-- Leo's gemini proxy

-- Connecting to git.thebackupbox.net:1965...

-- Connected

-- Sending request

-- Meta line: 20 text/gemini

repo: blog
action: blob
revision:
path_from: desktop
revision_from: refs/heads/master:
path_to:
revision_to:

git.thebackupbox.net

blog

git://git.thebackupbox.net/blog

blob of:

blog

/ desktop

refs/heads/master:/desktop
 # A page about my desktop bullshit.

 switched from ~/.xinitrc to ~/.xsession

 changed xrdb -load ~/.Xresources to call "xrl"
 which loads ~/.config/X/resources and ~/.config/X/resource.d/*

 ## this is mostly out of date

 I guess I'll go in chronological order.

 I don't use a display manager, I just login to console and run
 => man:startx startx
 That runs my ~/.xinitrc script which first does some io redirects

 ```
 exec >~/.local/var/log/xinitrc
 exec 2>&1
 ```

 So that I can see any debug info or errors in my ~/.xinitrx after I've started X.
 does a cd ~ to force anything else to have ~ as working dir.
 Do a xrdb -load ~/.Xresources just to initialize all those settings.
 In those settings I have basic green-on-black colorings for a handful of things
 (xmessage, xman, oneko, x-terminal-emulator (a build of urxvt with sixel support))
 There's also a handful of other settings for urxvt set in there to have it beep and urgent and to use a couple plugins.
 The perl extensions I have enabled for urxvt are: default,matcher,clickable-pgpkey,clickable-pgpmsg
 Those last two are exts I made to do what their name implies.
 The matcher is set to be overly broad in its matching of URL-like things, IP-like (IPv4 and IPv6) things, ASN-like things (AS4141), and acct-like things (user@host).
 When clicked those all pass the matched data to a script that pops open an xmessage that lets me select what to do with it.
 That script is named copy_start_nevermind.sh, where the "start" option calls out to my uristart script.
 Which does some nifty stuff, but this page doesn't seem like the spot to explain that.
 After it loads the resources... it sets a handful of magic env vars.
 Gives a message to systemd about dbus stuff.
 Starts a keyring daemon.
 Starts up my desktop notification daemon (dunst) with an option to print message to stdout and a redirect to log them.
 Starts urxvt's daemon part since I use terminals a bunch.
 Starts up a script to read lines from a named pipe in my home dir and push those lines into desktop notifications. (log2notify_nosu at the bottom)
 (Which are put there by my syslogd which is set to receive messages from other hosts on my network.)
 Then it starts
 => https://dwm.suckless.org/ dwm
 (window manager) in a loop and backgrounds that whole loop.
 Then it runs oneko as the blocking process, so to exit X11 I have to kill the kitteh.
 The lines after oneko just lock my keyring so it won't get left unlocked while not in X.

 The other main thing I have that makes up my desktop is a cron job.
 It runs once every minute and I call it ~/.Xsetroot
 What it does is it loops over each of the X displays that are mine.
 It gets this using a small one-liner that checks /tmp for X locks.
 Then the script does a loop from 1 to however many seconds are left in this minute.
 First it sets a background image using ~/.Xsetrootbg
 That script cycles through the images in ~/images/backgrounds and sets them as the background image.
 Using either hsetroot for static images, or
 ```
 (gifview -a -w root & sleep 55 ; kill %1; exit)
 ```
 for gifs.
 Back in Xsetroot, for each second it sets the root name (dwm's status bar displays this) to the output from another script (~/.Xsetrootname).
 Which contains a bunch of random things I've thought would be useful to know quickly.
 keyring status, date/time, volume, mem left/swap used, load avgs, computer temperature, X display, and ping time to my router.
 That last one is from when I was having trouble with my connectiong dropping randomly.
 The line will, in addition to showing only "ping:" will cause my computer to beep at me when the ping times out. (set to 1second atm)

 Hrm... What stuff did I miss? log2notify_nosu script? Gets ran like:
 ```
 ./log2notify_nosu < log2notify
 ```
 Where log2notify is a named pipe.

 ```
 #!/bin/sh
 export DISPLAY=:0
 export XAUTHORITY=/home/epoch/.Xauthority
 export XDG_SESSION_ID=2
 export XDG_RUNTIME_DIR=/run/user/1000
 stdbuf -o0 tr '\n' '\0' | xargs -0 -n1 notify-send syslog
 ```

 The messages get to the named pipe by way of rsyslog, but it doesn't matter exactly how you get them there.
 In my rsyslog.conf I just have:
 ```
 *.*                             |/home/epoch/log2notify
 ```

 I recently install xbindkeys so I wouldn't have to fuck with dwm's keybindings as often.
 I have it running
 => https://thebackupbox.net/git/music/music-search music-search
 for alt+m, and
 => https://thebackupbox.net/git/uritools/urilaunch urilaunch
 for alt+u

-- Response ended

-- Page fetched on Sun Jun 2 15:11:05 2024