dotfiles

regexghost dotfiles and scripts
git clone https://git.regexghost.com/dotfiles.git
Log | Files | Refs | README

commit 98a5a8770059e9603d063e8aef524a08645541bb
parent 55775eb2261035e6a435c7ff51ea9013019f0975
Author: regexghost <dev@regexghost.com>
Date:   Sun,  2 Aug 2026 21:26:01 +0100

stream launcher improvements, more kshrc trimming, guides/ updates

Diffstat:
Mapt-install.sh | 2+-
Mdotfiles/.kshrc | 23++---------------------
Mdotfiles/Image_Viewer-Substitution-sxiv-.kshrc | 2+-
Mguides/archInstallGuide.md | 2+-
Mguides/commands.txt | 4++++
Mterminal-scripts/ytdl-wrapper.sh | 8++++++++
Mwm-scripts/launch-stream.sh | 7+++++++
7 files changed, 24 insertions(+), 24 deletions(-)

diff --git a/apt-install.sh b/apt-install.sh @@ -1,3 +1,3 @@ #!/bin/sh -sudo apt install curl wget golang xorg xinit x11-xserver-utils bluetooth unzip git firefox-esr mpv vlc tar moc fasd fonts-roboto fonts-firacode figlet jq xcompmgr picom trash-cli ncdu pulsemixer feh moc-ffmpeg-plugin keepassxc-full fzf libnotify-bin dunst texinfo xmlstarlet duf gh tidy w3m bluetooth xclip wbritish wbritish-huge rsync pup rename ifuse libimobiledevice-utils chromium groff xdotool pulseaudio-module-bluetooth sqlite3 expect aria2 gammastep qimgv kimageformat-plugins kimageformat6-plugins nomacs mediainfo mpd mpc htop python3-venv btop alpine unrar-free android-file-transfer nnn xfe vim +sudo apt install curl wget golang xorg xinit x11-xserver-utils bluetooth unzip git firefox-esr mpv vlc tar moc fasd fonts-roboto fonts-firacode figlet jq xcompmgr picom trash-cli ncdu pulsemixer feh moc-ffmpeg-plugin keepassxc-full fzf libnotify-bin dunst texinfo xmlstarlet duf gh tidy w3m bluetooth xclip wbritish wbritish-huge rsync pup rename ifuse libimobiledevice-utils chromium groff xdotool pulseaudio-module-bluetooth sqlite3 expect aria2 gammastep qimgv kimageformat-plugins kimageformat6-plugins nomacs mediainfo mpd mpc htop python3-venv btop alpine unrar-free android-file-transfer nnn xfe vim yq diff --git a/dotfiles/.kshrc b/dotfiles/.kshrc @@ -114,10 +114,8 @@ alias gdc='git diff --cached' # Show diff for things `git add`'ed alias gdw='git diff --word-diff-regex=.' alias gs='git status .' alias gsa='git status' -alias gpl='git pull' alias gl='git log' alias glc='echo "$(git rev-list --count HEAD) commits"' -alias gp='git push' alias ga='git add' alias gc='git commit' @@ -195,26 +193,11 @@ alias t='date-time' ## Wrapper script alias yt-dlp='ytdl-wrapper' -yt-playlist () { - quality_option="--720p" - if [[ "$1" == "--1080p" ]]; then - quality_option="--1080p" - shift - fi - ytdl-wrapper --playlist-order --all-metadata --firefox-cookies --aria --archive "$quality_option" "$@" -} - -archivevideo () { - for url in "$@"; do - yt-dlp --cookies-from-browser firefox -o "%(title)s.%(ext)s" --embed-chapters --embed-thumbnail --embed-metadata -f "bestvideo[protocol=https][vcodec*=avc]+bestaudio[ext=m4a]" "$url" - done -} - archiveplaylist () { if [[ "$1" == "-t" ]]; then - yt-dlp --cookies-from-browser firefox --flat-playlist --skip-download -J "$2" | jq '{title, videos: [.entries[] | {title, channel, id}]}' | yq -t + ytdl-wrapper --firefox-cookies --json "$2" | jq '{title, videos: [.entries[] | {title, channel, id}]}' | yq -t else - yt-dlp --cookies-from-browser firefox -J --flat-playlist "$1" | jq '.entries[] | [.title,.channel,.url]| @csv' + ytdl-wrapper --firefox-cookies --json "$1" | jq '.entries[] | [.title,.channel,.url]| @csv' fi } @@ -297,8 +280,6 @@ fi . "$fasd_cache" unset fasd_cache -#eval "$(fasd --init auto)" - do_z () { command="fasd_cd -d" if [[ "$1" == "--choice" ]]; then diff --git a/dotfiles/Image_Viewer-Substitution-sxiv-.kshrc b/dotfiles/Image_Viewer-Substitution-sxiv-.kshrc @@ -2,7 +2,7 @@ # Open images in sxiv # The alias is called "rs" as I originally used Xfce with Ristretto rs () { - toOpen=$@ + toOpen="$@" if [[ "$toOpen" == "" ]]; then setsid sxiv . else diff --git a/guides/archInstallGuide.md b/guides/archInstallGuide.md @@ -1,6 +1,6 @@ # Arch Install Guide -This install guide is mainly for my reference, specific to my normal setup process. Most of the commands below would likely be the same on any system, and I have included different commands for UEFI or BIOS, or for NVidia cards. +This install guide is mainly for my reference, specific to my normal setup process. Most of the commands below would likely be the same on any system, and I have included different commands for UEFI or BIOS, for NVidia cards, and for Intel and AMD CPUs. It's recommanded you read [the Arch wiki install guide](https://wiki.archlinux.org/title/Installation_guide) if you are installing Arch for the first time. diff --git a/guides/commands.txt b/guides/commands.txt @@ -12,3 +12,7 @@ fio --name=usbseq --filename=test.test --size=1G --rw=readwrite --bs=1M --direct = disable ~/.sudo_as_admin_successful sudo visudo `Defaults !admin_flag` + += sed print or delete given line +sed '4p' +sed '4d' diff --git a/terminal-scripts/ytdl-wrapper.sh b/terminal-scripts/ytdl-wrapper.sh @@ -51,6 +51,14 @@ while [[ $# -gt 0 ]]; do archive_args=("--download-archive" "archive.txt") shift ;; + --json) + other_args=("--flat-playlist" "--skip-download" "-J") + shift + ;; + --best) + format_args=("-f" "bestvideo[protocol=https][vcodec*=avc]+bestaudio[ext=m4a]") + shift + ;; --1080p) format_args=("-f" "bestvideo[height<=1080][protocol=https][vcodec*=avc]+bestaudio[ext=m4a]") shift diff --git a/wm-scripts/launch-stream.sh b/wm-scripts/launch-stream.sh @@ -7,20 +7,27 @@ stream="$(cat "$XDG_CONFIG_HOME/regexghost/streams.csv" | cut -d "," -f 1 | "$DM [ "$stream" = "" ] && exit line="$(sed -n "$((stream+1))p" "$XDG_CONFIG_HOME/regexghost/streams.csv")" +name="$(echo "$line" | cut -d "," -f 1)" twitch="$(echo "$line" | cut -d "," -f 2)" youtube="$(echo "$line" | cut -d "," -f 3)" kick="$(echo "$line" | cut -d "," -f 4)" if ! [ "$youtube" = "NONE" ]; then + notify-send "Launching ${name} YouTube stream" mpv --no-resume-playback --ytdl-format="bestvideo[height<=480]" "https://youtube.com/${youtube}/live" && exit + notify-send "Failed to open YouTube stream" fi if ! [ "$kick" = "NONE" ]; then + notify-send "Launching ${name} Kick stream" mpv --no-resume-playback --ytdl-format="2" "https://kick.com/${kick}" && exit + notify-send "Failed to open Kick stream" fi if ! [ "$twitch" = "NONE" ]; then + notify-send "Launching ${name} Twitch stream" mpv --no-resume-playback "https://twitch.tv/${twitch}" && exit + notify-send "Failed to open Twitch stream" fi notify-send "Not live or unable to open stream"