Browse Source

xscreensaver-companion and a small fix to dmenu_ssh

master
Von Random 2 years ago
parent
commit
6bc06170d5
2 changed files with 19 additions and 1 deletions
  1. 0
    1
      dmenu_ssh
  2. 19
    0
      xscreensaver-companion

+ 0
- 1
dmenu_ssh View File

@@ -5,7 +5,6 @@ cmd="$1"
shift
get_hosts() {
awk -F",| " '{print $1}' "${HOME}/.ssh/known_hosts"
awk '$1 == "Host" {print $2}' "${HOME}/.ssh/config"
}
result=$(get_hosts | sort -uV | dmenu -p ssh ${1+"$@"}) || exit 1
exec $cmd $result

+ 19
- 0
xscreensaver-companion View File

@@ -0,0 +1,19 @@
#!/usr/bin/env zsh

function parse_actions
{
while read action _; do
case $action in
(LOCK|BLANK)
/usr/bin/setxkbmap us -option
/usr/bin/notify-send DUNST_COMMAND_PAUSE
;;
(UNBLANK)
/home/von/vscripts/mykblayouts
/usr/bin/notify-send DUNST_COMMAND_RESUME
;;
esac
done
}

/usr/bin/xscreensaver-command -watch | parse_actions

Loading…
Cancel
Save