sway: bitwarden integration (rofi-like)
Victor Franzi
4 years ago
16 | 16 |
bindsym $mod+Escape exec swaylock -i ~/.wallpaper
|
17 | 17 |
|
18 | 18 |
# rofi-style
|
19 | |
set $menu termite -e "bash -c 'compgen -c | sort -u | fzf --reverse | xargs -r swaymsg -t command exec'" -t "launcher"
|
|
19 |
set $menu termite -t launcher -e "bash -c 'compgen -c | sort -u | fzf --reverse | xargs -r swaymsg -t command exec'"
|
20 | 20 |
bindsym $mod+r exec $menu
|
21 | 21 |
for_window [app_id="termite" title="launcher"] floating enable, border pixel 3
|
22 | 22 |
|
23 | |
# FIXME pass integration (rofi-pass not available on wayland)
|
24 | |
set $pass termite -e "bash -c 'find $HOME/.password-store -type f | fzf --reverse | cut -d\'/\' -f5- | sed \'s/.gpg//\' | xargs -r pass | head -n 1 | wl-copy '" -t "pass"
|
|
23 |
# bitwarden integration
|
|
24 |
exec "wl-paste -t text --watch clipman store"
|
|
25 |
set $pass termite -t "pass" -e "$HOME/.config/sway/rbw_get.sh"
|
25 | 26 |
bindsym $mod+Shift+r exec $pass
|
26 | 27 |
for_window [app_id="termite" title="pass"] floating enable, border pixel 3
|
|
28 |
|
|
29 |
# if using 'pass', use this line
|
|
30 |
# set $pass termite -e "bash -c 'find $HOME/.password-store -type f | fzf --reverse | cut -d\'/\' -f5- | sed \'s/.gpg//\' | xargs -r pass | head -n 1 | wl-copy '" -t "pass"
|
27 | 31 |
|
28 | 32 |
# media keys
|
29 | 33 |
bindsym $mod+a exec pavucontrol
|
|
0 |
#!/bin/bash
|
|
1 |
set -eu
|
|
2 |
set -o pipefail
|
|
3 |
|
|
4 |
rbw ls --fields name,user,folder | perl -plE'/^([^\t]*)\t([^\t]*)\t([^\t]*)$/; $_ = join("/", grep { length } ($3, $1, $2)) . "\t$_"' | sort | fzf --with-nth=1 --reverse | perl -ple'/^([^\t]*)\t([^\t]*)\t([^\t]*)\t([^\t]*)$/; $_ = "$2 $3"' | xargs -r rbw get | wl-copy
|
|
5 |
|
|
6 |
sleep .2
|