Update users home folder, clean up some scripts and add comments

This commit is contained in:
natemaia 2017-12-17 10:06:39 -08:00
parent e322152f69
commit 662f7d9388
87 changed files with 2309 additions and 2364 deletions

0
etc/X11/xorg.conf.d/50-acceleration.conf Executable file → Normal file
View File

View File

@ -1,27 +0,0 @@
[settings]
usehal = false
[looks]
opacity = 80
bgcolor = black
buttontheme = adeos-archlabs
buttons = cancel, logout, suspend, lock, restart, shutdown
[shortcuts]
cancel = Escape
shutdown = S
restart = R
suspend = U
logout = L
lock = K
#hibernate = H
[commands]
shutdown = systemctl poweroff
restart = systemctl reboot
suspend = systemctl suspend
logout = session-logout
#hibernate = systemctl hibernate
lock = pkill oblogout; i3lock-fancy -p
#switchuser = gdm-control --switch-user
#safesuspend = safesuspend

View File

@ -234,7 +234,7 @@ mytasklist.buttons = awful.util.table.join(
instance:hide() instance:hide()
instance = nil instance = nil
else else
instance = awful.menu.clients({ width=250 }) instance = awful.menu.clients({ width=200 })
end end
end), end),
awful.button({ }, 4, function () awful.button({ }, 4, function ()

View File

@ -183,4 +183,3 @@ end
-- }}} -- }}}
setmetatable(_M, { __call = function(_, ...) return worker(...) end }) setmetatable(_M, { __call = function(_, ...) return worker(...) end })

View File

@ -16,13 +16,11 @@ al-compositor --start &
lxpolkit & lxpolkit &
# panel # panel
al-tint2-session & sleep 1; al-polybar-session &
sleep 1; start-polybar &
# Set some bsp specific stuff
bspc monitor -d I II III IV V VI VII VIII IX X bspc monitor -d I II III IV V VI VII VIII IX X
bspc config border_width 3 bspc config border_width 3
bspc config window_gap 12 bspc config window_gap 12
bspc config top_padding 18 bspc config top_padding 18

View File

@ -1 +0,0 @@

View File

@ -1 +0,0 @@
/home/smoke/.config/conky/conky-sessionfile

View File

@ -21,7 +21,6 @@
<const>lcddefault</const> <const>lcddefault</const>
</edit> </edit>
</match> </match>
<!-- Set preferred serif, sans serif, and monospace fonts. --> <!-- Set preferred serif, sans serif, and monospace fonts. -->
<alias> <alias>
<family>serif</family> <family>serif</family>

View File

@ -76,11 +76,12 @@ set $Mon2 HDMI2
# run with reload # run with reload
exec_always --no-startup-id start-compton exec_always --no-startup-id start-compton
exec_always --no-startup-id start-polybar exec_always --no-startup-id al-polybar-session
exec_always --no-startup-id numlockx on exec_always --no-startup-id numlockx on
exec_always --no-startup-id nitrogen --restore exec_always --no-startup-id nitrogen --restore
exec_always --no-startup-id xrdb -load ~/.Xresources 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 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
# run once # run once
exec --no-startup-id xfsettingsd exec --no-startup-id xfsettingsd

View File

@ -1,30 +1,29 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# this script will setup the keyring
sed -i '/keypack/d' $HOME/.config/openbox/autostart # for any user being created from /etc/skel
# only after a valid internet connection is made
do_setup() { do_setup() {
KEYS=('AEFB411B072836CD48FF0381AE252C284B5DBA5D' keys=('AEFB411B072836CD48FF0381AE252C284B5DBA5D'
'9E4F11C6A072942A7B3FD3B0B81EB14A09A25EB0' '9E4F11C6A072942A7B3FD3B0B81EB14A09A25EB0'
'35F52A02854DCCAEC9DD5CC410443C7F54B00041') '35F52A02854DCCAEC9DD5CC410443C7F54B00041')
sudo dirmngr </dev/null # sometimes prevents failure to connect to keyserver sudo dirmngr </dev/null
sudo pacman-key --init sudo pacman-key --init
sudo pacman-key --populate archlinux sudo pacman-key --populate archlinux
for key in "${KEYS[@]}"; do for k in ${keys[@]}; do
if ! sudo pacman-key --list-keys | grep $key >/dev/null 2>&1; then if ! sudo pacman-key --list-keys | grep -q $k; then
gpg --receive-keys $key gpg --receive-keys $k
sudo pacman-key -r $key sudo pacman-key -r $k
fi fi
done done
sudo pacman-key --populate archlabs sudo pacman-key --populate archlabs
} }
net=$(ping -c1 8.8.8.8 2>&1) while ! [[ $(ping -c1 8.8.8.8) ]]; do
while ! [[ $net >/dev/null ]]; do
net=$(ping -c1 8.8.8.8 2>&1)
sleep 1 sleep 1
done done
do_setup do_setup
sed -i '/keypack/d' $HOME/.config/openbox/autostart
rm -f $HOME/.config/keypack rm -f $HOME/.config/keypack

