summaryrefslogtreecommitdiff
path: root/.local/bin
diff options
context:
space:
mode:
authorBenjamin Chausse <benjamin@chausse.xyz>2025-03-31 12:16:47 -0400
committerBenjamin Chausse <benjamin@chausse.xyz>2025-03-31 12:16:47 -0400
commit4ccdb6fb1f53bc6c799ece8c2f03a0fede093acd (patch)
tree9d3a73a81547fff442263c28bdfd9d1e98895d5d /.local/bin
parentf4c4550e327d9090c82a735d39d104d0bedb602d (diff)
config cleanupHEADmaster
Diffstat (limited to '.local/bin')
-rwxr-xr-x.local/bin/lazydockerbin11558912 -> 0 bytes
-rwxr-xr-x.local/bin/makewall.bak30
-rwxr-xr-x.local/bin/media-notify5
-rwxr-xr-x.local/bin/newsup14
-rwxr-xr-x.local/bin/previewclean10
-rwxr-xr-x.local/bin/quitapp11
-rwxr-xr-x.local/bin/remaps11
-rwxr-xr-x.local/bin/rotdir12
l---------.local/bin/scope1
-rwxr-xr-x.local/bin/shortcutgen-v155
-rwxr-xr-x.local/bin/shortcutgen.bak23
l---------.local/bin/strm1
-rwxr-xr-x.local/bin/tmux-r17
-rwxr-xr-x.local/bin/winit6
14 files changed, 0 insertions, 196 deletions
diff --git a/.local/bin/lazydocker b/.local/bin/lazydocker
deleted file mode 100755
index c356cb3..0000000
--- a/.local/bin/lazydocker
+++ /dev/null
Binary files differ
diff --git a/.local/bin/makewall.bak b/.local/bin/makewall.bak
deleted file mode 100755
index b098dff..0000000
--- a/.local/bin/makewall.bak
+++ /dev/null
@@ -1,30 +0,0 @@
-#!/bin/sh
-
-wallDir="${XDG_CONFIG_HOME:-$HOME}/wallpapers"
-
-# Acquire the list of connected displays
-displays="$(wlr-randr --json | jq -r '.[] | select(.enabled) | .name')"
-echo "$displays"
-
-# If there is a wallpaper with a filename matching the display
-# name, set it as the wallpaper for that display.
-# ex: DP-1.jpg and DP-1.png are both valid filenames
-# Otherwise, set the wallpaper to the default wallpaper
-# (default.png or default.jpg)
-setDisplay() {
- case $(ls $wallDir) in
- *"$1"*)
- wall=$(ls $wallDir | grep "$1" | head -n 1)
- ;;
- *)
- wall=$(ls $wallDir | grep "default" | head -n 1)
- ;;
- esac
- swaybg --output $1 -m fill --image $wallDir/$wall &
-}
-
-# Set the wallpaper for each display
-killall swaybg >/dev/null 2>&1
-for display in $displays; do
- setDisplay $display
-done
diff --git a/.local/bin/media-notify b/.local/bin/media-notify
deleted file mode 100755
index dd9563f..0000000
--- a/.local/bin/media-notify
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/sh
-
-# Create a temporary directory
-current="$(mktemp -d)"
-raw="$(playerctl metadata)"
diff --git a/.local/bin/newsup b/.local/bin/newsup
deleted file mode 100755
index b94ca37..0000000
--- a/.local/bin/newsup
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/bin/sh
-# Set as a cron job to check for new RSS entries for newsboat.
-# If newsboat is open, sends it an "R" key to refresh.
-
-ping -q -c 1 1.1.1.1 > /dev/null || exit
-
-/usr/bin/notify-send -t 1 -i "$HOME/.fonts/svg/rss.svg" -a RSS "Updating RSS feeds..."
-
-pgrep -x newsboat >/dev/null && /usr/bin/xdotool key --window "$(/usr/bin/xdotool search --name newsboat)" R && exit
-
-echo "  " > /tmp/newsupdate && kill -37 $(pidof dwmblocks)
-/usr/bin/newsboat -x reload
-rm -f /tmp/newsupdate
-/usr/bin/notify-send -t 1 -a " RSS" "RSS feed update complete." && kill -37 $(pidof dwmblocks)
diff --git a/.local/bin/previewclean b/.local/bin/previewclean
deleted file mode 100755
index 8b0a570..0000000
--- a/.local/bin/previewclean
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/sh
-
-threshold="200000" # 200 MB
-previewdir="${XDG_CACHE_HOME:-$HOME/.cache}/lf"
-
-# Check if the total size of the preview directory exceeds the threshold
-# and remove the last viewed file until it doesn't
-while [ "$(du -s "$previewdir" | cut -f1)" -gt "$threshold" ]; do
- rm -f "$(find "$previewdir" -type f -printf '%T+ %p\n' | sort | head -n1 | cut -d' ' -f2)"
-done
diff --git a/.local/bin/quitapp b/.local/bin/quitapp
deleted file mode 100755
index 60a8644..0000000
--- a/.local/bin/quitapp
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/bin/sh
-
-active_window="$(xdotool getwindowfocus)"
-active_class=$(xprop -id "$active_window" WM_CLASS | awk '{print $4}')
-
-if [ "$active_class" = '"firefox"' ]; then
- xdotool windowclose "$active_window"
-else
- kill -15 "$(xdotool getwindowfocus getwindowpid)"
-fi
-
diff --git a/.local/bin/remaps b/.local/bin/remaps
deleted file mode 100755
index ed6ae43..0000000
--- a/.local/bin/remaps
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/bin/sh
-
-# This script is called on startup to remap keys.
-# Increase key speed via a rate change
-xset r rate 300 50
-# Map the caps lock key to super...
-setxkbmap -option caps:super
-# But when it is pressed only once, treat it as escape.
-killall xcape 2>/dev/null ; xcape -e 'Super_L=Escape'
-# Map the menu button to right super as well.
-xmodmap -e 'keycode 135 = Super_R'
diff --git a/.local/bin/rotdir b/.local/bin/rotdir
deleted file mode 100755
index d171f29..0000000
--- a/.local/bin/rotdir
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/bin/sh
-
-# When I open an image from the file manager in nsxiv (the image viewer), I want
-# to be able to press the next/previous keys to key through the rest of the
-# images in the same directory. This script "rotates" the content of a
-# directory based on the first chosen file, so that if I open the 15th image,
-# if I press next, it will go to the 16th etc. Autistic, I know, but this is
-# one of the reasons that nsxiv is great for being able to read standard input.
-
-[ -z "$1" ] && echo "usage: rotdir regex 2>&1" && exit 1
-base="$(basename "$1")"
-ls "$PWD" | awk -v BASE="$base" 'BEGIN { lines = ""; m = 0; } { if ($0 == BASE) { m = 1; } } { if (!m) { if (lines) { lines = lines"\n"; } lines = lines""$0; } else { print $0; } } END { print lines; }'
diff --git a/.local/bin/scope b/.local/bin/scope
deleted file mode 120000
index 7d5b41b..0000000
--- a/.local/bin/scope
+++ /dev/null
@@ -1 +0,0 @@
-/home/master/.config/lf/scope \ No newline at end of file
diff --git a/.local/bin/shortcutgen-v1 b/.local/bin/shortcutgen-v1
deleted file mode 100755
index fa08875..0000000
--- a/.local/bin/shortcutgen-v1
+++ /dev/null
@@ -1,55 +0,0 @@
-#!/bin/sh
-
-[ -f "$XDG_CONFIG_HOME/shortcutrc" ] && src="$XDG_CONFIG_HOME/shortcutrc" || exit 1
-
-# If you do not want to create a specific file, replace the path with /dev/null
-lf_filepath="${XDG_CONFIG_HOME:-$HOME/.config}/lf/shortcuts"
-zsh_filepath="${XDG_CACHE_HOME:-$HOME/.cache}/zsh-shortcuts"
-env_filepath="${XDG_CACHE_HOME:-$HOME/.cache}/env-shortcuts"
-
-awk '
-BEGIN {
- FS=","
- OFS=","
-}
-
-# Function to remove whitespaces from a string
-function remove_whitespace(str) {
- gsub(/[[:space:]]/, "", str)
- return str
-}
-
-{
- # Remove comments
- gsub(/#.*/, "")
-
- # Remove whitespaces from column 2
- $2 = remove_whitespace($2)
-
- # Remove leading and trailing whitespaces from column 3
- gsub(/^[[:space:]]+|[[:space:]]+$/, "", $3)
-
- # whenever a line contains only commas, replace it with an empty string
- # so that we can check if a line is empty or not
- gsub(/^,+$|^,+|,+$|,+,/, "", $0)
-
- # Check if line is empty or contains only whitespace
- if (NF) {
-
- # Convert column 2 to lowercase
- lc_col2 = tolower($2)
-
- # Convert column 2 to uppercase
- uc_col2 = toupper($2)
-
- # Write to $XDG_CONFIG_HOME/lf/shortcuts
- print "map g" lc_col2 " " $3 > ENVIRON["XDG_CONFIG_HOME"] "/lf/shortcuts"
-
- # Write to $XDG_CACHE_HOME/zsh-shortcuts
- print "alias g" lc_col2 "=\"cd " $3 "\"" > ENVIRON["XDG_CACHE_HOME"] "/zsh-shortcuts"
-
- # Write to $XDG_CACHE_HOME/env-shortcuts
- print "export G" uc_col2 "=\"" $3 "\"" > ENVIRON["XDG_CACHE_HOME"] "/env-shortcuts"
- }
-}
-' XDG_CONFIG_HOME="$XDG_CONFIG_HOME" XDG_CACHE_HOME="$XDG_CACHE_HOME" "$src"
diff --git a/.local/bin/shortcutgen.bak b/.local/bin/shortcutgen.bak
deleted file mode 100755
index fe5ed75..0000000
--- a/.local/bin/shortcutgen.bak
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/sh
-
-
-# raw (basic processing before converting to specific formats)
-# - remove comments
-# - remove empty lines
-# - remove spacing (keep commas between columns)
-# - remove trailing whitespace
-
-# Strip comments, remove empty lines, condense spacing, remove trailing whitespace
-raw="$(sed 's/#.*//g;s/,[[:space:]]*/,/g;/^$/d;s/[[:space:]]*$//g' <"${XDG_CONFIG_HOME:-$HOME/.config}/shortcutrc")"
-
-# lf (sourced by lfrc)
-echo "$raw" | sed 's/\(.*\),\(.*\),\(.*\)/map g\2 cd \3/' >"${XDG_CONFIG_HOME:-$HOME/.config}/lf/shortcuts"
-
-# Shell aliases (read by zshrc)
-echo "$raw" | sed 's/\(.*\),\(.*\),\(.*\)/alias g\2="cd \3"/' >"${XDG_CACHE_HOME:-$HOME/.cache}/zsh-shortcuts"
-
-# Environment variables (read by .profile)
-echo "$raw" | sed 's/^\(.*\),\(.*\),/export G\U\2=,/;s/,\(.*\)/\1/' >"${XDG_CACHE_HOME:-$HOME/.cache}/env-shortcuts"
-
-
-
diff --git a/.local/bin/strm b/.local/bin/strm
deleted file mode 120000
index c1a120b..0000000
--- a/.local/bin/strm
+++ /dev/null
@@ -1 +0,0 @@
-/home/master/.local/src/strm/strm \ No newline at end of file
diff --git a/.local/bin/tmux-r b/.local/bin/tmux-r
deleted file mode 100755
index 6b4819c..0000000
--- a/.local/bin/tmux-r
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/bin/sh
-
-session="R"
-
-# Check if the session exists, discarding output
-# We can check $? for the exit status (zero for success, non-zero for failure)
-tmux has-session -t $session 2>/dev/null
-
-if [ $? != 0 ]; then
- # Set up your session
- tmux new-session -d -s "$session" R -q --no-save
- # R -q --no-save
- # ([ -e /usr/bin/R ] && R -q --no-save) || python -q
-fi
-
-# Attach to created session
-tmux attach-session -t $session
diff --git a/.local/bin/winit b/.local/bin/winit
deleted file mode 100755
index 1fd2d9e..0000000
--- a/.local/bin/winit
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/sh
-
-# winit: Wayland Init (using dwl)
-
-dwl &
-swaybg -i ~/.config/wallpaper/default.jpg &