Skip to content

Instantly share code, notes, and snippets.

@sigboe
sigboe / favorites.zsh
Last active November 6, 2023 17:53
[[ZSH & Bash (untested) ]] Favorites shell functions to manage symlinks in .local/share/favorites. These functions allow you to easily add and remove symlinks to your favorite directories. The cd command is wrapped to follow symlinks when navigating favorites. Note that it's shell-agnostic at least for zsh and bash, but it hasn't been tested in…
# Favorites
favorites="${HOME}/.local/share/favorites"
if [[ -n "${ZSH_VERSION}" ]]; then
cdpath=("${cdpath[@]}" "${favorites}")
elif [[ -n "${BASH_VERSION}" ]]; then
CDPATH=("${CDPATH[@]}" "${favorites}")
fi
favorite() {
local current_dir="${PWD}"
local favorites_dir="${favorites}"
#!/bin/env bash
# adapted from diko_d scripts
# untested, made by ziggurat
if [[ "${1}" == "install" ]]; then
if grep -Fxq "kite-update.sh" /opt/retropie/configs/all/emulationstation/gamelists/retropie/gamelist.xml; then
kitesection=$(
cat <<_END_
<game>
@sigboe
sigboe / suspend-modules
Last active April 16, 2024 03:57 — forked from mauron85/suspend-modules
Systemd unload modules on sleep
#!/bin/bash
# Put into /lib/systemd/system-sleep/suspend-modules
# chmod a+x /lib/systemd/system-sleep/suspend-modules
# Unloads kernel modules defined in /etc/suspend-modules.d/*.conf
# and /etc/suspend-modules
# with one module per line
# Too see credits, see git history
@sigboe
sigboe / vlc play
Last active September 1, 2016 11:56
#!/bin/bash
while true; do
vlc "/mnt/fileserver/folderwithfiles" --fullscreen --no-mouse-events --no-osd --no-audio ;
done