View File

@ -23,7 +23,7 @@ require "$ENV{HOME}/.config/obmenu-generator/config.pl";
my $editor = $CONFIG->{editor}; my $editor = $CONFIG->{editor};
our $SCHEMA = [ our $SCHEMA = [
# NAME LABEL ICON # Format: NAME, LABEL, ICON
{sep => "ArchLabs"}, {sep => "ArchLabs"},
{item => ['exo-open --launch TerminalEmulator', 'Terminal', 'terminal']}, {item => ['exo-open --launch TerminalEmulator', 'Terminal', 'terminal']},
{item => ['exo-open --launch WebBrowser ', 'Web Browser', 'firefox']}, {item => ['exo-open --launch WebBrowser ', 'Web Browser', 'firefox']},

View File

@ -8,11 +8,8 @@ numlockx on &
# restore wallpaper # restore wallpaper
nitrogen --restore & nitrogen --restore &
# start tint2 if enabled # start polybar
al-tint2-session & sleep 1; al-polybar-session &
# start polybar if tint2 not enabled (start after al-tint-session)
sleep 1; start-polybar &
# system tray # system tray
sleep 1; trayer --edge bottom --align left --widthtype request --SetDockType false --expand true & sleep 1; trayer --edge bottom --align left --widthtype request --SetDockType false --expand true &
@ -26,10 +23,7 @@ lxpolkit &
# Required for xfce settings to work # Required for xfce settings to work
xfsettingsd & xfsettingsd &
# Launch conky if session exists # set user shortcuts for file managers
sleep 2; al-conky-session &
# set side user dirs shortcuts for file managers
xdg-user-dirs-gtk-update & xdg-user-dirs-gtk-update &
$HOME/.config/keypack & $HOME/.config/keypack &

View File

@ -111,10 +111,8 @@
<desktops> <desktops>
<!-- this stuff is only used at startup, pagers allow you to change them <!-- this stuff is only used at startup, pagers allow you to change them
during a session during a session
these are default values to use when other ones are not already set these are default values to use when other ones are not already set
by other applications, or saved in your session by other applications, or saved in your session
use obconf if you want to change these without having to log out use obconf if you want to change these without having to log out
and back in --> and back in -->
<number>4</number> <number>4</number>
@ -175,7 +173,6 @@
</dock> </dock>
<keyboard> <keyboard>
<chainQuitKey/> <chainQuitKey/>
<!-- Window & Desktop Control --> <!-- Window & Desktop Control -->
<keybind key="W-1"> <keybind key="W-1">
<action name="GoToDesktop"> <action name="GoToDesktop">
@ -264,7 +261,6 @@
<action name="FocusToBottom"/> <action name="FocusToBottom"/>
<action name="Unfocus"/> <action name="Unfocus"/>
</keybind> </keybind>
<!-- Media & Backlight --> <!-- Media & Backlight -->
<keybind key="XF86AudioRaiseVolume"> <keybind key="XF86AudioRaiseVolume">
<action name="Execute"> <action name="Execute">
@ -311,7 +307,6 @@
<command>xbacklight -10</command> <command>xbacklight -10</command>
</action> </action>
</keybind> </keybind>
<!-- Applications --> <!-- Applications -->
<keybind key="Print"> <keybind key="Print">
<action name="Execute"> <action name="Execute">
@ -358,7 +353,6 @@
<command>pavucontrol</command> <command>pavucontrol</command>
</action> </action>
</keybind> </keybind>
<!-- Launchers --> <!-- Launchers -->
<keybind key="W-s"> <keybind key="W-s">
<action name="Execute"> <action name="Execute">
@ -375,7 +369,6 @@
<command>rofi-gorice</command> <command>rofi-gorice</command>
</action> </action>
</keybind> </keybind>
<!-- Logout & Reload --> <!-- Logout & Reload -->
<keybind key="W-x"> <keybind key="W-x">
<action name="Execute"> <action name="Execute">
@ -401,7 +394,6 @@
<keybind key="C-S-Enter"> <keybind key="C-S-Enter">
<action name="Reconfigure"/> <action name="Reconfigure"/>
</keybind> </keybind>
<!-- Window Control --> <!-- Window Control -->
<keybind key="W-Escape"> <keybind key="W-Escape">
<action name="Execute"> <action name="Execute">
@ -435,7 +427,6 @@
<keybind key="S-W-q"> <keybind key="S-W-q">
<action name="Close"/> <action name="Close"/>
</keybind> </keybind>
<keybind key="W-space"> <keybind key="W-space">
<action name="ShowMenu"> <action name="ShowMenu">
<menu>root-menu</menu> <menu>root-menu</menu>
@ -446,7 +437,6 @@
<menu>client-menu</menu> <menu>client-menu</menu>
</action> </action>
</keybind> </keybind>
<!-- Tiling Bindings --> <!-- Tiling Bindings -->
<keybind key="W-KP_1"> <keybind key="W-KP_1">
<action name="UnmaximizeFull"/> <action name="UnmaximizeFull"/>

View File

@ -369,15 +369,6 @@ menu-3-3 = "  |"
menu-3-3-exec = systemctl poweroff menu-3-3-exec = systemctl poweroff
;;;;;;;;;;;;;;;;;;;
;; Extra Modules ;;
;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;
;; Compton Toggle ;; ;; Compton Toggle ;;
;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;
@ -385,7 +376,7 @@ menu-3-3-exec = systemctl poweroff
type = custom/script type = custom/script
tail = true tail = true
label = %output% label = %output%
click-left = toggle-compton --toggle click-left = toggle-compton --toggle &
exec = toggle-compton exec = toggle-compton
format = <label> format = <label>
@ -422,7 +413,7 @@ type = custom/script
tail = true tail = true
exec = toggle-redshift exec = toggle-redshift
label = %output% label = %output%
click-left = toggle-redshift --toggle click-left = toggle-redshift --toggle &
;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;
@ -470,7 +461,6 @@ bar-progress-empty-foreground = #44
bar-progress-indicator-foreground = #A85659 bar-progress-indicator-foreground = #A85659
;;;;;;;;;; ;;;;;;;;;;
;; WIFI ;; ;; WIFI ;;
;;;;;;;;;; ;;;;;;;;;;

View File

@ -0,0 +1,11 @@
# Polybar bspwm Sessionfile
# DO NO edit this file, it will be overwritten by al-polyzen
# Instead make a custom sessionfile and use the -z FILE or --session FILE option
# To load session at startup use the following line
# sleep 1; al-polybar-session &
~/.config/polybar/config bspwm-bar

View File

@ -0,0 +1,11 @@
# Polybar i3 Sessionfile
# DO NO edit this file, it will be overwritten by al-polyzen
# Instead make a custom sessionfile and use the -z FILE or --session FILE option
# To load session at startup use the following line
# sleep 1; al-polybar-session &
~/.config/polybar/config i3-bar

View File

@ -0,0 +1,11 @@
# Polybar openbox Sessionfile
# DO NO edit this file, it will be overwritten by al-polyzen
# Instead make a custom sessionfile and use the -z FILE or --session FILE option
# To load session at startup use the following line
# sleep 1; al-polybar-session &
~/.config/polybar/config openbox-bar

View File

@ -1,15 +1,17 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# this script will setup configs for any user created from /etc/skel
# if this is not run immediately at startup, polybar WILL fail to load
sed -i '/base/{n;N;N;d}' $HOME/.config/polybar/config files=($HOME/.config/polybar/config
sed -i "/base/ a\ $HOME/.config/gtk-3.0/bookmarks
include-file = ${HOME}/.config/polybar/master.conf" $HOME/.config/polybar/config $HOME/.gorice/templates/i3/data.json
sed -i "/base/ a\ $HOME/.mozilla/firefox/archlabs.default/prefs.js
include-file = ${HOME}/.config/polybar/modules.conf" $HOME/.config/polybar/config $HOME/.mozilla/firefox/archlabs.default/sessionstore.js)
sed -i "s/liveuser/${USER}/g" $HOME/.mozilla/firefox/archlabs.default/prefs.js
sed -i "s/liveuser/${USER}/g" $HOME/.mozilla/firefox/archlabs.default/sessionstore.js for f in ${files[@]}; do
sed -i "s/liveuser/${USER}/g" $HOME/.gorice/templates/i3/data.json sed -i "s/liveuser/${USER}/g" $f
sed -i "s/liveuser/${USER}/g" $HOME/.config/gtk-3.0/bookmarks done
sed -i '/setup/d' $HOME/.config/openbox/autostart sed -i '/setup/d' $HOME/.config/openbox/autostart
rm -f $HOME/.config/setup rm -f $HOME/.config/setup

View File

@ -4,7 +4,7 @@ connected=""
disconnected="" disconnected=""
while true; do while true; do
if ping -c1 8.8.8.8 >/dev/null; then if [[ $(ping -c1 8.8.8.8) ]]; then
echo "$connected"; sleep 10 echo "$connected"; sleep 10
else else
echo "$disconnected"; sleep 1 echo "$disconnected"; sleep 1

View File

@ -5,7 +5,7 @@ ICON=/usr/share/icons/gnome/32x32/apps/system-software-update.png
while true; do while true; do
count=$(checkupdates | wc -l) count=$(checkupdates | wc -l)
if hash notify-send >/dev/null 2>&1; then if hash notify-send &>/dev/null; then
if [[ $count > 50 ]]; then if [[ $count > 50 ]]; then
notify-send -u critical -i $ICON \ notify-send -u critical -i $ICON \
"You really need to update soon!!" "$count New package updates" "You really need to update soon!!" "$count New package updates"

View File

@ -23,8 +23,6 @@ class Selection(Gtk.EventBox):
self.background = background self.background = background
self.selected_colour = selected self.selected_colour = selected
if not working:
name = 'x ' + name
text = Gtk.Label(name) text = Gtk.Label(name)
hbox = Gtk.HBox() hbox = Gtk.HBox()
hbox.set_size_request(0, 30) hbox.set_size_request(0, 30)
@ -45,38 +43,36 @@ class Selection(Gtk.EventBox):
hbox.pack_end(colour_widgets, False, True, 20) hbox.pack_end(colour_widgets, False, True, 20)
self.hbox = hbox self.hbox = hbox
self.connect('enter-notify-event', self.selected) #self.connect('enter-notify-event', self.selected)
self.connect('leave-notify-event', self.unselected) #self.connect('leave-notify-event', self.unselected)
self.connect('button-press-event', self.clicked) self.connect('button-press-event', self.clicked)
self.add(self.hbox) self.add(self.hbox)
def clicked(self, widget, button): def clicked(self, button):
_, index = button.get_button() _, index = button.get_button()
if index == 1: if index == 1:
proc = subprocess.run([PATH, 'load', self.name]) subprocess.run([PATH, 'load', self.name])
Gtk.main_quit() Gtk.main_quit()
return None return None
def selected(self, *args): #def selected(self, *args):
# self.hbox.override_background_color(Gtk.StateType.NORMAL, Gdk.RGBA(*self.selected)) # return None
return None
def unselected(self, *args): #def unselected(self, *args):
# self.hbox.override_background_color(Gtk.StateType.NORMAL, Gdk.RGBA(*self.selected)) # return None
return None
def load_configs(): def load_configs():
broken = subprocess.check_output([PATH, 'check', GROUP]) broken = subprocess.check_output([PATH, 'check', GROUP])
broken = broken.decode('utf-8').split('\n') broken = broken.decode('utf-8').split('\n')
output = []
path = '{}/.gorice/output.yaml'.format(os.environ['HOME']) path = '{}/.gorice/output.yaml'.format(os.environ['HOME'])
output = []
with open(path, 'r') as f: with open(path, 'r') as f:
data = yaml.load(f.read()) data = yaml.load(f.read())
names = sorted(data['configs']) names = sorted(data['configs'])
for config in names: for config in names:
info = data['configs'][config] info = data['configs'][config]
config, ext = os.path.splitext(config) config, ext = os.path.splitext(config)
@ -111,18 +107,18 @@ def main():
configs = load_configs() configs = load_configs()
window = Gtk.Window() window = Gtk.Window()
window.modify_font(Pango.FontDescription('Ubuntu 11')) window.modify_font(Pango.FontDescription('Ubuntu 10'))
window.set_property('type-hint', Gdk.WindowTypeHint.SPLASHSCREEN) window.set_property('type-hint', Gdk.WindowTypeHint.SPLASHSCREEN)
window.set_decorated(False) window.set_decorated(False)
window.set_resizable(False) window.set_resizable(False)
window.connect('leave-notify-event', Gtk.main_quit) window.connect('leave-notify-event', Gtk.main_quit)
window.connect('delete-event', Gtk.main_quit)
#window.set_property('skip-taskbar-hint', False) #window.set_property('skip-taskbar-hint', False)
#window.set_title('bar-dropdown') #window.set_title('bar-dropdown')
#window.set_border_width(0) #window.set_border_width(0)
#window.stick() #window.stick()
window.connect('delete-event', Gtk.main_quit)
scrolled = Gtk.ScrolledWindow() scrolled = Gtk.ScrolledWindow()
scrolled.set_policy(Gtk.PolicyType.NEVER, Gtk.PolicyType.AUTOMATIC) scrolled.set_policy(Gtk.PolicyType.NEVER, Gtk.PolicyType.AUTOMATIC)

View File

@ -20,7 +20,6 @@ case $question in
systemctl poweroff systemctl poweroff
;; ;;
*) *)
: # do nothing on wrong response exit 0 # do nothing on wrong response
;; ;;
esac esac

View File

@ -20,6 +20,6 @@ case $question in
systemctl poweroff systemctl poweroff
;; ;;
*) *)
: # do nothing on wrong response exit 0 # do nothing on wrong response
;; ;;
esac esac

