blog.cemunalan.com.tr

My Gnome Workspace Tips

9 Nisan 2024

A few months ago, I installed i3 and tried a tiling window manager for the very first time, after years of running Gnome and macOS. As a result, I’m left with a lot of excitement. i3 felt super snappy and direct.

I couldn’t make the switch fully, mostly because I’m clueless about how to manage my settings for Bluetooth and Wi-Fi. I didn’t want to take that risk with my work computer.

That being said, the experience made me question my Gnome setup and change a few things.

Fast Workspace Switching

Workspaces are known as “desktops” in macOS and Windows.

I always found workspaces overwhelming. It’s hard enough to arrange windows in one workspace, why would I need another 5? However, i3 showed how much value you can get out of them, if used differently.

See, i3 is a tiling window manager. “windows” don’t float and they don’t ever overlap each other. i3’s design physically limits your ability to open too many windows in one workspace.

This sounds very limiting but that’s where having multiple workspaces came into play. Instead of opening a bunch of windows and cramming them into a single workspace, distribute them among many and use keyboard shortcuts to switch between workspaces.

For example, I always keep my browser in workspace #1, code editor in workspace #2, and terminals in workspace #3. It’s now a muscle memory to hit “Alt + 1” to see my browser. This way, instead of hitting “Alt + Tab” multiple times to get the window I want, I can be more direct.

This changed my mental model from “workspaces increase desktop area you should manage” to “workspaces are just like switching apps, but more direct”. This never ocurred to me before, and it’s a testament of trying new desktop environments.

I have made the following tweaks in Settings > Multitasking.

Workspaces

I switched to “Fixed number of workspaces”. By default, the setting is “Dynamic workspaces”, meaning the thrid workspace won’t show up unless you have a window open on the second one.

Set the “Number of workspaces” to 5. Why 5? I’ll get to this later.

Multi-Monitor

I switched to “Workspaces on primary display only”, which is only relevant if you have multiple monitors. With the “Workspaces on all displays” setting, switching to a different workspace, will make this change on all displays. I find this difficult to keep track.

App Switching

This settings is about which apps you’ll get in your app switcher when you are hitting “Alt + Tab”. Including apps from all workspaces makes switching very slow because you have to tab through all the open apps. I don’t want to see apps from other workspaces that are not in my direct view.

Keyboard Shortcuts

Alt + Number

From Settings > Keyboard > Keyboard Shortcuts, I have updated Gnome’s “Switch to workspace X” shortcuts. Hitting Alt + 1, takes me to the first workspace, hitting Alt + 4, takes me to the fourth workspace.

Interestingly, while supported, there is no way to add a shortcut for the fifth, sixth, seventh, and eighth workspaces. I think you can do this with a terminal command, but I haven’t bothered.

I have also set up Alt + 9 to go to the last workspace, which is the fifth one. Hence, that’s why I have set up the “Number of workspaces” setting to 5.

Similarly, I’ve set the “Move window to workspace” shortcuts in the “Shift + Alt + Number” format.

Alt + U and Alt + I

I have set these two shortcuts to switch to the workspace on the left and on the right, however, I’m not using them at all. Maybe they are useful to you.

Ctrl is mapped to Alt, Alt to Win

It’s a personal preference, but highly recommended. It’s difficult to hit Ctrl all day with your pinky, so I map it to Alt. That puts Alt under your pinky, which I also don’t like, so I map Alt to the Win key.

This is very easy to do in Gnome, using the Tweaks tool. Go to Gnome Tweaks > Keyboard & Mouse > Additional Layout Options > Alt and Win Behavior.

This all depends on the shape of your keyboard. On some configurations, hitting “Alt + 1” is quite a reach. For the Apple Bluetooth keyboard I have, this is not a problem.

Only Two Windows in a Workspace

i3 stores everything in trees, therefore it can maintain a hierarchy between windows on the display. It literally knows which window is on the right or left, so you can focus on the one on the left or right. Gnome doesn’t have such mechanism. All windows float on top of each other and there is no hierarchy.

Therefore, I try to open two windows per workspace. This allows me to easily “Alt + Tab” between the two windows and bring them to focus. There is no third window I can accidentally bring to front. This makes it easier to quickly change focus.

Other Settings

Reduced Animations

While not madnatory, this increases the feeling of snapiness for me. So I reduced the animations in Settings > Accessibility > Seeing > Reduce Animation.

Launcher

i3 can run start any application using “Alt + D”. This is easy to implement in Gnome by setting the Settings > Keyboard > Keyboard Shortcuts > Launchers > Search shortcut.

Hide Dock (if on Ubuntu)

Since we keep a minimal number of windows on the workspace, know which workspace has which program running, and we can launch applications quickly using the launcher shortcut, we don’t need the dock.

I set Settings > Ubuntu Desktop > Dock > Auto-hide the Dock.