~mdkcore/dotbins

$HOME/.bin scripts and other cool things
[power] Use loginctl instead of pm-*
[generate-colors|synchronize-colors] Add generate-colors.py and synchronize-colors.sh
[README] Better layout

refs

master
browse  log 

clone

read-only
https://git.sr.ht/~mdkcore/dotbins
read/write
git@git.sr.ht:~mdkcore/dotbins

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

#dotbins

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.

#mutefy

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.

#renamer

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.

#imgurme

file: imgurme

Parse and download images from an imgur gallery url.

#curreios

file: curreios

Check Correios shipments.

#update-git

file: update-git

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

#show-ansi-colors.sh

file: show-ansi-colors.sh

Display current terminal colors. Based on this script.

#wireguard_allow_ip_ranges.sh

file: wireguard_allow_ip_ranges.sh

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

#power

file: power

Lock X screen and/or suspend/hybernate.

Usage:

$ 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"

#pinentry-auto

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.

Usage:

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
...
export PINENTRY_USER_DATA="USE_CURSES=1"
...

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

$ cat ~/.xinitrc
...
unset PINENTRY_USER_DATA
...

#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.

Usage:

$ 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.

#dotfiles

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