diff options
-rw-r--r-- | .config/Synergy/Synergy.conf | 118 | ||||
-rw-r--r-- | .config/X11/modmap | 21 | ||||
-rw-r--r-- | .config/bash/rc.d/10_aliases.sh | 8 | ||||
-rw-r--r-- | .config/dconf/user.txt | 265 | ||||
-rw-r--r-- | .config/emacs/custom.el | 3 | ||||
-rw-r--r-- | .config/emacs/init.el | 36 | ||||
-rw-r--r-- | .config/ssh/config | 11 | ||||
-rw-r--r-- | .config/systemd/user/onboard@.service | 12 | ||||
l--------- | .config/systemd/user/wmii@.service.wants/onboard@.service | 1 | ||||
l--------- | .config/systemd/user/wmii@.service.wants/rbar@98_wifi.service | 1 | ||||
l--------- | .config/systemd/user/wmii@.service.wants/redshift@.service | 1 | ||||
l--------- | .config/systemd/user/wmii@.service.wants/x0vncserver@.service | 1 | ||||
-rw-r--r-- | .config/wmii-hg/config.sh | 32 | ||||
-rw-r--r-- | .config/wmii-hg/ctl-init | 2 | ||||
-rwxr-xr-x | .config/wmii-hg/rbar_acpi | 3 | ||||
-rwxr-xr-x | .config/wmii-hg/rbar_clock | 2 | ||||
-rwxr-xr-x | .config/wmii-hg/rbar_wifi | 11 | ||||
-rw-r--r-- | .config/wmii-hg/rules | 1 | ||||
-rw-r--r-- | .config/wmii-hg/workarounds.sh | 20 | ||||
-rwxr-xr-x | .local/bin/backlight | 20 | ||||
-rwxr-xr-x | .local/bin/config-path | 1 | ||||
-rwxr-xr-x | .local/bin/iwdata | 8 | ||||
-rwxr-xr-x | .local/bin/xrotate | 119 |
23 files changed, 457 insertions, 240 deletions
diff --git a/.config/Synergy/Synergy.conf b/.config/Synergy/Synergy.conf new file mode 100644 index 0000000..0835cfc --- /dev/null +++ b/.config/Synergy/Synergy.conf @@ -0,0 +1,118 @@ +[General] +activateEmail= +autoConfig=true +autoConfigPrompted=true +autoHide=true +configFile=/home/lukeshu-parabola/synergy.conf +cryptoEnabled=false +edition=2 +elevateMode=false +groupClientChecked=false +groupServerChecked=true +interface= +language=en +logFilename=/var/log/synergy.log +logLevel=3 +logToFile=false +port=24800 +screenName=lukeshu-gluglugt60 +serverHostname= +startedBefore=true +useExternalConfig=false +useInternalConfig=true +userToken= +wizardLastRun=7 + +[internalConfig] +hasHeartbeat=false +hasSwitchDelay=false +hasSwitchDoubleTap=false +heartbeat=5000 +hotkeys\size=0 +ignoreAutoConfigClient=false +numColumns=5 +numRows=3 +relativeMouseMoves=false +screenSaverSync=true +screens\1\name= +screens\10\name= +screens\11\name= +screens\12\name= +screens\13\name= +screens\14\name= +screens\15\name= +screens\2\name= +screens\3\name= +screens\4\name= +screens\5\name= +screens\6\name= +screens\7\aliasArray\size=0 +screens\7\fixArray\1\fix=false +screens\7\fixArray\2\fix=false +screens\7\fixArray\3\fix=false +screens\7\fixArray\4\fix=false +screens\7\fixArray\size=4 +screens\7\modifierArray\1\modifier=0 +screens\7\modifierArray\2\modifier=1 +screens\7\modifierArray\3\modifier=2 +screens\7\modifierArray\4\modifier=3 +screens\7\modifierArray\5\modifier=4 +screens\7\modifierArray\6\modifier=5 +screens\7\modifierArray\size=6 +screens\7\name=build64-par +screens\7\switchCornerArray\1\switchCorner=false +screens\7\switchCornerArray\2\switchCorner=false +screens\7\switchCornerArray\3\switchCorner=false +screens\7\switchCornerArray\4\switchCorner=false +screens\7\switchCornerArray\size=4 +screens\7\switchCornerSize=0 +screens\8\aliasArray\size=0 +screens\8\fixArray\1\fix=false +screens\8\fixArray\2\fix=false +screens\8\fixArray\3\fix=false +screens\8\fixArray\4\fix=false +screens\8\fixArray\size=4 +screens\8\modifierArray\1\modifier=0 +screens\8\modifierArray\2\modifier=1 +screens\8\modifierArray\3\modifier=2 +screens\8\modifierArray\4\modifier=3 +screens\8\modifierArray\5\modifier=4 +screens\8\modifierArray\6\modifier=5 +screens\8\modifierArray\size=6 +screens\8\name=lukeshu-gluglugt60 +screens\8\switchCornerArray\1\switchCorner=false +screens\8\switchCornerArray\2\switchCorner=false +screens\8\switchCornerArray\3\switchCorner=false +screens\8\switchCornerArray\4\switchCorner=false +screens\8\switchCornerArray\size=4 +screens\8\switchCornerSize=0 +screens\9\aliasArray\size=0 +screens\9\fixArray\1\fix=false +screens\9\fixArray\2\fix=false +screens\9\fixArray\3\fix=false +screens\9\fixArray\4\fix=false +screens\9\fixArray\size=4 +screens\9\modifierArray\1\modifier=0 +screens\9\modifierArray\2\modifier=1 +screens\9\modifierArray\3\modifier=2 +screens\9\modifierArray\4\modifier=3 +screens\9\modifierArray\5\modifier=4 +screens\9\modifierArray\6\modifier=5 +screens\9\modifierArray\size=6 +screens\9\name=android +screens\9\switchCornerArray\1\switchCorner=false +screens\9\switchCornerArray\2\switchCorner=false +screens\9\switchCornerArray\3\switchCorner=false +screens\9\switchCornerArray\4\switchCorner=false +screens\9\switchCornerArray\size=4 +screens\9\switchCornerSize=0 +screens\size=15 +switchCornerArray\1\switchCorner=false +switchCornerArray\2\switchCorner=false +switchCornerArray\3\switchCorner=false +switchCornerArray\4\switchCorner=false +switchCornerArray\size=4 +switchCornerSize=16 +switchDelay=250 +switchDoubleTap=250 +win32KeepForeground=false diff --git a/.config/X11/modmap b/.config/X11/modmap index b332204..d97c134 100644 --- a/.config/X11/modmap +++ b/.config/X11/modmap @@ -1,14 +1,21 @@ ! -*- Mode: Xmodmap -*- -! My desktop doesn't have a super key, so I map Caps_Lock to Super_L +! Notes on the syntax: +! - The RHS of keycode/keysym commands is: +! normal [Shift [Mode_switch [Shift+Mode_switch]]] +! - The modifiers are (non-caps sensitive): +! 0: Shift +! 1: Lock +! 2: Control +! 3-7: Mod{1-5} + +! My desktop doesn't have a super key, so I map Caps_Lock to Hyper_L ! Also, use Caps_Lock for the compose key remove lock = Caps_Lock -keysym Caps_Lock = Super_L Multi_key +keysym Caps_Lock = Hyper_L Multi_key ! All of these are my "super". Silly I have so many... clear mod4 -add mod4 = Super_L Super_R Hyper_L Hyper_R Menu - - -! Note to future me: -! The modifiers are: << Shift, Lock, Control, Mod{1..5} >> and are NOT case sensitive +add mod4 = Super_L Super_R Hyper_L Hyper_R +clear mod5 +add mod5 = Menu diff --git a/.config/bash/rc.d/10_aliases.sh b/.config/bash/rc.d/10_aliases.sh index 2e28a5d..8499bde 100644 --- a/.config/bash/rc.d/10_aliases.sh +++ b/.config/bash/rc.d/10_aliases.sh @@ -100,9 +100,12 @@ alias l='ls -CF' alias tree='tree --charset utf8' alias cd=pushd alias gitk='gitk --all --date-order' -alias userctl='systemctl --user' alias mv='mv -i' +alias userctl='systemctl --user' +alias journalctl='journalctl --no-hostname' # I know what host I'm on +alias datetimectl=timedatectl # I forget which it is + ###################################################################### # These are actually functions :P # ###################################################################### @@ -175,3 +178,6 @@ jarmain() { grep -E '(^[a-z]|public static void main\(java\.lang\.String\[\]\))' | grep -B1 '^ ' } +calc() { + bc <<<"$*" +} diff --git a/.config/dconf/user.txt b/.config/dconf/user.txt index 48a55eb..a041066 100644 --- a/.config/dconf/user.txt +++ b/.config/dconf/user.txt @@ -1,200 +1,69 @@ -[org/mate/terminal/profiles/default] -background-color='#FFFFFFFFDDDD' -login-shell=true -palette='#2E2E34343636:#CCCC00000000:#4E4E9A9A0606:#C4C4A0A00000:#34346565A4A4:#757550507B7B:#060698209A9A:#D3D3D7D7CFCF:#555557575353:#EFEF29292929:#8A8AE2E23434:#FCFCE9E94F4F:#72729F9FCFCF:#ADAD7F7FA8A8:#3434E2E2E2E2:#EEEEEEEEECEC' -bold-color='#000000000000' -foreground-color='#000000000000' -visible-name='Default' - -[org/mate/eom/ui] -image-collection=false -sidebar=false - -[org/mate/engrampa/listing] -sort-method='name' -name-column-width=250 -sort-type='ascending' -list-mode='as-folder' -show-path=false - -[org/mate/engrampa/ui] -sidebar-width=200 -window-height=480 -window-width=600 - -[org/mate/volume-control] -window-height=886 -window-width=1706 - -[org/mate/screenshot] -include-pointer=true -include-border=true -border-effect='none' -delay=0 - -[org/mate/desktop/peripherals/keyboard] -numlock-state='off' - -[org/mate/desktop/accessibility/keyboard] -slowkeys-beep-press=true -mousekeys-accel-time=1200 -bouncekeys-beep-reject=true -slowkeys-beep-reject=false -togglekeys-enable=false -enable=false -bouncekeys-enable=false -stickykeys-enable=false -feature-state-change-beep=false -slowkeys-beep-accept=true -bouncekeys-delay=300 -mousekeys-max-speed=750 -mousekeys-enable=false -timeout-enable=false -slowkeys-delay=300 -stickykeys-modifier-beep=true -stickykeys-two-key-off=true -mousekeys-init-delay=160 -timeout=120 -slowkeys-enable=false - -[org/mate/desktop/background] -color-shading-type='solid' -primary-color='#a1a184845c5c' -picture-options='wallpaper' -picture-filename='' -secondary-color='#3c3c8f8f2525' - -[org/mate/desktop/font-rendering] -antialiasing='grayscale' -dpi=95.0 -hinting='full' - -[org/mate/desktop/session] -session-start=1443192888 - -[org/mate/pluma/plugins/filebrowser/on-load] -virtual-root='file:///tmp' -tree-view=true -root='file:///' - -[org/mate/pluma] -statusbar-visible=true - -[org/mate/marco/general] -mouse-button-modifier='<Super>' -side-by-side-tiling=true -focus-mode='click' -theme='Purdue' - -[org/mate/panel/general] -show-program-list=true -toplevel-id-list=['top', 'bottom'] -history-mate-run=['/homes/shumakl/.prefix.x86_64/bin/urxvt', '/bin/bash --noprofile --norc', 'mate-terminal /bin/sh', 'vncviewer', 'gimp', 'emacs', 'killall emacs', 'urxvt', 'mate-terminal bash --noprofile --norc', 'mate-terminal'] -object-id-list=['menu-bar', 'separator', 'terminal', 'web-browser', 'notification-area', 'clock', 'window-menu', 'show-desktop', 'window-list', 'workspace-switcher', 'object_0'] - -[org/mate/panel/toplevels/bottom] -expand=true -orientation='bottom' -screen=0 -y-bottom=0 -size=24 -y=1055 - -[org/mate/panel/toplevels/top] -expand=true -orientation='top' -screen=0 -size=24 - -[org/mate/panel/objects/workspace-switcher] -applet-iid='WnckletFactory::WorkspaceSwitcherApplet' -locked=true -toplevel-id='bottom' -position=0 -object-type='applet' -panel-right-stick=true - -[org/mate/panel/objects/clock] -applet-iid='ClockAppletFactory::ClockApplet' -locked=true -toplevel-id='top' -position=5 -object-type='applet' -panel-right-stick=true - -[org/mate/panel/objects/clock/prefs] -format='12-hour' -custom-format='' - -[org/mate/panel/objects/object_0] -launcher-location='v-editor.desktop' -toplevel-id='top' -position=296 -object-type='launcher' -panel-right-stick=false - -[org/mate/panel/objects/separator] -locked=true -toplevel-id='top' -position=5 -object-type='separator' - -[org/mate/panel/objects/menu-bar] -locked=true -toplevel-id='top' -position=0 -object-type='menu-bar' - -[org/mate/panel/objects/window-menu] -applet-iid='WnckletFactory::WindowMenuApplet' -locked=true -toplevel-id='top' -position=0 -object-type='applet' -panel-right-stick=true - -[org/mate/panel/objects/window-list] -applet-iid='WnckletFactory::WindowListApplet' -locked=true -toplevel-id='bottom' -position=20 -object-type='applet' - -[org/mate/panel/objects/notification-area] -applet-iid='NotificationAreaAppletFactory::NotificationArea' -locked=true -toplevel-id='top' -position=10 -object-type='applet' -panel-right-stick=true - -[org/mate/panel/objects/show-desktop] -applet-iid='WnckletFactory::ShowDesktopApplet' -locked=true -toplevel-id='bottom' -position=0 -object-type='applet' - -[org/mate/panel/objects/web-browser] -locked=true -launcher-location='/usr/share/applications/firefox.desktop' -toplevel-id='top' -position=10 -object-type='launcher' - -[org/mate/panel/objects/terminal] -locked=true -launcher-location='urxvt.desktop' -toplevel-id='top' -position=10 -object-type='launcher' - -[org/mate/caja/window-state] -start-with-sidebar=true -geometry='800x550+312+123' -start-with-status-bar=true -maximized=true -start-with-toolbar=true +[org/onboard/auto-show] +enabled=false + +[org/onboard/keyboard] +show-click-buttons=true + +[org/onboard] +current-settings-page=1 +use-system-defaults=false +theme='/usr/share/onboard/themes/Nightshade.theme' +system-theme-associations={'LowContrast': 'LowContrast', 'oxygen-gtk': '/usr/share/onboard/themes/Nightshade.theme', 'Default': '', 'HighContrast': 'HighContrast', 'HighContrastInverse': 'HighContrastInverse'} +start-minimized=true +layout='/home/lukeshu-parabola/.local/share/onboard/layouts/LukeShu.onboard' +schema-version='2.3' +snippets=['0:Onboard\\\\nHome:https\\://launchpad.net/onboard', '1:Example:Create your macros here.'] +status-icon-provider='auto' + +[org/onboard/theme-settings] +key-size=94.0 +key-stroke-width=0.0 +key-gradient-direction=-3.0 +color-scheme='/usr/share/onboard/themes/Charcoal.colors' +key-fill-gradient=8.0 +key-style='gradient' +background-gradient=0.0 +key-stroke-gradient=8.0 +key-label-font='' +key-shadow-strength=0.0 +key-shadow-size=0.0 +roundrect-radius=20.0 + +[org/onboard/typing-assistance/word-suggestions] +enabled=false + +[org/onboard/window] +docking-enabled=true +window-handles='' + +[org/onboard/window/landscape] +width=663 +dock-expand=true +x=0 +y=0 + +[org/onboard/scanner] +enabled=false + +[org/gtk/settings/file-chooser] +sort-column='name' +sidebar-width=156 +window-position=(83, 40) +show-size-column=true +show-hidden=false +window-size=(858, 622) +sort-directories-first=false +date-format='regular' +sort-order='ascending' +location-mode='path-bar' [org/mate/atril/default] -window-ratio=(3.1209150326797386, 1.2676767676767677) +continuous=true +fullscreen=false +show-toolbar=true +show-sidebar=false +inverted-colors=false +sidebar-page='links' +sidebar-size=132 +dual-page=false +sizing-mode='free' diff --git a/.config/emacs/custom.el b/.config/emacs/custom.el index ac20ba1..04c1bec 100644 --- a/.config/emacs/custom.el +++ b/.config/emacs/custom.el @@ -33,9 +33,6 @@ (quote ("xelatex -interaction nonstopmode -output-directory %o %f" "xelatex -interaction nonstopmode -output-directory %o %f" "xelatex -interaction nonstopmode -output-directory %o %f"))) '(org-src-fontify-natively t) - '(package-selected-packages - (quote - (wanderlust yaml-mode scss-mode nginx-mode markdown-mode less-css-mode haml-mode graphviz-dot-mode go-mode glsl-mode php-mode php-mode-improved coffee-mode bison-mode smart-tabs-mode page-break-lines dtrt-indent))) '(ruby-deep-arglist nil) '(ruby-deep-indent-paren nil) '(safe-local-variable-values diff --git a/.config/emacs/init.el b/.config/emacs/init.el index b7ee6df..200daad 100644 --- a/.config/emacs/init.el +++ b/.config/emacs/init.el @@ -2,19 +2,21 @@ ;; Hey, Emacs: -*- Indent-tabs-mode: nil -*- ;; Without (advice-add) it should work in older versions of Emacs 24. ;;;; Use XDG-ish locations ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -(setq xdg-cache-home (file-name-as-directory (or (getenv "XDG_CACHE_HOME") "~/.cache"))) -(setq - package-user-dir (concat xdg-cache-home "emacs/elpa") - ido-save-directory-list-file (concat xdg-cache-home "emacs/ido.last.el") - el-get-dir (concat xdg-cache-home "emacs/el-get/") - eshell-directory-name (concat xdg-cache-home "emacs/eshell/") - wl-score-files-directory (concat xdg-cache-home "emacs/wl-score-files/") - elmo-msgdb-directory (concat xdg-cache-home "emacs/elmo-msgdb/") - elmo-cache-directory (concat xdg-cache-home "emacs/elmo-cache/") - auto-save-list-file-prefix (concat xdg-cache-home "emacs/auto-save-list/saves-") - tramp-persistency-file-name (concat xdg-cache-home "emacs/tramp-cache.el") - wl-init-file (concat user-emacs-directory "wl.el") - ) +(let ((xdg-cache-home (file-name-as-directory (or (getenv "XDG_CACHE_HOME") "~/.cache"))) + (xdg-data-home (file-name-as-directory (or (getenv "XDG_DATA_HOME") "~/.local/share")))) + (setq + wl-init-file (concat user-emacs-directory "wl.el") + eshell-directory-name (concat xdg-data-home "emacs/eshell/") ;; actually should be split between config and data + ido-save-directory-list-file (concat xdg-data-home "emacs/ido.last.el") + + package-user-dir (concat xdg-cache-home "emacs/elpa") + el-get-dir (concat xdg-cache-home "emacs/el-get/") + wl-score-files-directory (concat xdg-cache-home "emacs/wl-score-files/") + elmo-msgdb-directory (concat xdg-cache-home "emacs/elmo-msgdb/") + elmo-cache-directory (concat xdg-cache-home "emacs/elmo-cache/") + auto-save-list-file-prefix (concat xdg-cache-home "emacs/auto-save-list/saves-") + tramp-persistency-file-name (concat xdg-cache-home "emacs/tramp-cache.el") + )) (setq custom-file (concat user-emacs-directory "custom.el")) (load custom-file 'noerror) @@ -71,6 +73,7 @@ (smart-tabs-mode 1) (apply 'smart-tabs-insinuate (mapcar 'car smart-tabs-insinuate-alist)))) +(use-package editorconfig) ;; Major modes (use-package bison-mode :mode (("\\.l\\'" . bison-mode) @@ -95,7 +98,7 @@ ;; '(lambda () ;; (c-set-offset 'cpp-macro 0) ;; ))) -(use-package php-mode :mode ("\\.php[s345t]?\\'" "/\\.php_cs\\(\\.dist\\)?\\'" "\\.phtml\\'" "/Amkfile\\'" "\\.amk\\'")) +(use-package cmake-mode :mode ("CMakeLists\\.txt\\'" "\\.cmake\\'")) (use-package glsl-mode :mode ("\\.vert\\'" "\\.frag\\'" "\\.geom\\'" "\\.glsl\\'")) (use-package go-mode :mode "\\.go\\'") (use-package graphviz-dot-mode :mode ("\\.dot\\'" "\\.gv\\'")) @@ -103,6 +106,7 @@ (use-package less-css-mode :mode "\\.less\\'") (use-package markdown-mode :mode ("\\.markdown\\'" "\\.md\\'" "\\.ronn\\'")) (use-package nginx-mode :mode ("nginx\\.conf\\'" "/nginx/.+\\.conf\\'")) +(use-package php-mode :mode ("\\.php[s345t]?\\'" "/\\.php_cs\\(\\.dist\\)?\\'" "\\.phtml\\'" "/Amkfile\\'" "\\.amk\\'")) (use-package scss-mode :mode "\\.scss\\'") (use-package yaml-mode :mode "\\.e?ya?ml\\'") @@ -179,6 +183,10 @@ sh-script.el is broken." (if xterm-mouse-mode (xterm-mouse-mode 1)) ))) +;; Make TRAMP obey ~/.ssh/config for ControlMaster. For some reason, +;; customize doesn't correctly set this. +(setq tramp-use-ssh-controlmaster-options nil) + ;; Use mailcrypt to encrypt/decrypt email (when (require 'mailcrypt nil t) (mc-setversion "gpg") diff --git a/.config/ssh/config b/.config/ssh/config index 9dbf510..7687d08 100644 --- a/.config/ssh/config +++ b/.config/ssh/config @@ -20,13 +20,20 @@ Host parabola.nu *.parabola.nu # Personal ################################################# -Host lukeshu.com +Host lukeshu.com *.lukeshu.com Port 1863 User lukeshu Host ssl.lukeshu.com User lukeshu ProxyCommand proxytunnel --proxy=lukeshu.com:8443 --proxyauth=frc4272:password --encrypt-proxy --dest=lukeshu.com:1863 +Host team4272.com + Port 1863 + User lukeshu +Host ssl.team4272.com + User lukeshu + ProxyCommand proxytunnel --proxy=lukeshu.com:8443 --proxyauth=frc4272:password --encrypt-proxy --dest=team4272.com:1863 + Match host build64-par exec "nslookup %n.lan." HostName build64-par Port 22 @@ -37,6 +44,6 @@ Host build64-par ForwardX11 yes ForwardX11Trusted yes -Host 192.168.*.1 10.* +Host 192.168.*.1 10.* 169.254.* roborio-*-frc.local StrictHostKeyChecking no UserKnownHostsFile /dev/null diff --git a/.config/systemd/user/onboard@.service b/.config/systemd/user/onboard@.service new file mode 100644 index 0000000..541731f --- /dev/null +++ b/.config/systemd/user/onboard@.service @@ -0,0 +1,12 @@ +[Unit] +Description=Onboard on-screen keyboard on X display %I +Documentation=man:onboard(1) +After=X11@%i.target panel@%i.target +Requisite=X11@%i.target +BindsTo=panel@%i.target + +[Service] +Environment=DISPLAY=%I + +Type=simple +ExecStart=/usr/bin/env onboard diff --git a/.config/systemd/user/wmii@.service.wants/onboard@.service b/.config/systemd/user/wmii@.service.wants/onboard@.service new file mode 120000 index 0000000..fbe829b --- /dev/null +++ b/.config/systemd/user/wmii@.service.wants/onboard@.service @@ -0,0 +1 @@ +../onboard@.service
\ No newline at end of file diff --git a/.config/systemd/user/wmii@.service.wants/rbar@98_wifi.service b/.config/systemd/user/wmii@.service.wants/rbar@98_wifi.service new file mode 120000 index 0000000..286989e --- /dev/null +++ b/.config/systemd/user/wmii@.service.wants/rbar@98_wifi.service @@ -0,0 +1 @@ +../rbar@.service
\ No newline at end of file diff --git a/.config/systemd/user/wmii@.service.wants/redshift@.service b/.config/systemd/user/wmii@.service.wants/redshift@.service new file mode 120000 index 0000000..59234a7 --- /dev/null +++ b/.config/systemd/user/wmii@.service.wants/redshift@.service @@ -0,0 +1 @@ +../redshift@.service
\ No newline at end of file diff --git a/.config/systemd/user/wmii@.service.wants/x0vncserver@.service b/.config/systemd/user/wmii@.service.wants/x0vncserver@.service new file mode 120000 index 0000000..bc3be20 --- /dev/null +++ b/.config/systemd/user/wmii@.service.wants/x0vncserver@.service @@ -0,0 +1 @@ +../x0vncserver@.service
\ No newline at end of file diff --git a/.config/wmii-hg/config.sh b/.config/wmii-hg/config.sh index 1b48cc4..9c6a041 100644 --- a/.config/wmii-hg/config.sh +++ b/.config/wmii-hg/config.sh @@ -123,13 +123,17 @@ Event() { 2) ;; 3) { - case $(wmii9menu Delete Fullscreen ToggleFloat) in + case $(wmii9menu Delete Fullscreen ToggleFloat SendLeft SendRight) in Delete) echo kill >> $WMII_DIR/client/$client/ctl;; Fullscreen) echo Fullscreen on >> $WMII_DIR/client/$client/ctl;; ToggleFloat) echo send $client toggle >> $WMII_DIR/tag/sel/ctl;; + SendLeft) + echo send sel left >> $WMII_DIR/tag/sel/ctl;; + SendRight) + echo send sel right >> $WMII_DIR/tag/sel/ctl;; esac }& ;; 4) ;; @@ -160,7 +164,9 @@ Event() { DestroyTag) ## $1=tag rm $WMII_DIR/lbar/$1;; FocusTag) ## $1=tag - echo colors "$WMII_FOCUSCOLORS" >> $WMII_DIR/lbar/$1;; + echo colors "$WMII_FOCUSCOLORS" >> $WMII_DIR/lbar/$1 + onboard-hack + ;; UnfocusTag) ## $1=tag echo colors "$WMII_NORMCOLORS" >> $WMII_DIR/lbar/$1;; UrgentTag) ## $1=[Manager|Client] $2=tag @@ -263,6 +269,28 @@ Key() { sel=$(sed 1q $WMII_DIR/client/sel/ctl) tag=$(lstags | wimenu -h "${HIST}.tags" -n 50) || return echo "$tag" >> $WMII_DIR/client/$sel/tags;; + + ## Hardware keys + XF86RotateWindows) ## Toggle between 'normal' an 'right' + local old new + old="$(xrotate|cut -d $'\t' -f3|sort -u)" + case "$old" in + normal) new=right;; + *) new=normal;; + esac + xrotate "$new" + ;; + $MODKEY-XF86RotateWindows) ## Rotate in 90° steps + local old new + old="$(xrotate|cut -d $'\t' -f3|sort -u)" + case "$old" in + normal) new=right;; + right) new=inverted;; + inverted) new=left;; + left) new=normal;; + esac + xrotate "$new" + ;; esac } diff --git a/.config/wmii-hg/ctl-init b/.config/wmii-hg/ctl-init index 026c0d5..a7e5358 100644 --- a/.config/wmii-hg/ctl-init +++ b/.config/wmii-hg/ctl-init @@ -1,5 +1,5 @@ font xft:Monospace-8 focuscolors $WMII_FOCUSCOLORS normcolors $WMII_NORMCOLORS -grabmod $MODKEY +grabmod Mod5 border 1 diff --git a/.config/wmii-hg/rbar_acpi b/.config/wmii-hg/rbar_acpi index 6e3e6e5..7c1d18b 100755 --- a/.config/wmii-hg/rbar_acpi +++ b/.config/wmii-hg/rbar_acpi @@ -15,7 +15,8 @@ update() { -e 's/\s*remaining//g' \ -e 's/\s*until charged//g' \ -e 's/charging at zero rate - will never fully charge./∞/g' \ - -e 's/\s*ok,\s*//g' | + -e 's/\s*ok,\s*//g' \ + -e 's/\s+//g' | cat -n | while read -r n line; do printf "label %s\n" "$line" | write "${id}.${n}" done diff --git a/.config/wmii-hg/rbar_clock b/.config/wmii-hg/rbar_clock index e84d5c3..c66b21e 100755 --- a/.config/wmii-hg/rbar_clock +++ b/.config/wmii-hg/rbar_clock @@ -7,7 +7,7 @@ update() { while true; do { printf 'label ' - date +'%a, %F %T %Z(%:::z)' + date +'%a %F %T %Z(%:::z)' } | write "$id" sleep .5 done diff --git a/.config/wmii-hg/rbar_wifi b/.config/wmii-hg/rbar_wifi index d201152..e740777 100755 --- a/.config/wmii-hg/rbar_wifi +++ b/.config/wmii-hg/rbar_wifi @@ -1,14 +1,5 @@ #!/usr/bin/env bash -iwinfo() { - local interface=$1 - iwconfig "$interface" | - sed -r 's/ {2,}/\n/g' | - sed -e '/^\s*$/d' -e 's/:\s*/=/' \ - -e '1s/^/Interface=/' \ - -e '2s/^/MAC Protocol=/' -} - update() { local iface=wlp2s0 @@ -18,7 +9,7 @@ update() { while true; do IFS=$'\n' lines=($( - iwinfo "$iface" | sed -rn 's@^(ESSID|Link Quality)=@@p' + iwdata "$iface" | sed -rn 's@^(ESSID|Link Quality)=@@p' ifdata -pa "$iface" )) IFS='|' diff --git a/.config/wmii-hg/rules b/.config/wmii-hg/rules index 65f8339..bf219bc 100644 --- a/.config/wmii-hg/rules +++ b/.config/wmii-hg/rules @@ -1,5 +1,6 @@ /wimenu/ floating=always /panel/ tags=/.*/ floating=always +/^onboard:/ tags=/.*/ floating=always /^FLTK:FLTK:/ floating=always diff --git a/.config/wmii-hg/workarounds.sh b/.config/wmii-hg/workarounds.sh index c0b6f31..66ea64c 100644 --- a/.config/wmii-hg/workarounds.sh +++ b/.config/wmii-hg/workarounds.sh @@ -40,3 +40,23 @@ systemd-notify() { printf -v n '%s\n' "${our_env[@]}" socat STDIO UNIX-SENDTO:"$NOTIFY_SOCKET" <<<"$n" } + +## +# Reposition Onboard in the correct location +# +# I think this is actually working around a +# WMII bug where it confuses the heights when +# there are multiple panels. +# +onboard-hack() { + local res=$(xdpyinfo|awk '/^\s*dimensions:/{print $2}') + [[ "$res" == *x* ]] || break + local file wid size + while read -r file; do + wid="${file%/props}" + wid="${wid##*/}" + size=$(xdotool getwindowgeometry 0x01000007|awk '/^\s*Geometry:/{print $2}') + [[ "$size" == *x* ]] || continue + xdotool windowmove "$wid" 0 "$(bc <<<"${res#*x}-${size#*x}")" + done < <(grep -l ^onboard: -- "$WMII_DIR"/client/*/props) +} diff --git a/.local/bin/backlight b/.local/bin/backlight new file mode 100755 index 0000000..cf48dca --- /dev/null +++ b/.local/bin/backlight @@ -0,0 +1,20 @@ +#!/bin/bash + +[[ -n "$BACKLIGHT" ]] || BACKLIGHT=intel_backlight +fmax=/sys/class/backlight/$BACKLIGHT/max_brightness +fcur=/sys/class/backlight/$BACKLIGHT/brightness +read max < $fmax || exit $? +case $# in + 0) + read cur < $fcur + bc <<<"100*$cur/$max" | cut -d. -f1 + ;; + 1) + declare -i pct="$1" + bc <<<"$max*$pct/100" | cut -d. -f1 > $fcur + ;; + *) + echo "Usage: [BACKLIGHT=<device_id>] backlight [<percent>]" >&2 + exit 1 + ;; +esac diff --git a/.local/bin/config-path b/.local/bin/config-path index dcac0e8..74748f7 100755 --- a/.local/bin/config-path +++ b/.local/bin/config-path @@ -9,6 +9,7 @@ prefixes=( "$HOME/.prefix" "$HOME"/.gem/ruby/* "$HOME"/.npm-prefix + "$HOME"/go ) in_array() { diff --git a/.local/bin/iwdata b/.local/bin/iwdata new file mode 100755 index 0000000..a631d6d --- /dev/null +++ b/.local/bin/iwdata @@ -0,0 +1,8 @@ +#!/bin/sh + +iwconfig "$1" | +sed -r 's/ {2,}/\n/g' | +sed -e '/^\s*$/d' -e 's/:\s*/=/' \ + -e '1s/^/Interface=/' \ + -e '2s/^/MAC Protocol=/' \ + -e 's/^ESSID="\(.*\)"$/ESSID=\1/' diff --git a/.local/bin/xrotate b/.local/bin/xrotate new file mode 100755 index 0000000..c7d9f0d --- /dev/null +++ b/.local/bin/xrotate @@ -0,0 +1,119 @@ +#!/usr/bin/env bash + +# xrandr (graphical output) ############################################ +type xrandr &>/dev/null && modules+=(xrandr) + +xrandr.get() { + # FIXME: I don't think simple column counting is reliable. + # I'll have to study the exact output format. + xrandr --query --verbose|awk -v OFS=$'\t' '/ connected /{print "xrandr", $1, $6}' +} + +xrandr.set() { + xrandr --orientation "$1" +} + +# xsetwacom (touchscreen input) ######################################## +type xsetwacom &>/dev/null && modules+=(xsetwacom) + +xsetwacom.get() { + local device + xsetwacom --list devices|cut -d $'\t' -f1|while read -r device; do + printf 'xsetwacom\t%s\t%s\n' "$device" "$(xsetwacom --get "$device" Rotate)" + done | sed -e $'s/\tnone$/\tnormal/' \ + -e $'s/\tcw$/\tright/' \ + -e $'s/\tccw$/\tleft/' \ + -e $'s/\thalf$/\tinverted/' +} + +xsetwacom.set() { + declare -A xrandr2wacom + xrandr2wacom[normal]=none + xrandr2wacom[left]=ccw + xrandr2wacom[right]=cw + xrandr2wacom[inverted]=half + + local device + local r=0 + xsetwacom --list devices|cut -d $'\t' -f1|while read -r device; do + xsetwacom --set "$device" Rotate ${xrandr2wacom[$1]} || r=$? + done + return $r +} + +# xmodmap (D-pad input) ################################################ +type xmodmap &>/dev/null && modules+=(xmodmap) + +declare -A xrandr2xmodmap +xrandr2xmodmap[keycode]=' 111 113 114 116 ' +xrandr2xmodmap[normal]=' Up Left Right Down ' +xrandr2xmodmap[left]=' Right Up Down Left ' +xrandr2xmodmap[right]=' Left Down Up Right' +xrandr2xmodmap[inverted]='Down Right Left Up ' + +xmodmap.get() { + local cur=malformed + + local keys=($(xmodmap -pke | grep -f <(printf '^keycode %s =\n' ${xrandr2xmodmap[keycode]})|awk '{print $4}')) + local k + for k in normal left right inverted; do + if [[ "$(echo ${xrandr2xmodmap[$k]})" = "${keys[*]}" ]]; then + cur=$k + fi + done + printf 'xmodmap\t-\t%s\n' "$cur" +} + +xmodmap.set() { + paste \ + <(printf '%s\n' ${xrandr2xmodmap[keycode]}) \ + <(printf '%s\n' ${xrandr2xmodmap[$1]}) \ + | awk '{print "keycode", $1, "=", $2}' | xmodmap - +} + +# main ################################################################# + +usage() { + . libremessages + print 'Usage: %q [-h|--help|normal|left|right|inverted]' "${0##*/}" + print 'Get or set screen rotation.' + echo + prose 'Without any arguments, return the screen rotation as + reported by supported subsystems. The output format is:' + echo + print ' SUBSYSTEM <tab> DEVICE <tab> STATE <newline>' +} + +xget() { + local r=0 + local module + for module in "${modules[@]}"; do + "${module}.get" || r=$? + done + return $r +} + +xset() { + local r=0 + local module + for module in "${modules[@]}"; do + "${module}.set" "$1" || r=$? + done + return $r +} + +main() { + case $# in + 0) xget;; + 1) + case "$1" in + normal|left|right|inverted) xset "$1";; + -h|--help) usage;; + *) usage >&2; exit 1;; + esac + ;; + *) usage >&2; exit 1;; + esac +} + +main "$@" |