Debian Post-installation Script

Yesterday I spent the day working on a script to install my usual working environment on top of a clean install of the (soon to be) current version of Debian. This is a fork of my Ubuntu scripts that I use to set up all my machines.

It’s very much a work in progress, and I wouldn’t recommend running this on a machine you care about, but I thought it was worth documenting in case it’s of use to anyone else.

Pre-installation

Before you run this script ensure that you have sudo installed and that your user is in the group. To do this run the following as root (replacing <your username> with your username)

apt install -y sudo
sudo usermod -aG sudo <your username>

You will also need some extra repositories enabled. My /etc/apt/sources.list looks like this:

deb http://deb.debian.org/debian bullseye main contrib
deb http://security.debian.org/debian-security bullseye/updates main contrib

Installation

Download the script, make it executable, and run it:

wget https://raw.githubusercontent.com/teknostatik/debian/master/deploy_debian.sh
chmod 755 deploy_debian.sh
./deploy_debian.sh

I’ve tested this on top of a full desktop install and a command line only installation as well. My goal is to get a working i3 environment, so the latter is probably what I’m going to focus on going forward. I did get a few snaps working on my test machine, but that was non-trivial, and I’m still not confident enough about that aspect yet. I also suspect most people who choose Debian do not care for snaps anyway.

Investigating Launchers

Last night I was experimenting with ulauncher as a way of easily launching apps on my computer. After using it for a few hours it seems like something that I might want to start using all the time, but it also made me start looking at other launchers like Albert which seems a little harder to install but which promises to search across my applications, my local files, and the internet.

I think that as I try and use a keyboard for most things this is the sort of application I need. At the moment I’m using dmenu which does the job well enough but which is also quite basic and relies me to choose between knowing the package name or the name that would be displayed if I was using it in a more traditional menu (so files or naultilus but not both). The launchers I’m looking at now do both of these and more, but both of them require a little hoop-jumping to get them installed so may not be suitable for my default installation image (although there is at least a PPA for ulauncher so I may very well have a go at getting that added this afternoon)

It’s something I’ll come back to, but in the meantime it’s always fun trying out new software that may one day become part of my workflow.

Rough Trade Club 2021

I’ve been subscribed to the Rough Trade Club for a few years now, and receive a monthly record with a few other interesting bits of paraphernalia thrown in. The records I get are rarely bad, and many of them are things I would buy anyway, but the selection this year has been particularly strong, and If I had to only listen to these records for a whole year then I think I would be OK.

January’s selection was Welfare Jazz by Viagra Boys. I loved their last record and this one is also very strong. It fuses together quite a few genres of music, but it’s also immediately accessible and a lot of fun as well.

February saw the very welcome arrival of For The First Time by Black Country, New Road. I had already played a lot of these songs to death, but getting them all in one place was exactly what I needed to shed some truth and light on the cold winter days. I think this is still my record of the year (so far), and it will take something really special to dislodge it. It also came with a badge (more records should come with badges).

March’s record was Flock by Jane Weaver. An artist I already own music by, and another record that was already on my list to buy. Many people may not have heard of Jane Weaver, but this record is a joyous pop masterpiece that I think anyone who appreciates good music would enjoy. It was also the subject of a really entertaining listening party.

April bought with it the excellent New Long Leg by Dry Cleaning. It reminds me a bit of a cross between The Blue Aeroplanes and Arab Strap, but with female vocals. If that sounds intriguing then you should definitely give it a listen. The songs on the bonus CD are very good as well.

May’s record was Bright Green Field by Squid. A new name for me, but one that reminds me a little of Black Country, New Road and a lot of other things that I really like. It’s not an easy first listen, but it soon makes itself indispensable and is another one that will definitely feature on my end of year list.

I’ve also chosen to buy music by Arab Strap, Mogwai, Maximo Park and Field Music, all of which I’ve very much recommend, but it is the Rough Trade selection that I think best represent the musical journey I’ve been on so far this year.

