summaryrefslogtreecommitdiffstats
path: root/.local/bin
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2022-01-07 03:20:11 +0100
committerJozanLeClerc <bousset.rudy@gmail.com>2022-01-07 03:20:11 +0100
commit85c46b0598d90ee060041fb1f3612d61cf4287be (patch)
treeef92c5d10f202d4c75ccb1e17ec91d2cb3186978 /.local/bin
parentamfora update again (diff)
downloaddotfiles-bsd-85c46b0598d90ee060041fb1f3612d61cf4287be.tar.gz
dotfiles-bsd-85c46b0598d90ee060041fb1f3612d61cf4287be.tar.bz2
dotfiles-bsd-85c46b0598d90ee060041fb1f3612d61cf4287be.tar.xz
dotfiles-bsd-85c46b0598d90ee060041fb1f3612d61cf4287be.tar.zst
dotfiles-bsd-85c46b0598d90ee060041fb1f3612d61cf4287be.zip
kb script change
Diffstat (limited to '.local/bin')
-rwxr-xr-x.local/bin/kb8
1 files changed, 4 insertions, 4 deletions
diff --git a/.local/bin/kb b/.local/bin/kb
index dfa3e5c..f2ea9f4 100755
--- a/.local/bin/kb
+++ b/.local/bin/kb
@@ -3,9 +3,9 @@
xset r rate 200 150
setxkbmap -layout us,fr -option grp:alt_shift_toggle
setxkbmap -option caps:none
-if ! xrandr | grep 'HDMI-1 connected' >/dev/null 2>&1; then
- if ! xrandr | grep 'VGA-1 connected' >/dev/null 2>&1; then
- echo
+screens=$(xrandr | grep ' connected' | awk '{print $1}')
+if ! echo "$screens" | grep 'HDMI-1' >/dev/null 2>&1; then
+ if ! echo "$screens" | grep 'VGA-1' >/dev/null 2>&1; then
setxkbmap -option ctrl:swapcaps
xmodmap -e 'keycode 9 = Tab'
xmodmap -e 'keycode 23 = Escape'
@@ -18,7 +18,7 @@ else
xmodmap -e 'keycode 66 = Escape'
fi
mouse=$(xinput list | grep 'HARPOON' | awk '{print $10}' | sed 's/id=//')
-xinput --set-prop $mouse 'libinput Accel Speed' -0.40
+xinput --set-prop "$mouse" 'libinput Accel Speed' -0.40
notify-send -u low -t 2000 'kb' ' Keyboard set'
# vim: filetype=sh