From a66988a6e884273b13a12a85ab80dd08e8a7ce4a Mon Sep 17 00:00:00 2001 From: Benjamin Chausse Date: Fri, 13 Oct 2023 10:43:49 -0400 Subject: Lots of changes --- .local/bin/crontog | 5 ----- .local/bin/makewall | 28 ++++++++++++++++++++++++++++ .local/bin/remaps | 2 -- .local/bin/shortcutgen | 2 ++ 4 files changed, 30 insertions(+), 7 deletions(-) delete mode 100755 .local/bin/crontog create mode 100755 .local/bin/makewall (limited to '.local/bin') diff --git a/.local/bin/crontog b/.local/bin/crontog deleted file mode 100755 index 93c2d30..0000000 --- a/.local/bin/crontog +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh -# Toggles all cronjobs off/on. -# Stores disabled crontabs in ~/.consaved until restored. - -([ -f ~/.config/cronsaved ] && crontab - < ~/.config/cronsaved && rm ~/.config/cronsaved && notify-send "🕓 Cronjobs re-enabled.") || ( crontab -l > ~/.config/cronsaved && crontab -r && notify-send "🕓 Cronjobs saved and disabled.") diff --git a/.local/bin/makewall b/.local/bin/makewall new file mode 100755 index 0000000..f0fc854 --- /dev/null +++ b/.local/bin/makewall @@ -0,0 +1,28 @@ +#!/bin/sh + +wallDir="$XDG_CONFIG_HOME/wallpapers" + +# Acquire the list of connected displays +displays=$(xrandr | grep " connected" | sed 's/^\([a-Z,0-9,-]*\).*/\1/') + +# 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) + xwallpaper --output $1 --zoom $wallDir/$wall ;; + *) + wall=$(ls $wallDir | grep "default" | head -n 1) + xwallpaper --output $1 --zoom $wallDir/$wall ;; + esac +} + +# Set the wallpaper for each display +for display in $displays; do + setDisplay $display +done + diff --git a/.local/bin/remaps b/.local/bin/remaps index 595022d..ed6ae43 100755 --- a/.local/bin/remaps +++ b/.local/bin/remaps @@ -9,5 +9,3 @@ setxkbmap -option caps:super 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' -# Software fix for key bounce (debouncing) -xkbset bo 50 diff --git a/.local/bin/shortcutgen b/.local/bin/shortcutgen index e5817d9..0020ec9 100755 --- a/.local/bin/shortcutgen +++ b/.local/bin/shortcutgen @@ -53,6 +53,8 @@ vifmy=$( echo "$vifm" | sed " s/|/:copy/") echo "$vifmcd\n\n$vifmv\n\n$vifmy" > ~/.cache/vifm-shortcuts + + # #---Testing---# # # echo "$raw" | sed "s/[A-z,a-z,0-9]*\s*|//" -- cgit v1.2.3