Skip to content

nabijaczleweli/topfig

Repository files navigation

topfig Licence

Assorted config/tooling/lube from the nabtop

Change /sys/class/backlight/acpi_video0/brightness by the amount specified as the first argument, clamped to 0..=max_brightness.

Needs to be installed suid, see toplevel doc-comment.

Get the current X keyboard layout in localectl set-x11-keymap LAYOUT/setxkbmap -layout format ("pl", "ru", &c.).

Based on https://unix.stackexchange.com/a/422493/162189, see src/deps for build dependencies.

The following patches to i3status:

  1. 0001-Don-t-pad-CPU-usage-to-2-characters.patch: the cpu_usage metric is padded with %02d by default, this replaces that behaviour with %d.
  2. 0002-Count-all-CPUs-for-general-cpu_usage.patch: cpu_usage of all CPUs is scaled between 0-100 by default, this replaces that behaviour with summing each CPU's load together instead for a scaling of 0-(ncpus*100).

The following patches to st:

  1. 0001-boxdraw_v2-custom-render-lines-blocks-braille-for-pe.patch: boxdraw (0.8.2) patch, plus boxdraw = 1 config.
  2. 0002-scrollback-mouse-scrollback.patch: scrollback, plus mousescrollincrement = 3 config. Includes the following patchs:
    • st-scrollback-20190331-21367a0.diff
    • st-scrollback-mouse-20191024-a2c479c.diff
    • st-scrollback-mouse-altscreen-20191024-a2c479c.diff
    • st-scrollback-mouse-increment-0.8.2.diff
  3. 0003-Apply-ISO-14755-patch.patch: ISO 14755 patch.
  4. 0004-Use-default-monospace-font.patch: request the fontconfig-specified "monospace" font instead of Liberation Mono.

dracut has a long-standing (2013! – dracutdevs/dracut@34b56de) issue wherein in order to enable the resume module it needs to find a swap partition, which is unideal in environments that use swap files exclusively.

There's an open issue from 2018 in the dracut repository – dracutdevs/dracut#496 – mentioning this, but going by the stagnation and two separate maintainers saying swap files are a bad idea and/or doubting the kernel supports them, it will not be resolved any time soon,

As of Tue, 03 Mar 2020 10:51:10 -0800, an equivalent patch has been merged upstream.

The diff present in src/dracut/debian_patches_resume-file can be applied to /usr/lib/dracut/modules.d/95resume/module-setup.sh in order to also check for the presence of any swap-files activated in /proc/swaps.

Alternatively, if you prefer, and are in the mood for building some packages, it can also be used in debian/patches – see here for a clonable repo (and Debian wiki for building).

If you aren't, see the releases page for installable i386 and amd64 debs or add these repositories to your sources.list, signed with my key (also available here):

deb     https://foreign.nabijaczleweli.xyz/debian sid patches
deb-src https://foreign.nabijaczleweli.xyz/debian sid patches

Wait the specified delay, then, if the idle time of $DISPLAY is greater therethan, suspend the machine, e.g. for use with xss-lock.

Wraps i3status in i3bar mode modifying the status line as follows:

  • the current keyboard layout to the left of tztime
  • the current power draw from BAT1 at the end of its sexion

Python 3 port of Google's oauth2 script, as referenced in the mutt manual, following recent breakage on sid.

i3 and i3status config, of note:

i3 screenshot

sway config mirroring the above X/i3 setup.

However, at the time of writing (2020-01-31 19:10:55), two issues prevent me from switching to sway:

  • the window bars are padded around the text signiifcantly more than in i3 (am i being a diva about this? probably; does it bother me? yes; could i patch sway to fix it? maybe, however)
  • SolveSpace not creating GL context

htop config, of @ThePhD fame, laptopified.

htop screenshot 1 htop screenshot 2

baba is uwu-inspired grub colour scheme, boot/grub/baba-colour-background.png is a simple 10x10 solid-colour PNG picked from the background.

Dracut compression setting, optimised for size (and the boot time ain't tee bag, either, but that's probably because of the incredibly speedy original Toshiba drive in this):

nabijaczleweli@nabtop:~/code/topfig$ l /boot/initrd.img-*
-rwxr-xr-x 1 root root 9.3M Feb 11 20:49 /boot/initrd.img-5.4.0-3-686-pae
-rwxr-xr-x 1 root root 9.2M Feb 14 04:04 /boot/initrd.img-5.4.0-4-686-pae

About

Assorted config/tooling/lube from the nabtop

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published