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 | |
parent | dc35691ecf7aa36ab916bbb9634a75e0e1a747e0 (diff) |
feat(sway): replace rofi with bemenu
-rw-r--r-- | bemenu/.config/profile.d/50-bemenu.sh | 40 | ||||
-rw-r--r-- | dunst/.config/dunst/dunstrc | 3 | ||||
-rw-r--r-- | dunst/.config/dunst/dunstrc.d/00-colorscheme.conf | 14 | ||||
-rw-r--r-- | flavours/.config/flavours/config.toml | 15 | ||||
-rw-r--r-- | rofi/.config/rofi/config.rasi | 16 | ||||
-rwxr-xr-x | rofi/.local/bin/rofi-ykman | 33 | ||||
-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 |
9 files changed, 116 insertions, 67 deletions
diff --git a/bemenu/.config/profile.d/50-bemenu.sh b/bemenu/.config/profile.d/50-bemenu.sh new file mode 100644 index 0000000..b99adc4 --- /dev/null +++ b/bemenu/.config/profile.d/50-bemenu.sh @@ -0,0 +1,40 @@ +#!/usr/bin/sh + +base00="#1d2021" +base01="#3c3836" +base02="#504945" +base03="#665c54" +base04="#bdae93" +base05="#d5c4a1" +base06="#ebdbb2" +base07="#fbf1c7" +base08="#fb4934" +base09="#fe8019" +base0A="#fabd2f" +base0B="#b8bb26" +base0C="#8ec07c" +base0D="#83a598" +base0E="#d3869b" +base0F="#d65d0e" + +export BEMENU_OPTS="--ignorecase \ +--list 10 \ +--scrollbar autohide \ +--line-height 18 \ +--binding vim \ +--fn 'Fira Code Nerd Font 12' \ +--no-overlap \ +--ab '$base02' \ +--af '$base06' \ +--fb '$base00' \ +--ff '$base06' \ +--scb '$base06' \ +--scf '$base00' \ +--nb '$base02' \ +--nf '$base06' \ +--tb '$base0D' \ +--tf '$base06' \ +--hb '$base03' \ +--hf '$base06' \ +--sb '$base06' \ +--sf '$base06'" diff --git a/dunst/.config/dunst/dunstrc b/dunst/.config/dunst/dunstrc index e4c01af..07df5a7 100644 --- a/dunst/.config/dunst/dunstrc +++ b/dunst/.config/dunst/dunstrc @@ -16,18 +16,15 @@ [urgency_low] background = "#282828" - frame_color = "#8ec07c" foreground = "#ebdbb2" timeout = 5 [urgency_normal] background = "#282828" - frame_color = "#fabd2f" foreground = "#ebdbb2" timeout = 20 [urgency_critical] background = "#282828" - frame_color = "#fb4934" foreground = "#ebdbb2" timeout = 0 diff --git a/dunst/.config/dunst/dunstrc.d/00-colorscheme.conf b/dunst/.config/dunst/dunstrc.d/00-colorscheme.conf new file mode 100644 index 0000000..ac59452 --- /dev/null +++ b/dunst/.config/dunst/dunstrc.d/00-colorscheme.conf @@ -0,0 +1,14 @@ +[urgency_low] + background = "#282828" + foreground = "#ebdbb2" + timeout = 5 + +[urgency_normal] + background = "#282828" + foreground = "#ebdbb2" + timeout = 20 + +[urgency_critical] + background = "#282828" + foreground = "#ebdbb2" + timeout = 0 diff --git a/flavours/.config/flavours/config.toml b/flavours/.config/flavours/config.toml new file mode 100644 index 0000000..c689cc9 --- /dev/null +++ b/flavours/.config/flavours/config.toml @@ -0,0 +1,15 @@ +[[items]] +file = "~/.config/sway/config.d/99-base16.conf" +template = "sway" +subtemplate = "colors" +hook = "swaymsg reload" +rewrite = true +light = false + + +[[items]] +file = "~/.config/dunst/dunstrc.d/99-base16.conf" +template = "dunst" +hook = "swaymsg reload" +rewrite = true +light = false diff --git a/rofi/.config/rofi/config.rasi b/rofi/.config/rofi/config.rasi deleted file mode 100644 index 3e4fc90..0000000 --- a/rofi/.config/rofi/config.rasi +++ /dev/null @@ -1,16 +0,0 @@ -configuration { - modi: "run,drun,ssh"; - kb-remove-to-eol: ""; - kb-accept-entry: "Control+m,Return,KP_Enter"; - kb-row-up: "Up,Control+k,Control+p"; - kb-row-down: "Down,Control+j,Control+n"; - timeout { - action: "kb-cancel"; - delay: 0; - } - filebrowser { - directories-first: true; - sorting-method: "name"; - } -} -@theme "gruvbox-dark-hard" diff --git a/rofi/.local/bin/rofi-ykman b/rofi/.local/bin/rofi-ykman deleted file mode 100755 index 3d4ca99..0000000 --- a/rofi/.local/bin/rofi-ykman +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/bin/env bash - -# rofi-ykman -# Yubikey oath utility - -#2019 nukeop - -if [ ! "$(ykman info)" ]; then - notify-send "rofi-ykman" "Yubikey not detected." -a "rofi-ykman" - exit 1 -fi - -OPTIONS=$(ykman oath accounts list) -LAUNCHER="rofi -dmenu -i -p YubikeyOATH" - -option=$(echo "${OPTIONS/, TOTP/\n}" | $LAUNCHER) -code=$(ykman oath accounts code "$option") -IFS=', ' read -r -a code <<<"$code" -if [ "$XDG_SESSION_TYPE" == "wayland" ]; then - cliptool=wl-copy - typer="wtype -" -else - cliptool="xclip -selection clipboard" - typer="xargs xdotool type" -fi -if [ "$1" == "type" ]; then - action=$typer -else - action=$cliptool -fi - -notify-send "rofi-ykman" "Touch Yubikey..." -a "rofi-ykman" -echo "${code[-1]}" | $action 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 |