This file contains hidden or 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
#!/bin/sh | |
# check #!/bin/sh-shebanged scripts in /usr/bin for | |
# dash-incompatible syntax using shellcheck. | |
# config | |
outdir=~/bashisms | |
searchdir=/usr/bin | |
mkdir -p "$outdir" || exit 1 |
This file contains hidden or 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
#!/bin/bash | |
# winetricks, but for Bottles (https://github.com/bottlesdevs/Bottles). | |
# config | |
d=~/.local/share/bottles | |
set -e | |
cd ${d:?}/bottles | |
b=$(printf '%s\n' * | fzf) | |
r=$(grep '^Runner:' $b/bottle.yml | cut -d' ' -f2) |
This file contains hidden or 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
#!/bin/sh | |
# burn a file or an iso to a dvd. | |
# requires the cdrtools package. | |
# usage: $ burn FILE [TITLE] | |
# config | |
speed=1 # leave blank for default speed | |
dev=/dev/sr0 | |
tmp=~/.cache/burn |
This file contains hidden or 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
#!/bin/sh | |
# detect and show IP Address, MAC Address and OS of local network computers. | |
# requires nmap and ip(iproute2). | |
gateway=$(ip route); gateway=${gateway#*via }; gateway=${gateway%% *} | |
localip=$(ip route get 1); localip=${localip#*src }; localip=${localip%% *} | |
scan=$(sudo nmap -sT -n -O --host-timeout 1m "${gateway:?}"/24) || exit 1 | |
printf '%s\n' "${scan:?}" | while IFS= read -r line; do case $line in 'Nmap scan report for '*) |
This file contains hidden or 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
#!/bin/bash | |
# show android notifications on linux. | |
# it updates duckdns ddns and portforwards via upnp. | |
# requires a duckdns account, NetworkManager, miniupnpc and an2linux. | |
# config | |
duckdns_token= # put your duckdns token here | |
local_ddns= # local ddns name | |
public_ddns= # public ddns name |
This file contains hidden or 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
function script_description() | |
return [[ | |
<h2>obs-pulse-remap v1</h2> | |
<p>Load a module-remap-sink on pulseaudio when OBS starts, and unload it when OBS exits.</p> | |
<p>Useful for when you want OBS to capture the audio of only one program.</p> | |
<p>Author: ghesy <ehsan at disroot dot org></p> | |
]] | |
end | |
local modules = {} |
This file contains hidden or 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
#!/bin/sh | |
# this script accompanies barrier (https://github.com/debauchee/barrier). | |
# it runs commands upon your mouse leaving or entering your machine. | |
# config | |
interval=2 | |
check_count=10 | |
# this hook runs when mouse enters this machine. |
This file contains hidden or 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
AddKeysToAgent yes | |
Host github.com | |
IdentityFile ~/.ssh/keys/github | |
Host aur.archlinux.org | |
IdentityFile ~/.ssh/keys/aur | |
User aur | |
Host desktop.local |
This file contains hidden or 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
#!/bin/sh | |
# this script return true if the pointer is on the root window. | |
# requires xorg-xwininfo and xdotool. | |
rootwin=$(xwininfo -root | grep -Po 'Window id: \K\S+') | |
currentwin=$(printf '0x%x\n' "$(xdotool getmouselocation | cut -d: -f5)") | |
[ -n "$currentwin" ] && [ "$currentwin" = "$rootwin" ] |
This file contains hidden or 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
#!/bin/bash | |
# a dmenu wrapper script for system functions. | |
actions=( | |
'鈴 Sleep' | |
'鈴 Hibernate' | |
'⏻ Poweroff' | |
' Reboot' | |
' Logout' | |
) |