Move startpage out of user-skel, update user scripts
This commit is contained in:
@ -2,6 +2,7 @@
|
||||
|
||||
connected=""
|
||||
disconnected=""
|
||||
|
||||
while true; do
|
||||
if ping -c1 8.8.8.8 >/dev/null; then
|
||||
echo "$connected"; sleep 10
|
||||
|
@ -6,29 +6,29 @@ ICON=/usr/share/icons/gnome/32x32/apps/system-software-update.png
|
||||
while true; do
|
||||
count=$(checkupdates | wc -l)
|
||||
if hash notify-send >/dev/null 2>&1; then
|
||||
if [ $count -gt 50 ]; then
|
||||
if [[ $count > 50 ]]; then
|
||||
notify-send -u critical -i $ICON \
|
||||
"You really need to update soon!!" "$count New package updates"
|
||||
elif [ $count -gt 25 ]; then
|
||||
elif [[ $count > 25 ]]; then
|
||||
notify-send -u normal -i $ICON \
|
||||
"You should update soon" "$count New package updates"
|
||||
elif [ $count -gt 5 ]; then
|
||||
elif [[ $count > 2 ]]; then
|
||||
notify-send -u low -i $ICON \
|
||||
"$count New package updates"
|
||||
fi
|
||||
fi
|
||||
|
||||
while [ "$count" -gt 0 ]; do
|
||||
if [ $count -eq 1 ]; then
|
||||
while [[ $count > 0 ]]; do
|
||||
if [[ $count == 1 ]]; then
|
||||
echo "$count Update"
|
||||
elif [ $count -gt 1 ]; then
|
||||
elif [[ $count > 1 ]]; then
|
||||
echo "$count Updates"
|
||||
fi
|
||||
sleep 8
|
||||
count=$(checkupdates | wc -l)
|
||||
done
|
||||
|
||||
while [ "$count" -eq 0 ]; do
|
||||
while [[ $count == 0 ]]; do
|
||||
echo $BAR_ICON
|
||||
sleep 1200
|
||||
count=$(checkupdates | wc -l)
|
||||
|
@ -1,6 +1,10 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
CUR_WM=$(xprop -root | grep "_NET_WM_NAME(UTF8_STRING)" | cut -d " " -f 3 | sed 's/"//g' | awk '{print tolower($0)}')
|
||||
if [[ "$(xprop -root | grep -i "openbox")" > /dev/null ]]; then
|
||||
CUR_WM="openbox"
|
||||
else
|
||||
CUR_WM=$(xprop -root | grep "_NET_WM_NAME(UTF8_STRING)" | cut -d " " -f 3 | sed 's/"//g' | awk '{print tolower($0)}')
|
||||
fi
|
||||
|
||||
ANS=$(echo " lock| logout| reboot| shutdown" | rofi -sep "|" -dmenu -i -p 'System: ' "" -width 20 -hide-scrollbar -font "Ubuntu 11" -eh 1 -line-padding 4 -padding 20 -no-config -lines 4 -color-enabled -color-window "#1F2326, #F1F1F1, #1F2326" -color-normal "#1F2326, #F1F1F1, #1F2326, #4E88CF, #1F2326")
|
||||
|
||||
|
@ -1,6 +1,10 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
CUR_WM=$(xprop -root | grep "_NET_WM_NAME(UTF8_STRING)" | cut -d " " -f 3 | sed 's/"//g' | awk '{print tolower($0)}')
|
||||
if [[ "$(xprop -root | grep -i "openbox")" > /dev/null ]]; then
|
||||
CUR_WM="openbox"
|
||||
else
|
||||
CUR_WM=$(xprop -root | grep "_NET_WM_NAME(UTF8_STRING)" | cut -d " " -f 3 | sed 's/"//g' | awk '{print tolower($0)}')
|
||||
fi
|
||||
|
||||
ANS=$(echo " lock| logout| reboot| shutdown" | rofi -sep "|" -dmenu -i -p 'System: ' "" -width 20 -hide-scrollbar -font "Ubuntu 11" -eh 1 -line-padding 4 -padding 20 -no-config -lines 4 -color-enabled -color-window "{{.Data.terminal_background}}, {{.Data.terminal_foreground}}, {{.Data.terminal_background}}" -color-normal "{{.Data.terminal_background}}, {{.Data.terminal_foreground}}, {{.Data.terminal_background}}, {{index .Data.terminal_colors 4}}, {{.Data.terminal_background}}")
|
||||
|
||||
|
@ -1,11 +1,10 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
start="al-compositor --start"
|
||||
restart="al-compositor --restart"
|
||||
if [ -e "${HOME}/.config/.composite_enabled" ]; then
|
||||
if pgrep compton; then
|
||||
$restart
|
||||
else
|
||||
$start
|
||||
fi
|
||||
if [ -e "$HOME/.config/.composite_enabled" ] && pgrep compton >/dev/null; then
|
||||
al-compositor --restart
|
||||
elif [ -e "$HOME/.config/.composite_enabled" ]; then
|
||||
al-compositor --start
|
||||
else
|
||||
echo -e "Compositing in not enabled.. Requires ~/.config/.composite_enabled
|
||||
\n\nTry running paranoid and enabling compositing"
|
||||
fi
|
||||
|
@ -1,31 +1,45 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
#
|
||||
# Polybar launcher script written by Nathaniel Maia for use in ArchLabs
|
||||
# Will launch bars depending on WM
|
||||
# Can also be used to reload openbox session with [--reload] or [-r]
|
||||
|
||||
|
||||
# Enter your bar names here (seperated by spaces) eg BARS=(bar bar1 my-bar)
|
||||
# This will be combined with CUR_WM eg. openbox-bar, bspwm-bar, i3-bar
|
||||
BARS=(bar)
|
||||
|
||||
CONFIG=$HOME/.config/polybar/config
|
||||
CUR_WM=$(xprop -root | grep "_NET_WM_NAME(UTF8_STRING)" | cut -d " " -f 3 | sed 's/"//g' | awk '{print tolower($0)}')
|
||||
if [[ $1 == "--reload" ]] || [[ $1 == "-r" ]]; then
|
||||
if [[ $CUR_WM == "openbox" ]]; then
|
||||
|
||||
|
||||
if [[ "$(xprop -root | grep -i "openbox")" > /dev/null ]]; then
|
||||
CUR_WM="openbox"
|
||||
else
|
||||
CUR_WM=$(xprop -root | grep "_NET_WM_NAME(UTF8_STRING)" | cut -d " " -f 3 | sed 's/"//g' | awk '{print tolower($0)}')
|
||||
fi
|
||||
|
||||
# Reload openbox session
|
||||
if [[ $1 == "--reload" ]] && [[ $CUR_WM == "openbox" ]]; then
|
||||
openbox --restart
|
||||
al-compositor --restart
|
||||
al-tint2restart
|
||||
else
|
||||
echo "[WARN]: Option [--reload] is meant for Openbox..."
|
||||
fi
|
||||
elif [[ $1 == "--reload" ]]; then
|
||||
echo "[WARN]: Option [--reload] is meant for Openbox Only"
|
||||
fi
|
||||
|
||||
if pgrep -x "tint2" >/dev/null; then
|
||||
echo "Tint is running... Exiting"
|
||||
exit 1
|
||||
# Drop out if tint2 is running
|
||||
if pgrep tint2 >/dev/null; then
|
||||
echo "Tint2 is running... Exiting"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
while pgrep -x polybar >/dev/null; do
|
||||
# Terminate already running Bars
|
||||
while pgrep polybar >/dev/null; do
|
||||
killall -q polybar
|
||||
sleep 0.5
|
||||
done
|
||||
|
||||
# Launch each bar in BARS=() above
|
||||
echo "Using $CUR_WM... Launching Bars"
|
||||
for bar in "${BARS[@]}"; do
|
||||
polybar -r --config=$CONFIG ${CUR_WM}-$bar &
|
||||
|
@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
killall -q polybar
|
||||
while pgrep -u $UID -x polybar >/dev/null; do
|
||||
while pgrep polybar >/dev/null; do
|
||||
killall -q polybar
|
||||
sleep 0.5
|
||||
done
|
||||
echo "Bars stopped..."
|
||||
|
@ -1,13 +1,10 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# if the script is passed --toggle
|
||||
if [[ "$1" == *toggle* ]]; then
|
||||
if pgrep caffeine >/dev/null; then
|
||||
killall caffeine
|
||||
else
|
||||
caffeine &>/dev/null &
|
||||
fi
|
||||
exit 0
|
||||
if [[ "$1" == *toggle* ]] && pgrep caffeine >/dev/null; then
|
||||
killall caffeine && exit 0
|
||||
elif [[ "$1" == *toggle* ]]; then
|
||||
caffeine &>/dev/null && exit 0
|
||||
fi
|
||||
|
||||
while true; do
|
||||
|
@ -3,16 +3,13 @@
|
||||
on=""
|
||||
off=""
|
||||
|
||||
if [[ $1 == *toggle* ]]; then
|
||||
if pgrep -x compton > /dev/null 2>&1; then
|
||||
al-compositor --stop
|
||||
else
|
||||
al-compositor --start
|
||||
fi
|
||||
exit 0
|
||||
if [[ $1 == *toggle* ]] && pgrep compton >/dev/null; then
|
||||
al-compositor --stop && exit 0
|
||||
elif [[ $1 == *toggle* ]]; then
|
||||
al-compositor --start && exit 0
|
||||
fi
|
||||
|
||||
if pgrep -x compton > /dev/null 2>&1; then
|
||||
if pgrep compton >/dev/null; then
|
||||
echo "$on"
|
||||
else
|
||||
echo "%{F#888888}$off"
|
||||
|
@ -3,6 +3,6 @@
|
||||
if pgrep -x polybar >/dev/null; then
|
||||
pkill polybar
|
||||
else
|
||||
launch-polybar >/dev/null 2>&1
|
||||
start-polybar
|
||||
fi
|
||||
|
||||
|
@ -1,11 +1,12 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
if [[ $1 = "--toggle" ]] || [[ $1 = "-t" ]]; then
|
||||
if pgrep redshift > /dev/null 2>&1; then
|
||||
killall redshift
|
||||
if pgrep redshift >/dev/null; then
|
||||
pkill redshift
|
||||
else
|
||||
redshift &
|
||||
fi
|
||||
exit 0
|
||||
fi
|
||||
|
||||
|
||||
|
@ -1,7 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
MATCH=$(pgrep --full 'termite --title=work-term')
|
||||
if ! $MATCH; then
|
||||
if pgrep --full 'termite --title=work-term' >/dev/null; then
|
||||
pkill --full 'termite --title=work-term'
|
||||
else
|
||||
termite --title=work-term --class=work-term &
|
||||
|
Reference in New Issue
Block a user