Skip to content

suckless software

st

My st configuration can be found in github

Place st-autocomplete somewhere in $PATH. It depends on perl.

The font I use is ubuntu variant of iosevka: aur

Apart from these I have these fonts installed as fallback fonts to support glyphs, chinese/japanese/korean characters and emoji:

  1. ttf-iosevka-nerd
  2. ttf-sarasa-gothic
  3. noto-fonts-emoji
config.def.h
static char *font2[] = {
  "IosevkaTerm Nerd Font Mono:pixelsize=22:antialias=true:autohint=true",
  "Sarasa Term Slab CL:pixelsize=12:antialias=true:autohint=true",
  "Noto Color Emoji:pixelsize=16:antialias=true:autohint=true",
};

Patches applied:

  1. scrollback ring buffer
  2. autocomplete
  3. alpha
  4. newterm
  5. external pipe
  6. blinking cursor

dwm

My dwm configuration can be found in github.

Notable modifications to vanilla dwm are autostart patch and status-colors patch so that status bar can change colors to alert me of the status of battery (charging, disconnected, low).

If there's a program that I want to autostart when launching dwm, I add it here in config.def.h:

static const char *const autostart[] = {
    "xmodmap", "/home/vector/.Xmodmap", NULL,
    "dunst", NULL,
    "slstatus", NULL,
    "picom", NULL,
    // "hsetroot", "-full", "/home/vector/admin/dwm/wallpaper.png", NULL,
    // "feh", "--bg-fill", "/home/vector/admin/dwm/wallpaper.jpg", NULL,
    // "wallset", "--video", "/home/vector/admin/dwm/xasthur.mp3", NULL,
    "/home/vector/bin/wallpaper.sh",
    // "/home/vector/bin/splash.sh",
    NULL /* terminate */
};

I also set keymaps from config.def.h. A lot of these keymaps expect scripts to exist in ~/bin.

DWM dependencies:

depends=('libx11' 'libxinerama' 'libxft' 'freetype2')

Since I found it tedious to use pacman here, I just do the regular install with

make clean
make
sudo make install

~/bin scripts

~/bin/dwm-alto.sh
#!/bin/bash
ID=`xdotool search --class dwmalto`
if ! [[ -z $ID ]];
then
    if xdotool search --onlyvisible --class dwmalto;
    then
        xdotool windowunmap $ID
    else
        xdotool windowmap $ID
    fi
else
    tabbed -c -n dwmalto st -w
fi
~/bin/inc-volume.sh
#!/bin/bash

function ProgressBar {
# Process data
    let _progress=(${1}*100/${2}*100)/100
    let _done=(${_progress}*2)/10
    let _left=20-$_done
# Build progressbar string lengths
    _fill=$(printf "%${_done}s")
    _empty=$(printf "%${_left}s")

# 1.2 Build progressbar strings and print the ProgressBar line
# 1.2.1 Output example:
# 1.2.1.1 Progress : [########################################] 100%
printf "[${_fill// /#}${_empty// /-}] ${_progress}%%"

}


pactl -- set-sink-volume 0 +5%

VOL=$(pamixer --get-volume)

notify-send -t 1000 -h string:x-canonical-private-synchronous:volume-notification "VOL: $(ProgressBar $VOL 100)"
~/bin/dec-volume.sh
#!/bin/bash

function ProgressBar {
# Process data
    let _progress=(${1}*100/${2}*100)/100
    let _done=(${_progress}*2)/10
    let _left=20-$_done
# Build progressbar string lengths
    _fill=$(printf "%${_done}s")
    _empty=$(printf "%${_left}s")

# 1.2 Build progressbar strings and print the ProgressBar line
# 1.2.1 Output example:
# 1.2.1.1 Progress : [########################################] 100%
printf "[${_fill// /#}${_empty// /-}] ${_progress}%%"

}

pactl -- set-sink-volume 0 -5%

VOL=$(pamixer --get-volume)

notify-send -t 1000 -h string:x-canonical-private-synchronous:volume-notification "VOL: $(ProgressBar $VOL 100)"
~/bin/wallpaper.sh
#!/bin/bash

while true
do
    # Font arguments: convert -list font
    magick ~/admin/dwm/wallpaper.jpg -font "Iosevka-Term-SS12" -pointsize 48 -fill white -gravity center -annotate +0+0 "$(date '+%A, %B %d %Y%n%H:%M:%S%n%Y-%m-%d')" -  | feh --bg-fill -
    sleep 1
done

Comments