Cleanup dotfiles, fixed permissions
Also updated i3 config
This commit is contained in:
BIN
.config/i3/scripts/claw
Executable file
BIN
.config/i3/scripts/claw
Executable file
Binary file not shown.
29
.config/i3/scripts/locker.sh
Executable file
29
.config/i3/scripts/locker.sh
Executable file
@@ -0,0 +1,29 @@
|
||||
#!/bin/sh
|
||||
ARGS=(
|
||||
"--screen=0"
|
||||
"--blur=5"
|
||||
# "-i${HOME}/Pictures/bg_1440p/Linux-Wallpapers-19-2560-x-1920.png"
|
||||
# "-i${HOME}/Pictures/backgrounds/0c7e1f_5775038.jpg"
|
||||
"--clock"
|
||||
"--timecolor=dfdfdfff"
|
||||
"--datecolor=dfdfdfff"
|
||||
"--insidevercolor=35d75588"
|
||||
"--insidewrongcolor=d7355588"
|
||||
"--insidecolor=00000000"
|
||||
"--ringvercolor=64c784ff"
|
||||
"--ringwrongcolor=c76484ff"
|
||||
"--ringcolor=3555d7ff"
|
||||
"--linecolor=00000000"
|
||||
"--radius=30"
|
||||
"--indpos=x+200:h-70"
|
||||
"--timepos=x+90:h-70"
|
||||
"--datepos=tx:ty+25"
|
||||
"--statuspos=ix:iy+10"
|
||||
"--separatorcolor=6484c7ff"
|
||||
"--keyhlcolor=35d755ff"
|
||||
"--bshlcolor=d73555ff"
|
||||
"--veriftext=V" "--wrongtext=E")
|
||||
|
||||
i3lock "${ARGS[@]}" &
|
||||
i3lockpid=$!
|
||||
sleep 2
|
||||
23
.config/i3/scripts/polybar_launch.sh
Executable file
23
.config/i3/scripts/polybar_launch.sh
Executable file
@@ -0,0 +1,23 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
# Terminate already running bar instances
|
||||
killall -q polybar
|
||||
|
||||
# Wait until the processes have been shut down
|
||||
while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done
|
||||
|
||||
if type "xrandr"; then
|
||||
for m in $(xrandr --query | grep " connected" | cut -d" " -f1); do
|
||||
export COLOR_CYAN="#8be9fd"
|
||||
export COLOR_BLUE="#6272a4"
|
||||
export COLOR_GREEN="#50fa7b"
|
||||
export LABEL_MOUNTED="%{F$COLOR_CYAN}%mountpoint%%{F-}:%free%"
|
||||
export LABEL_NETWORK_CONNECTED="%{F$COLOR_CYAN}%local_ip%%{F-}:%downspeed:4%"
|
||||
MONITOR=$m polybar --reload top &
|
||||
MONITOR=$m polybar --reload bottom &
|
||||
done
|
||||
else
|
||||
polybar --reload top &
|
||||
fi
|
||||
|
||||
echo "Bars launched..."
|
||||
9
.config/i3/scripts/rotate_background.sh
Executable file
9
.config/i3/scripts/rotate_background.sh
Executable file
@@ -0,0 +1,9 @@
|
||||
#! /bin/bash
|
||||
WALLPAPERS="/home/tristan/Pictures/bg_1440p"
|
||||
ALIST=( `ls -w1 $WALLPAPERS` )
|
||||
RANGE=${#ALIST[@]}
|
||||
let "number = $RANDOM"
|
||||
let LASTNUM="`cat $WALLPAPERS/.last` + $number"
|
||||
let "number = $LASTNUM % $RANGE"
|
||||
echo $number > $WALLPAPERS/.last
|
||||
nitrogen --set-scaled --save $WALLPAPERS/${ALIST[$number]}
|
||||
40
.config/i3/scripts/shutdown_menu
Executable file
40
.config/i3/scripts/shutdown_menu
Executable file
@@ -0,0 +1,40 @@
|
||||
#!/bin/bash
|
||||
#LOCKSCRIPT="i3lock-extra -m pixelize"
|
||||
FG_COLOR="#d7d7d7"
|
||||
BG_COLOR="#15325A"
|
||||
SF_COLOR="#3555d7"
|
||||
SB_COLOR="#6484c7"
|
||||
color="-bg $BG_COLOR -fg $FG_COLOR -hlfg $SF_COLOR -hlbg $SB_COLOR -bw 0"
|
||||
|
||||
# menu defined as an associative array
|
||||
typeset -A menu
|
||||
|
||||
# Menu with keys/commands
|
||||
menu=(
|
||||
[Shutdown]="systemctl poweroff"
|
||||
[Reboot]="systemctl reboot"
|
||||
[Hibernate]="systemctl hibernate"
|
||||
[Suspend]="systemctl suspend"
|
||||
[Halt]="systemctl halt"
|
||||
[Lock]="~/.i3/scripts/locker.sh"
|
||||
[Logout]="exit"
|
||||
[Cancel]="Cancel"
|
||||
)
|
||||
|
||||
# Menu entries that may trigger a confirmation message
|
||||
menu_confirm="Shutdown Reboot Hibernate Suspend Halt Logout"
|
||||
launcher="rofi -dmenu -hide-scrollbar -width 10"
|
||||
launcher_opt="-i -yoffset 23 -location 3 $color"
|
||||
selection=$(printf '%s\n' ${!menu[@]} | sort | eval '$launcher $launcher_opt -font "Hack-Regular 12" -lines 8')
|
||||
if [ $selection == "Cancel" ] || [ -z $selection ]; then
|
||||
exit 1
|
||||
else
|
||||
if [[ ${menu_confirm[*]} =~ $selection ]]; then
|
||||
confirm=$(printf 'Yes\nNo\n' | eval '$launcher $launcher_opt -l 2 -font "Hack-Regular 12"')
|
||||
if [[ $confirm == 'Yes' ]]; then
|
||||
i3-msg -q "exec ${menu[${selection}]}"
|
||||
fi
|
||||
else
|
||||
i3-msg -q "exec ${menu[${selection}]}"
|
||||
fi
|
||||
fi
|
||||
7
.config/i3/scripts/term_runner.sh
Executable file
7
.config/i3/scripts/term_runner.sh
Executable file
@@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
while getopts "d:" option; do
|
||||
case "${option}" in
|
||||
d)
|
||||
alacritty --working-directory ${OPTARG} & ;;
|
||||
esac
|
||||
done
|
||||
18
.config/i3/scripts/volume_set.sh
Executable file
18
.config/i3/scripts/volume_set.sh
Executable file
@@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
if [ "$1" == "up" ]
|
||||
then
|
||||
pulsemixer --change-volume +5
|
||||
TEXT="Volume: $(pulsemixer --get-volume | cut -d' ' -f 1 | sed 's/\(\[\|\]\)//g')"
|
||||
elif [ "$1" == "down" ]
|
||||
then
|
||||
pulsemixer --change-volume -5
|
||||
TEXT="Volume: $(pulsemixer --get-volume | cut -d' ' -f 1 | sed 's/\(\[\|\]\)//g')"
|
||||
elif [ "$1" == "mute" ]
|
||||
then
|
||||
pulsemixer --toggle-mute
|
||||
TEXT="Mute: $(pulsemixer --get-mute | cut -d' ' -f 1 | sed 's/\(\[\|\]\)//g')"
|
||||
else
|
||||
echo "usage volume_set.sh {up|down|mute}"
|
||||
fi
|
||||
|
||||
dunstify -r 33223 "Volume changed" "$TEXT"
|
||||
13
.config/i3/scripts/wan-or-not.sh
Executable file
13
.config/i3/scripts/wan-or-not.sh
Executable file
@@ -0,0 +1,13 @@
|
||||
#!/bin/zsh
|
||||
#First arg is icon for WAN IP, Second argument is icon for local IP, third for offline
|
||||
wanip=$(dig +short myip.opendns.com @resolver1.opendns.com);
|
||||
if [[ $wanip =~ ^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$ ]]; then
|
||||
echo "<span foreground='#00CC33'>$1</span>:$wanip"
|
||||
else
|
||||
wanip=$(ip addr show dev wlan0 | grep "inet " | awk '{print $2}')
|
||||
if [[ $wanip =~ ^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3} ]]; then
|
||||
echo "<span foreground='#3300CC'>$2</span>:$wanip"
|
||||
else
|
||||
echo "<span foreground='#CC0033'>$3</span>"
|
||||
fi
|
||||
fi
|
||||
2
.config/i3/scripts/workspace.sh
Executable file
2
.config/i3/scripts/workspace.sh
Executable file
@@ -0,0 +1,2 @@
|
||||
#!/bin/sh
|
||||
i3-msg "append_layout $1" && bash $HOME/.i3/scripts/term_runner.sh -d "$2" -d "$2" -d "$2" -d "$HOME"
|
||||
Reference in New Issue
Block a user