This is repository of my Archlinux scripts I use on daily basis.
If you'd like to use this repository in your PATH keep in mind there are a few folders. In order to scrap all the script names from every folder I use find
.
find $HOME/scripts -type d
This will generate bunch of weird folders we don't really need related to git, so we can ignore them like so
find $HOME/scripts -type d ! -iwholename "*git*" -printf %p:
This will scrap every folder and subfolder inside scripts directory and we can use it to add them as additional records in PATH
. Directories in PATH
are splited by colon sign hence addigional -printf
flag.
scripts_dirs=$(find $HOME/scripts -type d ! -iwholename "*git*" -printf %p:)
export PATH=$PATH:/usr/local/games:/usr/local/bin:$HOME/.local/share/applications:$HOME/:$scripts_dirs
Most of my scripts use:
cdda2wav
to rip CD Audio discs into wav files andflac
to compress them to loseless formatdmenu
for listing optionsfzf
although I think the only one usingfzf
iskcs
right now and possibly I'll move to dmenu as well in futuregnutils
such asgawk
,grep
,tr
,tail
,head
,echo
,read
,file
,find
xrandr
for monitor scriptsxinput
used intouchtog
dunst
or another program for sending notifications vianotify-send
- either
amixer
orpactl
depending on what you're using for sound mpc
andncmpcpp
for playing musicsxiv
to pick a wallpaperxrandr
to manage monitors and resolutionsffmpeg
for webcam preview (webcam
script) and screen recording (record
script)maim
for screenshots and screen area picking forrecord
screenkey
specificly insctog
to start and stopscreenkey
application in the backgroundudisks2
to manage usb drives
There are few scripts that expects you to have certain variables to be set in order to work.
var | description | used by |
---|---|---|
SCRIPTS_DIR | self explainatory, your scripts directory | - |
WALLPAPER_DIR | a file that supposed to be used as your wallpaper i.e. $HOME/wallpaper.png |
setwall, swapwall |
WALLPAPERS_DIR | directory with your wallpapers, i.e. $HOME/Pictures/wallpapers |
setwall, swapwall |
SCREENSHOT_DIR | directory with your screenshots, i.e. $HOME/Pictures/screenshots |
screenshot |
KEEPASS_DIR | directory with your keepass database, i.e. $HOME/Keepass/ |
kcs |
DEFAULT_OUTPUT | default output for screen manipulation like change resolution, i.e. DP-4` | conmon |
TOUCHPAD_ID | touchpad device id to toggle it off | touchtog, tpadstatus |
OPEN_WEATHER_KEY | api key to make weather widget on dwm statusbar work | weather |
I try to group scripts into folders for maintenance but they also have functional reasons. Here's short description of some of them.
- aliases - a group of scripts that could have been aliases but I find it easier to maintain it there
- capture
- cd
- cron - notify - simple wrapper for notify-send with timeout of 10s, safe to use with cronjobs
- sound - everything related to sound management, volume, mute status, switching sinks and so on
- screen - monitors, wallpapers, brightness, screenshots
- conmon - connect additional monitor (currently hardcoded to
right-of
so mostly for 2 monitors as of now) - light - increases and decreases brightness
- night - runs redshift
- screenshot - copies screenshots to $SCREENSHOT_DIR as well as to your xclip
- setwall - sets wallpaper
- showmonitors - lists monitors
- swapres - changes resolution and refresh rate
- swapwall - replaces wallpaper file or runs sxiv to pick one and then calls setwall
- conmon - connect additional monitor (currently hardcoded to
- pacman - scripts related to pacman
- keepassxc - scripts related to keepassxc
- kcs - Keepass + rclone sync to update/merge database.
- askpass - calls dmenu for password, if dmenu has -P flag (patch) it stars the input and sends it forward
- statusbar - dwm bar status bar scripts to present cpu and ram usage, volume, date and time, nothing fancy there
- emotes - dumb script to present emotes and its tags and copy over needed one to the
xclip
- marktime - sets timestamp and adds it to a file. Then substracts it from previous one to count time period. Can be used to track time
- scan - uses plugged in scanner and tries to scan image
- sshadd - picks ssh key from dmenu to use with ssh-agent, asks for password using
askpass
if possible - startdwm - while loop that reruns dwm every time it's binary has changed
- subdate - subtracts two dates
- touchtog - uses
xinput
to toggle provided device - usboff - kosher way of make usb drives off
- ytrss - generates rss from youtube channel/playlist/user