diff --git a/.config/i3/config b/.config/i3/config index d5dea19..db8eab4 100644 --- a/.config/i3/config +++ b/.config/i3/config @@ -34,7 +34,7 @@ bindsym $mod+Shift+e exec thunderbird # start thunderb bindsym Mod1+Mod4+s exec $config_dir/lock.sh suspend # suspend bindsym Mod1+Control+l exec $config_dir/lock.sh lock # lock screen bindsym Mod1+Control+Delete exec $config_dir/lock.sh pick # power menu -bindsym $mod+p exec --no-startup-id ~/.bin/killPanel.sh # restart xfce4-panel +bindsym $mod+p exec --no-startup-id $config_dir/killPanel.sh # restart xfce4-panel mode "launch" { bindsym e exec emacsclient -c -n; mode "default" @@ -64,10 +64,10 @@ bindsym Mod1+XF86MonBrightnessUp exec light -A 1 bindsym Mod1+XF86MonBrightnessDown exec light -U 1 # Screen Rotation -bindsym $mod+Mod1+Down exec /home/adam/.bin/rotate.sh 0 -bindsym $mod+Mod1+Right exec /home/adam/.bin/rotate.sh 1 -bindsym $mod+Mod1+Up exec /home/adam/.bin/rotate.sh 2 -bindsym $mod+Mod1+Left exec /home/adam/.bin/rotate.sh 3 +bindsym $mod+Mod1+Down exec $config_dir/rotate.sh 0 +bindsym $mod+Mod1+Right exec $config_dir/rotate.sh 1 +bindsym $mod+Mod1+Up exec $config_dir/rotate.sh 2 +bindsym $mod+Mod1+Left exec $config_dir/rotate.sh 3 ## Actual i3 Config ## diff --git a/.config/i3/killPanel.sh b/.config/i3/killPanel.sh new file mode 100755 index 0000000..5b0a0ae --- /dev/null +++ b/.config/i3/killPanel.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +pkill xfce4-panel +xfce4-panel -d & diff --git a/.config/i3/rotate.sh b/.config/i3/rotate.sh new file mode 100755 index 0000000..1282a63 --- /dev/null +++ b/.config/i3/rotate.sh @@ -0,0 +1,26 @@ +#!/bin/bash + +ids=$(xinput --list|grep "SAM\|Digitizer"|grep -oP "id=\K[\w]*") +#ids=( 9 10 11 ) + +transform_matrix="" + +rotate=$1 +case $rotate in + 0) #normal + transform_matrix="1 0 0 0 1 0 0 0 1";; + 1) #left + transform_matrix="0 -1 1 1 0 0 0 0 1";; + 2) #inverted + transform_matrix="-1 0 1 0 -1 1 0 0 1";; + 3) #right + transform_matrix="0 1 0 -1 0 1 0 0 1";; +esac + +for input in ${ids[@]}; do + echo xinput set-prop $input "Coordinate Transformation Matrix" $transform_matrix + xinput set-prop $input "Coordinate Transformation Matrix" $transform_matrix +done + + +xrandr -o $rotate