diff --git a/files/.config/i3/config b/files/.config/i3/config index 35d5807..bcab4b5 100644 --- a/files/.config/i3/config +++ b/files/.config/i3/config @@ -132,7 +132,10 @@ bindsym $mod+w layout tabbed bindsym $mod+e layout toggle split # toggle tiling / floating -bindsym $mod+Shift+space floating toggle +bindsym $mod+Shift+space exec center-float + +# toggle sticky +bindsym $mod+Ctrl+space sticky toggle # change focus between tiling / floating windows bindsym $mod+space focus mode_toggle @@ -144,6 +147,7 @@ bindsym $mod+a focus parent bindsym $mod+d focus child # switch to workspace +bindsym $mod+q workspace back_and_forth bindsym $mod+1 workspace 1 bindsym $mod+2 workspace 2 bindsym $mod+3 workspace 3 @@ -194,7 +198,7 @@ bindsym $mod+Shift+r restart # exit i3 (logs you out of your X session) bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -b 'Yes, exit i3' 'i3-msg exit'" # toggle compton -bindsym $mod+c exec --no-startup-id killall compton || compton --config ~/.config/compton/compton.conf +bindsym $mod+c exec --no-startup-id systemctl --user is-active compton && systemctl --user stop compton || systemctl --user start compton # lock the screen bindsym $mod+Pause exec lock # suspend diff --git a/files/.config/i3/startup.bash b/files/.config/i3/startup.bash index 8f51c31..bc3efd6 100755 --- a/files/.config/i3/startup.bash +++ b/files/.config/i3/startup.bash @@ -5,7 +5,7 @@ # Initial workspace and startup app i3-msg "workspace 2" -i3-sensible-terminal & +uxterm -e "center-float && $SHELL -l" & # sleep a bit to allow polybar to fully load sleep 3 diff --git a/files/.config/zsh/custom/100-alias.zsh b/files/.config/zsh/custom/100-alias.zsh index d5a35a9..afb76ca 100644 --- a/files/.config/zsh/custom/100-alias.zsh +++ b/files/.config/zsh/custom/100-alias.zsh @@ -5,6 +5,7 @@ alias vihosts="sudo -e /etc/hosts" alias top="htop" alias http-server="python -m http.server" alias rename="perl-rename" +alias userctl="systemctl --user" # powershell seems to have trouble with xterm-256colors alias pwsh="TERM=xterm pwsh" diff --git a/files/.local/bin/center-float b/files/.local/bin/center-float new file mode 100755 index 0000000..9e25ac2 --- /dev/null +++ b/files/.local/bin/center-float @@ -0,0 +1,6 @@ +#!/bin/bash +set -- \ + $(i3-msg -t get_workspaces | jq --raw-output '. | map(select(.focused == true)) | .[].rect | [.width, .height] | @sh') +i3-msg -q floating toggle +i3-msg -q resize set $(( $1/3*2 )) $(( $2/3*2 )) +i3-msg -q move absolute position center