View File

@ -1,36 +0,0 @@
#!/usr/bin/env bash
# check which wm were using, case insensitive
WMS=(bspwm i3 openbox)
for i in ${WMS[@]}; do
if [[ "$(wmctrl -m | grep -i name | awk '{print tolower($2)}')" == "$i" ]]; then
WM=$i && break
elif [[ "$(xprop -root -notype | grep "WM_NAME =" | tr -d '"' | awk '{print tolower($3)}')" == "$i" ]]; then
WM=$i && break
elif [[ "$(awk '{print tolower($0)}' <<< $XDG_CURRENT_DESKTOP)" == "$i" ]]; then
WM=$i && break
fi
done
# do the logout
case $WM in
i3)
i3-msg exit
;;
bspwm)
for window_id in $(bspc query -W); do
bspc window $window_id -c
done
killall sxhkd
bspc quit
;;
openbox)
openbox --exit
;;
*)
echo "WM not yet supported.. Exiting"
exit 0
;;
esac

View File

@ -1,5 +1,8 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# this script will run polybar at boot
# and allow toggling via polybar or other means
# if it is not running and not enabled, enable it then start
if [ -e "$HOME/.config/.composite_enabled" ] && [ "$(pidof compton)" ]; then if [ -e "$HOME/.config/.composite_enabled" ] && [ "$(pidof compton)" ]; then
al-compositor --restart al-compositor --restart
elif [ -e "$HOME/.config/.composite_enabled" ]; then elif [ -e "$HOME/.config/.composite_enabled" ]; then

