2021-11-21 | 5 minutes reading

Does my setup suck less than few years ago?

I used to be xfce user for very long time. But I am suckless for several years now. Let's find out if it is good for me and/or if it may be good for you too.


When I was at Uni, I was sporting custom alpha build of Compiz/Beryl. Mostly for fun, and of course, to see everybody going nuts when seeing how I rotate my 3D cube to switch between desktops :D But later on, I got too much work and I had to optimize for performance and not for showing off. I switched to Xfce and stayed for very long. As time went by, I found out I was continuously removing things. I removed wallpaper, transparency, window decorations, side panel, login screen. People were laughing that soon I won't have nothing to be shown, but I felt better. This went side by side with moving more to a terminal world. One day I found out I can use any WM/DM because I do not really rely on anything specific anymore. I tried i3 tiling WM for several times and always went back. I just didn't need tiling concept to be honest, because 90% of time, I have had only one window on fullscreen and what I strived for more, was to be able to get specific app on foreground without searching through alt+tab. I ended app creating shell wrappers for all of my apps I used on daily basis and put a keyboard shortcut on it. Wrapper looks for example like this:

wmctrl -xa Firefox || firefox-bin &

so basically what it does is checking if there already exist a window of specific app (in this case firefox), if yes, put it to foreground, if no, start fresh instance. I very rarely have multiple instances of some app running at one time, so this setup was great for me. I got 20+ apps made like this and started to switch to what I wanted instantly.


Around this time I had some long shifts at work and sometimes needed some focus break. One time I decided to re-style my lock screen to some "h4x0r" mode, where you won't see yourself typing. I tried to style the default lock screen, but then found slock. Lock screen app written in pure C with 300 something lines made by community called suckless. I instantly fall in love with it, but break was already too long, so I didn't dive in to suckless world immediately.


The only thing I missed every time I left xfce for something more lightweight was settings app. The easy way to switch monitors (I got many presentations those days), font sizes, plug and play devices and so on. So I decided to create DM/WM independent set of scripts for everything I used from xfce settings. There was always the same paradigm repeating. You have several choices you frequently use, and you want to pick between them. So what script should do is show the options and let user choose. Preferably using keyboard only and in some non-intrusive way. I found dmenu. Exactly what I wanted. I went through the man pages and realized it is a suckless app again and that it is the default app launcher for dwm, suckless window manager. You can guess what I did :) But first I finished my scripts. For example this one is to switch monitors:

chosen=$(echo -e "$choices" | dmenu -i -p 'SWITCH DISPLAY TO:  ')

case "$chosen" in
  LAPTOP) xrandr --output VIRTUAL1 --off --output eDP1 --primary --mode 2560x1440 --pos 0x0 --rotate normal --output DP1 --off --output HDMI2 --off --output HDMI1 --off --output DP2 --off ;;
  HDMI) xrandr --output VIRTUAL1 --off --output eDP1 --off --output DP2 --off --output HDMI2 --off --output HDMI1 --primary --preferred --pos 0x0 --rotate normal ;;

then I set dmenu as my default app launcher in xfce and created new to-do item: "try dwm".


It took a year or two until I marked that to-do item as "complete". Mostly because dwm was not something I needed very much. I also didn't like the fact, that it has no config file by default. You are supposed to change configuration in config.h itself. This applies to all suckless apps by the way. But in case of something like window manager, you will start to notice. So I tried it several times, but went back at the end of the day. Real commitment to switch came continuously with my constant drive to minimize. What I wanted to achieve was to be able to run my setup (OS+WM+apps) on any hardware, old one that I can buy for little or no money, or possibly an opensource one, like the MNT Reform. You can not expect high performance specs from such devices. But I also didn't want to compromise the usability and speed. So I switched, read complete man pages, went through all the available patches and applied the ones that provided functionality I needed. I had everything I wanted from a WM in one weekend. It takes 11MB of RAM right now, and it is not even fresh start. Uptime on this laptop is 46 days. I also realized after some months, that I really don't need to change the config at all. I run dwm for several years now, and I think I changed the config two or three times after it stabilized at the beginning.

st, tabbed, scroll

Default terminal emulator in dwm is st. It stands for Simple Terminal. And simple it is for sure. It has no support for scrolling, del and backspace buttons doesn't do what you would expect from them, lines in TUI apps are not continuous, no tabs, no context menu. You can imagine. I tried hard with this one. Finally, I settled with Luke Smith's fork of st, which by default has scrolling support, command output copying, or url launching. I only changed his color preferences back to default st colors, default font size, default cursor shape and fixed the delete button. Everything in config.h of course. Besides that I like it very much. Memory footprint is again ridiculously small as you can imagine. By the way, default ways to add scrolling support into st is either by using suckless scroll utility, which is experimental and abandoned, or scrollback patch, which is a bit bloated and often not going well with other patches. Last but not least, if you want tabs support, you can use tabbed utility from suckless. It is very simple window wrapper providing general tab functionality for any app, not only st.


Suckless web browser is the last one I use. I experiment with surf for month or so. I am still trying to aggregate the minimal amount of functionality I need to switch over. I already have tab support through tabbed, static adblocking through /etc/hosts, inverted colors using custom css added to ~/.surf/styles/default.css. Keyboard shortcuts are vim-like by default. The last thing I need is tagging links with characters, so I can browse through the links with keyboard only. Browser is webkit based, so it is possible, that some pages will not work, but it is definitely ok for standard web browsing. You will still probably need some mainstream browser as a backup.


My base system with running X server, WM and with all my daily apps opened (web browser, terminal, rss reader, music player, instant messenger, to-do app, email client and file manager) takes only 800 MB RAM give or take. And that's mind-blowing in current modern world, where even low-end laptops needs to be sold with 8GB RAM, because otherwise they won't be usable when using windows or ubuntu with mainstream set of GUI apps. I like my current setup very much, but 10 years ago, it wouldn't be for me yet. As it is not for most of the people. Too many compilations, patches, code changes and tinkering. But when set up, it is rock steady, fast, lightweight and never goes in your way.

tags: Linux, Minimalism