My Ubuntu Desktop
Tags: linux, ubuntu, productivity
Published: 2018-12-28 16:00:58

---
title: My Ubuntu Desktop
published: true
description: 
tags: linux, ubuntu, productivity
cover_image: https://thepracticaldev.s3.amazonaws.com/i/qqizqgxt5np2xiwzkj74.png
---

I recently reinstalled Ubuntu on my personal laptop. I found some pleasant surprises in doing so, and I wanted to share what I've got going.

Note: This is my current setup for Ubuntu 18.10. Your mileage may vary if on LTS.

## Hotkeys
The default hotkeys in GNOME are pretty good out of the box. Here are some that I use on a regular basis:
- alt + tab: Switch of program.
- alt + backtick: Switch to a window which belongs to the same program.
- ctrl + alt + arrow: Move to a different workspace. Workspaces in GNOME can
only go up or down.
- ctrl + alt + shift + arrow: Move current window to a different workspace.
- ctrl + alt + t: open gnome terminal
- meta (windows button): Open the global menu, I use it to search for programs
instead of relying on the mouse.
- meta + left or right: move the window left or right.
- meta + up: make the window take up the entire viewport.
- shift + printscr: Select a region to do a screen capture.
- alt + printscr: Do a screen capture of the entire focused window.

There's really just two things that bother me with the default hotkeys. First, program switching is for all programs, across workspaces. This isn't an issue if you don't normally have a lot of programs open, but I tend to multitask and prefer keeping things isolated between workspaces. Second, I like to switch of workspaces using using indexes (e.g., `super+2` to switch to workspace number 2). This is something I got used to from back when had i3wm as part of my main desktop environment.

### Limiting application switching to workspaces
To make this customization we will need the DConf Editor. It can be installed through the Ubuntu Software program. Simply open up "Ubuntu Software", search for "Dconf" and install the "Dconf Editor":

![dconf-editor][dconf-editor]

After opening the DConf Editor, navigate to the path `org -> gnome -> shell -> app-switcher -> current-workspace-only`. Disable the "Use default value" option and set "Custom value" to "true".

![workspace-switcher][workspace-switcher]

#### Changing of workspace using indexes
This step is easier since its just a regular setting. Open up the "Settings" application, select "Devices", and click the "Keyboard" option. Change the "Switch to workspace" option to the desired keybinding.

![workspace-indexed][workspace-indexed]

## Look and Feel
In Ubuntu 18.10, the [default theme][yaru-theme] is actually quite good out of the box. I personally didn't change it this time around, but for those looking for alternatives there are quite a few solid options out there such as [arc][arc-theme] and [adapta][adapta-theme] themes.

I have only a few issues with the out of the box look and feel:
- Dock is in the way (if you have a keyboard-driven workflow)
- Some of the animations are too slow
- Terminal menu bar isn't needed (you can get the menu by right clicking)

### Removing the dock
Unfortunately, you can't disable the dock from the Tweaks program. Instead, we need to uninstall it entirely. In the terminal type the following:
```bash
sudo apt remove gnome-shell-extension-ubuntu-dock
```

You will need to re-log into your machine for the changes to take effect.

If you want to bring back the dock, simply run:
```bash
sudo apt install gnome-shell-extension-ubuntu-dock
```

### Speeding up animations
To reduce the time of animations, all we need is to grab an extension from the Ubuntu Software program. Simply search for "impatience" and it should pop up.

![impatience][impatience]

Install the extension and open the settings for it. I've personally reduced the animation time in half.

### Disabling the terminal menu bar
Open the gnome terminal, right click, select preferences. Go to the general section and you should untick the "Show menubar by default in new terminals" checkbox.

![terminal-menubar][terminal-menubar]

## Additional Software
When installing additional software, it is preferable to do it through software repositories instead of relying on archives (`.deb` files). Installing programs through repositories means the operating system will handle upgrading programs for you.

All of the additional software I need can be simply installed through the "Ubuntu Software" program:
- Spotify
- Discord
- Steam

Since this is for my personal laptop, there isn't much in terms of office software that I setup. Most of it is browser-based in my case.

## Development
I've already written an article on how I [develop from containers][developing-from-containers]. However, I still need to install custom fonts and configure the terminal profile.

To install powerline patched fonts:
```bash
git clone https://github.com/powerline/fonts /tmp/fonts
cd /tmp/fonts
./install.sh
```

Go to the terminal preferences and select the correct profile in use. If you haven't changed the terminal profile this will be the "Unnamed" profile. Select the "Custom font" checkbox and click on the textbox beside it to pick a different font. The font should have "for Powerline" in it, otherwise some glyphs will be missing.

![terminal-font][terminal-font]

## Conclusion
Setting up a new machine is pretty simple and surprisingly doesn't require me to use the terminal all that much. While I may be extremely comfortable in the terminal (*caugh*, NeoVIM user ;)) it is encouraging to see the progress that has been made towards a more approachable desktop. Hopefully one day I'll be able to use Linux at my work.

[arc-theme]: https://github.com/horst3180/arc-theme
[adapta-theme]: https://github.com/adapta-project/adapta-gtk-theme
[yaru-theme]: https://github.com/ubuntu/yaru
[dconf-editor]: https://thepracticaldev.s3.amazonaws.com/i/zfn5q5rnu5ojhnk8a6qc.png
[workspace-switcher]: https://thepracticaldev.s3.amazonaws.com/i/zcuohdcgk32guli4by2o.png
[workspace-indexed]: https://thepracticaldev.s3.amazonaws.com/i/v3zwl8q4k0b7kflppiip.png
[terminal-menubar]: https://thepracticaldev.s3.amazonaws.com/i/o0u7tfxm4iocnrn7h0k4.png
[developing-from-containers]: https://dev.to/aghost7/developing-from-containers-42fp
[terminal-font]: https://thepracticaldev.s3.amazonaws.com/i/mvrb90u36hiixbrcq7ci.png
[impatience]: https://thepracticaldev.s3.amazonaws.com/i/t0kkz9cs0bo8hf1jv71v.png