Browse Source

xscreensaver-companion and a small fix to dmenu_ssh

Von Random 1 year 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"
5 5
 shift
6 6
 get_hosts() {
7 7
     awk -F",| " '{print $1}' "${HOME}/.ssh/known_hosts"
8
-    awk '$1 == "Host" {print $2}' "${HOME}/.ssh/config"
9 8
 }
10 9
 result=$(get_hosts | sort -uV | dmenu -p ssh ${1+"$@"}) || exit 1
11 10
 exec $cmd $result

+ 19
- 0
xscreensaver-companion View File

@@ -0,0 +1,19 @@
1
+#!/usr/bin/env zsh
2
+
3
+function parse_actions
4
+{
5
+    while read action _; do
6
+        case $action in
7
+            (LOCK|BLANK)
8
+                /usr/bin/setxkbmap us -option
9
+                /usr/bin/notify-send DUNST_COMMAND_PAUSE
10
+                ;;
11
+            (UNBLANK)
12
+                /home/von/vscripts/mykblayouts
13
+                /usr/bin/notify-send DUNST_COMMAND_RESUME
14
+                ;;
15
+        esac
16
+    done
17
+}
18
+
19
+/usr/bin/xscreensaver-command -watch | parse_actions

Loading…
Cancel
Save