From 7af10bdbffadab9c68f500b36d7d7fd550a4e0d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Tue, 12 Feb 2019 10:59:07 +0100 Subject: i3: add shortcut for notes --- config/i3/config | 5 +++++ config/i3/scripts/notes | 6 ++++++ config/i3/scripts/shutdown | 13 ------------- 3 files changed, 11 insertions(+), 13 deletions(-) create mode 100755 config/i3/scripts/notes delete mode 100755 config/i3/scripts/shutdown (limited to 'config') diff --git a/config/i3/config b/config/i3/config index 1d2b356..2d90f2c 100644 --- a/config/i3/config +++ b/config/i3/config @@ -15,6 +15,11 @@ bindsym $mod+Return exec urxvt # start dmenu (a program launcher) bindsym $mod+d exec --no-startup-id i3-dmenu-desktop --entry-type=name bindsym $mod+Shift+d exec --no-startup-id surf-menu +bindsym $mod+Shift+p exec --no-startup-id surf-menu --socks + +# Notes +bindsym $mod+Shift+n exec --no-startup-id ~/.config/i3/scripts/notes +for_window [ title="notes-terminal-window" ] floating enable # kill focused window bindsym $mod+q kill diff --git a/config/i3/scripts/notes b/config/i3/scripts/notes new file mode 100755 index 0000000..6b9cc8c --- /dev/null +++ b/config/i3/scripts/notes @@ -0,0 +1,6 @@ +#!/bin/sh + +cd ~/notes +find * -type f | dmenu -p 'notes' | while read -r note; do + nohup urxvt -title 'notes-terminal-window' -e vim ~/notes/"$note" >/dev/null 2>&1 & +done diff --git a/config/i3/scripts/shutdown b/config/i3/scripts/shutdown deleted file mode 100755 index 62f6ae1..0000000 --- a/config/i3/scripts/shutdown +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh - -export SUDO_ASKPASS=/tmp/shutdown-askpass.sh - - -echo '#!/bin/sh -echo "SETDESC Please enter password to shutdown system -SETPROMPT Password: -SETTITLE Sudo password for system shutdown -GETPIN" | pinentry | grep -E "^D " | sed "s/^D //"' > $SUDO_ASKPASS -chmod +x $SUDO_ASKPASS - -sudo -A shutdown -h now -- cgit v1.2.3