View File

@ -4,13 +4,20 @@
# Will launch bars depending on WM # Will launch bars depending on WM
# Can also be used to reload openbox session with [--reload] or [-r] # Can also be used to reload openbox session with [--reload] or [-r]
# I reccomend using al-polyzen to set up a session for each wm
# then ditching this method and adding the following line to your autostart
# sleep 1; al-polybar-session &
# Enter your bar names here (seperated by spaces) eg. BARS=(bar bar1 my-bar)
# This will be combined with CUR_WM in WMS below eg. openbox-bar, bspwm-bar1, i3-my-bar etc. # Enter your bar names here (seperated by spaces) eg. BARS=(bar1 bar2...)
# by default it is set up in WM-BAR naming format # This will be combined with window manager from WMS below eg. openbox-bar1, openbox-bar2...
# by default it is set up in WM-BAR naming format eg. i3-bar, openbox-bar, bspwm-bar....
BARS=(bar) BARS=(bar)
CONFIG=$HOME/.config/polybar/config CONFIG=$HOME/.config/polybar/config
WMS=(bspwm i3 openbox) WMS=(bspwm i3 openbox xfce awesome)
############################################################################################
HELP="\nUSAGE:\n\tstart-polybar [OPTIONS] HELP="\nUSAGE:\n\tstart-polybar [OPTIONS]
\nOPTIONS:\n\t--reload, -r\tIf running in openbox, will reload the session \nOPTIONS:\n\t--reload, -r\tIf running in openbox, will reload the session
@ -41,17 +48,11 @@ case "$@" in
;; ;;
esac esac
# bail if tint2 is running
if [ "$(pidof tint2)" ]; then exit 0; fi
# kill running bars # kill running bars
while [ "$(pidof polybar)" ]; do while [ "$(pidof polybar)" ]; do
pkill polybar && sleep 0.5 pkill polybar && sleep 0.5
done done
# launch bars # launch bars
for bar in "${BARS[@]}"; do for bar in "${BARS[@]}"; do
polybar -r --config=$CONFIG ${WM}-$bar & polybar -r --config=$CONFIG ${WM}-$bar &
@ -62,4 +63,3 @@ if [ "$(pidof polybar)" ]; then
else else
echo "Bars Failed to Launch" echo "Bars Failed to Launch"
fi fi

