dotfiles

Obligatory dotfiles repo
git clone git://git.danielmoch.com/dotfiles.git
Log | Files | Refs

commit 40b40a7cfc7bb30df3ee67228aeccc05bde72e3a
parent 3b43fb3d34aa9e92cdcc9ea56524b903fe3ba3bb
Author: Daniel Moch <daniel@danielmoch.com>
Date:   Sun,  8 Nov 2020 21:25:05 -0500

Scale down shell stuff

Diffstat:
M.profile | 64++++++++++++++++++++++++++++++----------------------------------
M.xsession | 28+++++++---------------------
Detc/awesome/rc.lua | 557-------------------------------------------------------------------------------
Detc/awesome/theme.lua | 69---------------------------------------------------------------------
Detc/dunst/dunstrc | 68--------------------------------------------------------------------
Detc/i3/config | 123-------------------------------------------------------------------------------
Detc/nncli/config | 48------------------------------------------------
Detc/pacman/makepkg.conf | 43-------------------------------------------
Detc/profile.d/01-brew.rc | 10----------
Detc/profile.d/01-brew.sh | 10----------
Detc/profile.d/01-cargo.rc | 4----
Detc/profile.d/01-cargo.sh | 1-
Detc/profile.d/10-browser.rc | 17-----------------
Detc/profile.d/10-browser.sh | 9---------
Detc/profile.d/10-editor.rc | 6------
Detc/profile.d/10-editor.sh | 11-----------
Detc/profile.d/10-env.sh | 5-----
Detc/profile.d/10-go.rc | 3---
Detc/profile.d/10-go.sh | 5-----
Detc/profile.d/10-gpg.rc | 11-----------
Detc/profile.d/10-gpg.sh | 9---------
Detc/profile.d/10-hostname.rc | 1-
Detc/profile.d/10-hostname.sh | 2--
Detc/profile.d/10-logname.rc | 6------
Detc/profile.d/10-logname.sh | 7-------
Detc/profile.d/10-pager.rc | 16----------------
Detc/profile.d/10-sh.sh | 6------
Detc/profile.d/10-visual.rc | 9---------
Detc/profile.d/10-visual.sh | 10----------
Detc/profile.d/10-xdg.rc | 3---
Detc/profile.d/10-xdg.sh | 4----
Detc/profile.d/99-my.rc | 4----
Detc/profile.d/99-my.sh | 1-
Metc/shrc | 31+++++++++++++++++++++++--------
Detc/shrc.d/cd.sh | 8--------
Detc/shrc.d/dotfiles.sh | 7-------
Detc/shrc.d/feh.sh | 5-----
Detc/shrc.d/gpg.sh | 5-----
Detc/shrc.d/num.sh | 3---
Detc/shrc.d/pager.sh | 23-----------------------
Detc/shrc.d/proj.sh | 7-------
Detc/shrc.d/ps1.sh | 8--------
Detc/shrc.d/rsync.sh | 5-----
Detc/shrc.d/ssh.sh | 6------
Detc/shrc.d/tmux.sh | 17-----------------
Detc/urlwatch/hooks.py | 178-------------------------------------------------------------------------------
Detc/urlwatch/urls.yaml | 55-------------------------------------------------------
Detc/urlwatch/urlwatch.yaml | 45---------------------------------------------
Detc/xsession.d/browser.sh | 8--------
Detc/xsession.d/xbindkeys.sh | 3---
Dlib/functions.rc.d/dotfiles.rc | 7-------
Dlib/functions.rc.d/editor.rc | 3---
Dlib/functions.rc.d/feh.rc | 3---
Dlib/functions.rc.d/num.rc | 3---
Dlib/functions.rc.d/proj.rc | 8--------
Dlib/functions.rc.d/rsync.rc | 17-----------------
Dlib/functions.rc.d/ssh.rc | 7-------
Dlib/functions.rc.d/tmux.rc | 15---------------
Mlib/profile | 45+++++++++++++++++++++++++--------------------
Dlib/terminfo/tmux-from-screen.terminfo | 7-------
Dlib/terminfo/tmux.terminfo | 7-------
61 files changed, 85 insertions(+), 1621 deletions(-)

