diff --git a/home/.ArchLabs-homepage/index.html b/home/.ArchLabs-homepage/index.html
deleted file mode 100644
index bfeabe96..00000000
--- a/home/.ArchLabs-homepage/index.html
+++ /dev/null
@@ -1,51 +0,0 @@
-
-
-
- ArchLabs Home
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ArchLabs
-
-
-
-
diff --git a/home/.ArchLabs-homepage/res/archlabs02.png b/home/.ArchLabs-homepage/res/archlabs02.png
deleted file mode 100644
index 6719e25f..00000000
Binary files a/home/.ArchLabs-homepage/res/archlabs02.png and /dev/null differ
diff --git a/home/.ArchLabs-homepage/res/logo-dark.png b/home/.ArchLabs-homepage/res/logo-dark.png
deleted file mode 100644
index 0d61b364..00000000
Binary files a/home/.ArchLabs-homepage/res/logo-dark.png and /dev/null differ
diff --git a/home/.ArchLabs-homepage/res/logo.png b/home/.ArchLabs-homepage/res/logo.png
deleted file mode 100644
index 88a79df3..00000000
Binary files a/home/.ArchLabs-homepage/res/logo.png and /dev/null differ
diff --git a/home/.ArchLabs-homepage/script.js b/home/.ArchLabs-homepage/script.js
deleted file mode 100644
index 076f17c7..00000000
--- a/home/.ArchLabs-homepage/script.js
+++ /dev/null
@@ -1,47 +0,0 @@
-$(document).ready(function() {
-
- //Search Bar
-
- var $search = $("input[name='q']");
-
- $("span[name='yt']").click(function() {
- var curr = $search.val();
- $search.val("!arch " + curr);
- $search.focus();
- });
-
- $("span[name='sr']").click(function() {
- var curr = $search.val();
- $search.val("!archforums " + curr);
- $search.focus();
- });
-
- $("span[name='a']").click(function() {
- var curr = $search.val();
- $search.val("!pkg " + curr);
- $search.focus();
- });
-
- $("span[name='w']").click(function() {
- var curr = $search.val();
- $search.val("!openbox" + curr);
- $search.focus();
- });
-
- //Tabs
-
- $(".stripe").mouseenter(function() {
- $(this).stop().animate({
- width: '100vw'
- });
- $(this).find(".content").stop().fadeIn().children().show();
- });
-
- $(".stripe").mouseleave(function() {
- $(this).stop().animate({
- width: '40px'
- });
- $(this).find(".content").stop().fadeOut();
- });
-
-});
diff --git a/home/.ArchLabs-homepage/style.css b/home/.ArchLabs-homepage/style.css
deleted file mode 100644
index f9e96c0b..00000000
--- a/home/.ArchLabs-homepage/style.css
+++ /dev/null
@@ -1,138 +0,0 @@
-@import url('https://fonts.googleapis.com/css?family=Open+Sans:300,400');
-
-* {
- margin: 0;
- padding: 0;
- font-family: "Ubuntu";
-}
-
-body {
- width: 100vw;
- height: 100vh;
- background:url("res/archlabs02.png");
-}
-
-h2 {
- width: 100vw;
- position: absolute;
- top: calc(90vh - 20px);
- left: calc(55vh - 0px);
- text-align: center;
- font-weight: 300;
- font-size: 35px;
-}
-
-h3 {
- width: 100vw;
- position: absolute;
- top: calc(90vh - 0px);
- left: calc(75vh - 0px);
- text-align: center;
- font-weight: 500;
- font-size: 60px;
- color: white;
-}
-
-form {
- position: absolute;
- left: 50%;
- top: 40%;
- width: 600px;
- height: 50px;
- transform: translateX(-50%);
- font-weight: 300;
- z-index: 1;
-}
-
-form p {
- display: flex;
- margin-top: 10px;
- justify-content: space-between;
- color: #ACB6BF;
- padding-left: 5px;
- padding-right: 5px;
-}
-
-form p span {
- cursor: pointer;
- transition: color 0.5s;
-}
-
-form p span:hover {
- color: #ACB6BF;
-}
-
-input[type=text] {
- width: 600px;
- height: 50px;
- border: 1px solid #a0a0a0;
- border-radius: 2px;
- padding: 10px;
- font-weight: 300;
-}
-
-input[type=text]:focus {
- border-color: #707070
-}
-
-.stripe {
- position: relative;
- width: 40px;
- height: 25vh;
- color: white;
- z-index: 2;
-}
-
-.stripe .title {
- position: relative;
- width: 40px;
- height: 100%;
- float: left;
- box-sizing: border-box;
-}
-
-.stripe .title span {
- position: absolute;
- top: 50%;
- left: 50%;
- display: block;
- transform: translateX(-50%) translateY(-50%) rotate(-90deg);
- font-weight: 400;
-}
-
-.stripe .content {
- position: absolute;
- left: calc(5vw + 40px);
- width: calc(90vw - 40px);
- display: none;
- padding: 20px;
- box-sizing: border-box;
- height: 100%;
- font-weight: 300;
- display: flex;
- justify-content: space-between;
-}
-
-.stripe .content div {
- position: relative;
- height: 100%;
- width: 150px;
- display: none;
-}
-
-.stripe .content div img {
- position: absolute;
- max-height: 100px;
- max-width: 150px;
- top: 50%;
- transform: translateY(-50%);
-}
-.stripe .content span {
- line-height: calc(25vh - 50px);
- display: none;
-}
-
-.stripe .content span a {
- text-decoration: none;
- color: white;
-}
diff --git a/home/.Xresources b/home/.Xresources
index b78f1aa7..99fcdd0b 100755
--- a/home/.Xresources
+++ b/home/.Xresources
@@ -64,7 +64,7 @@ URxvt*iso14755: false
! appearance
URxvt*depth: 32
-URxvt*background: [80]#2b303b
+URxvt*background: [90]#2b303b
URxvt*scrollBar: false
URxvt*scrollBar_right: false
URxvt*internalBorder: 0
@@ -72,7 +72,7 @@ URxvt*externalBorder: 0
! fonts
URxvt*letterSpace: -1
-URxvt.font: xft:Ubuntu Mono Nerd Font:size=11
+URxvt.font: xft:Ubuntu Mono:size=11
! run :.!fc-list | grep
! perl extensions
diff --git a/home/.Xresources.template b/home/.Xresources.template
index f03c801d..05c2ed2e 100644
--- a/home/.Xresources.template
+++ b/home/.Xresources.template
@@ -64,7 +64,7 @@ URxvt*iso14755: false
! appearance
URxvt*depth: 32
-URxvt*background: [80]{{.Data.terminal_background}}
+URxvt*background: [90]{{.Data.terminal_background}}
URxvt*scrollBar: false
URxvt*scrollBar_right: false
URxvt*internalBorder: 0
@@ -72,7 +72,7 @@ URxvt*externalBorder: 0
! fonts
URxvt*letterSpace: -1
-URxvt.font: xft:Ubuntu Mono Nerd Font:size=11
+URxvt.font: xft:Ubuntu Mono:size=11
! run :.!fc-list | grep
! perl extensions
diff --git a/home/.config/i3/config b/home/.config/i3/config
index aa1c6ace..c46e4dd5 100644
--- a/home/.config/i3/config
+++ b/home/.config/i3/config
@@ -25,31 +25,31 @@ set_from_resource $grey color7 #969CD3
set_from_resource $white color15 #F1F1F1
set_from_resource $black color0 #19043C
-# class bg bd txt ind
-client.focused $bg $blue $fg $blue
-client.unfocused $bg $bg $fg $bg
-client.focused_inactive $bg $bg $fg $bg
-client.urgent $bg $red $fg $red
-client.background $bg
+# class bd bg txt ind child_bordr
+client.focused $grey $bg $fg $blue $grey
+client.unfocused $grey $bg $black $bg $bg
+client.focused_inactive $grey $bg $black $bg $bg
+client.urgent $red $bg $red $red $red
+client.placeholder $grey $bg $bg $bg $bg
+client.background $bg
-# border
-for_window [class="^.*"] border pixel 2
+# border & title
+for_window [class="^.*"] border pixel 2, title_format " %class >> %title "
# gaps
-gaps inner 12
+gaps inner 15
gaps outer 0
# font
font pango:Ubuntu 11
-##
#### Set
##
-# $mod for Super or Alt
-set $mod Mod4
-#set $mod Mod1
+# $Mod = Super or Alt?
+set $Mod Mod4
+#set $Mod Mod1
# direction keys
set $up l
@@ -57,18 +57,18 @@ set $down k
set $left j
set $right semicolon
-set $WS1 "1:"
-set $WS2 "2:"
-set $WS3 "3:"
-set $WS4 "4:"
-set $WS5 "5:"
-set $WS6 "6:"
-set $WS7 "7:"
-set $WS8 "8:"
+set $WS1 "1: "
+set $WS2 "2: "
+set $WS3 "3: "
+set $WS4 "4: "
+set $WS5 "5: "
+set $WS6 "6: "
+set $WS7 "7: "
+set $WS8 "8: "
# monitors
-set $firstMonitor HDMI1
-set $secondMonitor HDMI2
+set $Mon1 HDMI1
+set $Mon2 HDMI2
####################################################################################################
################# Autostart ##################
@@ -78,6 +78,9 @@ set $secondMonitor HDMI2
exec_always --no-startup-id start-compton
exec_always --no-startup-id start-polybar
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
# run once
exec --no-startup-id xfsettingsd
@@ -91,7 +94,7 @@ exec --no-startup-id lxpolkit
####################################################################################################
# kill focused window
-bindsym $mod+Shift+q kill
+bindsym $Mod+Shift+q kill
bindsym Mod1+q kill
# launchers
@@ -99,13 +102,13 @@ bindsym Control+space exec --no-startup-id rofi-gorice
bindsym Mod1+F1 exec --no-startup-id rofi-gorice
# core
-bindsym $mod+e exec --no-startup-id al-open -edit
-bindsym $mod+t exec --no-startup-id exo-open --launch TerminalEmulator
-bindsym $mod+w exec --no-startup-id exo-open --launch WebBrowser
-bindsym $mod+f exec --no-startup-id exo-open --launch FileManager
+bindsym $Mod+e exec --no-startup-id al-open -edit
+bindsym $Mod+t exec exo-open --launch TerminalEmulator
+bindsym $Mod+w exec exo-open --launch WebBrowser
+bindsym $Mod+f exec exo-open --launch FileManager
# logout
-bindsym $mod+x exec --no-startup-id rofi-logout
+bindsym $Mod+x exec --no-startup-id rofi-logout
# long command broken into multiple lines
bindsym Print exec --no-startup-id "scrot '%S.png' \
@@ -128,81 +131,81 @@ bindsym XF86MonBrightnessDown exec --no-startup-id xbacklight -dec 10
####################################################################################################
# workspace assignment
-workspace $WS1 output $firstMonitor
-workspace $WS2 output $secondMonitor
-workspace $WS3 output $firstMonitor
-workspace $WS4 output $secondMonitor
-workspace $WS5 output $firstMonitor
-workspace $WS6 output $secondMonitor
-workspace $WS7 output $firstMonitor
-workspace $WS8 output $secondMonitor
+workspace $WS1 output $Mon1
+workspace $WS2 output $Mon1
+workspace $WS3 output $Mon1
+workspace $WS4 output $Mon1
+workspace $WS5 output $Mon2
+workspace $WS6 output $Mon2
+workspace $WS7 output $Mon2
+workspace $WS8 output $Mon2
# switch to workspace
-bindsym $mod+1 workspace $WS1
-bindsym $mod+2 workspace $WS2
-bindsym $mod+3 workspace $WS3
-bindsym $mod+4 workspace $WS4
-bindsym $mod+5 workspace $WS5
-bindsym $mod+6 workspace $WS6
-bindsym $mod+7 workspace $WS7
-bindsym $mod+8 workspace $WS8
+bindsym $Mod+1 workspace $WS1
+bindsym $Mod+2 workspace $WS2
+bindsym $Mod+3 workspace $WS3
+bindsym $Mod+4 workspace $WS4
+bindsym $Mod+5 workspace $WS5
+bindsym $Mod+6 workspace $WS6
+bindsym $Mod+7 workspace $WS7
+bindsym $Mod+8 workspace $WS8
# move focused container to workspace
-bindsym $mod+Shift+1 move container to workspace $WS1; workspace $WS1
-bindsym $mod+Shift+2 move container to workspace $WS2; workspace $WS2
-bindsym $mod+Shift+3 move container to workspace $WS3; workspace $WS3
-bindsym $mod+Shift+4 move container to workspace $WS4; workspace $WS4
-bindsym $mod+Shift+5 move container to workspace $WS5; workspace $WS5
-bindsym $mod+Shift+6 move container to workspace $WS6; workspace $WS6
-bindsym $mod+Shift+7 move container to workspace $WS7; workspace $WS7
-bindsym $mod+Shift+8 move container to workspace $WS8; workspace $WS8
+bindsym $Mod+Shift+1 move container to workspace $WS1; workspace $WS1
+bindsym $Mod+Shift+2 move container to workspace $WS2; workspace $WS2
+bindsym $Mod+Shift+3 move container to workspace $WS3; workspace $WS3
+bindsym $Mod+Shift+4 move container to workspace $WS4; workspace $WS4
+bindsym $Mod+Shift+5 move container to workspace $WS5; workspace $WS5
+bindsym $Mod+Shift+6 move container to workspace $WS6; workspace $WS6
+bindsym $Mod+Shift+7 move container to workspace $WS7; workspace $WS7
+bindsym $Mod+Shift+8 move container to workspace $WS8; workspace $WS8
####################################################################################################
################# Reload configs #################
####################################################################################################
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
-bindsym $mod+Shift+r restart
+bindsym $Mod+Shift+r restart
# reload the configuration file
-bindsym $mod+Shift+c reload
+bindsym $Mod+Shift+c reload
####################################################################################################
################ Container/Window control ##################
####################################################################################################
# Scratchpad, Floating
-bindsym $mod+minus move scratchpad
-bindsym $mod+plus scratchpad show
-bindsym $mod+space floating toggle
+bindsym Mod1+minus move scratchpad
+bindsym Mod1+plus scratchpad show
+bindsym $Mod+space floating toggle
floating_modifier Mod1
# change focus
-bindsym $mod+$left focus left
-bindsym $mod+$down focus down
-bindsym $mod+$up focus up
-bindsym $mod+$right focus right
+bindsym $Mod+$left focus left
+bindsym $Mod+$down focus down
+bindsym $Mod+$up focus up
+bindsym $Mod+$right focus right
# alternatively, you can use the cursor keys:
-bindsym $mod+Left focus left
-bindsym $mod+Down focus down
-bindsym $mod+Up focus up
-bindsym $mod+Right focus right
+bindsym $Mod+Left focus left
+bindsym $Mod+Down focus down
+bindsym $Mod+Up focus up
+bindsym $Mod+Right focus right
-bindsym $mod+p focus parent
-bindsym $mod+c focus child
+bindsym $Mod+p focus parent
+bindsym $Mod+c focus child
# move focused window
-bindsym $mod+Shift+$left move left 10px
-bindsym $mod+Shift+$down move down 10px
-bindsym $mod+Shift+$up move up 10px
-bindsym $mod+Shift+$right move right 10px
+bindsym $Mod+Shift+$left move left 10px
+bindsym $Mod+Shift+$down move down 10px
+bindsym $Mod+Shift+$up move up 10px
+bindsym $Mod+Shift+$right move right 10px
# alternatively, you can use the cursor keys:
-bindsym $mod+Shift+Up move up 10px
-bindsym $mod+Shift+Down move down 10px
-bindsym $mod+Shift+Left move left 10px
-bindsym $mod+Shift+Right move right 10px
+bindsym $Mod+Shift+Up move up 10px
+bindsym $Mod+Shift+Down move down 10px
+bindsym $Mod+Shift+Left move left 10px
+bindsym $Mod+Shift+Right move right 10px
# Size
bindsym Mod1+Up resize shrink height 10 px or 1 ppt
@@ -210,19 +213,20 @@ bindsym Mod1+Down resize grow height 10 px or 1 ppt
bindsym Mod1+Left resize shrink width 10 px or 1 ppt
bindsym Mod1+Right resize grow width 10 px or 1 ppt
-# next/previous workspace
-bindsym Mod1+Tab workspace next
-bindsym Mod1+Shift+Tab workspace prev
+# layout toggle, keycode 23 is Tab
+bindcode Mod1+23 layout toggle tabbed split
+bindcode $Mod+23 layout toggle splitv splith
# switch to workspace with urgent window
-for_window [urgent=latest] focus
+for_window [urgent="latest"] focus
+focus_on_window_activation focus
# container layout
-bindsym $mod+h split h
-bindsym $mod+v split v
-bindsym $mod+Shift+t layout tabbed
-bindsym $mod+Shift+s layout stacking
-bindsym $mod+Shift+h layout toggle split
+bindsym $Mod+h split h
+bindsym $Mod+v split v
+bindsym $Mod+Shift+t layout tabbed
+bindsym $Mod+Shift+s layout stacking
+bindsym $Mod+Shift+h layout toggle split
default_orientation horizontal
####################################################################################################
@@ -233,35 +237,52 @@ new_window normal
new_float normal
hide_edge_borders both
popup_during_fullscreen smart
-bindsym $mod+shift+b border toggle
+bindsym $Mod+shift+b border toggle
#changing border style
-bindsym $mod+n border normal
-bindsym $mod+y border 1pixel
-bindsym $mod+u border none
+bindsym $Mod+n border normal
+bindsym $Mod+y border 1pixel
+bindsym $Mod+u border none
-set $mode_gaps Gap Size + | -
-bindsym $mod+Shift+g mode "$mode_gaps"
-mode "$mode_gaps" {
- bindsym plus gaps inner all plus 2
- bindsym minus gaps inner all minus 2
- bindsym Return mode "default"
- bindsym Escape mode "default"
-}
+# change gaps
+bindsym $Mod+plus gaps outer current plus 5
+bindsym $Mod+minus gaps outer current minus 5
+bindsym $Mod+Shift+plus gaps inner current plus 5
+bindsym $Mod+Shift+minus gaps inner current minus 5
+
+bindsym $Mod+Control+plus gaps inner all plus 5
+bindsym $Mod+Control+minus gaps inner all minus 5
+bindsym $Mod+Control+Shift+plus gaps outer all plus 5
+bindsym $Mod+Control+Shift+minus gaps outer all minus 5
####################################################################################################
################# application settings #################
####################################################################################################
-for_window [class="qt5ct|Lxappearance|^Gpick$|Pamac|Peek|Nitrogen"] floating enable
-for_window [window_role="^Preferences$"] floating enable
-
-for_window [class="Termite|^Thunar|Geany|Firefox"] focus
+# focus & floating
+for_window [class="(?i)(?:lxapp\w+|peek)"] floating enable, focus
+for_window [class="(?i)(?:gpic\w+|gvim)"] floating enable, focus
+for_window [class="(?i)(?:deluge|nitrogen)"] floating enable, focus
+for_window [class="(?i)(?:qt5ct|pinentry)"] floating enable, focus
+for_window [class="(?i)(?:termite|thunar)"] focus
+for_window [class="(?i)(?:geany|firefox)"] focus
# Assign Applications to specific workspace
# get class with xprop
-assign [class="Firefox"] → $WS1
-assign [class="Geany"] → $WS2
-assign [class="Thunar"] → $WS3
-assign [class="^Gimp"] → $WS4
+assign [class="(?i)(?:firefox)"] → $WS1
+assign [class="(?i)(?:geany)"] → $WS2
+assign [class="(?i)(?:thunar)"] → $WS3
+assign [class="(?i)(?:gimp|nitrogen)"] → $WS4
+
+# focus, floating, & sticky
+for_window [title="(?i)(?:copying|deleting|moving|auth\w+)"] floating enable, sticky enable
+for_window [window_role="(?i)(?:pop-up|setup|preferen\w+)"] floating enable, sticky enable
+
+# set trayer to be borderless
+for_window [class="(?i)trayer"] border pixel 0
+
+
+
+# start on main workspaces when reloading i3 (keep me at the bottom)
+exec_always --no-startup-id i3-msg 'workspace $WS5, workspace $WS1'
diff --git a/home/.config/openbox/autostart b/home/.config/openbox/autostart
index ce915ea2..48283d9f 100755
--- a/home/.config/openbox/autostart
+++ b/home/.config/openbox/autostart
@@ -27,4 +27,4 @@ sleep 2; al-conky-session &
xdg-user-dirs-gtk-update &
-termite --geometry=650x450 --exec=al-hello &
+# al-hello
diff --git a/home/.config/openbox/rc.xml b/home/.config/openbox/rc.xml
index f5870c3a..c5050640 100644
--- a/home/.config/openbox/rc.xml
+++ b/home/.config/openbox/rc.xml
@@ -176,6 +176,8 @@
+
+
1
@@ -263,11 +265,8 @@
-
-
-
-
-
+
+
pamixer -i 2
@@ -313,6 +312,8 @@
xbacklight -10
+
+
scrot 'ArchLabs_%Y-%m-%d-%S_$wx$h.png' -e 'mv $f $$(xdg-user-dir PICTURES) ; gpicview $$(xdg-user-dir PICTURES)/$f'
@@ -323,11 +324,6 @@
scrot -d 5 'ArchLabs_%Y-%m-%d-%S_$wx$h.png' -e 'mv $f $$(xdg-user-dir PICTURES) ; gpicview $$(xdg-user-dir PICTURES)/$f'
-
-
- rofi-gorice
-
-
exo-open --launch FileManager
@@ -348,6 +344,11 @@
al-open -edit
+
+
+ xfce4-settings-manager
+
+
audacious
@@ -358,34 +359,38 @@
pavucontrol
-
-
- exit-openbox
-
-
-
-
-
-
-
- xkill
-
-
+
+
skippy-xd
+
+
+ rofi-gorice
+
+
rofi-gorice
-
-
-
+
+
+
+
+ exit-openbox
+
+
+ exit-openbox
+
+
+
+
+
start-polybar --reload
@@ -397,6 +402,13 @@
+
+
+
+
+ xkill
+
+
@@ -424,11 +436,19 @@
-
-
- xfce4-settings-manager
+
+
+
+
+
+
+
+
+
+
+
@@ -540,11 +560,6 @@
50%
-
-
- exit-openbox
-
-
diff --git a/home/.config/polybar/config b/home/.config/polybar/config
index a869f8cd..cbafda2b 100755
--- a/home/.config/polybar/config
+++ b/home/.config/polybar/config
@@ -44,7 +44,7 @@ inherit = bar/master
; Use $ xrandr -q | grep " connected" | cut -d ' ' -f1
monitor =
-modules-left = config i3-workspaces menu
+modules-left = config i3 menu
modules-center = clock
modules-right = pkg memory temperature coreuse network volume
diff --git a/home/.config/polybar/modules.conf b/home/.config/polybar/modules.conf
index a9d0138c..65679d5f 100644
--- a/home/.config/polybar/modules.conf
+++ b/home/.config/polybar/modules.conf
@@ -70,7 +70,7 @@ label-empty-foreground = ${colors.foreground}
;;;;;;;;;;;;;;;;;;;
;; i3 Workspaces ;;
;;;;;;;;;;;;;;;;;;;
-[module/workspaces]
+[module/i3]
type = internal/i3
pin-workspaces = true
strip-wsnumbers = false
diff --git a/home/.config/sxhkd/sxhkdrc b/home/.config/sxhkd/sxhkdrc
index 764e04f9..b7be13b6 100644
--- a/home/.config/sxhkd/sxhkdrc
+++ b/home/.config/sxhkd/sxhkdrc
@@ -24,7 +24,7 @@ super + shift + r
# quit bspwm normally
super + x
- bspc quit
+ rofi-logout
# close and kill
super + {_,shift + }q
diff --git a/home/bin/check-network b/home/bin/check-network
index 0a13d2a4..95acaba6 100755
--- a/home/bin/check-network
+++ b/home/bin/check-network
@@ -2,6 +2,7 @@
connected=""
disconnected=""
+
while true; do
if ping -c1 8.8.8.8 >/dev/null; then
echo "$connected"; sleep 10
diff --git a/home/bin/check-updates b/home/bin/check-updates
index 36126ae6..2a10a22c 100755
--- a/home/bin/check-updates
+++ b/home/bin/check-updates
@@ -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)
diff --git a/home/bin/rofi-logout b/home/bin/rofi-logout
index 587646d4..3e796d90 100755
--- a/home/bin/rofi-logout
+++ b/home/bin/rofi-logout
@@ -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")
diff --git a/home/bin/rofi-logout.template b/home/bin/rofi-logout.template
index f7b9465b..a1d20674 100644
--- a/home/bin/rofi-logout.template
+++ b/home/bin/rofi-logout.template
@@ -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}}")
diff --git a/home/bin/start-compton b/home/bin/start-compton
index c26eacce..307ec21b 100755
--- a/home/bin/start-compton
+++ b/home/bin/start-compton
@@ -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
diff --git a/home/bin/start-polybar b/home/bin/start-polybar
index 26c99897..92d0ecb0 100755
--- a/home/bin/start-polybar
+++ b/home/bin/start-polybar
@@ -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 &
diff --git a/home/bin/stop-polybar b/home/bin/stop-polybar
index c17dbc7d..d5f658e7 100755
--- a/home/bin/stop-polybar
+++ b/home/bin/stop-polybar
@@ -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..."
diff --git a/home/bin/toggle-caffeine b/home/bin/toggle-caffeine
index 1203f7e9..a25fc94f 100755
--- a/home/bin/toggle-caffeine
+++ b/home/bin/toggle-caffeine
@@ -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
diff --git a/home/bin/toggle-compton b/home/bin/toggle-compton
index f4690ebb..d4ffef06 100755
--- a/home/bin/toggle-compton
+++ b/home/bin/toggle-compton
@@ -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"
diff --git a/home/bin/toggle-polybar b/home/bin/toggle-polybar
index 1b2c7c6d..8c387400 100755
--- a/home/bin/toggle-polybar
+++ b/home/bin/toggle-polybar
@@ -3,6 +3,6 @@
if pgrep -x polybar >/dev/null; then
pkill polybar
else
- launch-polybar >/dev/null 2>&1
+ start-polybar
fi
diff --git a/home/bin/toggle-redshift b/home/bin/toggle-redshift
index 44ebd7ad..3985da76 100755
--- a/home/bin/toggle-redshift
+++ b/home/bin/toggle-redshift
@@ -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
diff --git a/home/bin/toggle-termite b/home/bin/toggle-termite
index de3dda5a..62a1ac27 100755
--- a/home/bin/toggle-termite
+++ b/home/bin/toggle-termite
@@ -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 &