View File

@ -1,5 +1,6 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# will stop any running polybar instances
while [ "$(pidof polybar)" ]; do while [ "$(pidof polybar)" ]; do
pkill polybar && sleep 0.5 pkill polybar && sleep 0.5
echo "Bars stopped..." echo "Bars stopped..."

View File

@ -1,18 +1,21 @@
#!/usr/bin/env bash #!/usr/bin/env bash
on=""
off=""
# if the script is passed --toggle # if the script is passed --toggle
if [[ $1 == *toggle* ]] && pgrep caffeine >/dev/null; then if [[ $1 == *toggle* ]] && pgrep caffeine &>/dev/null; then
killall caffeine && exit 0 killall caffeine && exit 0
elif [[ $1 == *toggle* ]]; then elif [[ $1 == *toggle* ]]; then
caffeine &>/dev/null && exit 0 caffeine && exit 0
fi fi
while true; do while true; do
# caffeine is running # caffeine is running
if pgrep caffeine >/dev/null; then if pgrep caffeine &>/dev/null; then
echo "%{F#0000FF}" echo "%{F#0000FF}$on"
else else
echo "%{F#FF0000}" echo "%{F#FF0000}$off"
fi fi
sleep 2 sleep 2
done done

View File

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

View File

@ -1,8 +1,9 @@
#!/usr/bin/env bash #!/usr/bin/env bash
if [ "$(pidof polybar)" ]; then # small script to kill polybar if it is running
# if it isnt running then start it the default session
if [[ $(pidof polybar) ]]; then
pkill polybar pkill polybar
else else
start-polybar al-polybar-session
fi fi

