├── addvm.sh ├── archman.sh ├── audio ├── bar.sh ├── baraction.sh ├── batt.sh ├── battery ├── binclock.sh ├── bookmarks.sh ├── clock ├── clock.sh ├── conktoggle.sh ├── display_clock.sh ├── dmenu ├── edit_configs.sh └── herbst-logout.sh ├── fileupdate.sh ├── flag.sh ├── funclock.sh ├── fuzclock.sh ├── fuzzytime.sh ├── gpush ├── gpush2 ├── hlSratch.sh ├── hotkeys.sh ├── jake@linux ├── launch.sh ├── load-layout.sh ├── logo ├── logout.sh ├── mailcheck.sh ├── menu.sh ├── mygrep ├── pacupdate ├── promptcom.sh ├── schedule.sh ├── scpad ├── scratch ├── scratch2 ├── scratchpad ├── snake ├── sound ├── testmenu.sh ├── themesel.sh ├── todo.sh ├── updicon.sh ├── updicon.sh.bkp ├── vmach.sh ├── vol ├── vol.sh ├── volchange.sh ├── volume ├── vsp ├── vsp2 ├── wall ├── weather ├── web ├── windows.sh └── ytsubs.sh /addvm.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # Created By: Jake@Linux 4 | # Created On: Tue 31 Jan 2023 09:35:22 AM CST 5 | # Project: virtual machine creation script, used with vmach.sh script or as a stand-alone installer 6 | 7 | read -rep $'What distro?\n: ' distro 8 | read -rep $'How many CPUs?\n: ' cpu 9 | read -rep $'How much Mem?\n: ' mem 10 | read -rep $'Name of iso?\n: ' iso 11 | read -rep $'Disk size?\n: ' gb 12 | read -rep $'Type of OS?\n: ' os 13 | read -rep $'Bios or UEFI?\n: ' boot 14 | 15 | # Run the virtual machine creation command in the background using nohup 16 | nohup virt-install --name="$distro" --vcpus="$cpu" --memory="$mem" --cdrom="/home/jake/Media/iso/$iso" --disk size="$gb" --os-variant="$os" --boot "$boot" & 17 | 18 | # Optionally, you can add a sleep to give the process some time to start before closing the terminal 19 | sleep 1 20 | 21 | read -r -p "Press Enter to continue" 22 | 23 | # Close the terminal window 24 | exit 25 | 26 | -------------------------------------------------------------------------------- /archman.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | #must have awman installed also change browser variable to whichever browser you currently use 4 | 5 | #variable for web browser 6 | browser="firefox" 7 | 8 | #prompt user for input as to what application they want information about 9 | echo "what application?" 10 | 11 | #takes user input and creates a variable called application to be called later 12 | read -r application 13 | 14 | #run netcat to check for ingernet connection 15 | nc -z 8.8.8.8 53 >/dev/null 2>&1 16 | online=$? 17 | 18 | #if internet connection found, launches web browser to arch wiki and fills in application variable with user input from above 19 | if [ $online -eq 0 ]; then 20 | "$browser" https://wiki.archlinux.org/title/"$application" 21 | 22 | #if no internet connection found, launches awman (command line, offline version of arch wiki) and calls application from user input above 23 | else 24 | printf "No Connection" 25 | fi 26 | 27 | 28 | -------------------------------------------------------------------------------- /audio: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | filter() { mpc | sed "/^volume:/d;s/\\&/&/g;s/\\[paused\\].*/⏸/g;/\\[playing\\].*/d" | paste -sd ' ';} 4 | 5 | pidof -x mpdup >/dev/null 2>&1 || mpdup >/dev/null 2>&1 & 6 | 7 | case $BLOCK_BUTTON in 8 | 1) mpc status | filter ; setsid -f "$TERMINAL" -e ncmpcpp ;; # right click, pause/unpause 9 | 2) mpc toggle | filter ;; # right click, pause/unpause 10 | 3) mpc status | filter ; notify-send "🎵 Music module" "\- Shows mpd song playing. 11 | - ⏸ when paused. 12 | - Left click opens ncmpcpp. 13 | - Middle click pauses. 14 | - Scroll changes track.";; # right click, pause/unpause 15 | 4) mpc prev | filter ;; # scroll up, previous 16 | 5) mpc next | filter ;; # scroll down, next 17 | 6) mpc status | filter ; "$TERMINAL" -e "$EDITOR" "$0" ;; 18 | *) mpc status | filter ;; 19 | esac 20 | 21 | -------------------------------------------------------------------------------- /bar.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ############################## 4 | # VOLUME 5 | ############################## 6 | 7 | vol() { 8 | vol="$(amixer -D pulse get Master | awk -F'[][]' 'END{ print $4":"$2 }')" 9 | echo -e " $vol" 10 | } 11 | 12 | ############################## 13 | # WORKSPACES # 14 | ############################## 15 | 16 | workspaces() { 17 | while true; do 18 | if read line < $PANEL_FIFO; then 19 | wm_status="" 20 | IFS=':' read -a array <<< "$line" 21 | for element in "${array[@]}"; do 22 | if [[ $element =~ ^D ]]; then 23 | wm_status="$wm_status ^fg(white)${element:1}" 24 | elif [[ $element =~ ^d ]]; then 25 | wm_status="$wm_status ^ca(1, bspc use ${element:1})^fg(darkgray)${element:1}^ca()" 26 | elif [[ $element =~ ^E ]]; then 27 | wm_status="$wm_status ^ca(1, bspc use ${element:1})^fg(#6b6b6b)${element:1}^ca()" 28 | elif [[ $element =~ ^L ]]; then 29 | wm_status="$wm_status • ^ca(1, bspc cycle_layout)^fg(white)${element:1}^ca()" 30 | fi 31 | done 32 | 33 | echo $wm_status 34 | fi 35 | done 36 | } 37 | 38 | ############################## 39 | # UPGRADES 40 | ############################## 41 | 42 | upgrades() { 43 | cupd=$(checkupdates | wc -l) 44 | printf "$cupd \n" 45 | } 46 | ############################## 47 | # KERNEL 48 | ############################## 49 | 50 | kernel() { 51 | kernel="$(uname -r)" 52 | echo " $kernel" 53 | } 54 | 55 | ## BATTERY 56 | bat() { 57 | batstat="$(cat /sys/class/power_supply/BAT0/status)" 58 | battery="$(cat /sys/class/power_supply/BAT0/capacity)" 59 | if [ $batstat = 'Charging' ]; then 60 | batstat="^" 61 | elif [ $batstat = 'Discharging' ]; then 62 | batstat="v" 63 | elif [[ $battery -ge 5 ]] && [[ $battery -le 19 ]]; then 64 | batstat="" 65 | elif [[ $battery -ge 20 ]] && [[ $battery -le 39 ]]; then 66 | batstat="" 67 | elif [[ $battery -ge 40 ]] && [[ $battery -le 59 ]]; then 68 | batstat="" 69 | elif [[ $battery -ge 60 ]] && [[ $battery -le 79 ]]; then 70 | batstat="" 71 | elif [[ $battery -ge 80 ]] && [[ $battery -le 95 ]]; then 72 | batstat="" 73 | elif [[ $battery -ge 96 ]] && [[ $battery -le 100 ]]; then 74 | batstat="" 75 | fi 76 | 77 | echo "$batstat $battery %" 78 | } 79 | 80 | network() { 81 | wifi="$(ip a | grep wlo1 | grep inet | wc -l)" 82 | 83 | if [ $wifi = 1 ]; then 84 | echo "ok" 85 | else 86 | echo "ng" 87 | fi 88 | } 89 | 90 | SLEEP_SEC=2 91 | #loops forever outputting a line every SLEEP_SEC secs 92 | while :; do 93 | echo " ^i(/home/jake/.xmonad/xpm/xmonad_xpm_pac_20.xpm) = $(upgrades) | kernel = $(kernel) | vol = $(vol) | Batt = $(bat) | wifi = $(network) " 94 | sleep $SLEEP_SEC 95 | done 96 | 97 | -------------------------------------------------------------------------------- /baraction.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Bar Action Script for spectrwm. 4 | 5 | ############################## 6 | # DISK 7 | ############################## 8 | 9 | hdd() { 10 | hdd="$(df -h /home | grep /dev | awk '{print $3 " / " $5}')" 11 | echo -e " $hdd" 12 | } 13 | ############################## 14 | # RAM 15 | ############################## 16 | 17 | mem() { 18 | used="$(free | grep Mem: | awk '{print $3}')" 19 | total="$(free | grep Mem: | awk '{print $2}')" 20 | 21 | totalh="$(free -h | grep Mem: | awk '{print $2}' | sed 's/Gi/G/')" 22 | 23 | ram="$(( 200 * $used/$total - 100 * $used/$total ))% / $totalh " 24 | 25 | echo "$ram" 26 | } 27 | ############################## 28 | # CPU 29 | ############################## 30 | 31 | cpu() { 32 | read -r cpu a b c previdle rest < /proc/stat 33 | prevtotal=$((a+b+c+previdle)) 34 | sleep 0.5 35 | read cpu a b c idle rest < /proc/stat 36 | total=$((a+b+c+idle)) 37 | cpu=$((100*( (total-prevtotal) - (idle-previdle) ) / (total-prevtotal) )) 38 | echo -e " $cpu%" 39 | } 40 | ############################## 41 | # VOLUME 42 | ############################## 43 | 44 | vol() { 45 | vol="$(amixer -D pulse get Master | awk -F'[][]' 'END{ print $4":"$2 }')" 46 | echo -e " $vol" 47 | } 48 | ############################## 49 | # UPGRADES 50 | ############################## 51 | 52 | upgrades() { 53 | cupd=$(checkupdates | wc -l) 54 | printf "$cupd \n" 55 | } 56 | ############################## 57 | # KERNEL 58 | ############################## 59 | 60 | kernel() { 61 | kernel="$(uname -r)" 62 | echo " $kernel" 63 | } 64 | 65 | ## BATTERY 66 | bat() { 67 | batstat="$(cat /sys/class/power_supply/BAT0/status)" 68 | battery="$(cat /sys/class/power_supply/BAT0/capacity)" 69 | if [ $batstat = 'Charging' ]; then 70 | batstat="^" 71 | elif [ $batstat = 'Discharging' ]; then 72 | batstat="v" 73 | elif [[ $battery -ge 5 ]] && [[ $battery -le 19 ]]; then 74 | batstat="" 75 | elif [[ $battery -ge 20 ]] && [[ $battery -le 39 ]]; then 76 | batstat="" 77 | elif [[ $battery -ge 40 ]] && [[ $battery -le 59 ]]; then 78 | batstat="" 79 | elif [[ $battery -ge 60 ]] && [[ $battery -le 79 ]]; then 80 | batstat="" 81 | elif [[ $battery -ge 80 ]] && [[ $battery -le 95 ]]; then 82 | batstat="" 83 | elif [[ $battery -ge 96 ]] && [[ $battery -le 100 ]]; then 84 | batstat="" 85 | fi 86 | 87 | echo "$batstat $battery %" 88 | } 89 | 90 | network() { 91 | wifi="$(ip a | grep wlo1 | grep inet | wc -l)" 92 | 93 | if [ $wifi = 1 ]; then 94 | echo "ok" 95 | else 96 | echo "ng" 97 | fi 98 | } 99 | 100 | SLEEP_SEC=2 101 | #loops forever outputting a line every SLEEP_SEC secs 102 | while :; do 103 | echo "+@fg=5;  +@fn=0; $(upgrades) | +@fg=2;  +@fn=0; $(kernel) | +@fg=3;  +@fn=0; $(vol) | +@fg=4;  +@fn=0; $(bat) | +@fg=6;  +@fn=0; $(network) |" 104 | sleep $SLEEP_SEC 105 | done 106 | -------------------------------------------------------------------------------- /batt.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Created By: Jake@Linux 4 | # Created On: Thu 02 Mar 2023 08:50:25 AM UTC 5 | # # Project: 6 | 7 | batstat="$(cat /sys/class/power_supply/BAT0/status)" 8 | battery="$(cat /sys/class/power_supply/BAT0/capacity)" 9 | if [[ $batstat != 'Discharging' ]] && [[ $battery -ge 99 ]]; then 10 | batstat="  " 11 | elif [[ $batstat != 'Discharging' ]] && [[ $battery -ge 75 ]]; then 12 | batstat="  " 13 | elif [[ $batstat != 'Discharging' ]] && [[ $battery -ge 50 ]]; then 14 | batstat="  " 15 | elif [[ $batstat != 'Discharging' ]] && [[ $battery -ge 25 ]]; then 16 | batstat="  " 17 | elif [[ $batstat != 'Discharging' ]] && [[ $battery -ge 1 ]]; then 18 | batstat="  " 19 | elif [[ $batstat = 'Discharging' ]] && [[ $battery -le 5 ]]; then 20 | batstat="󰚦  " 21 | elif [[ $batstat = 'Discharging' ]] && [[ $battery -le 25 ]]; then 22 | batstat="ﮤ  " 23 | elif [[ $batstat = 'Discharging' ]] && [[ $battery -le 50 ]]; then 24 | batstat="ﮤ  " 25 | elif [[ $batstat = 'Discharging' ]] && [[ $battery -le 75 ]]; then 26 | batstat="ﮤ  " 27 | elif [[ $batstat = 'Discharging' ]] && [[ $battery -le 97 ]]; then 28 | batstat="ﮤ  " 29 | elif [[ $batstat = 'Discharging' ]] && [[ $battery -le 100 ]]; then 30 | batstat="ﮤ  " 31 | fi 32 | 33 | echo "$batstat $battery%" 34 | 35 | -------------------------------------------------------------------------------- /battery: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Prints all batteries, their percentage remaining and an emoji corresponding 4 | # to charge status (🔌 for plugged up, 🔋 for discharging on battery, etc.). 5 | 6 | case $BLOCK_BUTTON in 7 | 3) notify-send "🔋 Battery module" "🔋: discharging 8 | 🛑: not charging 9 | ♻: stagnant charge 10 | 🔌: charging 11 | ⚡: charged 12 | ❗: battery very low! 13 | - Scroll to change adjust xbacklight." ;; 14 | 4) xbacklight -inc 10 ;; 15 | 5) xbacklight -dec 10 ;; 16 | 6) "$TERMINAL" -e "$EDITOR" "$0" ;; 17 | esac 18 | 19 | # acpi alternative 20 | # acpi | sed "s/Battery [0-9]: //;s/[Dd]ischarging, /🔋/;s/[Nn]ot charging, /🛑/;s/[Cc]harging, /🔌/;s/[Uu]nknown, /♻️/;s/[Ff]ull, /⚡/;s/ \(remaining\|until charged\)//"; exit 21 | 22 | # Loop through all attached batteries. 23 | for battery in /sys/class/power_supply/BAT? 24 | do 25 | # Get its remaining capacity and charge status. 26 | capacity=$(cat "$battery"/capacity 2>/dev/null) || break 27 | # status=$(sed "s/[Dd]ischarging/🔋/;s/[Nn]ot charging/🛑/;s/[Cc]harging/🔌/;s/[Uu]nknown/♻️/;s/[Ff]ull/⚡/" "$battery"/status) 28 | status=$(sed "s/[Dd]ischarging/ /;s/[Nn]ot charging/🛑/;s/[Cc]harging/ /;s/[Uu]nknown/♻️ /;s/[Ff]ull/ /" "$battery"/status) 29 | 30 | # If it is discharging and 25% or less, we will add a ❗ as a warning. 31 | [ "$capacity" -le 25 ] && [ "$status" = "🔋" ] && warn="❗" 32 | 33 | printf "%s%s%s%% " "$status" "$warn" "$capacity" 34 | unset warn 35 | done | sed 's/ *$//' 36 | -------------------------------------------------------------------------------- /binclock.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # 24 hour format 4 | militaryTime=false 5 | 6 | # colors 7 | clearColor='\033[0m' # do not change 8 | onColor='\033[36m' 9 | offColor=$clearColor 10 | 11 | # symbols 12 | onSymbol='o' 13 | offSymbol='.' 14 | 15 | # array of binary digits 0-9 16 | binary=("0000" "0001" "0010" "0011" "0100" "0101" "0110" "0111" "1000" "1001") 17 | 18 | # store time variables 19 | if ( $militaryTime ); then hr=$(date '+%H'); else hr=$(date '+%I'); fi 20 | min=$(date '+%M') 21 | sec=$(date '+%S') 22 | 23 | # convert each digit to binary 24 | for i in hr min sec 25 | do 26 | col[${#col[*]}]=${binary[${!i:0:1}]} 27 | col[${#col[*]}]=${binary[${!i:1:1}]} 28 | done 29 | 30 | # create grid 31 | for i in {0..3} 32 | do 33 | for j in {0..5}; do output="$output${col[j]:i:1} "; done 34 | output="$output\n" 35 | done 36 | 37 | # change symbols and colors 38 | output=$(sed s/'0 '/$(printf "$offSymbol")' '/g <<< $output) 39 | output=$(sed s/'1 '/$(printf "$onSymbol")' '/g <<< $output) 40 | echo -e $output && echo $(date +%R) # print 41 | -------------------------------------------------------------------------------- /bookmarks.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | 4 | file="/home/jake/.config/BraveSoftware/Brave-Browser/Default/Bookmarks" 5 | 6 | bkmk="$(grep https $file | awk -F ' ' '{print $2}' | sed -e 's/.........//' -e 's/"//' | fzf --prompt="Open : " --border --margin=5% --color=dark --height=100% --reverse --header=" BOOKMARKS " --header-first)" 7 | 8 | if [[ $bkmk ]] 9 | then 10 | brave-browser-stable $bkmk 11 | else 12 | exit 13 | fi 14 | 15 | -------------------------------------------------------------------------------- /clock: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | dte="$(date +"%a, %B %d %l:%M%p"| sed 's/ / /g')" 4 | echo "$dte" 5 | 6 | -------------------------------------------------------------------------------- /clock.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/bash 2 | 3 | hours=("zero" "one" "two" "three" "four" "five" "six" "seven" "eight" "nine" "ten" "eleven" "twelve") 4 | 5 | hour=$(date +'%I') 6 | minute=$(date +'%M') 7 | 8 | # strips leading zero to prevent octal number assumption 9 | hour=$(( "10#$hour" )) 10 | minute=$(( "10#$minute" )) 11 | 12 | # if the hour is more than half done, we make reference to the next hour, set adverb to "to" and subract 30 from minutes 13 | if (( minute >= 33 )) 14 | then 15 | if (( hour == 12 )) 16 | then 17 | hour=1 18 | else 19 | hour=$(( hour + 1 )) 20 | fi 21 | minute=$(( 60 - minute )) 22 | adverb="to" 23 | else 24 | adverb="past" 25 | fi 26 | 27 | hour_as_text=${hours[$hour]} 28 | 29 | if (( minute < 3 )) 30 | then 31 | time_as_text="$hour_as_text o'clock" 32 | elif (( minute < 8 )) 33 | then 34 | time_as_text="five $adverb $hour_as_text" 35 | elif (( minute < 13 )) 36 | then 37 | time_as_text="ten $adverb $hour_as_text" 38 | elif (( minute < 18 )) 39 | then 40 | time_as_text="quarter $adverb $hour_as_text" 41 | elif (( minute < 23 )) 42 | then 43 | time_as_text="twenty $adverb $hour_as_text" 44 | elif (( minute < 28 )) 45 | then 46 | time_as_text="twenty-five $adverb $hour_as_text" 47 | elif (( minute < 33 )) 48 | then 49 | time_as_text="half past $hour_as_text" 50 | else 51 | exit 1 52 | fi 53 | 54 | echo "$time_as_text" 55 | -------------------------------------------------------------------------------- /conktoggle.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | ## Created By: Jake@Linux 4 | # Created On: Thu 27 Oct 2022 12:50:03 PM CDT 5 | # # Project: conky viewer toggle 6 | # 7 | 8 | conk="$(pidof conky)" 9 | 10 | if [ ! "$conk" ]; 11 | then 12 | herbstclient split horizontal 0.87 && conky 13 | else 14 | herbstclient remove && pkill conky 15 | fi 16 | 17 | 18 | -------------------------------------------------------------------------------- /display_clock.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | while true 4 | do 5 | clear 6 | notify-send "The time is... ""$(clock.sh) ⏰" 7 | sleep 30 8 | done 9 | -------------------------------------------------------------------------------- /dmenu/edit_configs.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | options=("alacritty 4 | bash 5 | dunst 6 | dwm 7 | herbstluftwm 8 | i3 9 | i3blocks 10 | i3status 11 | picom 12 | polybar 13 | qutebrowser 14 | spectrwm 15 | st 16 | surf 17 | sxhkd 18 | vim 19 | website 20 | xmobar 21 | xmonad 22 | xresources 23 | zsh 24 | quit") 25 | 26 | #choice=$(echo -e "${options[@]}" | dmenu -g 5 -l 5 -fn 'Hermit:size=10' -p 'Edit file: ' -nb '#222222' -nf '#b8b8b8' -sb '#007687' -sf '#222222') 27 | #choice=$(echo -e "${options[@]}" | rofi -dmenu -p 'Edit config file: ') 28 | choice="$(echo -e "${options[@]}" | fzf --prompt="Select a File : " --border=rounded --margin=5% --color=dark --height 100% --reverse --header=" CONFIGS " --info=hidden --header-first)" 29 | 30 | case "$choice" in 31 | quit) 32 | echo "Program terminated." && exit 1 33 | ;; 34 | alacritty) 35 | choice="$HOME/.config/alacritty/alacritty.yml" 36 | ;; 37 | bash) 38 | choice="$HOME/.config/bash/.bashrc" 39 | ;; 40 | dunst) 41 | choice="$HOME/.config/dunst/dunstrc" 42 | ;; 43 | dwm) 44 | choice="$HOME/.config/suckless/dwm-6.2/config.h" 45 | ;; 46 | herbstluftwm) 47 | choice="$HOME/.config/herbstluftwm/autostart" 48 | ;; 49 | i3) 50 | choice="$HOME/.config/i3/config" 51 | ;; 52 | i3blocks) 53 | choice="$HOME/.config/i3blocks/config" 54 | ;; 55 | i3status) 56 | choice="$HOME/.config/i3status/config" 57 | ;; 58 | picom) 59 | choice="$HOME/.config/picom/picom.conf" 60 | ;; 61 | polybar) 62 | choice="$HOME/.config/polybar/config" 63 | ;; 64 | qutebrowser) 65 | choice="$HOME/.config/qutebrowser/config.py" 66 | ;; 67 | spectrwm) 68 | choice="$HOME/.spectrwm.conf" 69 | ;; 70 | st) 71 | choice="$HOME/.config/suckless/st-0.8.4/config.h" 72 | ;; 73 | sxhkd) 74 | choice="$HOME/.config/sxhkd/sxhkdrc" 75 | ;; 76 | vim) 77 | choice="$HOME/.config/vim/.vimrc" 78 | ;; 79 | website) 80 | choice="$HOME/.local/website/jpedmedia/index.html" 81 | ;; 82 | xmobar) 83 | choice="$HOME/.config/xmobar/xmobarrc" 84 | ;; 85 | xmonad) 86 | choice="$HOME/.xmonad/xmonad.hs" 87 | ;; 88 | xresources) 89 | choice="$HOME/.Xresources" 90 | ;; 91 | zsh) 92 | choice="$HOME/.config/zsh/.zshrc" 93 | ;; 94 | *) 95 | exit 1 96 | ;; 97 | esac 98 | devour alacritty -e vim -u ~/.config/vim/.vimrc "$choice" 99 | 100 | -------------------------------------------------------------------------------- /dmenu/herbst-logout.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | #SRL="$(echo -e "Shutdown\nReboot\nLogout\nCancel" | dmenu -l 5 -fn Hermit:size=10:style=italic -c -nb '#222222' -sb '#007687' -sf '#222222' -nf '#b8b8b8' -p "Make a Selection: ")" 4 | SRL="$(echo -e "Shutdown\nReboot\nLogout\nLock\nCancel" | fzf --prompt="Why u wanna leave : " --border=rounded --margin=5% --color=dark --height 100% --reverse --header=" LOGOUT MENU " --info=hidden --header-first)" 5 | SESS="$(echo $DESKTOP_SESSION | cut -d '/' -f5)" 6 | 7 | case $SRL in 8 | Shutdown) 9 | sudo /sbin/shutdown -h now 10 | ;; 11 | Reboot) 12 | sudo /sbin/reboot 13 | ;; 14 | Lock) 15 | i3lock 16 | ;; 17 | Logout) 18 | case $SESS in 19 | herbstluftwm) 20 | herbstclient quit 21 | ;; 22 | bspwm) 23 | bspc quit 24 | ;; 25 | i3) 26 | i3 exit 27 | ;; 28 | berry) 29 | berryc quit 30 | ;; 31 | qtile) 32 | qtile cmd-obj -o cmd -f shutdown 33 | ;; 34 | *) 35 | ;; 36 | esac 37 | esac 38 | 39 | -------------------------------------------------------------------------------- /fileupdate.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | count=$(ls ./ | grep $1 | wc -l) 4 | dir1="$HOME/Documents/" 5 | dir2="$HOME/.local/scripts/" 6 | dir3="$HOME/Documents/school/" 7 | 8 | for file in ./*.$1 "$2" 9 | do 10 | if [ -f "${file}" ] && [ -z "$2" ]; then 11 | if [[ "$file" == *.txt ]] 12 | then 13 | mv "$file" "$dir1" 14 | if [ "$count" -gt "1" ]; then 15 | notify-send "All $1 files successfully moved" 16 | else 17 | notify-send "$file successfully moved" 18 | fi 19 | elif 20 | [[ "$file" == *.sh ]] 21 | then 22 | mv "$file" "$dir2" 23 | if [ "$count" -gt "1" ]; then 24 | notify-send "All $1 files successfully moved" 25 | else 26 | notify-send "$file successfully moved" 27 | fi 28 | else 29 | [[ $file == *.docx ]] 30 | mv "$file" "$dir3" 31 | if [ "$count" -gt "1" ]; then 32 | notify-send "All $1 files successfully moved" 33 | else 34 | notify-send "$file successfully moved" 35 | fi 36 | fi 37 | else 38 | if [ -f "${file}" ] && [ "$2" ]; then 39 | mv "$file" "$2" 40 | if [ "$count" -gt "1" ]; then 41 | notify-send "All $1 files successfully moved" 42 | else 43 | notify-send "$file successfully moved" 44 | fi 45 | fi 46 | fi 47 | done 48 | 49 | -------------------------------------------------------------------------------- /flag.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | ## Created By: Jake@Linux 4 | # Created On: Mon 09 Jan 2023 12:35:28 PM CST 5 | # # Project: 6 | # 7 | # 8 | 9 | mem(){ 10 | free -h | grep Mem 11 | printf "\n" 12 | } 13 | 14 | disk(){ 15 | df -t btrfs 16 | printf "\n" 17 | } 18 | 19 | sys(){ 20 | neofetch 21 | printf "\n" 22 | } 23 | 24 | 25 | while getopts 'abcd:h' OPTION; do 26 | case "$OPTION" in 27 | a) 28 | mem 29 | ;; 30 | b) 31 | disk 32 | ;; 33 | c) 34 | sys 35 | ;; 36 | d) 37 | dvalue="$OPTARG" 38 | cat "$OPTARG" 39 | ;; 40 | h) 41 | echo "script requirements: $0 Options: [-a] [-b] [-c] [-d ]" 42 | ;; 43 | *) 44 | echo "script requirements: $0 Options: [-a] [-b] [-c] [-d ]" 45 | ;; 46 | esac 47 | done 48 | 49 | 50 | -------------------------------------------------------------------------------- /funclock.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Created By: Jake@Linux 4 | # Created On: Tue 19 Jul 2022 12:38:28 PM CDT 5 | # Project: fuzzy clock 6 | 7 | box() { 8 | title=" $1 " 9 | edge=$(echo "$title" | sed 's/./*/g') 10 | echo "$edge" 11 | echo -e "\e[1;31m$title\e[0m" 12 | echo "$edge" 13 | } 14 | 15 | txttime=("zero" "one" "two" "three" "four" "five" "six" "seven" "eight" "nine" "ten" "eleven" "twelve") 16 | 17 | hr=$(date +'%I') 18 | min=$(date +'%M') 19 | 20 | hr=$(( "10#$hr" )) 21 | min=$(( "10#$min" )) 22 | 23 | if (( min >= 33 )) 24 | then 25 | if (( "$hr" == 12 )); 26 | then 27 | hr=1 28 | else 29 | hr=$(( "$hr" + 1 )) 30 | fi 31 | min=$(( 60 - $min )); 32 | adverb="til" 33 | else 34 | adverb="after" 35 | fi 36 | 37 | txthour=${txttime[$hr]} 38 | 39 | if (( min < 3 )) 40 | then 41 | written_time="it is $txthour o'clock" 42 | elif (( min < 8 )) 43 | then 44 | written_time="it is five min $adverb $txthour" 45 | elif (( min < 13 )) 46 | then 47 | written_time="it is ten min $adverb $txthour" 48 | elif (( min < 18 )) 49 | then 50 | written_time="it is fifteen $adverb $txthour" 51 | elif (( min < 23 )) 52 | then 53 | written_time="it is twenty $adverb $txthour" 54 | elif (( min < 28 )) 55 | then 56 | written_time="it is twenty-five $adverb $txthour" 57 | elif (( min < 33 )) 58 | then 59 | written_time="it is half past $txthour" 60 | else 61 | exit 1 62 | fi 63 | 64 | box "$written_time" 65 | 66 | -------------------------------------------------------------------------------- /fuzclock.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | txthrs=("zero" "one" "two" "three" "four" "five" "six" "seven" "eight" "nine" "ten" "eleven" "twelve") 4 | 5 | hr="$(date +'%I')" 6 | min="$(date +'$M')" 7 | 8 | hr=$(( "10#$hr" )) 9 | min=$(( "10#$min" )) 10 | 11 | if (( $min >= 35 )); 12 | then 13 | if (( $hr == 12 )) 14 | then 15 | $hr=1 16 | else 17 | $hr"$(( $hr + 1 ))" 18 | fi 19 | $min=$(( 60 - $min )) 20 | adverb="to" 21 | else 22 | adverb="past" 23 | fi 24 | 25 | written_hour=${txthrs[$hr]} 26 | 27 | if (( $min < 5 )) 28 | -------------------------------------------------------------------------------- /fuzzytime.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Created By: Jake@Linux 4 | # Created On: Sat 16 Jul 2022 11:47:26 AM CDT 5 | # Project: fuzzy clock 6 | 7 | 8 | box() { 9 | title=" $1 " 10 | edge=$(echo "$title" | sed 's/./*/g') 11 | echo "$edge" 12 | echo -e "\e[1;31m$title\e[0m" 13 | echo "$edge" 14 | } 15 | 16 | 17 | ###--| Array of hours in text form |--### 18 | txtime=("zero" "one" "two" "three" "four" "five" "six" "seven" "eight" "nine" "ten" "eleven" "twelve") 19 | 20 | hr=$(date +'%I') 21 | min=$(date +'%M') 22 | 23 | 24 | hr=$(( "10#$hr" )) 25 | min=$(( "10#$min" )) 26 | 27 | if (( min >= 33 )) 28 | then 29 | if (( "$hr" == 12 )); 30 | then 31 | hr=1 32 | else 33 | hr=$(( $hr + 1 )) 34 | fi 35 | min=$(( 60 -$min )); 36 | adverb="til" 37 | else 38 | adverb="after" 39 | fi 40 | 41 | txthour=${txtime[$hr]} 42 | 43 | if (( min < 3 )) 44 | then 45 | written_time="Currently the local time is $txthour o'clock" 46 | elif (( min < 8 )) 47 | then 48 | written_time="Currently it is five min $adverb $txthour" 49 | elif (( min < 13 )) 50 | then 51 | written_time="Currently the time is ten $adverb $txthour" 52 | elif (( min < 18 )) 53 | then 54 | written_time="It is currently fifteen $adverb $txthour" 55 | elif (( min < 23 )) 56 | then 57 | written_time="As of right now the time is twenty $adverb $txthour" 58 | elif (( min < 28 )) 59 | then 60 | written_time="For the moment it is twenty-five $adverb $txthour" 61 | elif (( min < 33 )) 62 | then 63 | written_time="it is currently half past $txthour" 64 | else 65 | exit 1 66 | fi 67 | 68 | 69 | box "$written_time" 70 | -------------------------------------------------------------------------------- /gpush: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # stop script if any step fails 3 | set -eo pipefail 4 | 5 | repo=$1 6 | file=$2 7 | 8 | if [ -z "$repo" ] || [ -z "$file" ]; then 9 | echo ERROR: Please include repo name followed by filename or \* \(glob\) for entire dir. 10 | exit 1 11 | fi 12 | 13 | git status; 14 | 15 | read -p "Would you like to push changes?: " -n 1 -r REPLY 16 | if [[ $REPLY =~ ^[Yy]$ ]]; then 17 | if [[ "$file" != * ]]; then 18 | git add "$file" 19 | elif [[ "$file" = * ]]; then 20 | git add . 21 | fi 22 | elif [[ $REPLY =~ ^[Nn]$ ]]; then 23 | printf "\nNo Changes Pushed" 24 | sleep 2 25 | exit 26 | fi 27 | 28 | printf "\nadd message\n" 29 | read -r message 30 | 31 | git commit -m "$message" 32 | git push git@gitlab.com:jped/"$repo".git; 33 | git push git@github.com:jdpedersen1/"$repo".git 34 | 35 | figlet "HAVE A NICE DAY!!" 36 | sleep 2 37 | exit 38 | -------------------------------------------------------------------------------- /gpush2: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | ## Created By: Jake@Linux 4 | # Created On: Tue 24 Jan 2023 08:46:36 AM CST 5 | # # Project: Git maintenance script 6 | # 7 | #!/bin/bash 8 | 9 | while getopts 's:p' OPTION; do 10 | case "$OPTION" in 11 | s) 12 | svalue="$OPTARG" 13 | git -c color.status=always diff -p "$OPTARG" 14 | ;; 15 | p) 16 | git -c color.status=always status 17 | ;; 18 | ?) 19 | echo "script usage: $(basename \$0) [-l] [-h] [-a somevalue]" >&2 20 | exit 1 21 | ;; 22 | esac 23 | done 24 | shift "$(($OPTIND -1))" 25 | 26 | read -rep $'Would you like to commit changes?\n: ' commit 27 | if [[ $commit == y ]]; then 28 | echo "committed" 29 | fi 30 | 31 | 32 | -------------------------------------------------------------------------------- /hlSratch.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | #testing 3 | # Inferno LP 2023-08-28 4 | 5 | windows_in(){ 6 | hyprctl clients -j | jq ".[] | select(.workspace.name == \"special:$1\" )" 7 | } 8 | 9 | toggle_scratchpad(){ 10 | workspace_name="$1" 11 | cmd="$2" 12 | 13 | windows=$( windows_in "$workspace_name" ) 14 | # If not on latest , check the edit history of this post 15 | if [ -z "$windows" ];then 16 | hyprctl dispatch "exec [workspace special:$workspace_name] $cmd" 17 | else 18 | hyprctl dispatch togglespecialworkspace "$workspace_name" 19 | fi 20 | } 21 | 22 | if [ "$1" = "terminal" ];then 23 | toggle_scratchpad "terminal" "alacritty -T pad" 24 | elif [ "$1" = "music_player" ];then 25 | toggle_scratchpad "music_player" "alacritty -e ncmpcpp" 26 | elif [ "$1" = "file_manager" ];then 27 | toggle_scratchpad "file_manager" "alacritty -e ranger" 28 | fi 29 | -------------------------------------------------------------------------------- /hotkeys.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | #variable for current session environment 4 | session="$(echo "$DESKTOP_SESSION" | cut -d '/' -f 5)" 5 | 6 | #variables for determining which file to pull based on session identified 7 | file1="$HOME/.config/xmonad/xmonad.hs" 8 | file2="$HOME/.ratpoisonrc" 9 | file3="$HOME/.config/i3/config" 10 | file4="$HOME/.config/herbstluftwm/autostart" 11 | program=$1 12 | 13 | #requires figlet, this checks if figlet is installed and if not, it installs on arch or debian 14 | #if not running arch or debian, prompts user to install figlet, but still finishes running script without heading 15 | #if figlet already installed, this runs header 16 | if command -v figlet &> /dev/null 17 | then 18 | figlet -f small "$session Keybindings" 19 | else 20 | if command -v pacman &> /dev/null 21 | then 22 | sudo pacman -S figlet 23 | elif command -v apt &> /dev/null 24 | then 25 | sudo apt install figlet 26 | else 27 | printf "please install figlet" 28 | fi 29 | fi 30 | 31 | #clear screen if figlet was installed via script 32 | clear 33 | 34 | #runs header if figlet was installed via script 35 | figlet -f small "$session Keybindings" 36 | 37 | #checks for desktop session and locates associated config file 38 | #pulls only lines with keybindings and displays them 39 | if [[ $session == xmonad ]] 40 | then 41 | grep "M-" "$file1" | awk '{ printf "%-20s%-30s%s%s%s%s\n",$2,$3,$4,$5,$6,$7 }' | grep "$program" 42 | elif [[ $session == ratpoison ]] 43 | then 44 | grep "bind" "$file2" | cut -f1,2,3 -d " " 45 | elif [[ $session == i3 ]] 46 | then 47 | grep "bindsym" "$file3" | cut -f2-7 -d " " | column -t -s' ' | grep "$program" 48 | elif [[ $session == herbstluftwm ]] 49 | then 50 | grep "Mod-" "$file4" | cut -f3-9 -d " " | grep "$program" 51 | else [[ $session == ? ]] 52 | printf "session not found" 53 | fi 54 | -------------------------------------------------------------------------------- /jake@linux: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | # Created By: Jake@Linux 4 | # Created On: Sat 23 Sep 2023 11:20:15 AM CDT 5 | # Project: 6 | 7 | from tqdm import tqdm 8 | import time 9 | import os 10 | from pyfiglet import Figlet 11 | f=Figlet(font='slant') 12 | banner = f.renderText("Merry\nChristmas!") 13 | 14 | print("Traveling.........") 15 | time.sleep(1.0) 16 | for i in tqdm (range (100), 17 | desc="Seeking room.....", 18 | ncols=100): 19 | time.sleep(0.01) 20 | print() 21 | print("No room found......") 22 | time.sleep(.5) 23 | print() 24 | for i in tqdm (range (100), 25 | desc="stable located.....", 26 | ncols=100): 27 | time.sleep(0.01) 28 | print() 29 | print("Manger prepped......") 30 | time.sleep(.5) 31 | print() 32 | for i in tqdm (range (100), 33 | desc="Star shining.......", 34 | ncols=100): 35 | time.sleep(0.01) 36 | print() 37 | print("Wise men and shepherds seeking.....") 38 | time.sleep(.5) 39 | #os.system('clear') 40 | time.sleep(.5) 41 | print("On this day in Bethlehem, a child is born...") 42 | print() 43 | print(banner) 44 | print() 45 | print("Glory to the newborn King!") 46 | print("Luke 2:1-20") 47 | -------------------------------------------------------------------------------- /launch.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | ## Created By: Jake@Linux 4 | # Created On: Fri 02 Jun 2023 01:13:18 PM CDT 5 | # # Project: launch menu 6 | 7 | #mpv --no-video --no-terminal ~/Media/soundClips/launch2.mp3 2>/dev/null & 8 | DIR1="/usr/bin/" 9 | DIR2="/bin/" 10 | DIR3="$HOME/.nix-profile/bin" 11 | 12 | Menu="$(ls "$DIR1" "$DIR2" "$DIR3" | cut -d / -f 3 | uniq -u | sort | fzf --prompt="Which Program Would You Like To Run : " --border=rounded --margin=5% --color='fg:104,fg+:255,pointer:12,hl:255,hl+:12,header:12,prompt:255' --height 100% --reverse --header=" PROGRAMS " --info=hidden --header-first)" 13 | #Menu="$(find "$DIR1" "$DIR2" "$DIR3" -mindepth 1 -executable | cut -d / -f 3 | uniq -u | sort | fzf --prompt="Which Program Would You Like To Run : " --border=rounded --margin=5% --color='fg:104,fg+:255,pointer:12,hl:255,hl+:12,header:12,prompt:255' --height 100% --reverse --header=" PROGRAMS " --info=hidden --header-first)" 14 | #Menu="$(ls "$DIR1" "$DIR2" "$DIR3" | cut -d / -f 3 | uniq -u | sort | wofi --show dmenu)" 15 | exec devour "$Menu" 16 | 17 | -------------------------------------------------------------------------------- /load-layout.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SEL="$(ls ~/.config/herbstluftwm/layouts/ | dmenu -i -fn Hermit:bold -l 5 -g 5 -p "Which Layout?: " -nb '#000000' -sb '#000000' -sf '#5f875f' -nf '#b8b8b8')" 4 | herbstclient load "$(cat ~/.config/herbstluftwm/layouts/$SEL)" 5 | -------------------------------------------------------------------------------- /logo: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | DIR="$HOME/Media/Pictures/mosh/" 4 | LOGO="$(find "$DIR"/*.gif | shuf -n1)" 5 | cat "$LOGO" > /home/jake/Media/Pictures/logo.gif 6 | 7 | -------------------------------------------------------------------------------- /logout.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SRL="$(echo -e "Shutdown\nReboot\nLogout\nLock\nCancel" | fzf --prompt="Please Make a Selection : " --border=rounded --margin=5% --color=dark --height 100% --reverse --header=" LOGOUT MENU " --info=hidden --header-first)" 4 | 5 | case $SRL in 6 | Shutdown) 7 | sudo /sbin/shutdown -h now 8 | ;; 9 | Reboot) 10 | sudo /sbin/reboot 11 | ;; 12 | Logout) 13 | pkill xmonad 14 | ;; 15 | Lock) 16 | logout.sh 17 | ;; 18 | *) 19 | ;; 20 | esac 21 | 22 | -------------------------------------------------------------------------------- /mailcheck.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | nc -z 8.8.8.8 53 >/dev/null 2>&1 4 | online=$? 5 | 6 | if [ $online -eq 0 ]; then 7 | mailch="$(ls $HOME/.local/share/mail/jake\@jpedmedia.com/INBOX/new | wc -l)" 8 | mailch2="$(ls $HOME/.local/share/mail/jdpedersen1\@yahoo.com/INBOX/new | wc -l)" 9 | 10 | sleep 5; 11 | 12 | mbsync -a; 13 | 14 | if [[ $mailch -gt 0 ]] || [[ $mailch2 -gt 0 ]]; then 15 | printf " $mailch:$mailch2" 16 | else 17 | printf " 0" 18 | fi 19 | else 20 | mailch="$(ls $HOME/.local/share/mail/jake\@jpedmedia.com/INBOX/new | wc -l)" 21 | mailch2="$(ls $HOME/.local/share/mail/jdpedersen1\@yahoo.com/INBOX/new | wc -l)" 22 | printf " $mailch:$mailch2" 23 | fi 24 | 25 | -------------------------------------------------------------------------------- /menu.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Directory containing your images 4 | image_dir="/home/jake/Images/wallpapers/void/" 5 | 6 | # List all images in the directory 7 | images=("$image_dir"/*) 8 | 9 | # Create a temporary file to store the menu items 10 | menu_file=$(mktemp) 11 | 12 | # Populate the menu file with image paths 13 | for image in "${images[@]}"; do 14 | echo "$image" >> "$menu_file" 15 | done 16 | 17 | # Use wofi to create an image menu 18 | selected_image=$(wofi -p -d < "$menu_file") 19 | 20 | # Check if a selection was made 21 | if [ -n "$selected_image" ]; then 22 | echo "You selected: $selected_image" 23 | # Add your custom actions here using the selected image path 24 | else 25 | echo "No image selected." 26 | fi 27 | 28 | # Remove the temporary file 29 | rm -f "$menu_file" 30 | 31 | -------------------------------------------------------------------------------- /mygrep: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Created By: Jake@Linux 4 | # Created On: Tue 27 Dec 2022 01:57:09 PM CST 5 | # Project: 6 | 7 | while read -r; do 8 | line="$REPLY" 9 | ( echo "$line" | grep --color "$@" ) || echo "$line" 10 | done 11 | 12 | -------------------------------------------------------------------------------- /pacupdate: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | #cupd=$(xbps-install -nuM | wc -l) 4 | cupd=$(xbps-install -nuM | wc -l) 5 | printf "$cupd \n" 6 | -------------------------------------------------------------------------------- /promptcom.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | DIR="$HOME/.local/share/promptcomments/" 4 | MESSAGE="$(find "$DIR"/*.txt | shuf -n1)" 5 | cat "$MESSAGE" > /home/jake/.local/share/pc.txt 6 | -------------------------------------------------------------------------------- /schedule.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ##----------------## 4 | # assign variables # 5 | ##----------------## 6 | DAY=$(date --date="2 days" | awk '{ print $2 $3 }') 7 | TO_ADDRESS="yourmail@maildomain.com" 8 | SUBJECT="Appointment" 9 | BODY=$(less "$HOME/.local/todo/$DAY") 10 | FILE="$HOME/.local/todo/$DAY" 11 | time="$(date "+%H:%M:%S")" 12 | 13 | #if [[ "$time" == "08:00:00" ]] && [[ -f "$FILE" ]] 14 | #then 15 | # echo "$BODY" | neomutt -s "$SUBJECT" "$TO_ADDRESS" 16 | # curl -X POST https://textbelt.com/text --data-urlencode phone='xxxxxxxxxx' --data-urlencode message="$BODY" -d key=textbelt 17 | # exit 18 | #elif [[ "$time" != "08:00:00" ]] && [[ "$time" < "0:8:00:02" ]] && [[ ! -f "$FILE" ]] 19 | #then 20 | # exit 21 | #else 22 | 23 | ##-------------------------------------------------------------------------------------## 24 | # checks for figlet on system and installs on arch or debian based systems if not found # 25 | # prints out header for program # 26 | ##-------------------------------------------------------------------------------------## 27 | while true; do 28 | if command -v figlet &> /dev/null 29 | then 30 | break 31 | else 32 | if command -v pacman &> /dev/null 33 | then 34 | sudo pacman -S figlet 35 | break 36 | elif command -v apt &> /dev/null 37 | then 38 | sudo apt install figlet 39 | break 40 | elif command -v xbps-install &> /dev/null 41 | then 42 | sudo xbps-install figlet 43 | break 44 | else 45 | printf "please install figlet" 46 | exit 47 | fi 48 | fi 49 | done 50 | clear 51 | 52 | 53 | figlet -c -f slant "To Do" 54 | figlet -s -f digital "A simple terminal appointment organizer" 55 | printf "\n " 56 | printf " created by: Jake Pedersen of Jake@Linux\n" 57 | printf "\n " 58 | 59 | ##--------------------------------------------------------------------## 60 | # prompts for user input and checks for action user wishes to complete # 61 | ##--------------------------------------------------------------------## 62 | while true; do 63 | printf "Please Make a Selection\n(options: A/a=add, V/v=view, & E/e=exit)\n" 64 | printf " : " 65 | read -r answer 66 | 67 | 68 | ##-------------------------------------------------## 69 | # prompts for appointment info if "add" is selected # 70 | ##-------------------------------------------------## 71 | if [[ "$answer" == [A/a] ]] 72 | then 73 | printf "\n" 74 | printf "Date\n(format = Dec12)" 75 | printf "\n : " 76 | read -r date 77 | printf "\n" 78 | printf "Time\n(format = HH:MM AM/PM) " 79 | printf "\n : " 80 | read -r time 81 | printf "\n" 82 | printf "Entry\n " 83 | printf "\n : " 84 | read -r entry 85 | 86 | 87 | ##---------------------------------------------------------------------## 88 | # checks for file with selected date, if found, stores new appointment, # 89 | # if not found, it creates new file # 90 | ##---------------------------------------------------------------------## 91 | if [[ -f "$HOME/.local/todo/$date" ]]; then 92 | printf '%s %s :\n %s\n\n' "$date" "$time" "$entry" >> "$HOME/.local/todo/$date" 93 | vim "$HOME/.local/todo/$date" 94 | else 95 | touch "$HOME/.local/todo/$date" 96 | figlet -s -f slant "$date" >> "$HOME/.local/todo/$date" 97 | printf '%s %s :\n %s\n\n' "$date" "$time" "$entry" >> "$HOME/.local/todo/$date" 98 | vim "$HOME/.local/todo/$date" 99 | fi 100 | 101 | 102 | ##-----------------------------------------------------------------------------## 103 | # if "view" selected, prompts user for which date to view or all, if date given # 104 | # opens file for given date, if all selected, opens dir of all files for user # 105 | # to choose from, if exit chosen, closes program # 106 | ##-----------------------------------------------------------------------------## 107 | elif [[ "$answer" == [V/v] ]] 108 | then 109 | printf "\n" 110 | printf "Please type \"date\" or \"all\" to choose from list" 111 | printf "\n : " 112 | read -r choice 113 | printf "\n" 114 | if [[ "$choice" == all ]] 115 | then 116 | ls "$HOME/.local/todo/" 117 | else 118 | if [[ "$choice" == date ]] 119 | then 120 | printf "Which date would you like to view?\n" 121 | printf "(format = Dec12)" 122 | printf "\n : " 123 | read -r day 124 | vim "$HOME/.local/todo/$day" 125 | fi 126 | fi 127 | elif [[ "$answer" == [E/e] ]] 128 | then 129 | exit 130 | else [[ "$answer" == ? ]] 131 | printf "Please make proper selection" 132 | fi 133 | 134 | 135 | printf "\nWould you like to add or view another entry?\n" 136 | printf "(Y/y or N/n)" 137 | printf "\n: " 138 | read -r decision 139 | printf "\n" 140 | if [[ "$decision" == [Y/y] ]] 141 | then 142 | printf "Great!\n" 143 | else 144 | exit 145 | fi 146 | 147 | done 148 | #fi 149 | -------------------------------------------------------------------------------- /scpad: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Created By: Jake@Linux 4 | # Created On: Sat 03 Sep 2022 03:56:04 PM CDT 5 | # Project: bspwm scratchpad 6 | 7 | winclass="$(xdotool search --class scpad)"; 8 | if [ -z "$winclass" ]; then 9 | kitty --class scpad 10 | else 11 | if [ ! -f /tmp/scpad ]; then 12 | touch /tmp/scpad && xdo hide "$winclass" 13 | elif [ -f /tmp/scpad ]; then 14 | rm /tmp/scpad && xdo show "$winclass" 15 | fi 16 | fi 17 | 18 | -------------------------------------------------------------------------------- /scratch: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | case "$1" in 4 | 5 | scratchpad) 6 | entry="alacritty --class scpad -t scratchpad" 7 | ;; 8 | Menu) 9 | entry="alacritty --class launch -t menu -e launch.sh" 10 | ;; 11 | vsrc) 12 | entry="alacritty --class src -t vsrc -e vsp2" 13 | ;; 14 | Music) 15 | entry="alacritty -t Music -e ncmpcpp" 16 | ;; 17 | Todo) 18 | entry="alacritty -t Todo -e schedule.sh" 19 | ;; 20 | esac 21 | 22 | xdotool search --onlyvisible --name "$1" windowunmap \ 23 | || xdotool search --name "$1" windowmap \ 24 | || $entry & 25 | 26 | -------------------------------------------------------------------------------- /scratch2: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | SCRATCHPAD_NAME=$1 4 | 5 | case "$1" in 6 | 7 | qutebrowser) 8 | entry="qutebrowser" 9 | ;; 10 | Alacritty) 11 | entry="alacritty -e wingeo" 12 | ;; 13 | Calc) 14 | entry="qalculate-gtk" 15 | ;; 16 | Mail) 17 | entry="mailspring" 18 | ;; 19 | Menu) 20 | entry="kitty --class launch -e launch.sh" 21 | esac 22 | 23 | xdotool search --onlyvisible --class "$1" windowunmap \ 24 | || xdotool search --classname "$1" windowmap \ 25 | || $entry & 26 | 27 | -------------------------------------------------------------------------------- /scratchpad: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # a q3-like (or yakuake-like) terminal for arbitrary applications. 4 | # 5 | # this lets a new monitor called "q3terminal" scroll in from the top into the 6 | # current monitor. There the "scratchpad" will be shown (it will be created if 7 | # it doesn't exist yet). If the monitor already exists it is scrolled out of 8 | # the screen and removed again. 9 | # 10 | # Warning: this uses much resources because herbstclient is forked for each 11 | # animation step. 12 | # 13 | # If a tag name is supplied, this is used instead of the scratchpad 14 | 15 | tag="${1:-scratchpad}" 16 | hc() { "${herbstclient_command[@]:-herbstclient}" "$@" ;} 17 | 18 | termwidth_percent=${WIDTH_PERC:-65} 19 | mrect=( $(hc monitor_rect -p "" ) ) 20 | termwidth=$(( (${mrect[2]} * termwidth_percent) / 100 )) 21 | termheight=${HEIGHT_PIXELS:-550} 22 | 23 | rect=( 24 | $termwidth 25 | $termheight 26 | $(( ${mrect[0]} + (${mrect[2]} - termwidth) / 2 )) 27 | $(( ${mrect[1]} - termheight )) 28 | ) 29 | 30 | y_line=${mrect[1]} 31 | 32 | 33 | hc add "$tag" 34 | 35 | 36 | monitor=q3terminal 37 | 38 | exists=false 39 | if ! hc add_monitor $(printf "%dx%d%+d%+d" "${rect[@]}") \ 40 | "$tag" $monitor 2> /dev/null ; then 41 | exists=true 42 | else 43 | # remember which monitor was focused previously 44 | hc chain \ 45 | , new_attr string monitors.by-name."$monitor".my_prev_focus \ 46 | , substitute M monitors.focus.index \ 47 | set_attr monitors.by-name."$monitor".my_prev_focus M 48 | fi 49 | 50 | update_geom() { 51 | local geom=$(printf "%dx%d%+d%+d" "${rect[@]}") 52 | hc move_monitor "$monitor" $geom 53 | } 54 | 55 | steps=${ANIMATION_STEPS:-15} 56 | interval=${ANIMATION_INTERVAL:-0.01} 57 | 58 | animate() { 59 | progress=( "$@" ) 60 | for i in "${progress[@]}" ; do 61 | rect[3]=$((y_line - (i * termheight) / steps)) 62 | update_geom 63 | sleep "$interval" 64 | done 65 | } 66 | 67 | show() { 68 | hc lock 69 | hc raise_monitor "$monitor" 70 | hc focus_monitor "$monitor" 71 | hc unlock 72 | hc lock_tag "$monitor" 73 | animate $(seq $steps -1 0) 74 | } 75 | 76 | hide() { 77 | rect=( $(hc monitor_rect "$monitor" ) ) 78 | local tmp=${rect[0]} 79 | rect[0]=${rect[2]} 80 | rect[2]=${tmp} 81 | local tmp=${rect[1]} 82 | rect[1]=${rect[3]} 83 | rect[3]=${tmp} 84 | termheight=${rect[1]} 85 | y_line=${rect[3]} # height of the upper screen border 86 | 87 | animate $(seq 0 +1 $steps) 88 | # if q3terminal still is focused, then focus the previously focused monitor 89 | # (that mon which was focused when starting q3terminal) 90 | hc substitute M monitors.by-name."$monitor".my_prev_focus \ 91 | and + compare monitors.focus.name = "$monitor" \ 92 | + focus_monitor M 93 | hc remove_monitor "$monitor" 94 | } 95 | 96 | [ $exists = true ] && hide || show 97 | -------------------------------------------------------------------------------- /snake: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | apple() { 5 | # Pick coordinates within the game area 6 | APPLEX=$[( $RANDOM % ( $[ $AREAMAXX - $AREAMINX ] + 1 ) ) + $AREAMINX ] 7 | APPLEY=$[( $RANDOM % ( $[ $AREAMAXY - $AREAMINY ] + 1 ) ) + $AREAMINY ] 8 | } 9 | 10 | drawapple() { 11 | # Check we haven't picked an occupied space 12 | LASTEL=$(( ${#LASTPOSX[@]} - 1 )) 13 | x=0 14 | apple 15 | while [ "$x" -le "$LASTEL" ]; 16 | do 17 | if [ "$APPLEX" = "${LASTPOSX[$x]}" ] && [ "$APPLEY" = "${LASTPOSY[$x]}" ]; 18 | then 19 | # Invalid coords... in use 20 | x=0 21 | apple 22 | else 23 | x=$(( $x + 1 )) 24 | fi 25 | done 26 | tput setf 4 27 | tput cup $APPLEY $APPLEX 28 | printf %b "$APPLECHAR" 29 | tput setf 9 30 | } 31 | 32 | growsnake() { 33 | # Pad out the arrays with oldest position 3 times to make snake bigger 34 | LASTPOSX=( ${LASTPOSX[0]} ${LASTPOSX[0]} ${LASTPOSX[0]} ${LASTPOSX[@]} ) 35 | LASTPOSY=( ${LASTPOSY[0]} ${LASTPOSY[0]} ${LASTPOSY[0]} ${LASTPOSY[@]} ) 36 | RET=1 37 | while [ "$RET" -eq "1" ]; 38 | do 39 | apple 40 | RET=$? 41 | done 42 | drawapple 43 | } 44 | 45 | move() { 46 | case "$DIRECTION" in 47 | u) POSY=$(( $POSY - 1 ));; 48 | d) POSY=$(( $POSY + 1 ));; 49 | l) POSX=$(( $POSX - 1 ));; 50 | r) POSX=$(( $POSX + 1 ));; 51 | esac 52 | 53 | # Collision detection 54 | ( sleep $DELAY && kill -ALRM $$ ) & 55 | if [ "$POSX" -le "$FIRSTCOL" ] || [ "$POSX" -ge "$LASTCOL" ] ; then 56 | tput cup $(( $LASTROW + 1 )) 0 57 | stty echo 58 | echo " GAME OVER! You hit a wall!" 59 | gameover 60 | elif [ "$POSY" -le "$FIRSTROW" ] || [ "$POSY" -ge "$LASTROW" ] ; then 61 | tput cup $(( $LASTROW + 1 )) 0 62 | stty echo 63 | echo " GAME OVER! You hit a wall!" 64 | gameover 65 | fi 66 | 67 | # Get Last Element of Array ref 68 | LASTEL=$(( ${#LASTPOSX[@]} - 1 )) 69 | #tput cup $ROWS 0 70 | #printf "LASTEL: $LASTEL" 71 | 72 | x=1 # set starting element to 1 as pos 0 should be undrawn further down (end of tail) 73 | while [ "$x" -le "$LASTEL" ]; 74 | do 75 | if [ "$POSX" = "${LASTPOSX[$x]}" ] && [ "$POSY" = "${LASTPOSY[$x]}" ]; 76 | then 77 | tput cup $(( $LASTROW + 1 )) 0 78 | echo " GAME OVER! YOU ATE YOURSELF!" 79 | gameover 80 | fi 81 | x=$(( $x + 1 )) 82 | done 83 | 84 | # clear the oldest position on screen 85 | tput cup ${LASTPOSY[0]} ${LASTPOSX[0]} 86 | printf " " 87 | 88 | # truncate position history by 1 (get rid of oldest) 89 | LASTPOSX=( `echo "${LASTPOSX[@]}" | cut -d " " -f 2-` $POSX ) 90 | LASTPOSY=( `echo "${LASTPOSY[@]}" | cut -d " " -f 2-` $POSY ) 91 | tput cup 1 10 92 | #echo "LASTPOSX array ${LASTPOSX[@]} LASTPOSY array ${LASTPOSY[@]}" 93 | tput cup 2 10 94 | echo "SIZE=${#LASTPOSX[@]}" 95 | 96 | # update position history (add last to highest val) 97 | LASTPOSX[$LASTEL]=$POSX 98 | LASTPOSY[$LASTEL]=$POSY 99 | 100 | # plot new position 101 | tput setf 2 102 | tput cup $POSY $POSX 103 | printf %b "$SNAKECHAR" 104 | tput setf 9 105 | 106 | # Check if we hit an apple 107 | if [ "$POSX" -eq "$APPLEX" ] && [ "$POSY" -eq "$APPLEY" ]; then 108 | growsnake 109 | updatescore 10 110 | fi 111 | } 112 | 113 | updatescore() { 114 | SCORE=$(( $SCORE + $1 )) 115 | tput cup 2 30 116 | printf "SCORE: $SCORE" 117 | } 118 | randomchar() { 119 | [ $# -eq 0 ] && return 1 120 | n=$(( ($RANDOM % $#) + 1 )) 121 | eval DIRECTION=\${$n} 122 | } 123 | 124 | gameover() { 125 | tput cvvis 126 | stty echo 127 | sleep $DELAY 128 | trap exit ALRM 129 | tput cup $ROWS 0 130 | exit 131 | } 132 | 133 | drawborder() { 134 | # Draw top 135 | tput setf 6 136 | tput cup $FIRSTROW $FIRSTCOL 137 | x=$FIRSTCOL 138 | while [ "$x" -le "$LASTCOL" ]; 139 | do 140 | printf %b "$WALLCHAR" 141 | x=$(( $x + 1 )); 142 | done 143 | 144 | # Draw sides 145 | x=$FIRSTROW 146 | while [ "$x" -le "$LASTROW" ]; 147 | do 148 | tput cup $x $FIRSTCOL; printf %b "$WALLCHAR" 149 | tput cup $x $LASTCOL; printf %b "$WALLCHAR" 150 | x=$(( $x + 1 )); 151 | done 152 | 153 | # Draw bottom 154 | tput cup $LASTROW $FIRSTCOL 155 | x=$FIRSTCOL 156 | while [ "$x" -le "$LASTCOL" ]; 157 | do 158 | printf %b "$WALLCHAR" 159 | x=$(( $x + 1 )); 160 | done 161 | tput setf 9 162 | } 163 | 164 | SNAKECHAR="@" 165 | WALLCHAR="X" 166 | APPLECHAR="o" 167 | 168 | SNAKESIZE=3 169 | DELAY=0.2 170 | FIRSTROW=3 171 | FIRSTCOL=1 172 | LASTCOL=40 173 | LASTROW=20 174 | AREAMAXX=$(( $LASTCOL - 1 )) 175 | AREAMINX=$(( $FIRSTCOL + 1 )) 176 | AREAMAXY=$(( $LASTROW - 1 )) 177 | AREAMINY=$(( $FIRSTROW + 1)) 178 | ROWS=`tput lines` 179 | ORIGINX=$(( $LASTCOL / 2 )) 180 | ORIGINY=$(( $LASTROW / 2 )) 181 | POSX=$ORIGINX 182 | POSY=$ORIGINY 183 | # Pad out arrays 184 | ZEROES=`echo |awk '{printf("%0"'"$SNAKESIZE"'"d\n",$1)}' | sed 's/0/0 /g'` 185 | LASTPOSX=( $ZEROES ) 186 | LASTPOSY=( $ZEROES ) 187 | 188 | SCORE=0 189 | 190 | clear 191 | echo " 192 | Keys: 193 | 194 | W - UP 195 | S - DOWN 196 | A - LEFT 197 | D - RIGHT 198 | X - QUIT 199 | 200 | Press Return to continue 201 | " 202 | 203 | stty -echo 204 | tput civis 205 | read RTN 206 | tput setb 0 207 | tput bold 208 | clear 209 | drawborder 210 | updatescore 0 211 | 212 | drawapple 213 | sleep 1 214 | trap move ALRM 215 | 216 | DIRECTIONS=( u d l r ) 217 | randomchar "${DIRECTIONS[@]}" 218 | 219 | sleep 1 220 | move 221 | while : 222 | do 223 | read -s -n 1 key 224 | case "$key" in 225 | w) DIRECTION="u";; 226 | s) DIRECTION="d";; 227 | a) DIRECTION="l";; 228 | d) DIRECTION="r";; 229 | x) tput cup $COLS 0 230 | echo "Quitting..." 231 | tput cvvis 232 | stty echo 233 | tput reset 234 | printf "Bye Bye!\n" 235 | trap exit ALRM 236 | sleep $DELAY 237 | exit 0 238 | ;; 239 | esac 240 | done 241 | -------------------------------------------------------------------------------- /sound: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Prints the current volume or 🔇 if muted. 4 | 5 | case $BLOCK_BUTTON in 6 | 1) setsid -f "$TERMINAL" -e pulsemixer ;; 7 | 2) pamixer -t ;; 8 | 4) pamixer --allow-boost -i 1 ;; 9 | 5) pamixer --allow-boost -d 1 ;; 10 | 3) notify-send "📢 Volume module" "\- Shows volume 🔊, 🔇 if muted. 11 | - Middle click to mute. 12 | - Scroll to change." ;; 13 | 6) "$TERMINAL" -e "$EDITOR" "$0" ;; 14 | esac 15 | 16 | [ $(pamixer --get-mute) = true ] && echo 🔇 && exit 17 | 18 | vol="$(pamixer --get-volume)" 19 | 20 | if [ "$vol" -gt "70" ]; then 21 | icon="🔊" 22 | elif [ "$vol" -lt "30" ]; then 23 | icon="🔈" 24 | else 25 | icon="🔉" 26 | fi 27 | 28 | echo "$icon$vol%" 29 | 30 | -------------------------------------------------------------------------------- /testmenu.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | #arrays - for different levels of menu 4 | PROGS=("Window Manager" "Terminal Emulator" "Status Bar" "Quit") 5 | WMS=("awesome" "bspwm" "dwm" "herbst" "i3" "spectrwm" "xmonad" "back" "quit") 6 | TERMS=("alacritty" "kitty" "st" "urxvt" "xterm" "back" "quit") 7 | BARS=("baraction" "dzen" "polybar" "xmobar" "back" "quit") 8 | 9 | #prompt when menu launched 10 | PS3='Which type of file would you like to edit: ' 11 | 12 | #statement/loop for level 1 of menu system. listing options and commands 13 | select prog in "${PROGS[@]}"; do 14 | case "$prog" in 15 | 16 | # selection 1 lists selection of window manager configs to access 17 | "Window Manager") 18 | #prompt for level 2 of menu system (wm configs) 19 | PS3="Which config would you like to edit: " 20 | 21 | #statemen/loop for level 2 of menu system. listing options and commands 22 | select file in "${WMS[@]}"; do 23 | case "$file" in 24 | "awesome") 25 | vim "$HOME/.config/awesome/rc.lua" 26 | 27 | ;; 28 | "bspwm") 29 | vim "$HOME/.config/bspwm/bspwmrc" 30 | 31 | ;; 32 | "dwm") 33 | vim "$HOME/dwm-6.2/config.h" 34 | 35 | ;; 36 | "herbst") 37 | vim "$HOME/.config/herbstluftwm/autostart" 38 | 39 | ;; 40 | "i3") 41 | vim "$HOME/.config/i3/config" 42 | 43 | ;; 44 | "spectrwm") 45 | vim "$HOME/.spectrwm.conf" 46 | 47 | ;; 48 | "xmonad") 49 | vim "$HOME/.xmonad/xmonad.hs" 50 | 51 | ;; 52 | "back") 53 | PS3="What type of file: 1) WM, 2) Termnal, 3) Bar, 4) Quit: " 54 | break 55 | ;; 56 | "quit") 57 | echo "Peace Out!!" 58 | sleep 2 59 | exit 60 | ;; 61 | *) echo "you no read so well, $REPLY is not an option";; 62 | esac 63 | done 64 | ;; 65 | 66 | # selection 2 lists terminal emulator config files 67 | "Terminal Emulator") 68 | #prompt for level 2 of menu system (emulator configs) 69 | PS3='Which config are we changing: ' 70 | 71 | #statement/loop for level 2 of menu system. listing options and commands 72 | select config in "${TERMS[@]}"; do 73 | case "$config" in 74 | "alacritty") 75 | vim "$HOME/.config/alacritty.yml" 76 | 77 | ;; 78 | "kitty") 79 | vim "$HOME/.config/kitty/kitty.conf" 80 | 81 | ;; 82 | "st") 83 | vim "$HOME/st-0.8.4/config.h" 84 | 85 | ;; 86 | "urxvt") 87 | vim "$HOME/.Xresources" 88 | 89 | ;; 90 | "xterm") 91 | vim "$HOME/.Xresources" 92 | 93 | ;; 94 | "back") 95 | PS3="What type of file: 1) WM, 2) Termnal, 3) Bar, 4) Quit: " 96 | break 97 | ;; 98 | "quit") 99 | echo "Deuces!!" 100 | exit 101 | ;; 102 | *) echo "someone needs to go back to school, there is no $REPLY";; 103 | esac 104 | done 105 | ;; 106 | "Status Bar") 107 | PS3='Which bar are we working on: ' 108 | select bar in "${BARS[@]}"; do 109 | case "$bar" in 110 | "baraction") 111 | vim "$HOME/baraction.sh" 112 | 113 | ;; 114 | "dzen") 115 | vim "$HOME/.Xresources" 116 | 117 | ;; 118 | "polybar") 119 | vim "$HOME/.config/polybar/config" 120 | 121 | ;; 122 | "xmobar") 123 | vim "$HOME/.config/xmobar/xmobarrc" 124 | ;; 125 | "back") 126 | PS3="What type of file: 1) WM, 2) Termnal, 3) Bar, 4) Quit: " 127 | break 128 | ;; 129 | "quit") 130 | echo "Check ya later!" 131 | 132 | ;; 133 | *) echo "Why you no understand numbers? $REPLY not on the list";; 134 | esac 135 | done 136 | ;; 137 | "Quit") 138 | echo "Are you still here?" 139 | sleep 2 140 | exit 141 | ;; 142 | *) 143 | echo "Why you no count good? Number $REPLY no here";; 144 | esac 145 | done 146 | -------------------------------------------------------------------------------- /themesel.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Created By: Jake@Linux 4 | # Created On: Wed 03 Aug 2022 10:52:55 PM CDT 5 | # Project: theme switcher for HLWM 6 | 7 | dir="$HOME/.config/herbstluftwm/HLWM_themes/options/" 8 | theme="$HOME/.config/herbstluftwm/HLWM_themes/theme" 9 | bartheme="$HOME/.config/herbstluftwm/polybar_themes/theme.ini" 10 | themes="$(ls "$dir" | fzf --prompt="CHOOSE A THEME" --border=rounded --margin=5% --color=dark --height=100% --reverse --header=" THEMES " --info=hidden --header-first)" 11 | 12 | if [ $themes ]; 13 | then 14 | cp $HOME/.config/herbstluftwm/HLWM_themes/options/"$themes" "$theme" 15 | cp $HOME/.config/herbstluftwm/polybar_themes/options/"$themes" "$bartheme" 16 | pkill polybar 17 | herbstclient reload 18 | else 19 | exit 20 | fi 21 | 22 | -------------------------------------------------------------------------------- /todo.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | ##----------------## 3 | # assign variables # 4 | ##----------------## 5 | DAY=$(date --date="2 days" | awk '{ print $2 $3 }') 6 | TO_ADDRESS="jake@jpedmedia.com" 7 | SUBJECT="Appointment" 8 | BODY=$(less "$HOME/.local/todo/$DAY") 9 | FILE="$HOME/.local/todo/$DAY" 10 | time="$(date "+%H:%M:%S")" 11 | 12 | #if [[ "$time" == "08:00:00" ]] && [[ -f "$FILE" ]] 13 | #then 14 | # #echo "$BODY" | neomutt -s "$SUBJECT" "$TO_ADDRESS" 15 | # curl -X POST https://textbelt.com/text --data-urlencode phone='XXXXXXXXX' --data-urlencode message="$BODY" -d key=textbelt 16 | # exit 17 | #elif [[ "$time" != "08:00:00" ]] && [[ "$time" < "0:8:00:02" ]] && [[ ! -f "$FILE" ]] 18 | #then 19 | # exit 20 | #else 21 | 22 | ##-------------------------------------------------------------------------------------## 23 | # checks for figlet on system and installs on arch or debian based systems if not found # 24 | # prints out header for program # 25 | ##-------------------------------------------------------------------------------------## 26 | while true; do 27 | if command -v figlet &> /dev/null 28 | then 29 | break 30 | else 31 | if command -v pacman &> /dev/null 32 | then 33 | sudo pacman -S figlet 34 | break 35 | elif command -v apt &> /dev/null 36 | then 37 | sudo apt install figlet 38 | break 39 | elif command -v xbps-install &> /dev/null 40 | then 41 | sudo xbps-install figlet 42 | break 43 | else 44 | printf "please install figlet" 45 | exit 46 | fi 47 | fi 48 | done 49 | clear 50 | 51 | 52 | figlet -c -f slant "To Do" 53 | figlet -s -f digital "A simple terminal appointment organizer" 54 | printf "\n " 55 | printf " created by: Jake Pedersen of Jake@Linux\n" 56 | printf "\n " 57 | 58 | ##--------------------------------------------------------------------## 59 | # prompts for user input and checks for action user wishes to complete # 60 | ##--------------------------------------------------------------------## 61 | while true; do 62 | printf "Please Make a Selection\n(options: A/a=add, V/v=view, & E/e=exit)\n" 63 | printf " : " 64 | read -r answer 65 | 66 | 67 | ##-------------------------------------------------## 68 | # prompts for appointment info if "add" is selected # 69 | ##-------------------------------------------------## 70 | if [[ "$answer" == [A/a] ]] 71 | then 72 | printf "\n" 73 | printf "Input Topic of Entry" 74 | printf "\n : " 75 | read -r topic 76 | printf "\n" 77 | printf "Entry\n " 78 | printf "\n : " 79 | read -r entry 80 | 81 | 82 | ##---------------------------------------------------------------------## 83 | # checks for file with selected date, if found, stores new appointment, # 84 | # if not found, it creates new file # 85 | ##---------------------------------------------------------------------## 86 | if [[ -f "$HOME/.local/todo/$topic" ]]; then 87 | printf '[ ] %s\n' "$entry" >> "$HOME/.local/todo/$topic" 88 | vim "$HOME/.local/todo/$topic" 89 | else 90 | touch "$HOME/.local/todo/$topic" 91 | figlet -s -f slant "$topic" >> "$HOME/.local/todo/$topic" 92 | printf '\n %s\n' "$entry" >> "$HOME/.local/todo/$topic" 93 | vim "$HOME/.local/todo/$topic" 94 | fi 95 | 96 | 97 | ##-----------------------------------------------------------------------------## 98 | # if "view" selected, prompts user for which date to view or all, if date given # 99 | # opens file for given date, if all selected, opens dir of all files for user # 100 | # to choose from, if exit chosen, closes program # 101 | ##-----------------------------------------------------------------------------## 102 | elif [[ "$answer" == [V/v] ]] 103 | then 104 | printf "\n" 105 | printf "Please type \"date\" or \"all\" to choose from list" 106 | printf "\n : " 107 | read -r choice 108 | printf "\n" 109 | if [[ "$choice" == all ]] 110 | then 111 | vim "$HOME/.local/todo/" 112 | else 113 | if [[ "$choice" == date ]] 114 | then 115 | printf "Which date would you like to view?\n" 116 | printf "(format = Dec12)" 117 | printf "\n : " 118 | read -r day 119 | vim "$HOME/.local/todo/$day" 120 | fi 121 | fi 122 | elif [[ "$answer" == [E/e] ]] 123 | then 124 | exit 125 | else [[ "$answer" == ? ]] 126 | printf "Please make proper selection" 127 | fi 128 | 129 | 130 | printf "\nWould you like to add or view another entry?\n" 131 | printf "(Y/y or N/n)" 132 | printf "\n: " 133 | read -r decision 134 | printf "\n" 135 | if [[ "$decision" == [Y/y] ]] 136 | then 137 | printf "Great!\n" 138 | else 139 | exit 140 | fi 141 | 142 | done 143 | #fi 144 | -------------------------------------------------------------------------------- /updicon.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Check if yad is running and get its process ID 4 | inst=$(pgrep yad) 5 | 6 | # Kill yad if it's running and the script is running in an X11 environment 7 | if [ -n "$inst" ] && [ -n "$DISPLAY" ]; then 8 | DISPLAY=:0 pkill yad 9 | fi 10 | 11 | # Check for updates 12 | upd=$(sudo -E xbps-install -SunM | wc -l) 13 | list=$(sudo -E xbps-install -nuM | awk '{print $1}') 14 | 15 | # Display yad notification based on the number of updates 16 | if ((upd == 0)); then 17 | yad --text "$upd Updates" --notification --image=$HOME/Desktop/icon/noupdate.png 18 | elif ((upd <= 5)); then 19 | yad --text "$upd Updates: Right click to see all updates, Left click to perform update" --notification \ 20 | --image=$HOME/Desktop/icon/modupdate.png --menu="$list" --command "kitty -e sudo xbps-install -Su" 21 | elif ((upd > 5)); then 22 | yad --text "$upd Updates: Right click to see all updates, Left click to perform update" --notification \ 23 | --image=$HOME/Desktop/icon/lotsupdate.png --menu="$list" --command "kitty -e sudo xbps-install -Su" 24 | fi 25 | 26 | -------------------------------------------------------------------------------- /updicon.sh.bkp: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Created By: Jake@Linux 4 | # Created On: Thu 25 Aug 2022 02:20:52 PM CDT 5 | # Project: sys tray icon for system updates 6 | 7 | upd="$(sudo xbps-install -SunM | wc -l)" 8 | list="$(sudo xbps-install -nuM | awk {'print $1'})" 9 | inst="$(pidof yad)" 10 | 11 | 12 | 13 | if [[ $inst -eq " " ]] 14 | then 15 | if (( $upd == 0 )); 16 | then 17 | yad --text "$upd Updates" --notification --image=$HOME/Desktop/icon/noupdate.png 18 | elif (( $upd <= 5 )); 19 | then 20 | yad --text "$upd Updates: Right click to see all updates, Left click to perform update" --notification\ 21 | --image=$HOME/Desktop/icon/modupdate.png --menu="$list" --command "kitty -e sudo xbps-install -Su" 22 | elif (( $upd > 5 )); 23 | then 24 | yad --text "$upd Updates: Right click to see all updates, Left click to perform update" --notification\ 25 | --image=$HOME/Desktop/icon/lotsupdate.png --menu="$list" --command "kitty -e sudo xbps-install -Su" 26 | fi 27 | elif [[ $inst -gt "1" ]] 28 | then 29 | pkill yad 30 | fi 31 | 32 | if (( $upd == 0 )); 33 | then 34 | yad --text "$upd Updates" --notification --image=$HOME/Desktop/icon/noupdate.png 35 | elif (( $upd <= 5 )); 36 | then 37 | yad --text "$upd Updates: Right click to see all updates, Left click to perform update" --notification\ 38 | --image=$HOME/Desktop/icon/modupdate.png --menu="$list" --command "kitty -e sudo xbps-install -Su" 39 | elif (( $upd > 5 )); 40 | then 41 | yad --text "$upd Updates: Right click to see all updates, Left click to perform update" --notification\ 42 | --image=$HOME/Desktop/icon/lotsupdate.png --menu="$list" --command "kitty -e sudo xbps-install -Su" 43 | fi 44 | 45 | 46 | -------------------------------------------------------------------------------- /vmach.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | list=$(virsh list --all | cut -b 7- | sed 's/........$//' | tail -n +3 | sed 's/ *$//g') 4 | 5 | vms=("Add 6 | $list 7 | Quit") 8 | 9 | #choice=$(echo -e "${vms[@]}" | wofi --show dmenu --prompt="Virt Launcher") 10 | choice=$(echo -e "${vms[@]}" | dmenu -fn 'Hermit:size=10' -p 'Virt Machines: ' -nb '#222222' -nf '#b8b8b8' -sb '#008080' -sf '#000000') 11 | #choice="$(fzf --prompt="Choose a VM : " --border=rounded --margin=5% --color=dark --height 100% --reverse --header=" VM Launcher " --info=hidden --header-first <<<"${vms[@]}")" 12 | #notify="$(notify-send "v-machine launcher" "launching $choice")" 13 | 14 | case "$choice" in 15 | Add) 16 | choice=./.local/scripts/addvm.sh 17 | devour alacritty -T addvm -e $choice 18 | ;; 19 | Quit) 20 | exit 1 21 | ;; 22 | *) 23 | notify="$(notify-send "v-machine launcher" "launching $choice")" 24 | $notify 25 | choice="$(virsh -q start "$choice") && $(devour virt-viewer --attach --domain-name "$choice")" 26 | ;; 27 | esac 28 | 29 | #alacritty -e "$choice" 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /vol: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | [ "$(pamixer --get-mute)" == true ] && echo  && exit 4 | 5 | vol="$(pamixer --get-volume)" 6 | echo "${vol}% " 7 | -------------------------------------------------------------------------------- /vol.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # You can call this script like this: 4 | # $./volume.sh up 5 | # $./volume.sh down 6 | # $./volume.sh mute 7 | 8 | function get_volume { 9 | amixer -D pulse get Master | grep '%' | head -n 1 | cut -d '[' -f 2 | cut -d '%' -f 1 10 | } 11 | 12 | function is_mute { 13 | amixer -D pulse get Master | grep '%' | grep -oE '[^ ]+$' | grep off > /dev/null 14 | } 15 | 16 | function send_notification { 17 | DIR=`dirname "$0"` 18 | volume=`get_volume` 19 | # Make the bar with the special character ─ (it's not dash -) 20 | # https://en.wikipedia.org/wiki/Box-drawing_character 21 | #bar=$(seq -s "─" $(($volume/5)) | sed 's/[0-9]//g') 22 | if [ "$volume" = "0" ]; then 23 | icon_name="/usr/share/icons/Faba/48x48/notifications/notification-audio-volume-muted.svg" 24 | $DIR/notify-send.sh "$volume"" " -i "$icon_name" -t 2000 -h int:value:"$volume" -h string:synchronous:"─" --replace=555 25 | else 26 | if [ "$volume" -lt "10" ]; then 27 | icon_name="/usr/share/icons/Faba/48x48/notifications/notification-audio-volume-low.svg" 28 | $DIR/notify-send.sh "$volume"" " -i "$icon_name" --replace=555 -t 2000 29 | else 30 | if [ "$volume" -lt "30" ]; then 31 | icon_name="/usr/share/icons/Faba/48x48/notifications/notification-audio-volume-low.svg" 32 | else 33 | if [ "$volume" -lt "70" ]; then 34 | icon_name="/home/jake/.icons/Windows-10-1.0/48x48/status/stock_volume-med.png" 35 | else 36 | icon_name="/usr/share/icons/Faba/48x48/notifications/notification-audio-volume-high.svg" 37 | fi 38 | fi 39 | fi 40 | fi 41 | bar=$(seq -s "─" $(($volume/5)) | sed 's/[0-9]//g') 42 | # Send the notification 43 | $DIR/notify-send.sh "$volume"" ""$bar" -i "$icon_name" -t 2000 -h int:value:"$volume" -h string:synchronous:"$bar" --replace=555 44 | 45 | } 46 | 47 | case $1 in 48 | up) 49 | # Set the volume on (if it was muted) 50 | amixer -D pulse set Master on > /dev/null 51 | # Up the volume (+ 5%) 52 | amixer -D pulse sset Master 5%+ > /dev/null 53 | send_notification 54 | ;; 55 | down) 56 | amixer -D pulse set Master on > /dev/null 57 | amixer -D pulse sset Master 5%- > /dev/null 58 | send_notification 59 | ;; 60 | mute) 61 | # Toggle mute 62 | amixer -D pulse set Master 1+ toggle > /dev/null 63 | if is_mute ; then 64 | DIR=`dirname "$0"` 65 | $DIR/notify-send.sh -i "/usr/share/icons/Faba/48x48/notifications/notification-audio-volume-muted.svg" --replace=555 -u normal "Mute" -t 2000 66 | else 67 | send_notification 68 | fi 69 | ;; 70 | esac 71 | -------------------------------------------------------------------------------- /volchange.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # $0 volup 3 | # $0 voldown 4 | # make adjustment 5 | # read new volume level 6 | # set icon relevant to new volume 7 | # send notification with con + level 8 | # play ding 9 | # $0 togglemute 10 | # read whether currently muted 11 | # toggle mute 12 | # if muting, set icon to mute, notify 13 | # if unmuting, set icon to current volume level, notify, ding 14 | if [ $# -ne 1 ]; then 15 | echo "Need 1 argument (volup, voldown, volmute)" 16 | exit 1; 17 | fi 18 | getnewvol () { 19 | # return a percentage 20 | CURVOL=`pactl list sinks | grep -i volume | head -1 | awk '{print $5}' | sed -e 's/%//'` 21 | if [ `pactl list sinks | grep Mute | awk '{print $2}'` = 'yes' ]; then 22 | echo "Muted" 23 | ICON=audio-volume-muted 24 | return 25 | fi 26 | echo "Current volume $CURVOL" 27 | if [ $CURVOL -gt 75 ]; then 28 | ICON=audio-volume-high 29 | elif [ $CURVOL -gt 35 ]; then 30 | ICON=audio-volume-medium 31 | elif [ $CURVOL -gt 0 ]; then 32 | ICON=audio-volume-low 33 | fi 34 | 35 | } 36 | if [ $1 = 'volup' ]; then 37 | echo "Up" 38 | pactl set-sink-volume 0 +5% 39 | MSG='Volume up' 40 | getnewvol 41 | elif [ $1 = 'voldown' ]; then 42 | echo "Down" 43 | pactl set-sink-volume 0 -5% 44 | MSG='Volume down' 45 | getnewvol 46 | elif [ $1 = 'volmute' ]; then 47 | echo "Mute" 48 | pactl set-sink-mute 0 toggle 49 | if [ `pactl list sinks | grep Mute | awk '{print $2}'` = 'yes' ]; then 50 | MSG='Mute' 51 | ICON='audio-volume-muted' 52 | else 53 | MSG='Unmute' 54 | ICON='audio-volume-muted' 55 | fi 56 | getnewvol 57 | fi 58 | echo "ICON: $ICON" 59 | echo "MSG: $MSG" 60 | echo "CURVOL: $CURVOL" 61 | notify-send "$MSG ($CURVOL%)" -i /usr/share/icons/Adwaita/32x32/legacy/$ICON.png 62 | paplay /usr/share/sounds/freedesktop/stereo/audio-volume-change.oga 63 | -------------------------------------------------------------------------------- /volume: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Prints the current volume or 🔇 if muted. 4 | 5 | case $BLOCK_BUTTON in 6 | 1) setsid -f "$TERMINAL" -e pulsemixer ;; 7 | 2) pamixer -t ;; 8 | 4) pamixer --allow-boost -i 1 ;; 9 | 5) pamixer --allow-boost -d 1 ;; 10 | 3) notify-send " Volume module" "\- Shows volume 🔊,  if muted. 11 | - Middle click to mute. 12 | - Scroll to change." ;; 13 | 6) "$TERMINAL" -e "$EDITOR" "$0" ;; 14 | esac 15 | 16 | [ $(pamixer --get-mute) = true ] && echo  && exit 17 | 18 | vol="$(pamixer --get-volume)" 19 | 20 | if [ "$vol" -gt "70" ]; then 21 | icon=" " 22 | elif [ "$vol" -lt "30" ]; then 23 | icon="  " 24 | else 25 | icon="  " 26 | fi 27 | 28 | echo "$icon" 29 | -------------------------------------------------------------------------------- /vsp: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ARGS=$(getopt --options cvh --long "check,version,help" -- "$@") 4 | 5 | eval set --"$ARGS" 6 | 7 | check="false" 8 | version="false" 9 | help="false" 10 | 11 | 12 | 13 | while true; do 14 | case "$1" in 15 | -c|--check) 16 | check="true" 17 | shift;; 18 | -v|--version) 19 | version="true" 20 | shift;; 21 | -h|--help) 22 | help="true" 23 | shift;; 24 | --) 25 | shift 26 | break;; 27 | esac 28 | done 29 | 30 | search="$(ls "$HOME"/.local/pkgs/void-packages/srcpkgs | grep "$1")" 31 | 32 | 33 | if [ "$check" == true ]; then 34 | avail="$(ls "$HOME"/.local/pkgs/void-packages/srcpkgs | grep "$1" | wc -l)" 35 | if [ "$avail" -gt 0 ]; then 36 | echo "$search" 37 | fi 38 | fi 39 | 40 | 41 | if [ "$version" == true ]; then 42 | ver=$(grep version= ~/.local/pkgs/void-packages/srcpkgs/"$1"/template) 43 | echo "$ver" 44 | fi 45 | 46 | -------------------------------------------------------------------------------- /vsp2: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | pkg="$(ls ~/.local/pkgs/void-packages/srcpkgs | dmenu -i -fn Hermit:size=10 -nb '#222222' -sb '#007687' -sf '#222222' -nf '#b8b8b8' -l 5 -g 5 -p "What would you like to install? :")" 4 | #pkg="$(ls ~/.local/pkgs/void-packages/srcpkgs | wofi --show dmenu --prompt="Which Package:")" 5 | #pkg="$(ls ~/.local/pkgs/void-packages/srcpkgs | fzf --prompt="Search Void-src pkgs : " --border=rounded --margin=5% \ 6 | # --color='fg:104,fg+:255,pointer:12,hl:255,hl+:12,header:12,prompt:255'\ 7 | # --height 100% --reverse --header=" Templates " --info=hidden --header-first)" 8 | DIR1=$HOME/.local/pkgs/void-packages/ 9 | DIR2=$HOME/.local/pkgs/void-packages/srcpkgs 10 | CHECK="$(xbps-query -s "$pkg" | wc -l)" 11 | 12 | 13 | if [ "$pkg" ] 14 | then 15 | if [ "$CHECK" -eq "1" ] 16 | then 17 | notify-send "You are good to go, program already installed! have a wonderful day, gorgeous!" 18 | sleep 2 19 | exit 20 | else 21 | cd "$DIR1" || exit 22 | git pull 23 | 24 | cd "$DIR2" || exit 25 | if [[ -d "$pkg" ]] 26 | then 27 | cd "$DIR1" || exit 28 | notify-send -t 60000 "installing $pkg, Please be patient" 29 | ./xbps-src pkg "$pkg" && sudo xbps-install -Sy --repository hostdir/binpkgs "$pkg" 30 | else 31 | notify-send "Not found" 32 | exit 33 | fi 34 | fi 35 | else 36 | exit 37 | fi 38 | notify-send "$pkg installed" 39 | -------------------------------------------------------------------------------- /wall: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | DIR="/home/jake/Media/Pictures/wallpaper" 4 | WALL="$(sxiv file $DIR)" 5 | 6 | 7 | -------------------------------------------------------------------------------- /weather: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Displays todays precipication chance ( ) and daily low ( ) and high ( ). 4 | # Usually intended for the statusbar. 5 | 6 | # If we have internet, get a weather report from wttr.in and store it locally. 7 | # You could set up a shell alias to view the full file in a pager in the 8 | # terminal if desired. This function will only be run once a day when needed. 9 | weatherreport="/home/jake/.local/share/weatherreport" 10 | getforecast() { curl -sf "wttr.in/Rogers" > "$weatherreport" || exit 1 ;} 11 | 12 | # Some very particular and terse stream manipulation. We get the maximum 13 | # precipication chance and the daily high and low from the downloaded file and 14 | # display them with coresponding emojis. 15 | showweather() { printf "%s" "$(sed '16q;d' "$weatherreport" | 16 | grep -wo "[0-9]*%" | sort -rn | sed "s/^//g;1q" | tr -d '\n')" 17 | sed '13q;d' "$weatherreport" | grep -o "m\\([-+]\\)*[0-9]\\+" | sort -n -t 'm' -k 2n | sed -e 1b -e '$!d' | tr '\n|m' ' ' | awk '{print " " $1 "°"," " $2 "° "}' ;} 18 | 19 | case $BLOCK_BUTTON in 20 | 1) setsid -f "$TERMINAL" -e less -Srf "$weatherreport" ;; 21 | 2) getforecast && showweather ;; 22 | 3) notify-send "🌈 Weather module" "\- Left click for full forecast. 23 | - Middle click to update forecast. 24 |  : Chance of rain/snow 25 |  : Daily low 26 |  : Daily high" ;; 27 | 6) "$TERMINAL" -e "$EDITOR" "$0" ;; 28 | esac 29 | 30 | # The test if our forcecast is updated to the day. If it isn't download a new 31 | # weather report from wttr.in with the above function. 32 | [ "$(stat -c %y "$weatherreport" 2>/dev/null | cut -d' ' -f1)" = "$(date '+%Y-%m-%d')" ] || 33 | getforecast 34 | 35 | showweather 36 | -------------------------------------------------------------------------------- /web: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Show wifi 📶 and percent strength or 📡 if none. 4 | # Show 🌐 if connected to ethernet or ❎ if none. 5 | 6 | #case $BLOCK_BUTTON in 7 | # 1) "$TERMINAL" -e nmtui; pkill -RTMIN+4 dwmblocks ;; 8 | # 3) notify-send "🌐 Internet module" "\- Click to connect 9 | #📡: no wifi connection 10 | #📶: wifi connection with quality 11 | #❎: no ethernet 12 | #🌐: ethernet working 13 | #" ;; 14 | # 6) "$TERMINAL" -e "$EDITOR" "$0" ;; 15 | #esac 16 | 17 | case "$(cat /sys/class/net/w*/operstate 2>/dev/null)" in 18 | down) wifiicon="" ;; 19 | up) wifiicon="$(awk '/^\s*w/ { print "", int($3 * 100 / 70) "% " }' /proc/net/wireless)" ;; 20 | esac 21 | 22 | printf "%s%s\n" "$wifiicon" "$(sed "s/down/;s/up/" /sys/class/net/e*/operstate 2>/dev/null)" 23 | 24 | -------------------------------------------------------------------------------- /windows.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | open=("$(wmctrl -l | awk '{print $2, " : ", $NF, " - ", $4}' | sort -V -k 1 | column -tc2) 4 | kill 5 | cancel") 6 | 7 | close=("$(wmctrl -l | awk '{print $1, $NF, $4, " - ", $2}' | sort -V -k 4 | column -tc2) 8 | cancel") 9 | 10 | #workspace="$(echo "${open[@]}" | dmenu -c -l 10 -nb '#222222' -nf '#b8b8b8' -sf '#181818' -sb '#007687' -p "Open Windows:")" 11 | workspace="$(echo "${open[@]}" | fzf --prompt="Open Windows" --border=rounded --margin=5% --color=dark --height=100% --reverse --header=" Windows per Workspace" --info=hidden --header-first)" 12 | 13 | 14 | 15 | if [ "$workspace" == "kill" ]; 16 | then 17 | #closewin="$(echo "${close[@]}" | dmenu -c -l 10 -nb '#222222' -nf '#b8b8b8' -sf '#181818' -sb '#007687' -p "Which would you like to close?: ")"; 18 | closewin="$(echo "${close[@]}" | fzf --prompt="Close Window" --border=rounded --margin=5% --color=dark --height=100% --reverse --header=" Windows per Workspace" --info=hidden --header-first)" 19 | if [ "$closewin" == "cancel" ]; 20 | then 21 | exit 22 | else 23 | xdotool windowkill "$closewin" 24 | fi 25 | elif 26 | [ "$workspace" == "cancel" ]; 27 | then 28 | exit 29 | else 30 | wmctrl -s "$workspace" 31 | fi 32 | -------------------------------------------------------------------------------- /ytsubs.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | ## Created By: Jake@Linux 4 | # Created On: Thu 02 Mar 2023 08:52:21 AM UTC 5 | # # Project: 6 | # 7 | # 8 | subcount=$(curl -L --silent https://www.youtube.com/channel/UC1yGcBvdPGxRIMT1yo_bKIQ | grep -Eo '[.,0-9,K]+ subscriber' | sed -n 7p)s 9 | #notify-send -t 2500 "Channel growth" "$subcount" 10 | printf "$subcount" | sed 's/subscribers//g' 11 | --------------------------------------------------------------------------------