From 5a3a34be55e2bde544688461e00ee72ae2e86e4c Mon Sep 17 00:00:00 2001 From: Quentin Duchemin Date: Sun, 29 Oct 2023 16:10:09 +0100 Subject: [PATCH] Yey, resize floating i3 windows in % --- .config/i3/config.d/desk | 8 -------- .config/i3/config_common | 14 +++++++++++++- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/.config/i3/config.d/desk b/.config/i3/config.d/desk index 113e30d..9038884 100644 --- a/.config/i3/config.d/desk +++ b/.config/i3/config.d/desk @@ -61,18 +61,10 @@ bindsym $mod+b exec --no-startup-id ~/.config/i3/scripts/brightness.sh ################################## # Scratchpad -for_window [class="Hamster" window_type="normal"] floating enable, move scratchpad for_window [class="Non-Mixer"] mark "mixer", 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+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 assign [class="Pianoteq STAGE"] → number 6 diff --git a/.config/i3/config_common b/.config/i3/config_common index 5ed2444..ee59c4b 100644 --- a/.config/i3/config_common +++ b/.config/i3/config_common @@ -209,6 +209,9 @@ bindsym Shift+BackSpace exec dunstctl close # OPERATIONS FOR SPECIFIC WINDOWS ################################## +# enable window icons for all windows +for_window [all] title_window_icon yes + # some windows will float automatically for_window [class="(?i)Thunderbird"] 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 [window_role="GtkFileChooserDialog"] move position center -# scratchpad + +# === Scratchpad === # Make the currently focused window a scratchpad bindsym $mod+Shift+BackSpace 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+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 assign [class="(?i)Obsidian"] → number 4 assign [class="(?i)Tor Browser"] → number 5