Update users home folder, clean up some scripts and add comments
This commit is contained in:
parent
e322152f69
commit
662f7d9388
0
etc/X11/xorg.conf.d/50-acceleration.conf
Executable file → Normal file
0
etc/X11/xorg.conf.d/50-acceleration.conf
Executable file → Normal 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
|
@ -234,7 +234,7 @@ mytasklist.buttons = awful.util.table.join(
|
||||
instance:hide()
|
||||
instance = nil
|
||||
else
|
||||
instance = awful.menu.clients({ width=250 })
|
||||
instance = awful.menu.clients({ width=200 })
|
||||
end
|
||||
end),
|
||||
awful.button({ }, 4, function ()
|
||||
|
@ -183,4 +183,3 @@ end
|
||||
-- }}}
|
||||
|
||||
setmetatable(_M, { __call = function(_, ...) return worker(...) end })
|
||||
|
||||
|
@ -16,13 +16,11 @@ al-compositor --start &
|
||||
lxpolkit &
|
||||
|
||||
# panel
|
||||
al-tint2-session &
|
||||
sleep 1; start-polybar &
|
||||
|
||||
sleep 1; al-polybar-session &
|
||||
|
||||
# Set some bsp specific stuff
|
||||
bspc monitor -d I II III IV V VI VII VIII IX X
|
||||
|
||||
|
||||
bspc config border_width 3
|
||||
bspc config window_gap 12
|
||||
bspc config top_padding 18
|
||||
|
@ -1 +0,0 @@
|
||||
|
@ -1 +0,0 @@
|
||||
/home/smoke/.config/conky/conky-sessionfile
|
@ -21,7 +21,6 @@
|
||||
<const>lcddefault</const>
|
||||
</edit>
|
||||
</match>
|
||||
|
||||
<!-- Set preferred serif, sans serif, and monospace fonts. -->
|
||||
<alias>
|
||||
<family>serif</family>
|
||||
|
@ -76,11 +76,12 @@ set $Mon2 HDMI2
|
||||
|
||||
# run with reload
|
||||
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 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
|
||||
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
|
||||
exec --no-startup-id xfsettingsd
|
||||
|
@ -1,30 +1,29 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
|
||||
sed -i '/keypack/d' $HOME/.config/openbox/autostart
|
||||
# this script will setup the keyring
|
||||
# for any user being created from /etc/skel
|
||||
# only after a valid internet connection is made
|
||||
|
||||
do_setup() {
|
||||
KEYS=('AEFB411B072836CD48FF0381AE252C284B5DBA5D'
|
||||
keys=('AEFB411B072836CD48FF0381AE252C284B5DBA5D'
|
||||
'9E4F11C6A072942A7B3FD3B0B81EB14A09A25EB0'
|
||||
'35F52A02854DCCAEC9DD5CC410443C7F54B00041')
|
||||
sudo dirmngr </dev/null # sometimes prevents failure to connect to keyserver
|
||||
sudo dirmngr </dev/null
|
||||
sudo pacman-key --init
|
||||
sudo pacman-key --populate archlinux
|
||||
for key in "${KEYS[@]}"; do
|
||||
if ! sudo pacman-key --list-keys | grep $key >/dev/null 2>&1; then
|
||||
gpg --receive-keys $key
|
||||
sudo pacman-key -r $key
|
||||
for k in ${keys[@]}; do
|
||||
if ! sudo pacman-key --list-keys | grep -q $k; then
|
||||
gpg --receive-keys $k
|
||||
sudo pacman-key -r $k
|
||||
fi
|
||||
done
|
||||
sudo pacman-key --populate archlabs
|
||||
}
|
||||
|
||||
net=$(ping -c1 8.8.8.8 2>&1)
|
||||
while ! [[ $net >/dev/null ]]; do
|
||||
net=$(ping -c1 8.8.8.8 2>&1)
|
||||
while ! [[ $(ping -c1 8.8.8.8) ]]; do
|
||||
sleep 1
|
||||
done
|
||||
|
||||
do_setup
|
||||
|
||||
sed -i '/keypack/d' $HOME/.config/openbox/autostart
|
||||
rm -f $HOME/.config/keypack
|
||||
|
@ -23,7 +23,7 @@ require "$ENV{HOME}/.config/obmenu-generator/config.pl";
|
||||
my $editor = $CONFIG->{editor};
|
||||
|
||||
our $SCHEMA = [
|
||||
# NAME LABEL ICON
|
||||
# Format: NAME, LABEL, ICON
|
||||
{sep => "ArchLabs"},
|
||||
{item => ['exo-open --launch TerminalEmulator', 'Terminal', 'terminal']},
|
||||
{item => ['exo-open --launch WebBrowser ', 'Web Browser', 'firefox']},
|
||||
|
@ -8,11 +8,8 @@ numlockx on &
|
||||
# restore wallpaper
|
||||
nitrogen --restore &
|
||||
|
||||
# start tint2 if enabled
|
||||
al-tint2-session &
|
||||
|
||||
# start polybar if tint2 not enabled (start after al-tint-session)
|
||||
sleep 1; start-polybar &
|
||||
# start polybar
|
||||
sleep 1; al-polybar-session &
|
||||
|
||||
# system tray
|
||||
sleep 1; trayer --edge bottom --align left --widthtype request --SetDockType false --expand true &
|
||||
@ -26,10 +23,7 @@ lxpolkit &
|
||||
# Required for xfce settings to work
|
||||
xfsettingsd &
|
||||
|
||||
# Launch conky if session exists
|
||||
sleep 2; al-conky-session &
|
||||
|
||||
# set side user dirs shortcuts for file managers
|
||||
# set user shortcuts for file managers
|
||||
xdg-user-dirs-gtk-update &
|
||||
|
||||
$HOME/.config/keypack &
|
||||
|
@ -111,10 +111,8 @@
|
||||
<desktops>
|
||||
<!-- this stuff is only used at startup, pagers allow you to change them
|
||||
during a session
|
||||
|
||||
these are default values to use when other ones are not already set
|
||||
by other applications, or saved in your session
|
||||
|
||||
use obconf if you want to change these without having to log out
|
||||
and back in -->
|
||||
<number>4</number>
|
||||
@ -175,7 +173,6 @@
|
||||
</dock>
|
||||
<keyboard>
|
||||
<chainQuitKey/>
|
||||
|
||||
<!-- Window & Desktop Control -->
|
||||
<keybind key="W-1">
|
||||
<action name="GoToDesktop">
|
||||
@ -264,7 +261,6 @@
|
||||
<action name="FocusToBottom"/>
|
||||
<action name="Unfocus"/>
|
||||
</keybind>
|
||||
|
||||
<!-- Media & Backlight -->
|
||||
<keybind key="XF86AudioRaiseVolume">
|
||||
<action name="Execute">
|
||||
@ -311,7 +307,6 @@
|
||||
<command>xbacklight -10</command>
|
||||
</action>
|
||||
</keybind>
|
||||
|
||||
<!-- Applications -->
|
||||
<keybind key="Print">
|
||||
<action name="Execute">
|
||||
@ -358,7 +353,6 @@
|
||||
<command>pavucontrol</command>
|
||||
</action>
|
||||
</keybind>
|
||||
|
||||
<!-- Launchers -->
|
||||
<keybind key="W-s">
|
||||
<action name="Execute">
|
||||
@ -375,7 +369,6 @@
|
||||
<command>rofi-gorice</command>
|
||||
</action>
|
||||
</keybind>
|
||||
|
||||
<!-- Logout & Reload -->
|
||||
<keybind key="W-x">
|
||||
<action name="Execute">
|
||||
@ -401,7 +394,6 @@
|
||||
<keybind key="C-S-Enter">
|
||||
<action name="Reconfigure"/>
|
||||
</keybind>
|
||||
|
||||
<!-- Window Control -->
|
||||
<keybind key="W-Escape">
|
||||
<action name="Execute">
|
||||
@ -435,7 +427,6 @@
|
||||
<keybind key="S-W-q">
|
||||
<action name="Close"/>
|
||||
</keybind>
|
||||
|
||||
<keybind key="W-space">
|
||||
<action name="ShowMenu">
|
||||
<menu>root-menu</menu>
|
||||
@ -446,7 +437,6 @@
|
||||
<menu>client-menu</menu>
|
||||
</action>
|
||||
</keybind>
|
||||
|
||||
<!-- Tiling Bindings -->
|
||||
<keybind key="W-KP_1">
|
||||
<action name="UnmaximizeFull"/>
|
||||
|
@ -369,15 +369,6 @@ menu-3-3 = " |"
|
||||
menu-3-3-exec = systemctl poweroff
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;
|
||||
;; Extra Modules ;;
|
||||
;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;
|
||||
;; Compton Toggle ;;
|
||||
;;;;;;;;;;;;;;;;;;;;
|
||||
@ -385,7 +376,7 @@ menu-3-3-exec = systemctl poweroff
|
||||
type = custom/script
|
||||
tail = true
|
||||
label = %output%
|
||||
click-left = toggle-compton --toggle
|
||||
click-left = toggle-compton --toggle &
|
||||
exec = toggle-compton
|
||||
format = <label>
|
||||
|
||||
@ -422,7 +413,7 @@ type = custom/script
|
||||
tail = true
|
||||
exec = toggle-redshift
|
||||
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
|
||||
|
||||
|
||||
|
||||
;;;;;;;;;;
|
||||
;; WIFI ;;
|
||||
;;;;;;;;;;
|
||||
|
11
home/.config/polybar/sessions/bspwm-sessionfile
Normal file
11
home/.config/polybar/sessions/bspwm-sessionfile
Normal 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
|
11
home/.config/polybar/sessions/i3-sessionfile
Normal file
11
home/.config/polybar/sessions/i3-sessionfile
Normal 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
|
11
home/.config/polybar/sessions/openbox-sessionfile
Normal file
11
home/.config/polybar/sessions/openbox-sessionfile
Normal 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
|
@ -1,15 +1,17 @@
|
||||
#!/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
|
||||
sed -i "/base/ a\
|
||||
include-file = ${HOME}/.config/polybar/master.conf" $HOME/.config/polybar/config
|
||||
sed -i "/base/ a\
|
||||
include-file = ${HOME}/.config/polybar/modules.conf" $HOME/.config/polybar/config
|
||||
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
|
||||
sed -i "s/liveuser/${USER}/g" $HOME/.gorice/templates/i3/data.json
|
||||
sed -i "s/liveuser/${USER}/g" $HOME/.config/gtk-3.0/bookmarks
|
||||
files=($HOME/.config/polybar/config
|
||||
$HOME/.config/gtk-3.0/bookmarks
|
||||
$HOME/.gorice/templates/i3/data.json
|
||||
$HOME/.mozilla/firefox/archlabs.default/prefs.js
|
||||
$HOME/.mozilla/firefox/archlabs.default/sessionstore.js)
|
||||
|
||||
for f in ${files[@]}; do
|
||||
sed -i "s/liveuser/${USER}/g" $f
|
||||
done
|
||||
|
||||
sed -i '/setup/d' $HOME/.config/openbox/autostart
|
||||
rm -f $HOME/.config/setup
|
||||
|
@ -4,7 +4,7 @@ connected=""
|
||||
disconnected=""
|
||||
|
||||
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
|
||||
else
|
||||
echo "$disconnected"; sleep 1
|
||||
|
@ -5,7 +5,7 @@ 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 hash notify-send &>/dev/null; then
|
||||
if [[ $count > 50 ]]; then
|
||||
notify-send -u critical -i $ICON \
|
||||
"You really need to update soon!!" "$count New package updates"
|
||||
|
@ -23,8 +23,6 @@ class Selection(Gtk.EventBox):
|
||||
self.background = background
|
||||
self.selected_colour = selected
|
||||
|
||||
if not working:
|
||||
name = 'x ' + name
|
||||
text = Gtk.Label(name)
|
||||
hbox = Gtk.HBox()
|
||||
hbox.set_size_request(0, 30)
|
||||
@ -45,38 +43,36 @@ class Selection(Gtk.EventBox):
|
||||
|
||||
hbox.pack_end(colour_widgets, False, True, 20)
|
||||
self.hbox = hbox
|
||||
self.connect('enter-notify-event', self.selected)
|
||||
self.connect('leave-notify-event', self.unselected)
|
||||
#self.connect('enter-notify-event', self.selected)
|
||||
#self.connect('leave-notify-event', self.unselected)
|
||||
self.connect('button-press-event', self.clicked)
|
||||
self.add(self.hbox)
|
||||
|
||||
def clicked(self, widget, button):
|
||||
def clicked(self, button):
|
||||
_, index = button.get_button()
|
||||
if index == 1:
|
||||
proc = subprocess.run([PATH, 'load', self.name])
|
||||
subprocess.run([PATH, 'load', self.name])
|
||||
Gtk.main_quit()
|
||||
return None
|
||||
|
||||
def selected(self, *args):
|
||||
# self.hbox.override_background_color(Gtk.StateType.NORMAL, Gdk.RGBA(*self.selected))
|
||||
return None
|
||||
#def selected(self, *args):
|
||||
# return None
|
||||
|
||||
def unselected(self, *args):
|
||||
# self.hbox.override_background_color(Gtk.StateType.NORMAL, Gdk.RGBA(*self.selected))
|
||||
return None
|
||||
#def unselected(self, *args):
|
||||
# return None
|
||||
|
||||
|
||||
def load_configs():
|
||||
broken = subprocess.check_output([PATH, 'check', GROUP])
|
||||
broken = broken.decode('utf-8').split('\n')
|
||||
|
||||
output = []
|
||||
path = '{}/.gorice/output.yaml'.format(os.environ['HOME'])
|
||||
output = []
|
||||
|
||||
with open(path, 'r') as f:
|
||||
data = yaml.load(f.read())
|
||||
|
||||
names = sorted(data['configs'])
|
||||
|
||||
for config in names:
|
||||
info = data['configs'][config]
|
||||
config, ext = os.path.splitext(config)
|
||||
@ -111,18 +107,18 @@ def main():
|
||||
configs = load_configs()
|
||||
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_decorated(False)
|
||||
window.set_resizable(False)
|
||||
|
||||
window.connect('leave-notify-event', Gtk.main_quit)
|
||||
window.connect('delete-event', Gtk.main_quit)
|
||||
#window.set_property('skip-taskbar-hint', False)
|
||||
#window.set_title('bar-dropdown')
|
||||
#window.set_border_width(0)
|
||||
#window.stick()
|
||||
|
||||
window.connect('delete-event', Gtk.main_quit)
|
||||
|
||||
scrolled = Gtk.ScrolledWindow()
|
||||
scrolled.set_policy(Gtk.PolicyType.NEVER, Gtk.PolicyType.AUTOMATIC)
|
||||
|
@ -20,7 +20,6 @@ case $question in
|
||||
systemctl poweroff
|
||||
;;
|
||||
*)
|
||||
: # do nothing on wrong response
|
||||
exit 0 # do nothing on wrong response
|
||||
;;
|
||||
esac
|
||||
|
||||
|
@ -20,6 +20,6 @@ case $question in
|
||||
systemctl poweroff
|
||||
;;
|
||||
*)
|
||||
: # do nothing on wrong response
|
||||
exit 0 # do nothing on wrong response
|
||||
;;
|
||||
esac
|
||||
|
@ -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
|
||||
|
@ -1,5 +1,8 @@
|
||||
#!/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
|
||||
al-compositor --restart
|
||||
elif [ -e "$HOME/.config/.composite_enabled" ]; then
|
||||
|
@ -4,13 +4,20 @@
|
||||
# Will launch bars depending on WM
|
||||
# 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.
|
||||
# by default it is set up in WM-BAR naming format
|
||||
|
||||
# Enter your bar names here (seperated by spaces) eg. BARS=(bar1 bar2...)
|
||||
# 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)
|
||||
CONFIG=$HOME/.config/polybar/config
|
||||
WMS=(bspwm i3 openbox)
|
||||
WMS=(bspwm i3 openbox xfce awesome)
|
||||
|
||||
############################################################################################
|
||||
|
||||
|
||||
HELP="\nUSAGE:\n\tstart-polybar [OPTIONS]
|
||||
\nOPTIONS:\n\t--reload, -r\tIf running in openbox, will reload the session
|
||||
@ -41,17 +48,11 @@ case "$@" in
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
# bail if tint2 is running
|
||||
if [ "$(pidof tint2)" ]; then exit 0; fi
|
||||
|
||||
|
||||
# kill running bars
|
||||
while [ "$(pidof polybar)" ]; do
|
||||
pkill polybar && sleep 0.5
|
||||
done
|
||||
|
||||
|
||||
# launch bars
|
||||
for bar in "${BARS[@]}"; do
|
||||
polybar -r --config=$CONFIG ${WM}-$bar &
|
||||
@ -62,4 +63,3 @@ if [ "$(pidof polybar)" ]; then
|
||||
else
|
||||
echo "Bars Failed to Launch"
|
||||
fi
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# will stop any running polybar instances
|
||||
while [ "$(pidof polybar)" ]; do
|
||||
pkill polybar && sleep 0.5
|
||||
echo "Bars stopped..."
|
||||
|
@ -1,18 +1,21 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
on=""
|
||||
off=""
|
||||
|
||||
# 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
|
||||
elif [[ $1 == *toggle* ]]; then
|
||||
caffeine &>/dev/null && exit 0
|
||||
caffeine && exit 0
|
||||
fi
|
||||
|
||||
while true; do
|
||||
# caffeine is running
|
||||
if pgrep caffeine >/dev/null; then
|
||||
echo "%{F#0000FF}"
|
||||
if pgrep caffeine &>/dev/null; then
|
||||
echo "%{F#0000FF}$on"
|
||||
else
|
||||
echo "%{F#FF0000}"
|
||||
echo "%{F#FF0000}$off"
|
||||
fi
|
||||
sleep 2
|
||||
done
|
||||
|
@ -3,18 +3,17 @@
|
||||
on=""
|
||||
off=""
|
||||
|
||||
if [[ $1 == *toggle* ]] && [ "$(pidof compton)" ]; then
|
||||
if [[ $1 == *toggle* ]] && [[ $(pidof compton) ]]; then
|
||||
al-compositor --stop && exit 0
|
||||
elif [[ $1 == *toggle* ]]; then
|
||||
al-compositor --start && exit 0
|
||||
fi
|
||||
|
||||
while true; do
|
||||
if [ "$(pidof compton)" ]; then
|
||||
if [[ $(pidof compton) ]]; then
|
||||
echo "$on"
|
||||
else
|
||||
echo "%{F#888888}$off"
|
||||
fi
|
||||
sleep 2
|
||||
done
|
||||
|
||||
|
@ -1,8 +1,9 @@
|
||||
#!/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
|
||||
else
|
||||
start-polybar
|
||||
al-polybar-session
|
||||
fi
|
||||
|
||||
|
@ -1,5 +1,8 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
|
||||
icon=""
|
||||
|
||||
if [[ $1 = "--toggle" ]] || [[ $1 = "-t" ]]; then
|
||||
if pgrep redshift >/dev/null; then
|
||||
pkill redshift
|
||||
@ -9,8 +12,6 @@ if [[ $1 = "--toggle" ]] || [[ $1 = "-t" ]]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
icon=""
|
||||
|
||||
while true; do
|
||||
pgrep -x redshift &> /dev/null
|
||||
if [[ $? -eq 0 ]]; then
|
||||
@ -29,4 +30,3 @@ while true; do
|
||||
fi
|
||||
sleep 2
|
||||
done
|
||||
|
||||
|
@ -1,6 +1,11 @@
|
||||
#!/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'
|
||||
else
|
||||
termite --title=work-term --class=work-term &
|
||||
|
@ -46,9 +46,7 @@ for i in ${WMS[@]}; do
|
||||
done
|
||||
|
||||
# Loop until network connected
|
||||
net=$(ping -c1 8.8.8.8 2>&1)
|
||||
while ! [[ $net >/dev/null ]]; do
|
||||
net=$(ping -c1 8.8.8.8 2>&1)
|
||||
while ! [[ $(ping -c1 8.8.8.8) ]]; do
|
||||
echo -e "Please Connect to a Network Before Continuing"
|
||||
clear; sleep 1
|
||||
done
|
||||
@ -120,7 +118,7 @@ if [ "${answer,,}" = "${yes,,}" ]; then
|
||||
if [[ "$WM" == "i3" ]]; then
|
||||
i3-msg restart
|
||||
elif [[ "$WM" == "openbox" ]]; then
|
||||
start-polybar --reload > /dev/null 2>&1
|
||||
al-polybar-session -r
|
||||
fi
|
||||
fi
|
||||
|
||||
|
Reference in New Issue
Block a user