Keyboard shortcuts

I use a fairly eclectic range of hardware and software, and keyboard shortcuts are required to get it to all work together. This list is mainly for me, but I’ve split it up by device/application in case it is of any use to other people with similar setups.

Epomaker SK61 keyboard shortcuts

I use a 61-key keyboard on my main computer. It doesn’t have some of the keys that I use occasionally, and whilst it’s perfect for writing there are a few keyboard shortcuts required to make some things I do a little bit easier. The main ones that I use are:

  • Up arrow – Fn + /
  • Down arrow – Fn + menu
  • Left arrow – Fn + Alt
  • Right arrow – Fn + Ctrl
  • Delete – Fn + M
  • Volume up –Fn + H
  • Volume down –Fn + G
  • Switch to layer 2 – Fn + W

There isn’t really much else I use that this keyboard doesn’t give me naturally, and the form factor and the way it handles more than make up for the lack of keys.

Motospeed CK61 keyboard shortcuts

My other keyboard is a Motospeed CK61, which seems to have increased dramatically in price since I got mine. The layout is the same as the SK61 (which is why I like it), but instead of layers it has shortcuts that translate specific parts of the keyboard to alternate keys, which I find quite useful sometimes. Shortcuts I use are:

  • Factory reset – Fn + Escape
  • Map /, alt, menu and ctrl to arrow keys – Fn + 3
  • Control brightness of backlight – Fn + U/I
  • Cycle through different lighting patterns – Fn + menu

i3 shortcuts

I’ve used i3 as my window manager for over a year now, and I find it fits my workflow perfectly. The main i3 shortcuts I find myself using are:

  • Open a terminal window – $mod + Enter
  • Open a different application – $mod + d then type the application name (eg firefox)
  • Open (or go to) a second desktop – $mod + 2
  • Send the focused application to that desktop – $mod + Shift + 2
  • Split a container vertically – $mod + v
  • Split a container horizontally – $mod + h
  • Move between containers – $mod + arrow keys
  • Switch to a tabbed layout – $mod + w
  • Switch to a stacked layout – $mod + s
  • Close a window – $mod + Shift + q
  • Exit i3 – $mod + Shift + e

I do have a few other custom shortcuts defined, which are detailed in my i3 config file.

Atom shortcuts

I use the Atom text editor for a lot of my workflow. My main shortcuts are:

  • Multi line editing – ctrl + alt (or shift on Linux) + arrow keys
  • Toggle markdown preview – ctrl + shift + m
  • Create a PDF of the current file – alt + ctrl + e
  • Open a terminal ctrl + alt + shift + i
  • Show a hidden menu bar – alt

Kitty shortcuts

I use Kitty as my terminal emulator on any computer that it works with, although I don’t really use too much advanced functionality. The main shortcuts I use in Kitty are:

  • New terminal within an existing session – ctrl + shift + enter
  • Toggle through windows – ctrl + shift + ]

There are lots more of these on the Kitty website

Qutebrowser shortcuts

I’ve just started experimenting with Qutebrowser. It’s very fast, but has a steep learning curve. The main shortcuts that I’ve found myself using so far are:

  • Open a URL in the current tab – o
  • Open a URL in a new tab – shift + o
  • Toggle through open tabs – shift + k and shift + J
  • Close the current tab – d
  • Back – shift + H

A lot of standard shortcuts (ctrl + t for a new tab, Fn + 5 to refresh) also work as expected.

Zathura shortcuts

Zathura is a lightweight PDF viewer, and something else I’ve been incorporating into my workflow over the last few months. I only ever really use it for reading PDFs, so just use the arrow key shortcuts detailed above, plus s to make what I’m reading fit the width on the window/container I’m reading it in. Zathura has a lot of other functionality which I really do need to explore at some point soon, at which point I’ll come back and update this guide with anything interesting I uncover.