💾 Archived View for gmi.karl.berlin › suckless-desktop.html captured on 2023-05-24 at 17:43:42.

View Raw

More Information

⬅️ Previous capture (2023-01-29)

➡️ Next capture (2023-09-28)

-=-=-=-=-=-=-

<!doctype html>
<html lang="en">
<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<title>Suckless Software on My Desktop</title>
	<link href="https://www.karl.berlin/atom.xml" type="application/atom+xml" rel="alternate" title="Atom feed for blog posts" />
	<style>
		body {
			font-family: sans-serif;
			margin: 0 auto;
			max-width: 48rem;
			line-height: 1.45;
			padding: 0.5rem 0 1.6rem;
			box-shadow: 0 0 2rem 0 #bbb;
			border-radius: 0 0 0.6rem 0.6rem;
		}
		main {
			padding: 0 1.4rem;
			hyphens: auto;
		}
		code {
			background: #eee;
			padding: 0.3rem;
			tab-size: 4;
		}
		pre code {
			display: block;
			overflow-x: auto;
			padding: 0.3rem 0.6rem;
		}

		nav ul {
			margin: 0;
			padding: 0;
			display: flex;
			background: #17a;
		}
		nav li {
			list-style: none;
		}
		nav li * {
			display: block;
			padding: 0.4rem 0.4rem;
			color: white;
		}
		nav li strong {
			padding-left: 1.5rem;
			padding-right: 1rem;
		}
		nav a {
			text-decoration: none;
		}
		nav a:hover {
			background: #069;
		}
	</style>
</head>

<nav>
	<ul>
		<li><strong>Karl Bartel</strong></li>
		<li><a href="index.html">Home</a></li>
		<li><a href="projects.html">Projects</a></li>
	</ul>
</nav>

<main>
<h1>Suckless Software on My Desktop</h1>
<p>I took a look at which simple programs I could use as a desktop environment instead of Gnome and picked out the following ones</p>
<ul>
<li><a href="https://st.suckless.org/">st</a> as a terminal</li>
<li><a href="https://dwm.suckless.org/">dwm</a> as a window manager, along with <a href="https://tools.suckless.org/slstatus/">slstatus</a></li>
<li><a href="https://tools.suckless.org/slock/">slock</a> for screen locking</li>
</ul>
<h2>Initial Impression</h2>
<p>The suckless tools are configured by editing C header files before compilation. This is pretty straightforward to do in most cases, but it requires dealing with source changes in git repos instead of using config files. For now these changes stay outside my dotfiles repo and I'm not sure about the best way to version and sync this type of configuration.</p>
<p>One very pleasant aspect is how easily and fast the programs compile. They have hardly any dependencies and compilation is finished nearly at the same moment as you hit the enter key to call make.</p>
<p>Since each of the programs handles only a single concern, you have to collect more of them than you're used to when you want to cover the usual amount of use cases. This allows freely mixing and matching different tools as you like. I like the general approach, but would have preferred a way to get a selection of recommended programs and configs and start using a known-good setup before fiddling with the details.</p>
<h2>Additional Configuration</h2>
<h3>xbindkeys</h3>
<p>I want to be able to change the volume and screen brightness with the media keys and have a keybinding to turn off and lock my screen. This can be configured with <a href="https://www.nongnu.org/xbindkeys/">xbindkeys</a> by assigning shell commands to certain keys. This has a nice unix feel to it, but needs some fiddling to get right. I also miss the visual feedback when changing brightness and volume.</p>
<pre><code># Brightness +
&quot;lux -a 100&quot;
    XF86MonBrightnessUp 

# Brightness -
&quot;lux -s 100&quot;
    XF86MonBrightnessDown 


# Increase volume
&quot;pactl set-sink-volume @DEFAULT_SINK@ $(pacmd list-sinks | awk '/volume:/ {print int($3 * 1.2); exit}'); pacmd list-sinks | awk '/volume:/ {print $5; exit}' | dzen2 -p 2&quot;
   XF86AudioRaiseVolume
# Decrease volume
&quot;pactl set-sink-volume @DEFAULT_SINK@ $(pacmd list-sinks | awk '/volume:/ {print int($3 * 0.8); exit}'); pacmd list-sinks | awk '/volume:/ {print $5; exit}' | dzen2 -p 2&quot;
   XF86AudioLowerVolume
# Mute volume
&quot;pactl set-sink-mute @DEFAULT_SINK@ toggle&quot;
   XF86AudioMute

# Shift + super + L locks screen and turns display off
&quot;slock &amp; (sleep 1 &amp;&amp; xset dpms force off)&quot;
   Shift + Mod4 + l

# turn screen off
&quot;sleep 1.0 &amp;&amp; xset dpms force off&quot;
   shift + mod4 + s

&quot;systemctl suspend&quot;
   shift + mod4 + z

&quot;autorandr -c&quot;
   control+shift + a

# toggle redshift
&quot;killall redshift || redshift -l 52.5200:13.4050 -b 0.7:0.3 &amp;&quot;
   shift + mod4 + r
</code></pre>
<h2>Problems</h2>
<h3>autolock</h3>
<p>I didn't find an autolock setup that worked as well as I would like. My goal would be:</p>

<ul>
<li>Lock screen when sleeping or after X minutes</li>
<li>Turn screen off when locking</li>
<li>Don't lock when watching fullscreen videos in Firefox</li>
</ul>
<p>I could not get the last point working reliably for me with xautolock or <a href="https://github.com/jD91mZM2/xidlehook">xidlehook</a> (<a href="https://github.com/jD91mZM2/xidlehook/issues/23">bug report</a>). I stopped using autolock and just manually lock my screen.</p>
<h3>Versioning My Setup</h3>
<p>As noted above, the suckless tools don't use config files, so they I can't put their configuration in version control as I am used to.</p>
<h3>Lack of Good Predefined Setup</h3>
<p>While the programs work well and reliably, using them is not just matter of installing and running them. Getting to a usable setup involves quite some time of choosing the right set of programs and configuration that works for you. I would have liked a known-good setup as a starting point.</p>
<!--
## Other simple tools



## Not relevant because not desktop



## Big software



## Web Apps



-->
<small>Written on 2020-04-28. Last updated on 2021-01-20.</small>