View File

@ -1,5 +1,8 @@
#!/usr/bin/env bash #!/usr/bin/env bash
icon=""
if [[ $1 = "--toggle" ]] || [[ $1 = "-t" ]]; then if [[ $1 = "--toggle" ]] || [[ $1 = "-t" ]]; then
if pgrep redshift >/dev/null; then if pgrep redshift >/dev/null; then
pkill redshift pkill redshift
@ -9,8 +12,6 @@ if [[ $1 = "--toggle" ]] || [[ $1 = "-t" ]]; then
exit 0 exit 0
fi fi
icon=""
while true; do while true; do
pgrep -x redshift &> /dev/null pgrep -x redshift &> /dev/null
if [[ $? -eq 0 ]]; then if [[ $? -eq 0 ]]; then
@ -29,4 +30,3 @@ while true; do
fi fi
sleep 2 sleep 2
done done

View File

@ -1,6 +1,11 @@
#!/usr/bin/env bash #!/usr/bin/env bash
if pgrep --full 'termite --title=work-term' >/dev/null; then # will check if precisely this termite instance is running
# if it is, then kill it, otherwise launch a new termite with these settings
# This allows a "Toggle-able" terminal, by simply binding a key to
# "toggle-termite"
if pgrep --full 'termite --title=work-term' &>/dev/null; then
pkill --full 'termite --title=work-term' pkill --full 'termite --title=work-term'
else else
termite --title=work-term --class=work-term & termite --title=work-term --class=work-term &

View File

@ -46,9 +46,7 @@ for i in ${WMS[@]}; do
done done
# Loop until network connected # Loop until network connected
net=$(ping -c1 8.8.8.8 2>&1) while ! [[ $(ping -c1 8.8.8.8) ]]; do
while ! [[ $net >/dev/null ]]; do
net=$(ping -c1 8.8.8.8 2>&1)
echo -e "Please Connect to a Network Before Continuing" echo -e "Please Connect to a Network Before Continuing"
clear; sleep 1 clear; sleep 1
done done
@ -120,7 +118,7 @@ if [ "${answer,,}" = "${yes,,}" ]; then
if [[ "$WM" == "i3" ]]; then if [[ "$WM" == "i3" ]]; then
i3-msg restart i3-msg restart
elif [[ "$WM" == "openbox" ]]; then elif [[ "$WM" == "openbox" ]]; then
start-polybar --reload > /dev/null 2>&1 al-polybar-session -r
fi fi
fi fi