scripts

scripts
git clone git://git.wimdupont.com/scripts.git
Log | Files | Refs | README | LICENSE

README.adoc (6566B)


      1 = Scripts
      2 For certain scripts I've added a "requires" section to specify software which is less likely to be installed by default that the script uses. Most of these can be changed with alternatives by choice if willing to edit the script.
      3 :toc:
      4 
      5 == link:bin/askpass[askpass]
      6 
      7 Prompts for sudo password - using Zenity GUI only when using display server. Meant to be used with addition to the sudo.conf:
      8 
      9 [source, conf]
     10 ----
     11 Path askpass /path/to/askpass
     12 ----
     13 
     14 With this, sudo -A can be used to prompt this script.
     15 
     16 .Requires:
     17 
     18 * https://gitlab.gnome.org/GNOME/zenity[zenity]
     19 
     20 == link:bin/auru[auru]
     21 
     22 Arch Linux AUR updater. Edit path to your AUR repositories in the script before running. For every updated repository, a file selector GUI will prompt to the delete outdated files.
     23 
     24 .Requires:
     25 
     26 * https://gitlab.gnome.org/GNOME/zenity[zenity]
     27 
     28 == link:bin/bookmark[bookmark]
     29 
     30 Uses dmenu to browse and open URL's in your browser saved in a textfile (default in ~/.config/scripts/bookmarks).
     31 
     32 .Requires:
     33 
     34 * https://git.suckless.org/dmenu/[dmenu]
     35 
     36 == link:bin/coin[coin]
     37 
     38 Used to grab cryptocurrency data, including market price. The data itself is powered by CoinGecko API.
     39 This script could easily be chained with https://github.com/dunst-project/dunst[dunst] to have the output as notification. 
     40 
     41 .Requires:
     42 
     43 * https://github.com/stedolan/jq[jq]
     44 
     45 image::docs/coin-in-dunst.png[coin-in-dunst.png]
     46 
     47 == link:bin/decr[decr]
     48 
     49 Decrypts a GPG encrypted TAR file.
     50 
     51 == link:bin/dict[dict]
     52 
     53 Uses https://dictionaryapi.dev/[Free dictionary API] to retrieve word definitions in JSON.
     54 
     55 .Requires:
     56 
     57 * https://github.com/stedolan/jq[jq]
     58 
     59 == link:bin/encr[encr]
     60 
     61 Archives a given file or directory as a TAR file and encrypts it with GPG using symmetric or asymmetric encryption. By default it uses symmetric encryption and looks for encrypted
     62 file "~/.sym-pwd.gpg" to use its content as password.
     63 
     64 == link:bin/gitc[gitc]
     65 
     66 Adds, commits and pushes git changes to all remotes after confirmation. The "pushall" option should first be added to your gitconfig:
     67 
     68 [source,conf]
     69 ----
     70 [alias]
     71 	pushall = !git remote | xargs -L1 git push
     72 ----
     73 
     74 == link:bin/htmlconv[htmlconv]
     75 
     76 Generates html for asciidoc and markdown files and opens in browser or refreshes if current tab has
     77 the html filename in URL.
     78 
     79 .Requires:
     80 
     81 * https://github.com/astrand/xclip[xclip]
     82 * https://github.com/jordansissel/xdotool[xdotool]
     83 * https://github.com/asciidoctor/asciidoctor.git[asciidoctor]
     84 * https://github.com/mity/md4c.git[md4c]
     85 
     86 == link:bin/mpvd[mpvd]
     87 
     88 Uses dmenu to browse through music directory, including option to shuffle when choosing to play a directory.
     89 
     90 .Requires:
     91 
     92 * https://git.suckless.org/dmenu/[dmenu]
     93 * https://github.com/mpv-player/mpv[mpv]
     94 
     95 == link:bin/mpvpop[mpvpop]
     96 
     97 Uses mpv socket to be able to update and grab info of currently played mpv file and/or playlist.
     98 
     99 Can be used using '--input-ipc-server=/tmp/mpvsocket' mpv argument. If you always want this active than you are better off adding to mpv.conf:
    100 
    101 [source,conf]
    102 ----
    103 input-ipc-server=/tmp/mpvsocket
    104 ----
    105 
    106 .Requires:
    107 
    108 * https://github.com/mpv-player/mpv[mpv]
    109 * https://github.com/dunst-project/dunst[dunst]
    110 
    111 == link:bin/otp[otp]
    112 
    113 Lists files safed under the "~/.password-store/totp/" directory in dmenu or as argument and generates TOTP code based on chosen file.
    114 
    115 .Requires:
    116 
    117 * https://git.zx2c4.com/password-store/[pass]
    118 * https://github.com/tadfisher/pass-otp[pass-otp]
    119 * https://git.suckless.org/dmenu/[dmenu]
    120 
    121 == link:bin/pclip[pclip]
    122 
    123 Used to show all clipboard contents in dmenu and allows you to select one which will be typed out.
    124 
    125 .Requires:
    126 
    127 * https://git.suckless.org/dmenu/[dmenu]
    128 * https://github.com/astrand/xclip[xclip]
    129 * https://github.com/jordansissel/xdotool[xdotool]
    130 
    131 == link:bin/pwu[pwu]
    132 
    133 Lists files safed under the "~/.password-store/" directory in dmenu or as argument. The chosen file gets opened using pass followed by:
    134 
    135 * password (first line) get saved in clipboard
    136 * username (second line) gets saved in primary using xclip
    137 * URL (third line) gets opened in default browser using xdg-open
    138 
    139 Only first line is mandatory for this script to be useful, usernames en URL's can be added to files where and when preferred. If there exists a file under the the "otp/" directory
    140 for the same name as the chosen file then pass-otp will be used to copy the OTP to the clipboard after a prompt.
    141 
    142 .Requires:
    143 
    144 * https://git.zx2c4.com/password-store/[pass]
    145 * https://git.suckless.org/dmenu/[dmenu]
    146 * https://github.com/astrand/xclip[xclip]
    147 
    148 == link:bin/sinstaller[sinstaller]
    149 
    150 Installation and patching helper for https://git.suckless.org/[suckless] software. Adjust PROGRAMS and PATCHES arrays to your liking before running.
    151 
    152 .Requires:
    153 
    154 * https://gitlab.gnome.org/GNOME/zenity[zenity]
    155 
    156 == link:bin/radio[radio]
    157 
    158 Uses dmenu to browse and play online radio stations saved in a textfile (default in ~/.config/scripts/radiostations). The textfile should consist of a searchname and the URL separated by a semicolon (;) and with a new line for each new station.
    159 
    160 .Requires:
    161 
    162 * https://git.suckless.org/dmenu/[dmenu]
    163 * https://github.com/mpv-player/mpv[mpv]
    164 
    165 == link:bin/ugamma[ugamma]
    166 
    167 Helper script to update X.org gamma value.
    168 
    169 .Requires:
    170 
    171 * https://github.com/dunst-project/dunst[dunst]
    172 * https://gitlab.freedesktop.org/xorg/app/xgamma[xorg-xgamma]
    173 * https://github.com/lcn2/calc[calc]
    174 
    175 == link:bin/wta[wta]
    176 
    177 Looks up words to add to .csv file after confirmation. To be used as helper for other programs such as link:https://git.wimdupont.com/wordstudent[wordstudent].
    178 
    179 .Requires:
    180 
    181 * link:bin/dict[dict]
    182 
    183 == link:bin/yt[yt]
    184 
    185 Uses mpv and youtube-dl (or forks such as yt-dlp) to easily look up videos from command-line with an audio-only option and an option to specify the amount of results.
    186 
    187 .Requires:
    188 
    189 * https://github.com/mpv-player/mpv[mpv]
    190 * https://github.com/ytdl-org/youtube-dl[youtube-dl]
    191 
    192 == link:bin/ytd[ytd]
    193 
    194 Uses yt-dlp to easily download videos from youtube. Has options for audio-only files from youtube, can also download playlists, and allows for searches on either URL's or keywords.
    195 
    196 .Requires:
    197 
    198 * https://github.com/yt-dlp/yt-dlp[yt-dlp]
    199 
    200 == link:bin/ytd-album[ytd-album]
    201 
    202 Used to download full albums by playlist. The script creates a directory with the bandname followed by a directory with albumname in which the playlist is saved as mp3 files.
    203 The downloaded audio files also get tagged by id3 to make them easy to sort by on devices such as mp3-players.
    204 
    205 .Requires:
    206 
    207 * https://github.com/yt-dlp/yt-dlp[yt-dlp]
    208 * https://git.ffmpeg.org/ffmpeg.git[ffmpeg]
    209 * https://github.com/squell/id3[id3]