Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

View Git file
pathcompton/compton.conf
repository-id3
title~/.config/compton.conf
branchrefs/remotes/origin/master
linenumberstrue
collapsetrue

Window Management

My usage and window management approaches in i3 have evolved over time - and continue to evolve.  If you look through my dev branch you'll see many changes and things tried (and reverted) as I've slowly tried out things until I've found what works best for me.  That's one the many things I love about i3 (and linux in general).

Below are just a few of the window management approaches that have stuck with me.  Please note that these approaches might not work for you - and that's fine.  Feel free to adapt (or disregard) them.

My "special" window combiner bindsyms

I found that much of my time was spend combining two adjacent windows into a single container.  That is, say I have four application windows all in a tabbed container, like so:

Image Added

Now, most of the time I just want to combine two windows (in this example, my browser window and the Atom window to the right) into a split h container.  To do this, you would usually do something like

  1. create split h container;
  2. focus on the right app window;
  3. move right app window left (which combines into container);
  4. focus back on left app.

The above steps result in:

Image Added

Now, that gets rather tedious after doing it a thousand times. 

Thankfully, you can basically do all these steps and bind it to a single shortcut defined in you i3 config file.  Behold:

Code Block
# special combo for horizontal split of two windows next to each other
bindsym $mod+x split h, layout splith, focus right, move left, focus left, $con_title
bindsym $mod+Shift+x split h, layout splith, focus left, move right, focus right

The two bindsyms will combine in a split container with the right adjacent window ($mod+x) or with the adjacent window on the left ($mod+Shift+x).

I also have similar bindsyms for combining adjacent windows into a tabbed container:

Code Block
# special combo for container tabbed split of two windows next to each other
bindsym $mod+z split h, layout tabbed, focus right, move left, focus left, $con_title
bindsym $mod+Shift+z split h, layout tabbed, focus left, move right, focus right, $con_title

Dynamic container renaming

I've noticed that when you have a heavy window workload (lots of windows) and you've containerised lots of them - container names kind of... suck.  That is, they almost become so convoluted that it's easy to get lost.  For example look at the screenshot below of a normal workload for me (during development):

Image Added

Notice the container names at the top (stuff like T[filezilla putty H[chromium chromium]]...) I struggle to segregate and identify (remember) where I put that chromium or terminal window that I was working on.

Now notice the difference with the same workload but container names changed:

Image Added

Can you see the difference?  I've simply renamed the containers into something I understand; I have a container to my git related stuff (git clients and stuff), a container for several IDEs I use, another for apps I'm using to deploy applications to several web servers, and a container with stuff related to the latest javascript question/problem I'm figuring out.  These are all much more recognisable to me and helps me avoid "too many obscure window titles" hell.

I recently found this post on reddit that outlined a few ways to rename containers on the fly.  This can be achieved with a single bindsym that uses zenity (so make sure you have the zenity package installed) to pop up an input window for you to enter a container name and then focuses on the window parent, renames the container and then focuses back on the child window.  Below I've embedded a modified version of the script into a single bindsym command:

Code Block
languagetext
# dynamic renaming of parent container
bindsym $mod+slash exec "answer=$(zenity --title=\\"i3-msg title_format\\" --text \\"Change %TITLE for parent container\\" --entry); if [ -n \\"$answer\\" ]; then i3-msg focus parent, title_format \\"<span foreground='pink'><b> $answer</b></span>\\", focus child; else i3-msg focus parent, title_format \\"<span foreground='pink'><b> %title</b></span>\\", focus child; fi"

I've bound it to $mod+slash ("/" key).

References

  1. https://forum.manjaro.org/t/reversed-scrolling-in-i3-edition/25811
  2. https://wiki.archlinux.org/index.php/Libinput
  3. https://wiki.archlinux.org/index.php/Touchpad_Synaptics
  4. https://wiki.archlinux.org/index.php/Razer_Blade#2018_version
  5. https://forum.manjaro.org/t/how-disable-bios-beep-like-sound-in-some-applications/17094/5
  6. https://wiki.archlinux.org/index.php/GNOME/Keyring#PAM_method
  7. https://i3wm.org/i3status/manpage.html#_disk
  8. http://duncanlock.net/blog/2013/06/07/how-to-switch-to-compton-for-beautiful-tear-free-compositing-in-xfce/
  9. http://vadim-kirilchuk-linux.blogspot.com.au/2013/05/swap-file-for-hibernation.html
  10. https://github.com/DaveDavenport/rofi
  11. https://wiki.archlinux.org/index.php/Per-application_transparency
  12. https://forum.manjaro.org/t/manjaro-i3-how-to-use-lightdm-as-lockscreen/42131
  13. https://www.reddit.com/r/i3wm/comments/7f84ae/is_there_a_way_to_rename_parent_containers/

Content by Label
showLabelsfalse
max5
spacesTKB
showSpacefalse
sortmodified
reversetrue
typepage
cqllabel in ("manjaro","i3") and type = "page" and space = "TKB"
labelsmanjaro i3

...