Minor improvments to init & ~/bin scripts, remove numlock from autostarts

This commit is contained in:
natemaia 2017-12-26 15:03:54 -08:00
parent 88ecac0da3
commit 92ada44d97
8 changed files with 39 additions and 21 deletions

View File

@ -77,10 +77,16 @@ set $Mon2 HDMI2
# run with reload
exec_always --no-startup-id start-compton
exec_always --no-startup-id al-polybar-session
exec_always --no-startup-id numlockx on
exec_always --no-startup-id nitrogen --restore
exec_always --no-startup-id xrdb -load ~/.Xresources
exec_always --no-startup-id pkill trayer; trayer --edge bottom --align left --heighttype pixel --height 18 --widthtype request --SetDockType false --expand true --transparent true --alpha 255
# Trayer
exec_always --no-startup-id pkill trayer; trayer --edge bottom \
--align left --heighttype pixel --height 18 --widthtype request \
--SetDockType false --expand true --transparent true --alpha 255
# If you have a numpad you may want to enable this
# exec_always --no-startup-id numlockx on
# run once
exec --no-startup-id xfsettingsd

View File

@ -20,7 +20,7 @@ do_setup() {
sudo pacman-key --populate archlabs
}
while ! [[ $(ping -c1 8.8.8.8) ]]; do
while ! [[ "$(ping -c1 8.8.8.8)" ]]; do
sleep 1
done

View File

@ -2,8 +2,8 @@
al-compositor --start &
#$HOME/.config/setup &
# enable numlock, comment out if you dont have a numpad
numlockx on &
# enable numlock, commented out for laptop users
#numlockx on &
# restore wallpaper
nitrogen --restore &

View File

@ -6,16 +6,21 @@ XDG_CONFIG_HOME=$HOME/.config
export XDG_CONFIG_HOME
# include ~/bin in path
export PATH=$HOME/bin:$PATH
if [ -d "$HOME/bin" ]; then
PATH=$HOME/bin:$PATH
fi
# include sbin in PATH
if [ -d "/sbin" ] ; then
if [ -d "/sbin" ]; then
PATH="/sbin:$PATH"
fi
if [ -d "/usr/sbin" ] ; then
# include sbin in PATH
if [ -d "/usr/sbin" ]; then
PATH="/usr/sbin:$PATH"
fi
# launch dbus
if which dbus-launch >/dev/null && test -z "$DBUS_SESSION_BUS_ADDRESS"; then
eval `dbus-launch --sh-syntax --exit-with-session`
eval $(dbus-launch --sh-syntax --exit-with-session)
fi

View File

@ -1,7 +1,7 @@
#!/usr/bin/env bash
if [ "$(pidof compton)" ]; then
if [[ "$(pidof compton)" ]]; then
al-compositor --restart
else
al-compositor --start

View File

@ -4,15 +4,19 @@ on=""
off=""
# if the script is passed --toggle
if [[ $1 == *toggle* ]] && pgrep caffeine &>/dev/null; then
killall caffeine && exit 0
elif [[ $1 == *toggle* ]]; then
caffeine && exit 0
if [[ "$1" ]]; then
if [[ "$1" == *toggle* ]] && [[ "$(pidof caffeine)" ]]; then
killall caffeine
elif [[ "$1" == *toggle* ]]; then
caffeine &
fi
exit 0
fi
while true; do
# caffeine is running
if pgrep caffeine &>/dev/null; then
if [[ "$(pidof caffeine)" ]]; then
echo "%{F#0000FF}$on"
else
echo "%{F#FF0000}$off"

View File

@ -3,14 +3,17 @@
on=""
off=""
if [[ $1 == *toggle* ]] && [[ $(pidof compton) ]]; then
al-compositor --stop && exit 0
elif [[ $1 == *toggle* ]]; then
al-compositor --start && exit 0
if [[ "$1" ]]; then
if [[ "$1" == *toggle* ]] && [[ "$(pidof compton)" ]]; then
al-compositor --stop
elif [[ "$1" == *toggle* ]]; then
al-compositor --start
fi
exit 0
fi
while true; do
if [[ $(pidof compton) ]]; then
if [[ "$(pidof compton)" ]]; then
echo "$on"
else
echo "%{F#888888}$off"

View File

@ -2,7 +2,7 @@
# small script to kill polybar if it is running
# if it isnt running then start it the default session
if [[ $(pidof polybar) ]]; then
if [[ "$(pidof polybar)" ]]; then
pkill polybar
else
al-polybar-session