Skip to content

Instantly share code, notes, and snippets.

View oleasteo's full-sized avatar
✍️
Docendo discimus

Ole Asteo oleasteo

✍️
Docendo discimus
View GitHub Profile
@oleasteo
oleasteo / m4b-split-chapters
Created January 8, 2024 00:22
Split m4b files by chapter
#!/bin/bash
###
# Splits an m4b file by chapter with the `mkvmerge` tool. Then, the parts
# are converted back into m4b containers with `ffmpeg`.
#
# Usage: m4b-split-chapters [FILE]
###
FILE="$1"
@oleasteo
oleasteo / .XCompose
Created October 2, 2024 00:28
key layout: en_US + german umlauts + special + greek
# ~/.XCompose
# load defaults ( /usr/share/X11/locale/en_US.UTF-8/Compose )
include "%L"
<Multi_key> <g> <A> : "Α" U0391 # GREEK CAPITAL LETTER ALPHA
<Multi_key> <g> <a> : "α" U03B1 # GREEK SMALL LETTER ALPHA
<Multi_key> <g> <B> : "Β" U0392 # GREEK CAPITAL LETTER BETA
<Multi_key> <g> <b> : "β" U03B2 # GREEK SMALL LETTER BETA
<Multi_key> <g> <D> : "Δ" U0394 # GREEK CAPITAL LETTER DELTA
@oleasteo
oleasteo / hyprcfg-toggle
Last active November 22, 2024 20:49
Hyprland config feature-toggle
#!/bin/bash
# ~/.local/bin/hyprcfg-toggle
# dependency: shlike-toggle (AUR, https://github.com/oleasteo/shlike-toggle)
sleep 0.3 && shlike-toggle ~/.config/hypr/hyprland.conf "$@"
#!/bin/bash
cmd="$0"
usage() {
cat <<EOL
Usage: $cmd [...OPTIONS] [LENGTH=16]
Generates a random string based on the specified alphabet. If no alphabet is
specified, the \`base\` alphabet is used (alphanumeric and special characters).

This is my setup to add german umlauts and other special characters (in a mapping that makes sense to me, personally) via R_ALT to my en_US (halmak) layout.

It requires keyd to be installed. Also, the compose:menu option must be enabled (setup differs by window manager).