diff options
author | Toby Vincent <tobyv@tobyvin.dev> | 2023-07-22 16:25:36 -0500 |
---|---|---|
committer | Toby Vincent <tobyv@tobyvin.dev> | 2023-07-22 16:25:36 -0500 |
commit | 24070b249faf104af7915d5bcca1f5949cf3a4e9 (patch) | |
tree | da0f8aef0f4be2d1422b47d35b9e7c2fd7fcd89d /sway | |
parent | dc35691ecf7aa36ab916bbb9634a75e0e1a747e0 (diff) |
feat(sway): replace rofi with bemenu
Diffstat (limited to 'sway')
-rw-r--r-- | sway/.config/sway/config | 30 | ||||
-rw-r--r-- | sway/.config/sway/config.d/00-colorscheme.conf (renamed from sway/.config/sway/colorscheme) | 0 | ||||
-rwxr-xr-x | sway/.local/bin/powermenu | 32 |
3 files changed, 47 insertions, 15 deletions
diff --git a/sway/.config/sway/config b/sway/.config/sway/config index 2af0111..f1b82d7 100644 --- a/sway/.config/sway/config +++ b/sway/.config/sway/config @@ -1,13 +1,14 @@ ### Variables +# Colors +include ~/.config/sway/config.d/00-colorscheme.conf +include ~/.config/sway/config.d/99-base16.conf + # Set logo key as main modifier set $mod Mod4 -# Terminal -set $term $TERMINAL - # Menu -set $menu exec rofi -show-icons +set $menu bemenu # Home row direction keys, like vim set $left h @@ -19,9 +20,6 @@ set $right l set $lock_cmd swaylock --grace 10 --fade-in 1 set $sleep_cmd systemctl suspend -# Colors -include colorscheme - # Basic color configuration using the Base16 variables for windows and borders. # Property Name Border BG Text Indicator Child Border client.focused $base05 $base0D $base00 $base0D $base0D @@ -75,16 +73,17 @@ input type:keyboard { ### Key bindings # Power menu -bindsym $mod+Escape exec $menu -modi p:rofi-power-menu -show p -bindsym $mod+Shift+Escape exec swaynag -t warning -m 'Do you really want to exit sway?' -B 'Yes, exit sway' 'swaymsg exit' +bindsym $mod+Escape exec powermenu list | $menu | powermenu +bindsym $mod+Shift+Escape exec swaynag -t warning \ + -m 'Do you really want to exit sway?' \ + -B 'Yes, exit sway' 'swaymsg exit' # Run menu -bindsym $mod+space exec $menu -show drun -bindsym $mod+shift+space exec $menu -show run +bindsym $mod+space exec j4-dmenu-desktop --dmenu='$menu' --term="$TERMINAL" +bindsym $mod+shift+space exec bemenu-run # Launch terminal bindsym $mod+return exec $TERMINAL -bindsym $mod+shift+return exec $menu -show ssh # Launch browser bindsym $mod+w exec $BROWSER @@ -215,13 +214,14 @@ exec dunst # Clipboard manager exec wl-paste --type text --watch clipman store --no-persist -bindsym $mod+v exec clipman pick --tool=rofi +bindsym $mod+v exec clipman pick --tool=bemenu # Password manager -bindsym $mod+b exec rofi-rbw +bindsym $mod+p exec passmenu # Yubikey TOTP manager -bindsym $mod+y exec rofi-ykman +bindsym $mod+y exec yubikey-oath-dmenu --notify --clipboard +bindsym $mod+Shift+y exec yubikey-oath-dmenu --notify --type include ~/.config/sway/config.d/* include /etc/sway/config.d/* diff --git a/sway/.config/sway/colorscheme b/sway/.config/sway/config.d/00-colorscheme.conf index 29c9933..29c9933 100644 --- a/sway/.config/sway/colorscheme +++ b/sway/.config/sway/config.d/00-colorscheme.conf diff --git a/sway/.local/bin/powermenu b/sway/.local/bin/powermenu new file mode 100755 index 0000000..688ae3b --- /dev/null +++ b/sway/.local/bin/powermenu @@ -0,0 +1,32 @@ +#!/usr/bin/sh + +if [ "$#" -eq 0 ]; then + set -- $(awk '{print tolower($2)}') +fi + +case "$1" in +lock) + loginctl lock-session ${XDG_SESSION_ID-} + ;; +logout) + loginctl terminate-session ${XDG_SESSION_ID-} + ;; +suspend) + systemctl suspend + ;; +hibernate) + systemctl hibernate + ;; +reboot) + systemctl reboot + ;; +poweroff) + systemctl poweroff + ;; +*list) + printf '%s\n' ' Lock' ' Logout' ' Hibernate' ' Suspend' ' Reboot' ' Poweroff' + ;; +*) + echo "Invalid argument: $@" + ;; +esac |