$HOME/.bin scripts and other cool things
[synchronize-colors] Adjust base16-xresources path
[synchronize-colors] Adjust python virtual env name
[power] Use loginctl instead of pm-*


browse  log 



You can also use your local clone with git send-email.


Here I keep scripts and utils that live on my ~/.bin directory. They are currently on a private git repo, so I'm cleaning and importing them.

I try my best to make them optimal. But as they works for my needs, feel free to make suggestions and improvements on them.


file: mutefy

Old script to mute ads on Spotify (when using Alsa). I don't use it anymore, so maybe it isn't working right now.


file: renamer

Rename all files where invoked, removing whitespaces (and some other trash), in order to ease file handling on command line. Also, the new file name can have all characters in upper or lower case.


file: imgurme

Parse and download images from an imgur gallery url.


file: curreios

Check Correios shipments.


file: update-git

Update git repositories found on the current directory (with its submodules).


file: show-ansi-colors.sh

Display current terminal colors. Based on this script.


file: wireguard_allow_ip_ranges.sh

Update wireguard config files PostUp and PreDown rules to allow specific IP ranges.


file: power

Lock X screen and/or suspend/hybernate.


$ power <suspend|hibernate|hybrid|lock-only>

This script clears cached GPG passwords when called. If ran without arguments, will hybrid-suspend the system.

Also, can be used as an acpi event handler (/etc/acpi/event/lid):

event=button/lid LID close
action=su "$(ps aux | grep xinit | grep -v grep | awk '{print $1}')" -c "power lock-only"


file: pinentry-auto

Show pinentry-curses or pinentry-qt if requiring GPG password from a terminal emulator of from a GUI application. Based on this script.


Configure your pinentry-program entry to pinentry-auto and set USE_CURSES=1 on the PINENTRY_USER_DATA environment variable on your shell.

$ cat ~/.gnupg/gpg-agent.conf
pinentry-program /home/mdk/.bin/pinentry-auto
$ cat ~/.profile

Note: If starting X from command line (runlevel 3; e.g.: startx), just unset PINENTRY_USER_DATA:

$ cat ~/.xinitrc

#generate-colors.py && synchronize-colors.sh

files: generate-colors.py, synchronize-colors.sh

Generate application specific color theme based on a template and the current base16 shell theme in use, and syncronize them all across some applications, refreshing and reloading them.


$ base16_solarized-dark && synchronize-colors

synchronize-colors.sh will call generate-colors.py. They are tailored for my need, but suggestions and improvements are wellcome. See my dotfiles for a pratical example of the use.


You can take a look on them on my dotfiles repo ;)