xscreensaver-companion and a small fix to dmenu_ssh
This commit is contained in:
parent
09631ca385
commit
6bc06170d5
2 changed files with 19 additions and 1 deletions
|
@ -5,7 +5,6 @@ cmd="$1"
|
||||||
shift
|
shift
|
||||||
get_hosts() {
|
get_hosts() {
|
||||||
awk -F",| " '{print $1}' "${HOME}/.ssh/known_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
|
result=$(get_hosts | sort -uV | dmenu -p ssh ${1+"$@"}) || exit 1
|
||||||
exec $cmd $result
|
exec $cmd $result
|
||||||
|
|
19
xscreensaver-companion
Executable file
19
xscreensaver-companion
Executable 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…
Reference in a new issue