Skip to content

Instantly share code, notes, and snippets.

@sirkonst
sirkonst / docker-prune.service
Created November 22, 2018 12:25
Remove unused docker resources with systemd (service and timer)
[Unit]
Description=Remove unused docker resources
Documentation=https://docs.docker.com/v17.09/engine/admin/pruning/
After=docker.service
[Service]
Type=oneshot
ExecStart=/usr/bin/docker system prune -f --filter "until=744h"
ExecStart=/usr/bin/docker volume prune -f
@jose-lopes
jose-lopes / rofi-hamster
Created January 27, 2020 23:22
Rofi menu to start/stop hamster tracker
#!/bin/bash
current=$(hamster current | sed 's|^[^ ]\+ [^ ]\+ \(.*\) [^ ]\+$|\1|' | sed 's|@Unsorted|@|')
selected=$(hamster activities | rofi -dmenu -i -select "$current" -p "Select task")
[ -z "$selected" ] && exit
if [ "$current" == "$selected" ]; then
hamster stop
dunstify -a "hamster" "Stop activity $selected"
@advilm
advilm / lock_script.md
Last active September 27, 2024 07:56
Just some files relating to my i3lock setup

scripts/lock.sh

#!/bin/sh

scrot -o /tmp/screenshot.png
convert /tmp/screenshot.png -blur 0x5 /tmp/screenshot.png

# Turn on DND
old_dnd="$(xfconf-query -c xfce4-notifyd -p /do-not-disturb)"
xfconf-query -c xfce4-notifyd -p /do-not-disturb -s true