diff --git a/dot_config/emacs/init.el b/dot_config/emacs/init.el index f9a9848..ee3772d 100644 --- a/dot_config/emacs/init.el +++ b/dot_config/emacs/init.el @@ -78,6 +78,17 @@ (add-hook 'after-init-hook #'elpaca-process-queues) (elpaca `(,@elpaca-order)) +;; Unload seq before elpaca build - also see `use-package' declaration for seq below +;; https://github.com/progfolio/elpaca/issues/216#issuecomment-1868444883 +(defun +elpaca-unload-seq (e) + (and (featurep 'seq) (unload-feature 'seq t)) + (elpaca--continue-build e)) + +(defun +elpaca-seq-build-steps () + (append (butlast (if (file-exists-p (expand-file-name "seq" elpaca-builds-directory)) + elpaca--pre-built-steps elpaca-build-steps)) + (list '+elpaca-unload-seq 'elpaca--activate-package))) + ;; use-package (elpaca elpaca-use-package (elpaca-use-package-mode) @@ -231,6 +242,10 @@ (setq save-place-file (concat xdg_cache_home "places")) (save-place-mode)) +(use-package seq + ; Unload seq before elpaca build + :elpaca `(seq :build ,(+elpaca-seq-build-steps))) + (use-package simple :elpaca nil :config @@ -708,7 +723,12 @@ ;; Zig (use-package zig-mode :commands (zig-mode) - :config (setq-local fill-column 100)) + :config + (defun zig-compile () + (interactive) + (save-buffer) + (zig--run-cmd "build")) + (setq-local fill-column 100)) ;;; File format/markup support (use-package markdown-mode diff --git a/dot_config/river/executable_init.tmpl b/dot_config/river/executable_init.tmpl index 62f2efb..0c0a1c0 100644 --- a/dot_config/river/executable_init.tmpl +++ b/dot_config/river/executable_init.tmpl @@ -197,6 +197,11 @@ do riverctl map "$mode" None XF86AudioRaiseVolume spawn 'pactl set-sink-volume @DEFAULT_SINK@ +2%' riverctl map "$mode" None XF86AudioMicMute spawn 'pactl set-source-mute @DEFAULT_SOURCE@ toggle' + # Media + riverctl map "$mode" None XF86AudioPrev spawn '' + riverctl map "$mode" None XF86AudioPlay spawn '' + riverctl map "$mode" None XF86AudioNext spawn '' + # Backlight riverctl map $mode None XF86MonBrightnessDown spawn 'xbacklight -dec 5' riverctl map $mode None XF86MonBrightnessUp spawn 'xbacklight -inc 5' @@ -249,7 +254,7 @@ riverctl map-switch normal lid close 'waylock-launcher' riverctl focus-output DP-1 {{- end }} -# -app-id and title -"foo" start floating +# Start floating riverctl rule-add -app-id 'Bitwarden' float riverctl rule-add -app-id 'Blueman-manager' float riverctl rule-add -app-id 'connman-gtk' float @@ -259,10 +264,7 @@ riverctl rule-add -app-id 'mousepad' float riverctl rule-add -app-id 'com.nextcloud.dextopclient.Nextcloud' float riverctl rule-add -app-id 'vlc' float -# -app-id "bar" and any title use client-side decorations -riverctl rule-add -app-id 'emacs' csd - -# Default layout generator +# Layout generator riverctl default-layout rivertile rivertile -view-padding 4 -outer-padding 4 -main-ratio .55 & diff --git a/dot_config/wleave/layout b/dot_config/wleave/layout index 61fa2fd..16a0169 100644 --- a/dot_config/wleave/layout +++ b/dot_config/wleave/layout @@ -12,13 +12,13 @@ } { "label" : "logout", - "action" : "${HOME}/.local/bin/river-logout", + "action" : "${HOME}/.local/bin/river-exit logout", "text" : "Logout", "keybind" : "e" } { "label" : "shutdown", - "action" : "loginctl poweroff", + "action" : "${HOME}/.local/bin/river-exit poweroff", "text" : "Shutdown", "keybind" : "s" } @@ -30,7 +30,7 @@ } { "label" : "reboot", - "action" : "loginctl reboot", + "action" : "${HOME}/.local/bin/river-exit reboot", "text" : "Reboot", "keybind" : "r" } diff --git a/dot_local/bin/executable_river-exit b/dot_local/bin/executable_river-exit new file mode 100644 index 0000000..c2137bb --- /dev/null +++ b/dot_local/bin/executable_river-exit @@ -0,0 +1,26 @@ +#!/bin/sh + +river=$(ps -C river | awk '/river/') + +if [ -z "$river" ]; then + echo "error: $0: River is not running" + exit 1 +elif [ $# -ne 1 ]; then + echo "Usage: river-exit [command]" + echo "Commands: logout, poweroff, or reboot" + exit 1 +fi + +if [ "$1" = "logout" ]; then + riverctl spawn 'reset' + riverctl exit +elif [ "$1" = "poweroff" ]; then + riverctl spawn 'reset' + loginctl poweroff +elif [ "$1" = "reboot" ]; then + riverctl spawn 'reset' + loginctl reboot +else + echo "error: $0: unexpected argument" + exit 1 +fi