This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Override mpv's default volume keybinds with decibel controls | |
-- Put this file (dbvol.lua) in ~/.config/mpv/scripts/ | |
-- WARNING: positive gain values may cause clipping | |
-- Author: Romain "Artefact2" Dal Maso <romain.dalmaso@artefact2.com> | |
-- Released under the WTFPLv2 | |
function round(n) | |
-- https://stackoverflow.com/a/58411671 | |
return n + (2^52 + 2^51) - (2^52 + 2^51) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/sh | |
# disable some processes from showing | |
systemctl -t service --plain --no-legend --no-pager list-unit-files --state enabled,disabled | grep -Fv -e freedesktop -e systemd | sed 's/\..*//' > /tmp/sysunits & | |
systemctl list-unit-files -t service --no-legend --user --state enabled,disabled | sed 's/\..*//' > /tmp/usrunits & | |
action=$(dmenu <<EOF | |
start | |
stop | |
restart |