diff options
Diffstat (limited to 'dot_config')
| -rw-r--r-- | dot_config/sway/config | 7 | ||||
| -rw-r--r-- | dot_config/waybar/executable_clip-picker.sh | 32 | ||||
| -rw-r--r-- | dot_config/waybar/executable_webcam-status.sh | 2 | ||||
| -rw-r--r-- | dot_config/wofi/config | 8 |
4 files changed, 46 insertions, 3 deletions
diff --git a/dot_config/sway/config b/dot_config/sway/config index ee22e77..9cfb402 100644 --- a/dot_config/sway/config +++ b/dot_config/sway/config @@ -176,8 +176,11 @@ bindsym $mod+Shift+n exec ~/.config/waybar/dismiss-visible.sh all bindsym $mod+Ctrl+n exec ~/.config/waybar/restore-pending.sh # Clipboard history -bindsym $mod+p exec sh -c 'cliphist list | fuzzel --dmenu | cliphist decode | wl-copy' -bindsym $mod+Shift+p exec sh -c 'cliphist list | fuzzel --dmenu | cliphist delete' +bindsym $mod+p exec ~/.config/waybar/clip-picker.sh pick +bindsym $mod+Shift+p exec ~/.config/waybar/clip-picker.sh delete + +# Emoji picker (bemoji → wofi → wtype + clipboard) +bindsym $mod+period exec env BEMOJI_PICKER_CMD="wofi --dmenu --hide-search --prompt Emoji --style $HOME/.config/wofi/style.css" bemoji -tc # Display mode switching bindsym --no-repeat XF86Display exec ~/.config/sway/display-toggle.sh diff --git a/dot_config/waybar/executable_clip-picker.sh b/dot_config/waybar/executable_clip-picker.sh new file mode 100644 index 0000000..11ebf4c --- /dev/null +++ b/dot_config/waybar/executable_clip-picker.sh @@ -0,0 +1,32 @@ +#!/bin/sh +# Clipboard picker on top of cliphist + wofi (vim-nav, hide-search, +# Alt-d to delete the highlighted entry). +# +# Modes: +# pick Enter pastes (cliphist decode | wl-copy) +# delete Enter deletes (cliphist delete) +# +# Alt-d in pick mode deletes the highlighted entry without pasting. + +set -u + +mode=${1:-pick} +style=$HOME/.config/wofi/style.css + +set +e +selection=$( + cliphist list \ + | wofi --dmenu --hide-search --prompt Clip \ + --define key_custom_0=Alt-d \ + ${style:+--style "$style"} +) +rc=$? +set -e + +[ -z "$selection" ] && exit 0 + +case "$mode:$rc" in + pick:0) printf '%s' "$selection" | cliphist decode | wl-copy ;; + pick:10) printf '%s' "$selection" | cliphist delete ;; + delete:0|delete:10) printf '%s' "$selection" | cliphist delete ;; +esac diff --git a/dot_config/waybar/executable_webcam-status.sh b/dot_config/waybar/executable_webcam-status.sh index 997f97a..1b812a6 100644 --- a/dot_config/waybar/executable_webcam-status.sh +++ b/dot_config/waybar/executable_webcam-status.sh @@ -12,7 +12,7 @@ esac # fuser exits 0 when at least one device has an opener, 1 otherwise. Stderr # carries 'PID' for each match; redirect it away. if fuser $devs >/dev/null 2>&1; then - printf '{"text":"","tooltip":"webcam in use","class":"active","alt":"active"}\n' + printf '{"text":"","tooltip":"webcam in use","class":"active","alt":"active"}\n' else printf '{"text":"","alt":"idle"}\n' fi diff --git a/dot_config/wofi/config b/dot_config/wofi/config new file mode 100644 index 0000000..a62893c --- /dev/null +++ b/dot_config/wofi/config @@ -0,0 +1,8 @@ +# Wofi config (loaded automatically from ~/.config/wofi/config). +# Vim nav alongside arrow keys, page-jumps with Ctrl-u/Ctrl-d. +# Comma-separated key lists are supported by wofi >= 1.4. + +key_up=Up,k +key_down=Down,j +key_pgup=Page_Up,Ctrl-u +key_pgdn=Page_Down,Ctrl-d |
