Yey, resize floating i3 windows in %

master
Quentin Duchemin 2023-10-29 16:10:09 +01:00
parent 89b177ffba
commit 5a3a34be55
2 changed files with 13 additions and 9 deletions

View File

@ -61,18 +61,10 @@ bindsym $mod+b exec --no-startup-id ~/.config/i3/scripts/brightness.sh
################################## ##################################
# Scratchpad # Scratchpad
for_window [class="Hamster" window_type="normal"] floating enable, move scratchpad
for_window [class="Non-Mixer"] mark "mixer", move scratchpad for_window [class="Non-Mixer"] mark "mixer", move scratchpad
for_window [class="Catia*"] mark "jack", move scratchpad for_window [class="Catia*"] mark "jack", move scratchpad
bindsym $mod+Shift+j [con_mark="jack"] scratchpad show, move position center bindsym $mod+Shift+j [con_mark="jack"] scratchpad show, move position center
bindsym $mod+Shift+v [con_mark="mixer"] scratchpad show, move position center bindsym $mod+Shift+v [con_mark="mixer"] scratchpad show, move position center
bindsym $mod+Shift+p [class="Hamster" window_type="normal"] scratchpad show, move position center
# Adequate sizes for Desktop
for_window [class="thunderbird" window_type="normal"] resize set 1600 850
for_window [class="Signal"] resize set 1600 850
for_window [class="Hamster" window_type="normal"] resize set 1600 850e
for_window [class="Telegram"] resize set 1600 850
for_window [class="Pianoteq STAGE"] floating enable, move position center for_window [class="Pianoteq STAGE"] floating enable, move position center
assign [class="Pianoteq STAGE"] → number 6 assign [class="Pianoteq STAGE"] → number 6

View File

@ -209,6 +209,9 @@ bindsym Shift+BackSpace exec dunstctl close
# OPERATIONS FOR SPECIFIC WINDOWS # OPERATIONS FOR SPECIFIC WINDOWS
################################## ##################################
# enable window icons for all windows
for_window [all] title_window_icon yes
# some windows will float automatically # some windows will float automatically
for_window [class="(?i)Thunderbird"] floating enable for_window [class="(?i)Thunderbird"] floating enable
for_window [window_role="About"] floating enable for_window [window_role="About"] floating enable
@ -221,7 +224,8 @@ for_window [class="Telegram"] floating enable
for_window [class="(?i)Thunderbird"] move position center for_window [class="(?i)Thunderbird"] move position center
for_window [window_role="GtkFileChooserDialog"] move position center for_window [window_role="GtkFileChooserDialog"] move position center
# scratchpad
# === Scratchpad ===
# Make the currently focused window a scratchpad # Make the currently focused window a scratchpad
bindsym $mod+Shift+BackSpace move scratchpad bindsym $mod+Shift+BackSpace move scratchpad
for_window [class="Signal" window_type="normal"] move scratchpad for_window [class="Signal" window_type="normal"] move scratchpad
@ -237,6 +241,14 @@ bindsym Mod4+ampersand [title="(?i)perso.*obsidian"] scratchpad show, move conta
bindsym Mod4+eacute [title="(?i)tech.*obsidian"] scratchpad show, move container to workspace 4, workspace 4, floating disable bindsym Mod4+eacute [title="(?i)tech.*obsidian"] scratchpad show, move container to workspace 4, workspace 4, floating disable
bindsym Mod4+quotedbl [title="(?i)notes.*obsidian"] scratchpad show, move container to workspace 4, workspace 4, floating disable bindsym Mod4+quotedbl [title="(?i)notes.*obsidian"] scratchpad show, move container to workspace 4, workspace 4, floating disable
# Thanks to this epic discussion, with an unexpected ending, I am happily
# able to resize floating windows by percentage of the screen width/height,
# making it compatible with the shared configuration
# https://github.com/i3/i3/issues/2816
for_window [class="thunderbird" window_type="normal"] resize set 90 ppt 85 ppt
for_window [class="Signal"] resize set 90 ppt 85 ppt
for_window [class="Telegram"] resize set 90 ppt 85 ppt
# automatic workspace # automatic workspace
assign [class="(?i)Obsidian"] → number 4 assign [class="(?i)Obsidian"] → number 4
assign [class="(?i)Tor Browser"] → number 5 assign [class="(?i)Tor Browser"] → number 5