diff --git a/.profile b/.profile @@ -1,35 +1,31 @@ -# -# ~/.profile -# -__addpath () -{ - if [ -d "$1" ] - then - case ":$PATH:" in - *:"$1":*) - ;; - *) - if [ -z "$2" ] - then - PATH="$PATH:$1" - else - PATH="$1:$PATH" - fi - esac - fi -} +PATH="$PATH:$HOME/bin"; export PATH +HOSTNAME=$(hostname | cut -d. -f1); export HOSTNAME +ENV="$HOME/etc/shrc"; export ENV +LANG=en_US.UTF-8; export LANG +FCEDIT=$EDITOR; export FCEDIT +XDG_CONFIG_HOME="$HOME/etc"; export XDG_CONFIG_HOME +XDG_CACHE_HOME="$HOME/var/cache"; export XDG_CACHE_HOME +XDG_DATA_HOME="$HOME/var"; export XDG_DATA_HOME +PYTHONUSERBASE="$HOME"; export PYTHONUSERBASE +GOPATH="$HOME"; export GOPATH +TMPDIR="$HOME/tmp"; export TMPDIR -for file in "$HOME"/etc/profile.d/*.sh -do - [ -r $file ] && . $file -done - -unset __addpath -export PATH - -if type my-init > /dev/null 2>&1 && [ ! -f "$HOME/._.djmoch" ] -then - my-init -fi - -my login +case $HOSTNAME in + carbon) + PLAN9=/usr/local/plan9; export PLAN9 + PATH="$PATH:$PLAN9/bin"; export PATH + BROWSER=w3m; export BROWSER + WWW_HOME=https://www.danielmoch.com; export WWW_HOME + EDITOR=ed; export EDITOR + FCEDIT=$EDITOR; export FCEDIT + unset SSH_AGENT_PID + SSH_AUTH_SOCK=`gpgconf --list-dirs agent-ssh-socket`; export SSH_AUTH_SOCK + PKG_PATH=https://cdn.openbsd.org/pub/OpenBSD/snapshots/packages/amd64; export PKG_PATH + HISTSIZE=1000; export HISTSIZE + HISTFILE="$HOME/.sh_history"; export HISTFILE + HISTCONTROL=erasedups; export HISTCONTROL + VISUAL=vise; export VISUAL + MOZ_ACCELERATED=1; export MOZ_ACCELERATED + wsconsctl mouse.reverse_scrolling=1 >/dev/null + ;; +esac diff --git a/.xsession b/.xsession @@ -1,28 +1,14 @@ #!/bin/sh -# -# ~/.xsession -# echo "Running $HOME/.xsession as PID $$" >&2 [ -r "$HOME/.Xresources.local" ] && xrdb -merge "$HOME/.Xresources.local" date +'%m/%d/%Y %H:%M:%S' >&2 env >&2 -if [ $# -eq 0 ] -then - for wm in $wm rio dwm awesome i3 twm - do - if type $wm > /dev/null 2>&1 - then - echo "Setting window manager to $wm" >&2 - set -- $wm - break - fi - done -fi +xset dpms 0 0 900 +setxkbmap -option -option ctrl:nocaps +screen.$HOSTNAME +xcompmgr & +plumber & +riostart & -for file in "$HOME"/etc/xsession.d/*.sh -do - [ -r $file ] && . $file -done - -exec "$@" +exec rc -l rio diff --git a/etc/awesome/rc.lua b/etc/awesome/rc.lua @@ -1,557 +0,0 @@ --- --- ~/etc/awesome/rc.lua --- - --- Standard awesome library -local gears = require("gears") -local awful = require("awful") -require("awful.autofocus") --- Widget and layout library -local wibox = require("wibox") --- Theme handling library -local beautiful = require("beautiful") --- Notification library -local naughty = require("naughty") -local menubar = require("menubar") -local hotkeys_popup = require("awful.hotkeys_popup").widget --- Enable hotkeys help widget for VIM and other apps --- when client with a matching name is opened: -require("awful.hotkeys_popup.keys") - --- {{{ Error handling --- Check if awesome encountered an error during startup and fell back to --- another config (This code will only ever execute for the fallback config) -if awesome.startup_errors then - naughty.notify({ preset = naughty.config.presets.critical, - title = "Oops, there were errors during startup!", - text = awesome.startup_errors }) -end - --- Handle runtime errors after startup -do - local in_error = false - awesome.connect_signal("debug::error", function (err) - -- Make sure we don't go into an endless error loop - if in_error then return end - in_error = true - - naughty.notify({ preset = naughty.config.presets.critical, - title = "Oops, an error happened!", - text = tostring(err) }) - in_error = false - end) -end --- }}} - --- {{{ Variable definitions --- Themes define colours, icons, font and wallpapers. -beautiful.init(gears.filesystem.get_dir("config") .. "theme.lua") - --- This is used later as the default terminal and editor to run. -terminal = "my term" -editor = os.getenv("EDITOR") or "nano" -editor_cmd = terminal .. " -e " .. editor - --- Default modkey. --- Usually, Mod4 is the key with a logo between Control and Alt. --- If you do not like this or do not have such a key, --- I suggest you to remap Mod4 to another key using xmodmap or other tools. --- However, you can use another modifier like Mod1, but it may interact with others. -modkey = "Mod4" - --- Table of layouts to cover with awful.layout.inc, order matters. -awful.layout.layouts = { - -- awful.layout.suit.floating, - awful.layout.suit.tile, - awful.layout.suit.tile.left, - awful.layout.suit.tile.bottom, - awful.layout.suit.tile.top, - awful.layout.suit.fair, - awful.layout.suit.fair.horizontal, - awful.layout.suit.spiral, - awful.layout.suit.spiral.dwindle, - awful.layout.suit.max, - awful.layout.suit.max.fullscreen, - awful.layout.suit.magnifier, - awful.layout.suit.corner.nw, - -- awful.layout.suit.corner.ne, - -- awful.layout.suit.corner.sw, - -- awful.layout.suit.corner.se, -} --- }}} - --- {{{ Helper functions -local function client_menu_toggle_fn() - local instance = nil - - return function () - if instance and instance.wibox.visible then - instance:hide() - instance = nil - else - instance = awful.menu.clients({ theme = { width = 250 } }) - end - end -end --- }}} - --- {{{ Menu --- Create a launcher widget and a main menu -myawesomemenu = { - { "hotkeys", function() return false, hotkeys_popup.show_help end}, - { "manual", terminal .. " -e man awesome" }, - { "edit config", editor_cmd .. " " .. awesome.conffile }, - { "restart", awesome.restart }, - { "quit", function() awesome.quit() end} -} - -mymainmenu = awful.menu({ items = { { "awesome", myawesomemenu, beautiful.awesome_icon }, - { "open terminal", terminal } - } - }) - -mylauncher = awful.widget.launcher({ image = beautiful.awesome_icon, - menu = mymainmenu }) - --- Menubar configuration -menubar.utils.terminal = terminal -- Set the terminal for applications that require it --- }}} - --- {{{ Wibar --- Create a status widget -mystatus = awful.widget.watch('my status', 15) - --- Create a wibox for each screen and add it -local taglist_buttons = gears.table.join( - awful.button({ }, 1, function(t) t:view_only() end), - awful.button({ modkey }, 1, function(t) - if client.focus then - client.focus:move_to_tag(t) - end - end), - awful.button({ }, 3, awful.tag.viewtoggle), - awful.button({ modkey }, 3, function(t) - if client.focus then - client.focus:toggle_tag(t) - end - end), - awful.button({ }, 4, function(t) awful.tag.viewnext(t.screen) end), - awful.button({ }, 5, function(t) awful.tag.viewprev(t.screen) end) - ) - -local tasklist_buttons = gears.table.join( - awful.button({ }, 1, function (c) - if c == client.focus then - c.minimized = true - else - -- Without this, the following - -- :isvisible() makes no sense - c.minimized = false - if not c:isvisible() and c.first_tag then - c.first_tag:view_only() - end - -- This will also un-minimize - -- the client, if needed - client.focus = c - c:raise() - end - end), - awful.button({ }, 3, client_menu_toggle_fn()), - awful.button({ }, 4, function () - awful.client.focus.byidx(1) - end), - awful.button({ }, 5, function () - awful.client.focus.byidx(-1) - end)) - -local function set_wallpaper(s) - -- Wallpaper - if beautiful.wallpaper then - local wallpaper = beautiful.wallpaper - -- If wallpaper is a function, call it with the screen - if type(wallpaper) == "function" then - wallpaper = wallpaper(s) - end - gears.wallpaper.maximized(wallpaper, s, true) - end -end - --- Re-set wallpaper when a screen's geometry changes (e.g. different resolution) -screen.connect_signal("property::geometry", set_wallpaper) - -awful.screen.connect_for_each_screen(function(s) - -- Each screen has its own tag table. - awful.tag( - {"1", "2", "3", "4", "5", "6", "7", "8", "9"}, - s, - awful.layout.suit.tile - ) - - awful.tag.find_by_name(s, "9").layout = awful.layout.suit.max.fullscreen - - -- Create a promptbox for each screen - s.mypromptbox = awful.widget.prompt() - -- Create an imagebox widget which will contain an icon indicating which layout we're using. - -- We need one layoutbox per screen. - s.mylayoutbox = awful.widget.layoutbox(s) - s.mylayoutbox:buttons(gears.table.join( - awful.button({ }, 1, function () awful.layout.inc( 1) end), - awful.button({ }, 3, function () awful.layout.inc(-1) end), - awful.button({ }, 4, function () awful.layout.inc( 1) end), - awful.button({ }, 5, function () awful.layout.inc(-1) end))) - -- Create a taglist widget - s.mytaglist = awful.widget.taglist(s, awful.widget.taglist.filter.all, taglist_buttons) - - -- Create a tasklist widget - s.mytasklist = awful.widget.tasklist(s, awful.widget.tasklist.filter.currenttags, tasklist_buttons) - - -- Create the wibox - s.mywibox = awful.wibar({ position = "top", screen = s }) - - -- Add widgets to the wibox - s.mywibox:setup { - layout = wibox.layout.align.horizontal, - { -- Left widgets - layout = wibox.layout.fixed.horizontal, - mylauncher, - s.mytaglist, - s.mypromptbox, - }, - s.mytasklist, -- Middle widget - { -- Right widgets - layout = wibox.layout.fixed.horizontal, - mystatus, - wibox.widget.systray(), - s.mylayoutbox, - }, - } -end) --- }}} - --- {{{ Mouse bindings -root.buttons(gears.table.join( - awful.button({ }, 3, function () mymainmenu:toggle() end) - -- awful.button({ }, 4, awful.tag.viewnext), - -- awful.button({ }, 5, awful.tag.viewprev) -)) --- }}} - --- {{{ Key bindings -globalkeys = gears.table.join( - awful.key({ modkey, }, "s", hotkeys_popup.show_help, - {description="show help", group="awesome"}), - awful.key({ modkey, }, "Left", awful.tag.viewprev, - {description = "view previous", group = "tag"}), - awful.key({ modkey, }, "Right", awful.tag.viewnext, - {description = "view next", group = "tag"}), - awful.key({ modkey, }, "Escape", awful.tag.history.restore, - {description = "go back", group = "tag"}), - awful.key({ modkey, }, "j", - function () - awful.client.focus.byidx( 1) - end, - {description = "focus next by index", group = "client"} - ), - awful.key({ modkey, }, "k", - function () - awful.client.focus.byidx(-1) - end, - {description = "focus previous by index", group = "client"} - ), - awful.key({ modkey, }, "w", function () mymainmenu:show() end, - {description = "show main menu", group = "awesome"}), - - -- Layout manipulation - awful.key({ modkey, "Shift" }, "j", function () awful.client.swap.byidx( 1) end, - {description = "swap with next client by index", group = "client"}), - awful.key({ modkey, "Shift" }, "k", function () awful.client.swap.byidx( -1) end, - {description = "swap with previous client by index", group = "client"}), - awful.key({ modkey, "Control" }, "j", function () awful.screen.focus_relative( 1) end, - {description = "focus the next screen", group = "screen"}), - awful.key({ modkey, "Control" }, "k", function () awful.screen.focus_relative(-1) end, - {description = "focus the previous screen", group = "screen"}), - awful.key({ modkey, }, "u", awful.client.urgent.jumpto, - {description = "jump to urgent client", group = "client"}), - awful.key({ modkey, }, "Tab", - function () - awful.client.focus.history.previous() - if client.focus then - client.focus:raise() - end - end, - {description = "go back", group = "client"}), - - -- Standard program - awful.key({ modkey, "Control" }, "r", awesome.restart, - {description = "reload awesome", group = "awesome"}), - awful.key({ "Mod1", "Control" }, "BackSpace", awesome.quit, - {description = "quit awesome", group = "awesome"}), - - awful.key({ modkey, "Mod1" }, "l", function () awful.tag.incmwfact( 0.05) end, - {description = "increase master width factor", group = "layout"}), - awful.key({ modkey, "Mod1" }, "h", function () awful.tag.incmwfact(-0.05) end, - {description = "decrease master width factor", group = "layout"}), - awful.key({ modkey, "Shift" }, "h", function () awful.tag.incnmaster( 1, nil, true) end, - {description = "increase the number of master clients", group = "layout"}), - awful.key({ modkey, "Shift" }, "l", function () awful.tag.incnmaster(-1, nil, true) end, - {description = "decrease the number of master clients", group = "layout"}), - awful.key({ modkey, "Control" }, "h", function () awful.tag.incncol( 1, nil, true) end, - {description = "increase the number of columns", group = "layout"}), - awful.key({ modkey, "Control" }, "l", function () awful.tag.incncol(-1, nil, true) end, - {description = "decrease the number of columns", group = "layout"}), - awful.key({ modkey, }, "space", function () awful.layout.inc( 1) end, - {description = "select next", group = "layout"}), - awful.key({ modkey, "Shift" }, "space", function () awful.layout.inc(-1) end, - {description = "select previous", group = "layout"}), - - awful.key({ modkey, "Control" }, "n", - function () - local c = awful.client.restore() - -- Focus restored client - if c then - client.focus = c - c:raise() - end - end, - {description = "restore minimized", group = "client"}), - - -- Prompt - awful.key({ modkey }, "r", function () awful.screen.focused().mypromptbox:run() end, - {description = "run prompt", group = "launcher"}), - - awful.key({ modkey }, "x", - function () - awful.prompt.run { - prompt = "Run Lua code: ", - textbox = awful.screen.focused().mypromptbox.widget, - exe_callback = awful.util.eval, - history_path = awful.util.get_cache_dir() .. "/history_eval" - } - end, - {description = "lua execute prompt", group = "awesome"}), - -- Menubar - awful.key({ modkey }, "p", function() menubar.show() end, - {description = "show the menubar", group = "launcher"}) -) - -clientkeys = gears.table.join( - awful.key({ modkey, }, "f", - function (c) - c.fullscreen = not c.fullscreen - c:raise() - end, - {description = "toggle fullscreen", group = "client"}), - awful.key({ modkey, }, "q", function (c) c:kill() end, - {description = "close", group = "client"}), - awful.key({ modkey, "Control" }, "space", awful.client.floating.toggle , - {description = "toggle floating", group = "client"}), - awful.key({ modkey, "Control" }, "Return", function (c) c:swap(awful.client.getmaster()) end, - {description = "move to master", group = "client"}), - awful.key({ modkey, }, "o", function (c) c:move_to_screen() end, - {description = "move to screen", group = "client"}), - awful.key({ modkey, }, "t", function (c) c.ontop = not c.ontop end, - {description = "toggle keep on top", group = "client"}), - awful.key({ modkey, }, "n", - function (c) - -- The client currently has the input focus, so it cannot be - -- minimized, since minimized clients can't have the focus. - c.minimized = true - end , - {description = "minimize", group = "client"}), - awful.key({ modkey, }, "m", - function (c) - c.maximized = not c.maximized - c:raise() - end , - {description = "(un)maximize", group = "client"}), - awful.key({ modkey, "Control" }, "m", - function (c) - c.maximized_vertical = not c.maximized_vertical - c:raise() - end , - {description = "(un)maximize vertically", group = "client"}), - awful.key({ modkey, "Shift" }, "m", - function (c) - c.maximized_horizontal = not c.maximized_horizontal - c:raise() - end , - {description = "(un)maximize horizontally", group = "client"}) -) - --- Bind all key numbers to tags. --- Be careful: we use keycodes to make it work on any keyboard layout. --- This should map on the top row of your keyboard, usually 1 to 9. -for i = 1, 9 do - globalkeys = gears.table.join(globalkeys, - -- View tag only. - awful.key({ modkey }, "#" .. i + 9, - function () - local screen = awful.screen.focused() - local tag = screen.tags[i] - if tag then - tag:view_only() - end - end, - {description = "view tag #"..i, group = "tag"}), - -- Toggle tag display. - awful.key({ modkey, "Control" }, "#" .. i + 9, - function () - local screen = awful.screen.focused() - local tag = screen.tags[i] - if tag then - awful.tag.viewtoggle(tag) - end - end, - {description = "toggle tag #" .. i, group = "tag"}), - -- Move client to tag. - awful.key({ modkey, "Shift" }, "#" .. i + 9, - function () - if client.focus then - local tag = client.focus.screen.tags[i] - if tag then - client.focus:move_to_tag(tag) - end - end - end, - {description = "move focused client to tag #"..i, group = "tag"}), - -- Toggle tag on focused client. - awful.key({ modkey, "Control", "Shift" }, "#" .. i + 9, - function () - if client.focus then - local tag = client.focus.screen.tags[i] - if tag then - client.focus:toggle_tag(tag) - end - end - end, - {description = "toggle focused client on tag #" .. i, group = "tag"}) - ) -end - -clientbuttons = gears.table.join( - awful.button({ }, 1, function (c) client.focus = c; c:raise() end), - awful.button({ modkey }, 1, awful.mouse.client.move), - awful.button({ modkey }, 3, awful.mouse.client.resize)) - --- Set keys -root.keys(globalkeys) --- }}} - --- {{{ Rules --- Rules to apply to new clients (through the "manage" signal). -awful.rules.rules = { - -- All clients will match this rule. - { rule = { }, - properties = { border_width = beautiful.border_width, - border_color = beautiful.border_normal, - focus = awful.client.focus.filter, - raise = true, - keys = clientkeys, - buttons = clientbuttons, - screen = awful.screen.preferred, - placement = awful.placement.no_overlap+awful.placement.no_offscreen - } - }, - - -- Floating clients. - { rule_any = { - instance = { - "DTA", -- Firefox addon DownThemAll. - "copyq", -- Includes session name in class. - }, - class = { - "Arandr", - "Gpick", - "Kruler", - "MessageWin", -- kalarm. - "Sxiv", - "Wpa_gui", - "pinentry", - "veromix", - "xtightvncviewer"}, - - name = { - "Event Tester", -- xev. - "xbindkeys_show", - "xfontsel" - }, - role = { - "AlarmWindow", -- Thunderbird's calendar. - "pop-up", -- e.g. Google Chrome's (detached) Developer Tools. - } - }, properties = { floating = true }}, - - -- Set Firefox to always map on the tag named "2" on screen 1. - -- { rule = { class = "Firefox" }, - -- properties = { screen = 1, tag = "2" } }, -} --- }}} - --- {{{ Signals --- Signal function to execute when a new client appears. -client.connect_signal("manage", function (c) - -- Set the windows at the slave, - -- i.e. put it at the end of others instead of setting it master. - -- if not awesome.startup then awful.client.setslave(c) end - - if awesome.startup and - not c.size_hints.user_position - and not c.size_hints.program_position then - -- Prevent clients from being unreachable after screen count changes. - awful.placement.no_offscreen(c) - end -end) - --- Add a titlebar if titlebars_enabled is set to true in the rules. -client.connect_signal("request::titlebars", function(c) - -- buttons for the titlebar - local buttons = gears.table.join( - awful.button({ }, 1, function() - client.focus = c - c:raise() - awful.mouse.client.move(c) - end), - awful.button({ }, 3, function() - client.focus = c - c:raise() - awful.mouse.client.resize(c) - end) - ) - - awful.titlebar(c, { size = beautiful.titlebar_height }) : setup { - { -- Left - -- awful.titlebar.widget.iconwidget(c), - buttons = buttons, - layout = wibox.layout.fixed.horizontal - }, - { -- Middle - { -- Title - align = "center", - widget = awful.titlebar.widget.titlewidget(c) - }, - buttons = buttons, - layout = wibox.layout.flex.horizontal - }, - { -- Right - awful.titlebar.widget.floatingbutton (c), - awful.titlebar.widget.maximizedbutton(c), - awful.titlebar.widget.stickybutton (c), - awful.titlebar.widget.ontopbutton (c), - awful.titlebar.widget.closebutton (c), - layout = wibox.layout.fixed.horizontal() - }, - layout = wibox.layout.align.horizontal - } -end) - --- Enable sloppy focus, so that focus follows mouse. -client.connect_signal("mouse::enter", function(c) - if awful.layout.get(c.screen) ~= awful.layout.suit.magnifier - and awful.client.focus.filter(c) then - client.focus = c - end -end) - -client.connect_signal("focus", function(c) c.border_color = beautiful.border_focus end) -client.connect_signal("unfocus", function(c) c.border_color = beautiful.border_normal end) --- }}} diff --git a/etc/awesome/theme.lua b/etc/awesome/theme.lua @@ -1,69 +0,0 @@ --- --- ~/etc/awesome/theme.lua --- -local theme_assets = require("beautiful.theme_assets") -local xresources = require("beautiful.xresources") -local xtheme = xresources.get_current_theme() -local dpi = xresources.apply_dpi - -local gfs = require("gears.filesystem") -local awful = require("awful") -local themes_path = gfs.get_themes_dir() - -local theme = dofile(themes_path.."default/theme.lua") - -theme.font = "sans 9" - -theme.bg_normal = xtheme.color8 -theme.bg_focus = xtheme.color7 -theme.bg_urgent = xtheme.color4 -theme.bg_minimize = xtheme.color0 -theme.bg_systray = xtheme.color8 - -theme.fg_normal = xtheme.background -theme.fg_focus = xtheme.foreground -theme.fg_urgent = xtheme.background -theme.fg_minimize = xtheme.background - -theme.useless_gap = dpi(0) -theme.border_width = dpi(1) -theme.border_normal = xtheme.color8 -theme.border_focus = xtheme.color4 -theme.border_marked = xtheme.color5 - -theme.hotkeys_bg = xtheme.color8 -theme.hotkeys_fg = xtheme.background -theme.hotkeys_modifiers_fg = xtheme.color6 - --- Generate taglist squares: -local taglist_square_size = dpi(4) -theme.taglist_squares_sel = theme_assets.taglist_squares_sel( - taglist_square_size, theme.fg_focus -) -theme.taglist_squares_unsel = theme_assets.taglist_squares_unsel( - taglist_square_size, theme.fg_normal -) - -theme = theme_assets.recolor_layout(theme, theme.fg_normal) -theme = theme_assets.recolor_titlebar(theme, theme.fg_normal, "normal") -theme = theme_assets.recolor_titlebar(theme, theme.bg_normal, "focus") - --- Variables set for theming the menu: -theme.menu_height = dpi(15) -theme.menu_width = dpi(100) - -theme.wallpaper = function (s) awful.spawn('my wallpaper') end - --- Generate Awesome icon: -theme.awesome_icon = theme_assets.awesome_icon( - theme.menu_height, theme.bg_focus, theme.fg_focus -) - -theme.wibar_height = dpi(16) -theme.titlebar_height = dpi(16) - --- Define the icon theme for application icons. If not set then the icons --- from /usr/share/icons and /usr/share/icons/hicolor will be used. -theme.icon_theme = "Arc" - -return theme diff --git a/etc/dunst/dunstrc b/etc/dunst/dunstrc @@ -1,68 +0,0 @@ -# -# ~/etc/dunst/dunstrc -# -[global] -monitor = 0 -follow = mouse -geometry = "300x5-30+20" -indicate_hidden = yes -shrink = no -transparency = 0 -notification_height = 0 -separator_height = 2 -padding = 8 -horizontal_padding = 8 -frame_width = 1 -frame_color = "#bcbcbc" -separator_color = frame -sort = yes -idle_threshold = 120 -font = Sans 9 -line_height = 0 -markup = full -format = "<b>%s</b>\n%b" -alignment = left -show_age_threshold = 60 -word_wrap = yes -ellipsize = middle -ignore_newline = no -stack_duplicates = true -hide_duplicate_count = false -show_indicators = yes -icon_position = off -max_icon_size = 32 -icon_path = /usr/share/icons/gnome/16x16/status/:/usr/share/icons/gnome/16x16/devices/ -sticky_history = yes -history_length = 20 -dmenu = /usr/bin/dmenu -p dunst: -browser = my-open -always_run_script = true -title = Dunst -class = Dunst -startup_notification = false -force_xinerama = false - -[experimental] -per_monitor_dpi = false - -[shortcuts] -close = ctrl+space -close_all = ctrl+shift+space -history = ctrl+grave -context = ctrl+shift+period - -[urgency_low] -background = "#262626" -foreground = "#bcbcbc" -timeout = 10 - -[urgency_normal] -background = "#262626" -foreground = "#bcbcbc" -timeout = 10 - -[urgency_critical] -background = "#af5f5f" -foreground = "#bcbcbc" -frame_color = "#ff0000" -timeout = 0 diff --git a/etc/i3/config b/etc/i3/config @@ -1,123 +0,0 @@ -set $mod Mod4 - -floating_modifier $mod - -# Theme -font pango:sans 9 - -# XRDB alias xrdb name default -set_from_resource $background i3wm.background #262626 -set_from_resource $foreground i3wm.foreground #BCBCBC -set_from_resource $color0 i3wm.color0 #1C1C1C -set_from_resource $color8 i3wm.color8 #444444 -set_from_resource $color1 i3wm.color1 #AF5F5F -set_from_resource $color9 i3wm.color9 #FF8700 -set_from_resource $color2 i3wm.color2 #5F875F -set_from_resource $color10 i3wm.color10 #87AF87 -set_from_resource $color3 i3wm.color3 #87875F -set_from_resource $color11 i3wm.color11 #FFFFAF -set_from_resource $color4 i3wm.color4 #5F87AF -set_from_resource $color12 i3wm.color12 #8FAFD7 -set_from_resource $color5 i3wm.color5 #5F5F87 -set_from_resource $color13 i3wm.color13 #8787AF -set_from_resource $color6 i3wm.color6 #5F8787 -set_from_resource $color14 i3wm.color14 #5FAFAF -set_from_resource $color7 i3wm.color7 #6C6C6C -set_from_resource $color15 i3wm.color15 #FFFFFF - -# class border backgr. text indicator child_border -client.focused $foreground $color7 $foreground $color7 $foreground -client.focused_inactive $foreground $color7 $foreground $color7 $foreground -client.unfocused $foreground $background $foreground $background $foreground -client.urgent $foreground $color3 $foreground $color3 $foreground -client.placeholder $foreground $background $foreground $background $foreground - -client.background $background - -# Key Bindings -bindsym $mod+q kill -bindsym $mod+r exec dmenu_run -bindsym $mod+p exec --no-startup-id i3-dmenu-desktop - -bindsym $mod+Control+h focus left -bindsym $mod+Control+j focus down -bindsym $mod+Control+k focus up -bindsym $mod+Control+l focus right -bindsym $mod+Shift+h move left -bindsym $mod+Shift+j move down -bindsym $mod+Shift+k move up -bindsym $mod+Shift+l move right - -bindsym $mod+| split h -bindsym $mod+- split v - -bindsym $mod+f fullscreen toggle - -bindsym $mod+s layout stacking -bindsym $mod+w layout tabbed -bindsym $mod+e layout toggle split -bindsym $mod+space floating toggle -bindsym $mod+shift+space focus mode_toggle - -bindsym $mod+a focus parent - -bindsym $mod+1 workspace 1 -bindsym $mod+2 workspace 2 -bindsym $mod+3 workspace 3 -bindsym $mod+4 workspace 4 -bindsym $mod+5 workspace 5 -bindsym $mod+6 workspace 6 -bindsym $mod+7 workspace 7 -bindsym $mod+8 workspace 8 -bindsym $mod+9 workspace 9 - -bindsym $mod+Shift+1 move container to workspace 1 -bindsym $mod+Shift+2 move container to workspace 2 -bindsym $mod+Shift+3 move container to workspace 3 -bindsym $mod+Shift+4 move container to workspace 4 -bindsym $mod+Shift+5 move container to workspace 5 -bindsym $mod+Shift+6 move container to workspace 6 -bindsym $mod+Shift+7 move container to workspace 7 -bindsym $mod+Shift+8 move container to workspace 8 -bindsym $mod+Shift+9 move container to workspace 9 - -bindsym $mod+Control+r restart - -# Rules -for_window [class="^pinentry$"] floating enable -for_window [title="^xbindkeys_show$"] floating enable -for_window [title="^xfontsel$"] floating enable -for_window [window_type="^popup_menu$"] floating enable -popup_during_fullscreen leave_fullscreen - -# Resize Mode -bindsym $mod+Mod1+r mode "resize" -mode "resize" { - bindsym j resize shrink width 10 px or 10 ppt - bindsym k resize grow height 10 px or 10 ppt - bindsym l resize shrink height 10 px or 10 ppt - bindsym semicolon resize grow width 10 px or 10 ppt - - bindsym Escape mode "default" -} -#}}} - -# i3bar -bar { - position top - tray_output primary - status_command eval my i3status - - colors { - background $background - statusline $foreground - separator $color8 - - # color border backgr. text - focused_workspace $foreground $color7 $foreground - active_workspace $color7 $background $foreground - inactive_workspace $background $background $color7 - urgent_workspace $foreground $color3 $foreground - binding_mode $foreground $color1 $foreground - } -} diff --git a/etc/nncli/config b/etc/nncli/config @@ -1,48 +0,0 @@ -[nncli] -cfg_nn_username=djmoch -cfg_nn_password_eval=my-netrc nextcloud.djmoch.org password -cfg_nn_host=nextcloud.djmoch.org -clr_default_fg=default -clr_default_bg=default -clr_status_bar_fg=white -clr_status_bar_bg=dark blue -clr_log_fg=black -clr_log_bg=brown -clr_user_input_bar_fg=default -clr_user_input_bar_bg=default -clr_note_focus_fg=black -clr_note_focus_bg=light gray -clr_note_title_day_fg=light blue -; clr_note_title_day_bg -clr_note_title_week_fg=dark green -; clr_note_title_week_bg -clr_note_title_month_fg=brown -; clr_note_title_month_bg -clr_note_title_year_fg=default -; clr_note_title_year_bg -clr_note_title_ancient_fg=dark red -; clr_note_title_ancient_bg -clr_note_date_fg=light blue -; clr_note_date_bg -; clr_note_flags_fg -; clr_note_flags_bg -clr_note_tags_fg=brown -; clr_note_tags_bg -; clr_note_content_fg -; clr_note_content_bg -clr_note_content_focus_fg=black -clr_note_content_focus_bg=light blue -clr_note_content_old_fg=light gray -clr_note_content_old_bg=default -clr_note_content_old_focus_fg=black -clr_note_content_old_focus_bg=light blue -clr_help_focus_fg=black -clr_help_focus_bg=light blue -; clr_help_header_fg -; clr_help_header_bg -; clr_help_config_fg -; clr_help_config_bg -; clr_help_value_fg -; clr_help_value_bg -; clr_help_descr_fg -; clr_help_descr_bg diff --git a/etc/pacman/makepkg.conf b/etc/pacman/makepkg.conf @@ -1,42 +0,0 @@ -######################################################################### -# BUILD ENVIRONMENT -######################################################################### -# -# Defaults: BUILDENV=(!distcc !color !ccache check !sign) -# A negated environment option will do the opposite of the comments below. -# -#-- distcc: Use the Distributed C/C++/ObjC compiler -#-- color: Colorize output messages -#-- ccache: Use ccache to cache compilation -#-- check: Run the check() function if present in the PKGBUILD -#-- sign: Generate PGP signature file -# -BUILDENV=(!distcc !color !ccache check sign) -# -#-- If using DistCC, your MAKEFLAGS will also need modification. In addition, -#-- specify a space-delimited list of hosts running in the DistCC cluster. -#DISTCC_HOSTS="" -# -#-- Specify a directory for package building. -#BUILDDIR=/tmp/makepkg - -######################################################################### -# PACKAGE OUTPUT -######################################################################### -# -# Default: put built package and cached source in build directory -# -#-- Destination: specify a fixed directory where all packages will be placed -#PKGDEST=/home/packages -#-- Source cache: specify a fixed directory where source files will be cached -#SRCDEST=/home/sources -#-- Source packages: specify a fixed directory where all src packages will be placed -#SRCPKGDEST=/home/srcpackages -#-- Log files: specify a fixed directory where all log files will be placed -#LOGDEST=/home/makepkglogs -#-- Packager: name/email of the person or organization building packages -PACKAGER="Daniel Moch <daniel@danielmoch.com>" -#-- Specify a key to use for package signing -GPGKEY="84BDDD43" -#-- File integrity checks to use. Valid: md5, sha1, sha256, sha384, sha512 -INTEGRITY_CHECK=(sha256)- \ No newline at end of file diff --git a/etc/profile.d/01-brew.rc b/etc/profile.d/01-brew.rc @@ -1,10 +0,0 @@ -if(which brew >/dev/null >[2=1]) { - HOMEBREW_NO_ANALYTICS=1 - HOMEBREW_NO_INSECURE_REDIRECT=1 - HOMEBREW_CASK_OPTS=(--require-sha --appdir=$hone/Applications) - HOMEBREW_NO_AUTO_UPDATE=1 - if(~ $path *^`{brew -prefix}/bin^*) {} - if not { - path=(`{brew --prefix}/bin $path) - } -} diff --git a/etc/profile.d/01-brew.sh b/etc/profile.d/01-brew.sh @@ -1,10 +0,0 @@ -if type brew > /dev/null 2>&1 -then - HOMEBREW_NO_ANALYTICS=1 - HOMEBREW_NO_INSECURE_REDIRECT=1 - HOMEBREW_CASK_OPTS=--require-sha\ --appdir="$HOME/Applications" - HOMEBREW_NO_AUTO_UPDATE=1 - export HOMEBREW_NO_ANALYTICS HOMEBREW_NO_INSECURE_REDIRECT - export HOMEBREW_CASK_OPTS HOMEBREW_NO_AUTO_UPDATE - __addpath "`brew --prefix`/bin" "before" -fi diff --git a/etc/profile.d/01-cargo.rc b/etc/profile.d/01-cargo.rc @@ -1,4 +0,0 @@ -if(~ $path *^$home/.cargo/bin^*) {} -if not { - path=($path $home/.cargo/bin) -} diff --git a/etc/profile.d/01-cargo.sh b/etc/profile.d/01-cargo.sh @@ -1 +0,0 @@ -__addpath "$HOME/.cargo/bin" diff --git a/etc/profile.d/10-browser.rc b/etc/profile.d/10-browser.rc @@ -1,17 +0,0 @@ -if(~ $#DISPLAY 0) { - if(which lynx >/dev/null >[2=1]) { - BROWSER=lynx - } - if(which w3m >/dev/null >[2=1]) { - BROWSER=w3m - WWW_HOME=https://www.danielmoch.com - } -} -if not { - if(which firefox >/dev/null >[2=1]) { - BROWSER=firefox - } - if(which firefox-esr >/dev/null >[2=1]) { - BROWSER=firefox-esr - } -} diff --git a/etc/profile.d/10-browser.sh b/etc/profile.d/10-browser.sh @@ -1,9 +0,0 @@ -if type w3m > /dev/null 2>&1 -then - BROWSER=w3m - WWW_HOME=https://www.danielmoch.com; export WWW_HOME -elif type lynx > /dev/null 2>&1 -then - BROWSER=lynx -fi -export BROWSER diff --git a/etc/profile.d/10-editor.rc b/etc/profile.d/10-editor.rc @@ -1,6 +0,0 @@ -if(~ $#DISPLAY 0) { - EDITOR=(sam -d) -} -if not { - EDITOR=E -} diff --git a/etc/profile.d/10-editor.sh b/etc/profile.d/10-editor.sh @@ -1,11 +0,0 @@ -if type sam > /dev/null 2>&1 -then - EDITOR='sam -d' -elif type ed > /dev/null 2>&1 -then - EDITOR=ed -else - EDITOR=ex -fi -FCEDIT=$EDITOR -export EDITOR FCEDIT diff --git a/etc/profile.d/10-env.sh b/etc/profile.d/10-env.sh @@ -1,5 +0,0 @@ -if [ -r "$HOME/etc/shrc" ] -then - ENV="$HOME/etc/shrc" - export ENV -fi diff --git a/etc/profile.d/10-go.rc b/etc/profile.d/10-go.rc @@ -1,3 +0,0 @@ -if(which go >/dev/null >[2=1]) { - GOPATH=$home -} diff --git a/etc/profile.d/10-go.sh b/etc/profile.d/10-go.sh @@ -1,5 +0,0 @@ -if type go > /dev/null 2>&1 -then - GOPATH="$HOME" - export GOPATH -fi diff --git a/etc/profile.d/10-gpg.rc b/etc/profile.d/10-gpg.rc @@ -1,11 +0,0 @@ -if(test -z $SSH_TTY && which gpgconf >/dev/null >[2=1]) { - if(test `{gpgconf --list-dirs agent-ssh-socket | wc -l} -eq 1) { - SSH_AGENT_PID=() - SSH_AUTH_SOCK=`{gpgconf --list-dirs agent-ssh-socket} - } -} - -if(which gpg-connect-agent >/dev/null >[2=1]) { - GPG_TTY=`{tty} - gpg-connect-agent updatestartuptty /bye >/dev/null >[2=1] -} diff --git a/etc/profile.d/10-gpg.sh b/etc/profile.d/10-gpg.sh @@ -1,9 +0,0 @@ -if [ -z "$SSH_TTY" ] && type gpgconf > /dev/null 2>&1 -then - if [ "`gpgconf --list-dirs agent-ssh-socket | wc -l`" -eq 1 ] - then - unset SSH_AGENT_PID - SSH_AUTH_SOCK=`gpgconf --list-dirs agent-ssh-socket` - export SSH_AUTH_SOCK - fi -fi diff --git a/etc/profile.d/10-hostname.rc b/etc/profile.d/10-hostname.rc @@ -1 +0,0 @@ -HOSTNAME=`{uname -n|cut -d. -f1} diff --git a/etc/profile.d/10-hostname.sh b/etc/profile.d/10-hostname.sh @@ -1,2 +0,0 @@ -HOSTNAME=$(uname -n|cut -d. -f1) -export HOSTNAME diff --git a/etc/profile.d/10-logname.rc b/etc/profile.d/10-logname.rc @@ -1,6 +0,0 @@ -if(logname >/dev/null >[2=1]) { - LOGNAME=`{logname} -} -if not { - LOGNAME=`{basename $home} -} diff --git a/etc/profile.d/10-logname.sh b/etc/profile.d/10-logname.sh @@ -1,7 +0,0 @@ -if logname > /dev/null 2>&1 -then - LOGNAME=$(logname) -else - LOGNAME=$(basename $HOME) -fi -export LOGNAME diff --git a/etc/profile.d/10-pager.rc b/etc/profile.d/10-pager.rc @@ -1,16 +0,0 @@ -if(test "$TERM" = "dumb") { - PAGER=nobs -} -if(~ $#PAGER 0 && which less >/dev/null >[2=1]) { - PAGER=less - LESS='-FMRqX#10' - if(which lesspipe >/dev/null >[2=1]) { - eval `{lesspipe} - } - if not { - LESSOPEN='|$home/.lessfilter %s' - } -} -if(~ $#PAGER 0) { - PAGER=more -} diff --git a/etc/profile.d/10-sh.sh b/etc/profile.d/10-sh.sh @@ -1,6 +0,0 @@ -MAIL=$HOME/Mail/dotcom/INBOX -MAILCHECK=1 -HISTSIZE=1000 -HISTFILE="$HOME/.sh_history" -HISTCONTROL=erasedups -export MAIL MAILCHECK HISTSIZE HISTCONTROL HISTFILE diff --git a/etc/profile.d/10-visual.rc b/etc/profile.d/10-visual.rc @@ -1,9 +0,0 @@ -if(~ $#DISPLAY 0) { - VISUAL=vi - if(which vis >/dev/null >[2=1]) { - VISUAL=vis - } - if(which vise >/dev/null >[2=1]) { - VISUAL=vise - } -} diff --git a/etc/profile.d/10-visual.sh b/etc/profile.d/10-visual.sh @@ -1,10 +0,0 @@ -if type vise >/dev/null 2>&1 -then - VISUAL=vise -elif type vis >/dev/null 2>&1 -then - VISUAL=vis -else - VISUAL=vi -fi -export VISUAL diff --git a/etc/profile.d/10-xdg.rc b/etc/profile.d/10-xdg.rc @@ -1,3 +0,0 @@ -XDG_CONFIG_HOME=$home/etc -XDG_CACHE_HOME=$home/var/cache -XDG_DATA_HOME=$home/var diff --git a/etc/profile.d/10-xdg.sh b/etc/profile.d/10-xdg.sh @@ -1,4 +0,0 @@ -XDG_CONFIG_HOME=$HOME/etc -XDG_CACHE_HOME=$HOME/var/cache -XDG_DATA_HOME=$HOME/var -export XDG_CONFIG_HOME XDG_CACHE_HOME XDG_DATA_HOME diff --git a/etc/profile.d/99-my.rc b/etc/profile.d/99-my.rc @@ -1,4 +0,0 @@ -if(~ $path *^$home/bin^*) {} -if not { - path=($home/bin $path) -} diff --git a/etc/profile.d/99-my.sh b/etc/profile.d/99-my.sh @@ -1 +0,0 @@ -__addpath "$HOME/bin" before diff --git a/etc/shrc b/etc/shrc @@ -1,13 +1,28 @@ -# -# ~/etc/shrc -# +set -o emacs + case $TERM in st*|rxvt*|xterm*|tmux*) printf "\033]0;$LOGNAME@$HOSTNAME\007" ;; esac -for file in "$HOME"/etc/shrc.d/*.sh -do - [ -r $file ] && . $file -done +if [ "$termprog" = "9term" -o "$termprog" = "win" ] +then + cd() { + [ -z "$1" ] && set -- "$HOME" + command cd "$1" && awd $HOSTNAME + } + awd $HOSTNAME +fi + +if type gpg-connect-agent > /dev/null 2>&1 +then + GPG_TTY=`tty`; export GPG_TTY + gpg-connect-agent updatestartuptty /bye > /dev/null 2>&1 +fi -unset -v file +if [ -n "$SSH_TTY" ] +then + PS1="${HOSTNAME}\$(if [ \$(id -u) -ne 0 ]; then echo \$; else echo \#; fi) " +else + PS1="\$(if [ \$(id -u) -ne 0 ]; then echo \$; else echo \#; fi) " +fi +export PS1 diff --git a/etc/shrc.d/cd.sh b/etc/shrc.d/cd.sh @@ -1,8 +0,0 @@ -if [ "$termprog" = "9term" -o "$termprog" = "win" ] -then - cd() { - [ -z "$1" ] && set -- "$HOME" - command cd "$1" && awd $HOSTNAME - } - awd $HOSTNAME -fi diff --git a/etc/shrc.d/dotfiles.sh b/etc/shrc.d/dotfiles.sh @@ -1,7 +0,0 @@ -dotfiles() { - git --git-dir="$HOME/.dotfiles" --work-tree="$HOME" "$@" -} - -dot() { - dotfiles "$@" -} diff --git a/etc/shrc.d/feh.sh b/etc/shrc.d/feh.sh @@ -1,5 +0,0 @@ -type feh > /dev/null 2>&1 || return - -feh() { - command feh --auto-rotate --scale-down "$@" -} diff --git a/etc/shrc.d/gpg.sh b/etc/shrc.d/gpg.sh @@ -1,5 +0,0 @@ -if type gpg-connect-agent > /dev/null 2>&1 -then - GPG_TTY=`tty`; export GPG_TTY - gpg-connect-agent updatestartuptty /bye > /dev/null 2>&1 -fi diff --git a/etc/shrc.d/num.sh b/etc/shrc.d/num.sh @@ -1,3 +0,0 @@ -num() { - pr -tn "$1" | $PAGER -} diff --git a/etc/shrc.d/pager.sh b/etc/shrc.d/pager.sh @@ -1,23 +0,0 @@ -if [ "$TERM" = "dumb" ] -then - if type nobs >/dev/null 2>&1 - then - PAGER=nobs - else - PAGER=cat - fi -elif type less >/dev/null 2>&1 -then - PAGER=less - LESS="-FMRqX#10"; export LESS - if type lesspipe >/dev/null 2>&1 - then - eval `lesspipe` - else - LESSOPEN="|$HOME/.lessfilter %s" - export LESSOPEN - fi -else - PAGER=more -fi -export PAGER diff --git a/etc/shrc.d/proj.sh b/etc/shrc.d/proj.sh @@ -1,7 +0,0 @@ -proj() { - if [ -d "$HOME/src/$1" ] - then - cd "$HOME/src/$1" - [ ! -r .env ] || . ./.env - fi -} diff --git a/etc/shrc.d/ps1.sh b/etc/shrc.d/ps1.sh @@ -1,8 +0,0 @@ -if [ -n "$SSH_TTY" ] -then - PS1="${HOSTNAME}\$(if [ \$(id -u) -ne 0 ]; then echo \$; else echo \#; fi) " -else - PS1="\$(if [ \$(id -u) -ne 0 ]; then echo \$; else echo \#; fi) " -fi - -export PS1 diff --git a/etc/shrc.d/rsync.sh b/etc/shrc.d/rsync.sh @@ -1,5 +0,0 @@ -type rsync > /dev/null 2>&1 || return - -rsync() { - command rsync -C --include=.git "$@" -} diff --git a/etc/shrc.d/ssh.sh b/etc/shrc.d/ssh.sh @@ -1,6 +0,0 @@ -ssh() { - command ssh "$@" - case $TERM in - xterm*|rxvt*|st*|tmux*) printf "\033]0;$LOGNAME@$HOSTNAME\007" ;; - esac -} diff --git a/etc/shrc.d/tmux.sh b/etc/shrc.d/tmux.sh @@ -1,17 +0,0 @@ -type tmux > /dev/null 2>&1 || return - -tas() { - tmux attach-session -t "$@" -} - -tns() { - tmux new-session -s "$@" -} - -tls() { - tmux list-sessions "$@" -} - -ts() { - tmux-session "$@" -} diff --git a/etc/urlwatch/hooks.py b/etc/urlwatch/hooks.py @@ -1,178 +0,0 @@ -# -# Example hooks file for urlwatch -# -# Copyright (c) 2008-2018 Thomas Perl <m@thp.io> -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# 3. The name of the author may not be used to endorse or promote products -# derived from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# - -import re - -from urlwatch import filters -from urlwatch import jobs -from urlwatch import reporters - -from bs4 import BeautifulSoup - -#class CustomLoginJob(jobs.UrlJob): -# """Custom login for my webpage""" -# -# __kind__ = 'custom-login' -# __required__ = ('username', 'password') -# -# def retrieve(self, job_state): -# return 'Would log in to {} with {} and {}\n'.format(self.url, self.username, self.password) - - -#class CaseFilter(filters.FilterBase): -# """Custom filter for changing case, needs to be selected manually""" -# -# __kind__ = 'case' -# -# def filter(self, data, subfilter=None): -# # The subfilter is specified using a colon, for example the "case" -# # filter here can be specified as "case:upper" and "case:lower" -# -# if subfilter is None: -# subfilter = 'upper' -# -# if subfilter == 'upper': -# return data.upper() -# elif subfilter == 'lower': -# return data.lower() -# else: -# raise ValueError('Unknown case subfilter: %r' % (subfilter,)) - - -#class IndentFilter(filters.FilterBase): -# """Custom filter for indenting, needs to be selected manually""" -# -# __kind__ = 'indent' -# -# def filter(self, data, subfilter=None): -# # The subfilter here is a number of characters to indent -# -# if subfilter is None: -# indent = 8 -# else: -# indent = int(subfilter) -# -# ret - -class GitHubFilter(filters.FilterBase): - """Search for new Github releases or tags""" - __kind__ = 'github' - - def filter(self, data, subfilter=None): - soup = BeautifulSoup(data, "html5lib") - - releases = soup.select('div.release-header div.f1 a') - - if releases: - results = [rel.text for rel in releases] - return '\n'.join(results) - - else: - fallback = soup.select('div.site') - return '\n'.join([str(tag) for tag in fallback]) - -class GitLabTagFilter(filters.FilterBase): - """Search for new Github releases or tags""" - __kind__ = 'gitlabtag' - - def filter(self, data, subfilter=None): - soup = BeautifulSoup(data, "html5lib") - - releases = soup.select('a.ref-name') - - if releases: - results = [rel.text for rel in releases] - return '\n'.join(results) - - else: - fallback = soup.select('div.site') - return '\n'.join([str(tag) for tag in fallback]) - -class PyPIFilter(filters.FilterBase): - """Search for new releases at pypi.python.org""" - __kind__ = 'pypi' - - def filter(self, data, subfilter=None): - soup = BeautifulSoup(data, "html5lib") - - downloads = soup.select('table.list tr > td > span > a:nth-of-type(1)') - if downloads: - downloads = [dl.text for dl in downloads] - return ''.join(downloads) - else: - return data - -class PyPIOrgFilter(filters.FilterBase): - """Search for new releases on PyPI (pypi.org)""" - __kind__ = 'pypiorg' - - def filter(self, data, subfilter=None): - soup = BeautifulSoup(data, "html5lib") - - releases = soup.find_all('p', class_='release__version') - if releases: - releases = [rel.text for rel in releases] - return ''.join(releases) - else: - return data - -class CustomMatchUrlFilter(filters.AutoMatchFilter): - # The AutoMatchFilter will apply automatically to all filters - # that have the given properties set - MATCH = {'url': 'http://example.org/'} - - def filter(self, data): - return data.replace('foo', 'bar') - -class CustomRegexMatchUrlFilter(filters.RegexMatchFilter): - # Similar to AutoMatchFilter - MATCH = {'url': re.compile('http://example.org/.*')} - - def filter(self, data): - return data.replace('foo', 'bar') - - -class CustomTextFileReporter(reporters.TextReporter): - """Custom reporter that writes the text-only report to a file""" - - __kind__ = 'custom_file' - - def submit(self): - with open(self.config['filename'], 'w') as fp: - fp.write('\n'.join(super().submit())) - - -class CustomHtmlFileReporter(reporters.HtmlReporter): - """Custom reporter that writes the HTML report to a file""" - - __kind__ = 'custom_html' - - def submit(self): - with open(self.config['filename'], 'w') as fp: - fp.write('\n'.join(super().submit())) diff --git a/etc/urlwatch/urls.yaml b/etc/urlwatch/urls.yaml @@ -1,55 +0,0 @@ -filter: pypiorg -kind: url -url: https://pypi.org/project/django-otp/#history ---- -filter: pypiorg -kind: url -url: https://pypi.org/project/python-forecastio/#history ---- -filter: github -kind: url -url: https://github.com/orakaro/rainbowstream/releases ---- -filter: pypiorg -kind: url -url: https://pypi.org/project/rainbowstream/#history ---- -filter: github -kind: url -url: https://github.com/soveran/clac/tags ---- -filter: pypiorg -kind: url -url: https://pypi.org/project/sphinx-autorun/#history ---- -filter: github -kind: url -url: https://github.com/tapanpandita/pocket/releases ---- -filter: pypiorg -kind: url -url: https://pypi.org/project/pytest-flakes/#history ---- -filter: pypiorg -kind: url -url: https://pypi.org/project/tootstream/#history ---- -filter: github -kind: url -url: https://github.com/vi/imlib2-heic/releases ---- -filter: github -kind: url -url: https://github.com/tootsuite/mastodon/releases ---- -filter: gitlabtag -kind: url -url: https://gitlab.com/mailman/mailman/-/tags ---- -filter: github -kind: url -url: https://github.com/halcy/Mastodon.py/releases ---- -filter: github -kind: url -url: https://github.com/vozlt/nginx-module-vts/releases diff --git a/etc/urlwatch/urlwatch.yaml b/etc/urlwatch/urlwatch.yaml @@ -1,45 +0,0 @@ -display: - error: true - new: true - unchanged: false -report: - email: - enabled: false - from: '' - html: false - method: smtp - sendmail: - path: sendmail - smtp: - host: localhost - keyring: true - port: 25 - starttls: true - subject: '{count} changes: {jobs}' - to: '' - html: - diff: unified - mailgun: - api_key: '' - domain: '' - enabled: false - from_mail: '' - from_name: '' - subject: '{count} changes: {jobs}' - to: '' - pushbullet: - api_key: '' - enabled: false - pushover: - app: '' - device: '' - enabled: false - sound: spacealarm - user: '' - stdout: - color: true - enabled: true - text: - details: true - footer: true - line_length: 75 diff --git a/etc/xsession.d/browser.sh b/etc/xsession.d/browser.sh @@ -1,7 +0,0 @@ -if type surf > /dev/null 2>&1 -then - BROWSER=surf -else - BROWSER=firefox -fi -export BROWSER- \ No newline at end of file diff --git a/etc/xsession.d/xbindkeys.sh b/etc/xsession.d/xbindkeys.sh @@ -1,3 +0,0 @@ -type xbindkeys > /dev/null 2>&1 || return -[ "$wm" = "rio" ] && return -xbindkeys diff --git a/lib/functions.rc.d/dotfiles.rc b/lib/functions.rc.d/dotfiles.rc @@ -1,7 +0,0 @@ -fn dotfiles { - git --git-dir=$home/.dotfiles --work-tree=$home $* -} - -fn dot { - dotfiles $* -} diff --git a/lib/functions.rc.d/editor.rc b/lib/functions.rc.d/editor.rc @@ -1,3 +0,0 @@ -fn e { - $EDITOR $* -} diff --git a/lib/functions.rc.d/feh.rc b/lib/functions.rc.d/feh.rc @@ -1,3 +0,0 @@ -fn feh { - `{which feh} --auto-rotate --scale-down $* -} diff --git a/lib/functions.rc.d/num.rc b/lib/functions.rc.d/num.rc @@ -1,3 +0,0 @@ -fn num { - pr -tn $*(1) | $PAGER -} diff --git a/lib/functions.rc.d/proj.rc b/lib/functions.rc.d/proj.rc @@ -1,8 +0,0 @@ -fn proj { - if(test -d $home/src/$*(1)) { - cd $home/src/$*(1) - if(test -r .env) { - . ./.env - } - } -} diff --git a/lib/functions.rc.d/rsync.rc b/lib/functions.rc.d/rsync.rc @@ -1,17 +0,0 @@ -fn rsync { - if(which openrsync >/dev/null >[2=1]) { - rsync=openrsync - } - if(~ $#rsync 0 && which rsync >/dev/null >[2=1]) { - rsync=rsync - } - - switch($rsync) { - case openrsync - `{which openrsync} --rsync-path=`{which openrsync} $* - case rsync - `{which rsync} -C --include=.git $* - case * - echo 'rsync: No such file or directory' - } -} diff --git a/lib/functions.rc.d/ssh.rc b/lib/functions.rc.d/ssh.rc @@ -1,7 +0,0 @@ -fn ssh { - `{which ssh} $* - switch($TERM) { - case xterm* rxvt* st* tmux* - printf '\033]0;%s@%s\007' $LOGNAME $HOSTNAME - } -} diff --git a/lib/functions.rc.d/tmux.rc b/lib/functions.rc.d/tmux.rc @@ -1,15 +0,0 @@ -fn tas { - tmux attach-session -t $* -} - -fn tns { - tmux new-session -s $* -} - -fn tls { - tmux list-sessions $* -} - -fn ts { - tmux-session $* -} diff --git a/lib/profile b/lib/profile @@ -1,23 +1,28 @@ -# -# $home/lib/profile -# +fn %{ $* } +font=/lib/font/bit/lucsans/unicode.7.font +PATH=$PATH:$home/bin +HOSTNAME=`{hostname | cut -d. -f1} +LANG=en_US.UTF-8 +XDG_CONFIG_HOME=$home/etc +XDG_CACHE_HOME=$home/var/cache +XDG_DATA_HOME=$home/var +PYTHONUSERBASE=$home +GOPATH=$home +TMPDIR=$home/tmp -if(which my-init >/dev/null >[2=1] && test ! -f $home/._.djmoch) { - my-init -} - -for(file in $home/etc/profile.d/*.rc) { - if(test -r $file) { - . $file +switch($HOSTNAME) { +case carbon + PLAN9=/usr/local/plan9 + PATH=$PATH:$PLAN9/bin + BROWSER=firefox-esr + EDITOR=E + PAGER=nobs + SSH_AGENT_PID=() + SSH_AUTH_SOCK=`{gpgconf --list-dirs agent-ssh-socket} + PKG_PATH=https://cdn.openbsd.org/pub/OpenBSD/snapshots/packages/amd64 + MOZ_ACCELERATED=1 + wsconsctl mouse.reverse_scrolling=1 >/dev/null + if(~ $#DISPLAY 0) { + exec startx } } - -for(file in $HOME/lib/functions.rc.d/*.rc) { - if(test -r $file) { - . $file - } -} - -if(~ $#DISPLAY 0) { - my login -} diff --git a/lib/terminfo/tmux-from-screen.terminfo b/lib/terminfo/tmux-from-screen.terminfo @@ -1,7 +0,0 @@ -xterm-256color|xterm with italics support, - ritm=\E[23m, sitm=\E[3m, - use=xterm-256color, - -tmux-256color|tmux with 256 colors, - ritm=\E[23m, rmso=\E[27m, sitm=\E[3m, smso=\E[7m, flash=^G, - use=screen-256color, diff --git a/lib/terminfo/tmux.terminfo b/lib/terminfo/tmux.terminfo @@ -1,7 +0,0 @@ -xterm-256color|xterm with italics support, - ritm=\E[23m, sitm=\E[3m, - use=xterm-256color, - -tmux-256color|tmux with 256 colors, - ritm=\E[23m, rmso=\E[27m, sitm=\E[3m, smso=\E[7m, flash=^G, - use=tmux-256color,