summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorUrbain Vaes <urbain@vaes.uk>2020-10-02 10:16:37 +0100
committerUrbain Vaes <urbain@vaes.uk>2020-10-02 10:16:37 +0100
commit93eab33d13f8f30c8ba0088f20721d14c981fd16 (patch)
tree81625a57a7e915f3fe539fe3ccfd5bea3a7af22d /bin
parent60496da375fa7355a0f01d0e3dd6bf8afc46ffe5 (diff)
parent104ca1e11721518f9224527459e8506a858692c9 (diff)
Merge branch 'master' of localhost:public/dotfiles into master
Diffstat (limited to 'bin')
-rwxr-xr-xbin/.local/bin/keyboard15
-rwxr-xr-xbin/.local/bin/workspace7
2 files changed, 12 insertions, 10 deletions
diff --git a/bin/.local/bin/keyboard b/bin/.local/bin/keyboard
index b5d3900..ee1cc61 100755
--- a/bin/.local/bin/keyboard
+++ b/bin/.local/bin/keyboard
@@ -3,8 +3,9 @@
# Key repeat rate
xset r rate 400 50
-# Xcape settings
-killall -9 xcape
+# Kill xcape
+# ('pgrep -l xcape' can be used to list the processes)
+pkill xcape
# Compose key on left control
# https://vi.stackexchange.com/questions/2254/what-is-the-easiest-way-to-insert-unicode-characters-into-a-document
@@ -30,7 +31,7 @@ xcape -e 'Control_L=Escape'
xmodmap -e "keysym Print = Print Caps_Lock"
xmodmap -e "add Lock = Caps_Lock"
-# Make Shift (Shift, :)
+# Make Shift (Shift, :) (for vim)
xcape -e 'Shift_L=Shift_L|semicolon'
# Make Tab (Alt_L, Tab)
@@ -45,10 +46,10 @@ xmodmap -e "keycode any = space"
xcape -e 'Super_L=space'
# Make return (Control_R, Return)
-xmodmap -e "keysym Return = Control_R"
-xmodmap -e "add Control = Control_R"
-xmodmap -e "keycode any = Return"
-xcape -e 'Control_R=Return'
+# xmodmap -e "keysym Return = Control_R"
+# xmodmap -e "add Control = Control_R"
+# xmodmap -e "keycode any = Return"
+# xcape -e 'Control_R=Return'
# Make eject an Insert
xmodmap -e "keysym XF86Eject = Insert"
diff --git a/bin/.local/bin/workspace b/bin/.local/bin/workspace
index ad378ef..4f2ab67 100755
--- a/bin/.local/bin/workspace
+++ b/bin/.local/bin/workspace
@@ -1,13 +1,14 @@
#!/usr/bin/env bash
-# List of workspaces
+# List of workspaces: (id, number, name)
workspaces=$(i3-msg -t get_workspaces | awk 'BEGIN {
RS="(},{)|(\\[{)|(}\\])";
- FPAT="([^,:]+)|([^,]+{[^}]+})|(\"[^\"]+\")"
+ FPAT="([^,:\"]+)|([^,\"]+:[^,\"]+)|([^,]+{[^}]+})"
}
$0 !~ "^\\s*$" {
gsub(/"/, "", $4)
- print $2, $4, $8, $11
+ print $4, $6
+
}' | sort)
act_on_container() {