From 653f81eec07eb3e33c380810676a7feb45e1df43 Mon Sep 17 00:00:00 2001 From: Fuwn Date: Thu, 29 Aug 2024 21:31:09 -0700 Subject: some stuff --- home/ebisu/meta/scripts/default.nix | 13 --- home/ebisu/meta/scripts/scripts/.gitignore | 8 -- home/ebisu/meta/scripts/scripts/altserver | 12 --- home/ebisu/meta/scripts/scripts/anidub | 3 - home/ebisu/meta/scripts/scripts/anime | 3 - home/ebisu/meta/scripts/scripts/apod | 6 -- home/ebisu/meta/scripts/scripts/catboy | 8 -- home/ebisu/meta/scripts/scripts/chan2 | 3 - home/ebisu/meta/scripts/scripts/fim | 20 ----- home/ebisu/meta/scripts/scripts/gmiwatch | 24 ------ home/ebisu/meta/scripts/scripts/hon | 11 --- home/ebisu/meta/scripts/scripts/locs | 102 ----------------------- home/ebisu/meta/scripts/scripts/neovide-lunarvim | 7 -- home/ebisu/meta/scripts/scripts/reco | 58 ------------- home/ebisu/meta/scripts/scripts/setbg | 75 ----------------- home/ebisu/meta/scripts/scripts/shiori | 49 ----------- home/ebisu/meta/scripts/scripts/skyla | 53 ------------ home/ebisu/meta/scripts/scripts/start-vm | 21 ----- home/ebisu/meta/scripts/scripts/tup-init | 25 ------ home/ebisu/meta/scripts/scripts/vivwal | 59 ------------- home/ebisu/meta/scripts/scripts/wal_mako | 45 ---------- home/ebisu/meta/scripts/scripts/worlds | 15 ---- 22 files changed, 620 deletions(-) delete mode 100644 home/ebisu/meta/scripts/default.nix delete mode 100644 home/ebisu/meta/scripts/scripts/.gitignore delete mode 100755 home/ebisu/meta/scripts/scripts/altserver delete mode 100755 home/ebisu/meta/scripts/scripts/anidub delete mode 100755 home/ebisu/meta/scripts/scripts/anime delete mode 100755 home/ebisu/meta/scripts/scripts/apod delete mode 100755 home/ebisu/meta/scripts/scripts/catboy delete mode 100755 home/ebisu/meta/scripts/scripts/chan2 delete mode 100755 home/ebisu/meta/scripts/scripts/fim delete mode 100755 home/ebisu/meta/scripts/scripts/gmiwatch delete mode 100755 home/ebisu/meta/scripts/scripts/hon delete mode 100755 home/ebisu/meta/scripts/scripts/locs delete mode 100644 home/ebisu/meta/scripts/scripts/neovide-lunarvim delete mode 100755 home/ebisu/meta/scripts/scripts/reco delete mode 100755 home/ebisu/meta/scripts/scripts/setbg delete mode 100755 home/ebisu/meta/scripts/scripts/shiori delete mode 100755 home/ebisu/meta/scripts/scripts/skyla delete mode 100755 home/ebisu/meta/scripts/scripts/start-vm delete mode 100644 home/ebisu/meta/scripts/scripts/tup-init delete mode 100755 home/ebisu/meta/scripts/scripts/vivwal delete mode 100755 home/ebisu/meta/scripts/scripts/wal_mako delete mode 100755 home/ebisu/meta/scripts/scripts/worlds (limited to 'home/ebisu/meta/scripts') diff --git a/home/ebisu/meta/scripts/default.nix b/home/ebisu/meta/scripts/default.nix deleted file mode 100644 index 58851ea..0000000 --- a/home/ebisu/meta/scripts/default.nix +++ /dev/null @@ -1,13 +0,0 @@ -{ pkgs, ... }: -let - scriptDir = ./scripts; - generateScripts = builtins.listToAttrs (builtins.map - (name: { - name = name; - value = pkgs.writeShellScriptBin name (builtins.readFile "${scriptDir}/${name}"); - }) - (builtins.attrNames (builtins.readDir scriptDir))); -in -{ - home.packages = builtins.attrValues generateScripts; -} diff --git a/home/ebisu/meta/scripts/scripts/.gitignore b/home/ebisu/meta/scripts/scripts/.gitignore deleted file mode 100644 index 2ea4e67..0000000 --- a/home/ebisu/meta/scripts/scripts/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -know -hime -mirrors -pok -bt -counter -rinny -suzuri \ No newline at end of file diff --git a/home/ebisu/meta/scripts/scripts/altserver b/home/ebisu/meta/scripts/scripts/altserver deleted file mode 100755 index 0a0d5f9..0000000 --- a/home/ebisu/meta/scripts/scripts/altserver +++ /dev/null @@ -1,12 +0,0 @@ -# Wrapper around AltServer for usage on *nix - -# doas usbmuxd & - -# export USBMUXD_SOCKET_ADDRESS=127.0.0.1:27015 - -# doas netmuxd --disable-unix --host 127.0.0.1 & - -docker run -d -v lib_cache:/opt/lib/ --restart=always -p 6969:6969 --name anisette dadoum/anisette-server:latest - -# Not very Nix .... -ALTSERVER_ANISETTE_SERVER=http://127.0.0.1:6969 python3 ~/.local/src/AltServer-Linux/main.py diff --git a/home/ebisu/meta/scripts/scripts/anidub b/home/ebisu/meta/scripts/scripts/anidub deleted file mode 100755 index aacf84f..0000000 --- a/home/ebisu/meta/scripts/scripts/anidub +++ /dev/null @@ -1,3 +0,0 @@ -# Wrapper around ani-cli (dubbed) for Rofi - -ANI_CLI_PLAYER=clapper ani-cli --dub --rofi "${1}" diff --git a/home/ebisu/meta/scripts/scripts/anime b/home/ebisu/meta/scripts/scripts/anime deleted file mode 100755 index 60b143b..0000000 --- a/home/ebisu/meta/scripts/scripts/anime +++ /dev/null @@ -1,3 +0,0 @@ -# Wrapper around ani-cli for Rofi - -ANI_CLI_PLAYER=mpv ani-cli --rofi "${1}" diff --git a/home/ebisu/meta/scripts/scripts/apod b/home/ebisu/meta/scripts/scripts/apod deleted file mode 100755 index a8814a9..0000000 --- a/home/ebisu/meta/scripts/scripts/apod +++ /dev/null @@ -1,6 +0,0 @@ -# Get today's Astronomy Picture of the Day (APOD) from NASA - -printf \ - "https://apod.nasa.gov/apod/%s\\n" \ - "$(curl --silent "https://apod.nasa.gov/apod/" | - grep -Po 'SRC="\K[^"]+')" diff --git a/home/ebisu/meta/scripts/scripts/catboy b/home/ebisu/meta/scripts/scripts/catboy deleted file mode 100755 index cc75e52..0000000 --- a/home/ebisu/meta/scripts/scripts/catboy +++ /dev/null @@ -1,8 +0,0 @@ -# VPN wrapper around catgirl - -vpn_ip="$(piactl get vpnip)" - -BIND_INTERFACE=wgpia0 \ - LD_PRELOAD=/usr/lib/bindtointerface.so \ - BIND_SOURCE_IP=${vpn_ip} \ - catgirl "${1}" diff --git a/home/ebisu/meta/scripts/scripts/chan2 b/home/ebisu/meta/scripts/scripts/chan2 deleted file mode 100755 index 525d5f1..0000000 --- a/home/ebisu/meta/scripts/scripts/chan2 +++ /dev/null @@ -1,3 +0,0 @@ -# Tiny wrapper around chan-downloader - -chan-downloader -c 10 --thread "${1}" -o "${2}" diff --git a/home/ebisu/meta/scripts/scripts/fim b/home/ebisu/meta/scripts/scripts/fim deleted file mode 100755 index d1be1c5..0000000 --- a/home/ebisu/meta/scripts/scripts/fim +++ /dev/null @@ -1,20 +0,0 @@ -# Finger "blog" updater - -HOST="sina" - -while getopts "f" opt; do - case ${opt} in - f) FORMAT=true ;; - *) FORMAT=false ;; - esac -done - -shift $((OPTIND - 1)) - -PROFILE="/var/lib/docker/volumes/gigi-data/_data/${1:-fuwn}" - -if [ -n "${FORMAT}" ]; then - ssh -t "${HOST}" "vim -c 'autocmd BufWritePost * !fmt -w 80 % > %.tmp && mv %.tmp %' '${PROFILE}'" -else - ssh -t "${HOST}" "vim '${PROFILE}'" -fi diff --git a/home/ebisu/meta/scripts/scripts/gmiwatch b/home/ebisu/meta/scripts/scripts/gmiwatch deleted file mode 100755 index cf3e52a..0000000 --- a/home/ebisu/meta/scripts/scripts/gmiwatch +++ /dev/null @@ -1,24 +0,0 @@ -# Gemini capsule watcher, used for development - -usage() { - echo "usage: ${0} [-n interval] " - - exit 1 -} - -while getopts "n:" opt; do - case ${opt} in - n) - interval=${OPTARG} - - shift 2 - ;; - *) usage ;; - esac -done - -if [ -z "${1}" ]; then - usage -fi - -watch -n "${interval:-5}" -t gmni -j always "gemini://${1}" diff --git a/home/ebisu/meta/scripts/scripts/hon b/home/ebisu/meta/scripts/scripts/hon deleted file mode 100755 index b4436ec..0000000 --- a/home/ebisu/meta/scripts/scripts/hon +++ /dev/null @@ -1,11 +0,0 @@ -# Personal manga feed wrapper around Suzuri - -SUZURI_MINIMAL=1 \ - SUZURI_REVERSE=1 \ - suzuri \ - AXHJex1ZiWcQFSzUKhQ5uW \ - Anime | - grep -iF manga | - sed -E 's|http[s]?://[^ ]+||g' | - sed 's/^/* /' | - tac # | glow -w 2048 diff --git a/home/ebisu/meta/scripts/scripts/locs b/home/ebisu/meta/scripts/scripts/locs deleted file mode 100755 index 7b0ea19..0000000 --- a/home/ebisu/meta/scripts/scripts/locs +++ /dev/null @@ -1,102 +0,0 @@ -# Silly lines-of-code counter - -DEFAULT_COMMENT_STYLES='(//|#|/\*|\*|)' -FILE_MAX_LENGTH=5 - -count_non_empty_lines() { - local file="${1}" - grep -cve '^\s*$' "${file}" -} - -process_files() { - for file in "$@"; do - if [ -f "${file}" ]; then - if [ ${#file} -gt "${longest_filename}" ]; then - longest_filename=${#file} - fi - fi - done - - for file in "$@"; do - if [ -f "${file}" ]; then - lines=$(count_non_empty_lines "${file}") - total_lines=$((total_lines + lines)) - - case "${file}" in - *.gleam) COMMENT_STYLE='(//)' ;; - *.cc | *.hh | *.cpp | *.hpp | *.c | *.h) COMMENT_STYLE='(//|/\*)' ;; - *) COMMENT_STYLE=${DEFAULT_COMMENT_STYLES} ;; - esac - - comments=$(grep -E "^\s*${COMMENT_STYLE}\s*.*\s*$" "${file}" | grep -v '^\s*$' | wc -l) - total_comments=$((total_comments + comments)) - - printf "%-${longest_filename}s %-${FILE_MAX_LENGTH}s %s\n" "${file}" "$((lines - comments))" "${comments}" - - if [ "${LOCS_PRINT_COMMENTS:-0}" = 1 ]; then - grep -n -E "^\s*${COMMENT_STYLE}\s*.*\s*$" "${file}" | grep -v '^\s*$' | sed 's/^/ /' | sed 's/\s*\/\///' | sed 's/\([0-9]\+\): /\1 | /' - - if [ "${comments}" -gt 0 ]; then - echo - fi - fi - fi - done -} - -main() { - local total_lines=0 - local total_comments=0 - local longest_filename=0 - - if [ -z "$1" ]; then - cat < - -⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢲⢄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ -⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ -⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⠄⠂⢉⠤⠐⠋⠈⠡⡈⠉⠐⠠⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ -⠀⠀⠀⠀⢀⡀⢠⣤⠔⠁⢀⠀⠀⠀⠀⠀⠀⠀⠈⢢⠀⠀⠈⠱⡤⣤⠄⣀⠀⠀⠀⠀⠀ -⠀⠀⠰⠁⠀⣰⣿⠃⠀⢠⠃⢸⠀⠀⠀⠀⠀⠀⠀⠀⠁⠀⠀⠀⠈⢞⣦⡀⠈⡇⠀⠀⠀ -⠀⠀⠀⢇⣠⡿⠁⠀⢀⡃⠀⣈⠀⠀⠀⠀⢰⡀⠀⠀⠀⠀⢢⠰⠀⠀⢺⣧⢰⠀⠀⠀⠀ -⠀⠀⠀⠈⣿⠁⡘⠀⡌⡇⠀⡿⠸⠀⠀⠀⠈⡕⡄⠀⠐⡀⠈⠀⢃⠀⠀⠾⠇⠀⠀⠀⠀ -⠀⠀⠀⠀⠇⡇⠃⢠⠀⠶⡀⡇⢃⠡⡀⠀⠀⠡⠈⢂⡀⢁⠀⡁⠸⠀⡆⠘⡀⠀⠀⠀⠀ -⠀⠀⠀⠸⠀⢸⠀⠘⡜⠀⣑⢴⣀⠑⠯⡂⠄⣀⣣⢀⣈⢺⡜⢣⠀⡆⡇⠀⢣⠀⠀⠀⠀ -⠀⠀⠀⠇⠀⢸⠀⡗⣰⡿⡻⠿⡳⡅⠀⠀⠀⠀⠈⡵⠿⠿⡻⣷⡡⡇⡇⠀⢸⣇⠀⠀⠀ -⠀⠀⢰⠀⠀⡆⡄⣧⡏⠸⢠⢲⢸⠁⠀⠀⠀⠀⠐⢙⢰⠂⢡⠘⣇⡇⠃⠀⠀⢹⡄⠀⠀ -⠀⠀⠟⠀⠀⢰⢁⡇⠇⠰⣀⢁⡜⠀⠀⠀⠀⠀⠀⠘⣀⣁⠌⠀⠃⠰⠀⠀⠀⠈⠰⠀⠀ -⠀⡘⠀⠀⠀⠀⢊⣤⠀⠀⠤⠄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠤⠄⠀⢸⠃⠀⠀⠀⠀⠀⠃⠀ -⢠⠁⢀⠀⠀⠀⠈⢿⡀⠀⠀⠀⠀⠀⠀⢀⡀⠀⠀⠀⠀⠀⠀⢀⠏⠀⠀⠀⠀⠀⠀⠸⠀ -⠘⠸⠘⡀⠀⠀⠀⠀⢣⠀⠀⠀⠀⠀⠀⠁⠀⠃⠀⠀⠀⠀⢀⠎⠀⠀⠀⠀⠀⢠⠀⠀⡇ -⠀⠇⢆⢃⠀⠀⠀⠀⠀⡏⢲⢤⢀⡀⠀⠀⠀⠀⠀⢀⣠⠄⡚⠀⠀⠀⠀⠀⠀⣾⠀⠀⠀ -⢰⠈⢌⢎⢆⠀⠀⠀⠀⠁⣌⠆⡰⡁⠉⠉⠀⠉⠁⡱⡘⡼⠇⠀⠀⠀⠀⢀⢬⠃⢠⠀⡆ -⠀⢢⠀⠑⢵⣧⡀⠀⠀⡿⠳⠂⠉⠀⠀⠀⠀⠀⠀⠀⠁⢺⡀⠀⠀⢀⢠⣮⠃⢀⠆⡰⠀ -⠀⠀⠑⠄⣀⠙⡭⠢⢀⡀⠀⠁⠄⣀⣀⠀⢀⣀⣀⣀⡠⠂⢃⡀⠔⠱⡞⢁⠄⣁⠔⠁⠀ -⠀⠀⠀⠀⠀⢠⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠸⠉⠁⠀⠀⠀⠀ -⠀⠀⠀⠀⠀⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡇⠀⠀⠀⠀⠀ - -EOF - - exit 1 - fi - - local files - - files=$(find "${@}" -type f) - - process_files ${files} >/tmp/lines - - if [ "${LOCS_HEADER:-1}" = 1 ]; then - printf "%-${longest_filename}s %-${FILE_MAX_LENGTH}s %s\n" "filename" "lines" "comments" - fi - - if [ "${LOCS_PRINT_COMMENTS:-0}" = 1 ] || [ "${LOCS_SORT:-1}" = 0 ]; then - cat /tmp/lines - else - sort -k2nr "${tmpfile1}" - -# awk '{ -# print substr($0, 1, 74) sprintf("%06d", NR) substr($0, 81); -# }' "${tmpfile1}" >"${tmpfile2}" - -# mv "${tmpfile2}" "${filename}" -mv "${tmpfile1}" "${filename}" diff --git a/home/ebisu/meta/scripts/scripts/setbg b/home/ebisu/meta/scripts/scripts/setbg deleted file mode 100755 index a399344..0000000 --- a/home/ebisu/meta/scripts/scripts/setbg +++ /dev/null @@ -1,75 +0,0 @@ -background_location="${XDG_DATA_HOME:-${HOME}/.local/share}/bg" -dunst_configuration_file="${XDG_CONFIG_HOME:-${HOME}/.config}/dunst/dunstrc" -zathura_configuration_file="${XDG_CONFIG_HOME:-${HOME}/.config}/zathura/zathurarc" - -while getopts "s" o; do case "${o}" in - s) silent='1' ;; - *) ;; - esac done - -shift $((OPTIND - 1)) - -true_background_location="$(readlink -f "$1")" && - case "$(file --mime-type -b "${true_background_location}")" in - image/*) - ln -sf "${true_background_location}" "${background_location}" && - [ -z "${silent}" ] && - notify-send -i "${background_location}" "Changing wallpaper ..." - ;; - inode/directory) - link=$(find "${true_background_location}" -iregex '.*.\(jpg\|jpeg\|png\|gif\)' -type f | shuf -n 1) - - ln -sf "${link}" "${background_location}" && [ -z "${silent}" ] && notify-send -i "${background_location}" "Random wallpaper chosen." - ;; - *) - [ -z "${silent}" ] && - notify-send "Error" "Invalid image or directory found." - - exit 1 - ;; - esac - -if command -v wal >/dev/null 2>&1; then - link=$(readlink -f "${background_location}") - - wal -n -i "${link}" -o "${XDG_CONFIG_HOME:-${HOME}/.config}/wal/postrun" >/dev/null 2>&1 -else - [ -f "${dunst_configuration_file}.bak" ] && - unlink "${dunst_configuration_file}" && - mv "${dunst_configuration_file}.bak" "${dunst_configuration_file}" - - [ -f "${zathura_configuration_file}.bak" ] && - unlink "${zathura_configuration_file}" && - mv "${zathura_configuration_file}.bak" "${zathura_configuration_file}" -fi - -case "$(loginctl show-session 1 -p Type)" in -*"wayland") - hyprpaper_configuration_file="${HOME}/.config/hypr/hyprpaper.conf" - - cp "${HOME}/.cache/wal/colors-waybar.css" "${HOME}/.config/waybar/colors-waybar.css" - cp "${hyprpaper_configuration_file}" "${hyprpaper_configuration_file}.bak" - - if pidof hyprpaper >/dev/null; then - awk -v newpath="${true_background_location}" ' -BEGIN { FS = OFS = "=" } -/^preload/ { - $2 = " " newpath -} -/^wallpaper/ { - split($2, a, ","); - $2 = a[1] "," newpath -} -{ print } -' "${hyprpaper_configuration_file}.bak" >"${hyprpaper_configuration_file}" - killall -9 hyprpaper >/dev/null - hyprpaper >/dev/null & - elif pidof swww-daemon >/dev/null; then - swww img "${true_background_location}" & - fi - ;; -*) - xwallpaper --zoom "${background_location}" - pidof sei >/dev/null && xdotool key super+F5 - ;; -esac diff --git a/home/ebisu/meta/scripts/scripts/shiori b/home/ebisu/meta/scripts/scripts/shiori deleted file mode 100755 index 5f825e7..0000000 --- a/home/ebisu/meta/scripts/scripts/shiori +++ /dev/null @@ -1,49 +0,0 @@ -# Random ASCII art - -# https://zh.moegirl.org.cn/Shift_JIS%E8%89%BA%E6%9C%AF -art=() - -# http://aa.en.utf8art.com/node/52/txtcaa -read -r -d '' art['0'] <:)" >&2 - - exit 1 -fi - -# if [ "${SUDO_USER}" ]; then -# real_user=$SUDO_USER -# else -# real_user=$(whoami) -# fi - -systemctl start libvirtd >/dev/null && echo "libvirtd started" - -virsh net-start default >/dev/null && echo "default network started" diff --git a/home/ebisu/meta/scripts/scripts/tup-init b/home/ebisu/meta/scripts/scripts/tup-init deleted file mode 100644 index 387fa53..0000000 --- a/home/ebisu/meta/scripts/scripts/tup-init +++ /dev/null @@ -1,25 +0,0 @@ -tup init >/dev/null - -cat <Tupfile -# Input & Output Directories -SOURCE_DIRECTORY = . -INCLUDE_DIRECTORY = . -BUILD_DIRECTORY = build - -# Compiler Configuration -CC = clang++ -CC_EXTENSION = cc -CC_FLAGS = -std=c++23 -I \$(INCLUDE_DIRECTORY) -Weverything -Wno-padded -Wno-c++98-compat -MMD -Wno-c++98-compat-pedantic - -# Clang-tidy Configuration -CLANG_TIDY_CHECKS = '-*,bugprone-*,clang-analyzer-*,concurrency-*,cppcoreguildelines-*,llvm-*,misc-*,modernize-*,performance-*,portability-*,readability-*,-readability-magic-numbers,-llvm-header-guard,-bugprone-suspicious-include,-readability-function-cognitive-complexity,-bugprone-exception-escape' -CLANG_TIDY_FLAGS = -checks=\$(CLANG_TIDY_CHECKS) -warnings-as-errors=* -quiet - -NAME = $(basename "$(pwd)") - -: foreach \$(SOURCE_DIRECTORY)/*.\$(CC_EXTENSION) \$(INCLUDE_DIRECTORY)/*.hh |> clang-format -i %f |> -: foreach \$(SOURCE_DIRECTORY)/*.\$(CC_EXTENSION) |> clang-tidy \$(CLANG_TIDY_FLAGS) %f -- \$(CC_FLAGS) |> -: foreach \$(SOURCE_DIRECTORY)/*.\$(CC_EXTENSION) |> ^j^ \$(CC) \$(CC_FLAGS) -MF \$(BUILD_DIRECTORY)/%B.d -c %f -o %o |> \$(BUILD_DIRECTORY)/%B.o | \$(BUILD_DIRECTORY)/%B.d -: \$(BUILD_DIRECTORY)/*.o ^test.o |> \$(CC) %f -o %o |> \$(BUILD_DIRECTORY)/\$(NAME) -: \$(BUILD_DIRECTORY)/*.o ^main.o |> \$(CC) %f -o %o |> \$(BUILD_DIRECTORY)/\$(NAME)_test -EOF diff --git a/home/ebisu/meta/scripts/scripts/vivwal b/home/ebisu/meta/scripts/scripts/vivwal deleted file mode 100755 index 995359e..0000000 --- a/home/ebisu/meta/scripts/scripts/vivwal +++ /dev/null @@ -1,59 +0,0 @@ -# Sets Vivaldi's theme colors to those generated by Wal. -# Source: https://forum.vivaldi.net/topic/34521/linux-changing-theme-via-command-line/22?_=1597433612704 -# Author: Vivaldi Forum user Wismut - -logfile=~/.log/vivwal.log - -text_color="#eeeeee" -if [[ "$1" && "$1" == "-l" ]]; then - text_color="#111111" -fi - -# Source Wal colors (replace this path with the path where the colors generated by wal are stored) -source ~/.cache/wal/colors.sh - -# testing if vivaldi is running -PROCESS1=vivaldi -PROCESS2=crconsole -PIDS_Vivaldi=$(ps cax | grep $PROCESS1 | grep -o '^[ ]*[0-9]*') -PIDS_crconsole=$(ps cax | grep $PROCESS2 | grep -o '^[ ]*[0-9]*') -if [ -z "$PIDS_Vivaldi" ]; then - # Vivaldi is not running - if [ -z "$PIDS_crconsole" ]; then - echo "All is fine. Neither Vivaldi nor crconsole are running." 1>&2 - else - # kill crconsole - pkill -f "node /usr/bin/crconsole" - fi -else - # Vivaldi is running - # let's start using crconsole - # find all open tabs - tablist=$( - echo .tabs | crconsole & - sleep 1 - pkill -f "node /usr/bin/crconsole" - ) - # read each tab - while read -r line; do - echo "... $line ..." - # find /browser.html tab - if [[ $line == *"/browser.html"* ]]; then - tabnumber=$(echo "$line" | grep -o '[0-9]\+') - # change Vivaldi accent background colors - var=$( - ( - echo ".switch $tabnumber" - sleep 1 - echo "chrome.storage.local.set({'BROWSER_COLOR_BG':'$background', 'BROWSER_COLOR_FG':'$text_color', 'BROWSER_COLOR_ACCENT_BG':'$color5', 'BROWSER_COLOR_HIGHLIGHT_BG':'$color1'})" - ) | crconsole & - sleep 1 - pkill -f "node /usr/bin/crconsole" - ) - echo "$var" >$logfile - fi - done <<<"$tablist" - sleep 1 - pkill -f "node /usr/bin/crconsole" -fi -exit diff --git a/home/ebisu/meta/scripts/scripts/wal_mako b/home/ebisu/meta/scripts/scripts/wal_mako deleted file mode 100755 index 5cf4b1f..0000000 --- a/home/ebisu/meta/scripts/scripts/wal_mako +++ /dev/null @@ -1,45 +0,0 @@ -# Mako colourscheme setter for use with pywal - -MAKO_CTL="/usr/bin/makoctl" -MAKO_CONFIG="${HOME}/.config/mako/config" -MAKO_CONFIG_TEMPLATE="${MAKO_CONFIG}.template" -WAL_COLOURS="${HOME}/.cache/wal/colors" - -cp "${MAKO_CONFIG_TEMPLATE}" "${MAKO_CONFIG}" - -colour_iteration=0 - -while IFS= read -r line; do - eval "COLOR${colour_iteration}=\"${line}\"" - - colour_iteration=$((colour_iteration + 1)) -done <"${WAL_COLOURS}" - -unset colour_iteration - -cat <>"${MAKO_CONFIG}" -background-color=${COLOR0} -text-color=${COLOR15} - -# [urgency=low] -# border-color=${COLOR2} -# background-color=${COLOR4} -# text-color=${COLOR6} - -# [urgency=normal] -# border-color=${COLOR1} -# background-color=${COLOR3} -# text-color=${COLOR5} -# default-timeout=10000 -# ignore-timeout=1 - -# [urgency=high] -# font=Sauce Code Pro 16 -# border-color=${COLOR1} -# background-color=${COLOR2} -# text-color=${COLOR6} -# default-timeout=0 -# ignore-timeout=1 -EOF - -${MAKO_CTL} reload diff --git a/home/ebisu/meta/scripts/scripts/worlds b/home/ebisu/meta/scripts/scripts/worlds deleted file mode 100755 index 834079a..0000000 --- a/home/ebisu/meta/scripts/scripts/worlds +++ /dev/null @@ -1,15 +0,0 @@ -# WorldsPlayer runner for use in Bottles - -NAMESPACE=worlds - -# kitty -e doas termshark -i worlds_vo & -wireshark -k -i "${NAMESPACE}_vo" & - -doas runnet \ - --publish-all-ports \ - --user=fuwn \ - --netns=${NAMESPACE} \ - --internet \ - bottles-cli run \ - -p WorldsPlayer \ - -b 'WorldsPlayer' -- cgit v1.2.3