Clean up configs, remove bashrc conflicting with bash
This commit is contained in:
@ -17,9 +17,9 @@ inherit = bar/master
|
||||
; Use $ xrandr -q | grep " connected" | cut -d ' ' -f1
|
||||
monitor =
|
||||
|
||||
modules-left = config window_switch workspaces menu
|
||||
modules-left = config window_switch workspaces menu
|
||||
modules-center = clock
|
||||
modules-right = pkg memory temperature coreuse network volume
|
||||
modules-right = pkg memory temperature coreuse network volume
|
||||
|
||||
; All available modules (some require configuration in modules.conf)
|
||||
; redshift github filesystem mpd wired-network wireless-network battery menu volume-bar bspwm
|
||||
@ -44,9 +44,9 @@ inherit = bar/master
|
||||
; Use $ xrandr -q | grep " connected" | cut -d ' ' -f1
|
||||
monitor =
|
||||
|
||||
modules-left = config i3-workspaces menu
|
||||
modules-left = config i3-workspaces menu
|
||||
modules-center = clock
|
||||
modules-right = pkg memory temperature coreuse network volume
|
||||
modules-right = pkg memory temperature coreuse network volume
|
||||
|
||||
; All available modules (some require configuration in modules.conf)
|
||||
; redshift github filesystem mpd wired-network wireless-network battery menu volume-bar bspwm
|
||||
@ -71,9 +71,9 @@ inherit = bar/master
|
||||
; Use $ xrandr -q | grep " connected" | cut -d ' ' -f1
|
||||
monitor =
|
||||
|
||||
modules-left = bspwm menu
|
||||
modules-left = bspwm menu
|
||||
modules-center = clock
|
||||
modules-right = pkg memory temperature coreuse network volume
|
||||
modules-right = pkg memory temperature coreuse network volume
|
||||
|
||||
; All available modules (some require configuration in modules.conf)
|
||||
; redshift github filesystem mpd wired-network wireless-network battery menu volume-bar bspwm
|
||||
|
@ -1,18 +1,21 @@
|
||||
;=====================================================
|
||||
; Settings & Colors
|
||||
; Colors & Settings
|
||||
;=====================================================
|
||||
|
||||
[colors]
|
||||
background = #2b303b
|
||||
foreground = #c0c5ce
|
||||
urgent = #E7816B
|
||||
blue = #6BA4E7
|
||||
pink = #9181E7
|
||||
orange = #FEBE8E
|
||||
purple = #D7AFF9
|
||||
yellow = #F9F1AF
|
||||
moderate = #ebcb8b
|
||||
urgent = #bf616a
|
||||
trim = #8fa1b3
|
||||
blue = #8fa1b3
|
||||
pink = #bf616a
|
||||
orange = #ebcb8b
|
||||
purple = #b48ead
|
||||
yellow = #ebcb8b
|
||||
border = #c0c5ce
|
||||
|
||||
|
||||
[settings]
|
||||
throttle-output = 5
|
||||
throttle-output-for = 10
|
||||
@ -23,49 +26,40 @@ compositing-overline = source
|
||||
compositing-underline = source
|
||||
compositing-border = source
|
||||
screenchange-reload = true
|
||||
|
||||
format-foreground = ${colors.foreground}
|
||||
format-background = ${colors.background}
|
||||
|
||||
|
||||
format-foreground = ${colors.foreground}
|
||||
format-background = ${colors.background}
|
||||
|
||||
;=====================================================
|
||||
; Master Bar
|
||||
;=====================================================
|
||||
|
||||
[bar/master]
|
||||
width = 100%
|
||||
height = 28
|
||||
border-size = 0
|
||||
border-top-size = 0
|
||||
border-bottom-size = 2
|
||||
radius = 0
|
||||
bottom = false
|
||||
line-size = 2
|
||||
font-0 = "DejaVu Sans Mono:size=10:antialias=false;2"
|
||||
|
||||
|
||||
offset-x = 0
|
||||
offset-y = 0
|
||||
fixed-center = true
|
||||
|
||||
border-color = ${colors.border}
|
||||
background = ${colors.background}
|
||||
foreground = ${colors.foreground}
|
||||
|
||||
font-1 = "FontAwesome:size=9:antialias=false;2"
|
||||
font-2 = "MaterialIcons:size=9:antialias=false;3"
|
||||
font-3 = "icomoon:size=10:antialias=false;2"
|
||||
font-4 = "Ubuntu Nerd Font:size=9:antialias=false;2"
|
||||
|
||||
module-margin = 0
|
||||
padding-right = 0
|
||||
padding-left = 0
|
||||
separator = │
|
||||
|
||||
click-middle = skippy-xd --activate-window-picker
|
||||
scroll-up = pamixer -i 2
|
||||
scroll-down = pamixer -d 2
|
||||
double-click-left = python /usr/bin/networkmanager_dmenu
|
||||
width = 100%
|
||||
height = 24
|
||||
border-size = 0
|
||||
border-top-size = 0
|
||||
border-bottom-size = 2
|
||||
radius = 0
|
||||
bottom = false
|
||||
line-size = 2
|
||||
font-0 = "DejaVu Sans Mono:size=10:antialias=false;2"
|
||||
font-1 = "FontAwesome:size=10:antialias=false;2"
|
||||
font-2 = "MaterialIcons:size=10:antialias=false;2"
|
||||
font-3 = "icomoon:size=10:antialias=false;2"
|
||||
font-4 = "Ubuntu Nerd Font:size=10:antialias=false;2"
|
||||
offset-x = 0
|
||||
offset-y = 0
|
||||
fixed-center = true
|
||||
border-color = ${colors.border}
|
||||
background = ${colors.background}
|
||||
foreground = ${colors.foreground}
|
||||
module-margin = 0
|
||||
padding-right = 0
|
||||
padding-left = 0
|
||||
separator = │
|
||||
scroll-up = pamixer -i 2
|
||||
scroll-down = pamixer -d 2
|
||||
click-middle = skippy-xd --activate-window-picker
|
||||
double-click-left = networkmanager_dmenu
|
||||
double-click-middle = skippy-xd --activate-window-picker
|
||||
double-click-right = pavucontrol &
|
||||
double-click-right = pavucontrol &
|
||||
|
@ -1,11 +1,13 @@
|
||||
;=====================================================
|
||||
; Settings & Colors
|
||||
; Colors & Settings
|
||||
;=====================================================
|
||||
|
||||
[colors]
|
||||
background = {{.Data.bar_background}}
|
||||
foreground = {{.Data.terminal_foreground}}
|
||||
moderate = {{index .Data.terminal_colors 3}}
|
||||
urgent = {{index .Data.terminal_colors 1}}
|
||||
trim = {{index .Data.terminal_colors 4}}
|
||||
blue = {{index .Data.terminal_colors 4}}
|
||||
pink = {{index .Data.terminal_colors 1}}
|
||||
orange = {{index .Data.terminal_colors 3}}
|
||||
@ -13,6 +15,7 @@ purple = {{index .Data.terminal_colors 5}}
|
||||
yellow = {{index .Data.terminal_colors 3}}
|
||||
border = {{.Data.border_color}}
|
||||
|
||||
|
||||
[settings]
|
||||
throttle-output = 5
|
||||
throttle-output-for = 10
|
||||
@ -23,49 +26,40 @@ compositing-overline = source
|
||||
compositing-underline = source
|
||||
compositing-border = source
|
||||
screenchange-reload = true
|
||||
|
||||
format-foreground = ${colors.foreground}
|
||||
format-background = ${colors.background}
|
||||
|
||||
|
||||
format-foreground = ${colors.foreground}
|
||||
format-background = ${colors.background}
|
||||
|
||||
;=====================================================
|
||||
; Master Bar
|
||||
;=====================================================
|
||||
|
||||
[bar/master]
|
||||
width = {{.Data.bar_width}}
|
||||
height = {{.Data.bar_height}}
|
||||
border-size = {{.Data.border_all}}
|
||||
border-top-size = {{.Data.border_top}}
|
||||
border-bottom-size = {{.Data.border_bottom}}
|
||||
radius = {{.Data.bar_radius}}
|
||||
bottom = {{.Data.bar_bottom}}
|
||||
line-size = {{.Data.border_pixels}}
|
||||
font-0 = "{{.Data.bar_font0}}"
|
||||
|
||||
|
||||
offset-x = 0
|
||||
offset-y = 0
|
||||
fixed-center = true
|
||||
|
||||
border-color = ${colors.border}
|
||||
background = ${colors.background}
|
||||
foreground = ${colors.foreground}
|
||||
|
||||
font-1 = "FontAwesome:size=9:antialias=false;2"
|
||||
font-2 = "MaterialIcons:size=9:antialias=false;3"
|
||||
font-3 = "icomoon:size=10:antialias=false;2"
|
||||
font-4 = "Ubuntu Nerd Font:size=9:antialias=false;2"
|
||||
|
||||
module-margin = 0
|
||||
padding-right = 0
|
||||
padding-left = 0
|
||||
separator = │
|
||||
|
||||
click-middle = skippy-xd --activate-window-picker
|
||||
scroll-up = pamixer -i 2
|
||||
scroll-down = pamixer -d 2
|
||||
double-click-left = python /usr/bin/networkmanager_dmenu
|
||||
width = {{.Data.bar_width}}
|
||||
height = {{.Data.bar_height}}
|
||||
border-size = {{.Data.border_all}}
|
||||
border-top-size = {{.Data.border_top}}
|
||||
border-bottom-size = {{.Data.border_bottom}}
|
||||
radius = {{.Data.bar_radius}}
|
||||
bottom = {{.Data.bar_bottom}}
|
||||
line-size = {{.Data.border_pixels}}
|
||||
font-0 = "{{.Data.bar_font0}}"
|
||||
font-1 = "FontAwesome:size=10:antialias=false;2"
|
||||
font-2 = "MaterialIcons:size=10:antialias=false;2"
|
||||
font-3 = "icomoon:size=10:antialias=false;2"
|
||||
font-4 = "Ubuntu Nerd Font:size=10:antialias=false;2"
|
||||
offset-x = 0
|
||||
offset-y = 0
|
||||
fixed-center = true
|
||||
border-color = ${colors.border}
|
||||
background = ${colors.background}
|
||||
foreground = ${colors.foreground}
|
||||
module-margin = 0
|
||||
padding-right = 0
|
||||
padding-left = 0
|
||||
separator = │
|
||||
scroll-up = pamixer -i 2
|
||||
scroll-down = pamixer -d 2
|
||||
click-middle = skippy-xd --activate-window-picker
|
||||
double-click-left = networkmanager_dmenu
|
||||
double-click-middle = skippy-xd --activate-window-picker
|
||||
double-click-right = pavucontrol &
|
||||
double-click-right = pavucontrol &
|
||||
|
@ -2,20 +2,32 @@
|
||||
; Modules
|
||||
;=====================================================
|
||||
|
||||
;;;;;;;;;;;;;;;
|
||||
;; Jgmenu ;;
|
||||
;;;;;;;;;;;;;;;
|
||||
[module/jgmenu]
|
||||
type = custom/script
|
||||
label = %output%
|
||||
label-padding = 1
|
||||
interval = 10
|
||||
exec = echo "MENU"
|
||||
click-left = jgmenu_run lx
|
||||
click-right = exo-open $HOME/.config/jgmenu/jgmenurc
|
||||
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; GoRice Config UI ;;
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
[module/config]
|
||||
type = custom/script
|
||||
format-prefix = " "
|
||||
interval = 5
|
||||
exec = grep "current" $HOME/.gorice/templates/i3/data.json | cut -d '"' -f22 | cut -d . -f1 | cut -d / -f2
|
||||
label = %output%
|
||||
type = custom/script
|
||||
interval = 5
|
||||
label = %output%
|
||||
format-padding = 2
|
||||
format = <label>
|
||||
click-left = gorice dump i3 ~/.gorice/output.yaml.template; config_ui &
|
||||
click-right = termite "--exec=gorice edit i3/current" &
|
||||
|
||||
format = <label>
|
||||
click-right = termite "--exec=gorice edit i3/current" &
|
||||
click-left = gorice dump i3 ~/.gorice/output.yaml.template; config_ui &
|
||||
exec = echo "GO"
|
||||
;exec = grep "current" data.json | cut -d '"' -f22 | cut -d . -f1 | cut -d / -f2 | tr '[:lower:]' '[:upper:]'
|
||||
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
@ -23,7 +35,7 @@ click-right = termite "--exec=gorice edit i3/current" &
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
[module/workspaces]
|
||||
type = internal/xworkspaces
|
||||
pin-workspaces = true
|
||||
pin-workspaces = false
|
||||
enable-click = true
|
||||
enable-scroll = true
|
||||
format-padding = 0
|
||||
@ -39,57 +51,48 @@ icon-8 = 9;
|
||||
icon-9 = 10;
|
||||
icon-default =
|
||||
format = <label-state>
|
||||
label-active = " %icon% %name% "
|
||||
label-active = %icon% %name%
|
||||
label-active-padding = 1
|
||||
label-occupied = %icon% %name%
|
||||
label-occupied-padding = 1
|
||||
label-urgent = %icon% %name%
|
||||
label-urgent-padding = 1
|
||||
label-empty = %icon% %name%
|
||||
label-empty-padding = 1
|
||||
label-active-foreground = ${colors.blue}
|
||||
label-active-underline = ${colors.blue}
|
||||
label-occupied = " %icon% %name% "
|
||||
label-occupied-underline = ${colors.blue}
|
||||
label-urgent = " %icon% %name% "
|
||||
label-urgent-foreground = ${colors.urgent}
|
||||
label-urgent-underline = ${colors.urgent}
|
||||
label-empty = " %icon% %name% "
|
||||
label-empty-foreground = ${colors.foreground}
|
||||
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;
|
||||
;; i3 Workspaces ;;
|
||||
;;;;;;;;;;;;;;;;;;;
|
||||
[module/i3-workspaces]
|
||||
type = internal/i3
|
||||
pin-workspaces = true
|
||||
strip-wsnumbers = true
|
||||
index-sort = true
|
||||
enable-click = true
|
||||
enable-scroll = false
|
||||
wrapping-scroll = false
|
||||
reverse-scroll = false
|
||||
fuzzy-match = true
|
||||
ws-icon-0 = 1;
|
||||
ws-icon-1 = 2;
|
||||
ws-icon-2 = 3;
|
||||
ws-icon-3 = 4;
|
||||
ws-icon-4 = 5;
|
||||
ws-icon-5 = 6;
|
||||
ws-icon-6 = 7;
|
||||
ws-icon-7 = 8;
|
||||
ws-icon-8 = 9;
|
||||
ws-icon-9 = 10;
|
||||
[module/workspaces]
|
||||
type = internal/i3
|
||||
pin-workspaces = true
|
||||
strip-wsnumbers = false
|
||||
index-sort = true
|
||||
enable-click = true
|
||||
fuzzy-match = true
|
||||
ws-icon-default =
|
||||
format = <label-state><label-mode>
|
||||
label-mode = %mode%
|
||||
label-mode-padding = 2
|
||||
label-mode-underline = ${colors.urgent}
|
||||
label-focused = "%name% %icon%"
|
||||
label-focused-underline = ${colors.blue}
|
||||
label-focused-padding = 1
|
||||
label-unfocused = "%name% %icon%"
|
||||
label-unfocused-padding = 1
|
||||
label-visible = "%name% %icon%"
|
||||
label-visible-underline = ${colors.blue}
|
||||
label-visible-padding = 1
|
||||
label-urgent = "%name% %icon%"
|
||||
label-urgent-underline = ${colors.urgent}
|
||||
label-urgent-padding = 1
|
||||
format = <label-state><label-mode>
|
||||
label-mode = %mode%
|
||||
label-mode-padding = 2
|
||||
label-focused = %name%
|
||||
label-focused-padding = 2
|
||||
label-unfocused = %name%
|
||||
label-unfocused-padding = 2
|
||||
label-visible = %name%
|
||||
label-visible-padding = 2
|
||||
label-urgent = %name%
|
||||
label-urgent-padding = 2
|
||||
label-mode-underline = ${colors.urgent}
|
||||
label-focused-underline = ${colors.trim}
|
||||
label-visible-underline = ${colors.trim}
|
||||
label-urgent-underline = ${colors.urgent}
|
||||
|
||||
|
||||
|
||||
@ -99,11 +102,11 @@ label-urgent-padding = 1
|
||||
[module/bspwm]
|
||||
type = internal/bspwm
|
||||
pin-workspaces = true
|
||||
inline-mode = false
|
||||
enable-click = true
|
||||
enable-scroll = false
|
||||
inline-mode = false
|
||||
enable-click = true
|
||||
enable-scroll = false
|
||||
reverse-scroll = false
|
||||
fuzzy-match = false
|
||||
fuzzy-match = false
|
||||
; ws-icon-[0-9]+ = label;icon
|
||||
; Note that the label needs to correspond with the bspwm workspace name
|
||||
ws-icon-0 = I;
|
||||
@ -120,36 +123,36 @@ ws-icon-9 = X;
|
||||
|
||||
format = <label-state> <label-mode>
|
||||
label-monitor = %name%
|
||||
label-dimmed-foreground = ${colors.purple}
|
||||
label-dimmed-underline = ${colors.purple}
|
||||
label-dimmed-focused-background = ${colors.purple}
|
||||
label-mode-padding = 1
|
||||
label-focused = %icon% %name%
|
||||
label-focused-foreground = ${colors.blue}
|
||||
label-focused-underline = ${colors.blue}
|
||||
label-focused-padding = 1
|
||||
label-occupied = %icon% %name%
|
||||
label-occupied-underline = ${colors.purple}
|
||||
label-occupied-padding = 1
|
||||
label-urgent = %icon% %name%
|
||||
label-urgent-foreground = ${colors.urgent}
|
||||
label-urgent-underline = ${colors.urgent}
|
||||
label-urgent-padding = 1
|
||||
label-empty = %icon% %name%
|
||||
label-empty-padding = 1
|
||||
label-dimmed-foreground = ${colors.purple}
|
||||
label-dimmed-underline = ${colors.purple}
|
||||
label-dimmed-focused-background = ${colors.purple}
|
||||
label-focused-foreground = ${colors.blue}
|
||||
label-focused-underline = ${colors.blue}
|
||||
label-occupied-underline = ${colors.purple}
|
||||
label-urgent-foreground = ${colors.urgent}
|
||||
label-urgent-underline = ${colors.urgent}
|
||||
|
||||
; The following labels will be used to indicate the layout/mode
|
||||
; for the focused workspace. Requires <label-mode>
|
||||
label-monocle =
|
||||
label-tiled =
|
||||
label-fullscreen =
|
||||
label-floating =
|
||||
label-monocle =
|
||||
label-tiled =
|
||||
label-fullscreen =
|
||||
label-floating =
|
||||
label-pseudotiled = P
|
||||
label-locked =
|
||||
label-locked-foreground = ${colors.yellow}
|
||||
label-sticky =
|
||||
label-sticky-foreground = ${colors.purple}
|
||||
label-private =
|
||||
label-locked =
|
||||
label-sticky =
|
||||
label-private =
|
||||
label-sticky-foreground = ${colors.purple}
|
||||
label-locked-foreground = ${colors.yellow}
|
||||
label-private-foreground = ${colors.urgent}
|
||||
|
||||
|
||||
@ -159,10 +162,9 @@ label-private-foreground = ${colors.urgent}
|
||||
;;;;;;;;;;;;;
|
||||
[module/network]
|
||||
type = custom/script
|
||||
exec = $HOME/.config/polybar/scripts/network.sh
|
||||
exec = check-network
|
||||
click-left = networkmanager_dmenu &
|
||||
click-right = networkmanager_dmenu &
|
||||
interval = 1
|
||||
label-padding = 1
|
||||
tail = true
|
||||
|
||||
@ -172,10 +174,12 @@ tail = true
|
||||
;;;;;;;;;;;;;;;;;;;
|
||||
[module/window_switch]
|
||||
type = custom/script
|
||||
interval = 5
|
||||
label = "%{A1:skippy-xd:} %{A3:skippy-xd:} %output% %{A} %{A}"
|
||||
exec = echo ""
|
||||
format = <label>
|
||||
interval = 5
|
||||
label = %output%
|
||||
click-left = skippy-xd
|
||||
click-right = skippy-xd
|
||||
exec = echo " "
|
||||
format = <label>
|
||||
|
||||
|
||||
;;;;;;;;;
|
||||
@ -187,17 +191,17 @@ interval = 1
|
||||
format = <label><ramp-coreload>
|
||||
format-padding = 1
|
||||
label = %{A1:termite --exec=htop & disown:} %percentage%% %{A}
|
||||
ramp-coreload-0 = %{T1}▂%{T-}
|
||||
ramp-coreload-0 = ▂
|
||||
ramp-coreload-1 = ▃
|
||||
ramp-coreload-2 = ▄
|
||||
ramp-coreload-3 = ▅
|
||||
ramp-coreload-4 = ▆
|
||||
ramp-coreload-5 = ▇
|
||||
ramp-coreload-0-foreground = ${colors.foreground}
|
||||
ramp-coreload-1 = %{T1}▃%{T-}
|
||||
ramp-coreload-1-foreground = ${colors.foreground}
|
||||
ramp-coreload-2 = %{T1}▄%{T-}
|
||||
ramp-coreload-2-foreground = ${colors.yellow}
|
||||
ramp-coreload-3 = %{T1}▅%{T-}
|
||||
ramp-coreload-3-foreground = ${colors.yellow}
|
||||
ramp-coreload-4 = %{T1}▆%{T-}
|
||||
ramp-coreload-4-foreground = ${colors.urgent}
|
||||
ramp-coreload-5 = %{T1}▇%{T-}
|
||||
ramp-coreload-5-foreground = ${colors.urgent}
|
||||
|
||||
;;;;;;;;;
|
||||
@ -206,7 +210,7 @@ ramp-coreload-5-foreground = ${colors.urgent}
|
||||
[module/memory]
|
||||
type = internal/memory
|
||||
interval = 3
|
||||
format = <label>
|
||||
format = <label>
|
||||
label-padding = 1
|
||||
label = %{A1:termite --exec=htop & disown:} %percentage_used%%%{A}
|
||||
|
||||
@ -216,10 +220,9 @@ label = %{A1:termite --exec=htop & disown:} %percentage_used%%%{A}
|
||||
;;;;;;;;;
|
||||
[module/pkg]
|
||||
type = custom/script
|
||||
exec = $HOME/.config/polybar/scripts/pkg.sh
|
||||
exec = check-updates
|
||||
exec-if = "ping -q -w 2 -c 1 176.34.135.167 > /dev/null"
|
||||
label = %{A1:termite --exec=pacli & disown:} %{A3:termite --exec=pacli & disown:}%output%%{A} %{A}
|
||||
interval = 10
|
||||
tail = true
|
||||
|
||||
|
||||
@ -409,11 +412,11 @@ label-connected = %local_ip%
|
||||
[module/redshift]
|
||||
type = custom/script
|
||||
interval = 5
|
||||
exec = $HOME/.config/polybar/scripts/redshift
|
||||
exec = toggle-redshift
|
||||
label = %output%
|
||||
tail = true
|
||||
click-left = $HOME/.config/polybar/scripts/redshift toggle
|
||||
click-right = $HOME/.config/polybar/scripts/redshift toggle
|
||||
click-left = toggle-redshift --toggle
|
||||
click-right = toggle-redshift --toggle
|
||||
|
||||
|
||||
;;;;;;;;;;;;
|
||||
|
@ -1,10 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
START="al-compositor --start"
|
||||
STOP="al-compositor --stop"
|
||||
|
||||
if (pgrep -x "compton" > /dev/null); then
|
||||
$STOP
|
||||
else
|
||||
$START
|
||||
fi
|
@ -1,11 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
#The icon that would change color
|
||||
icon=" "
|
||||
|
||||
if pgrep -x "compton" > /dev/null
|
||||
then
|
||||
echo "$icon"
|
||||
else
|
||||
echo "%{F#484852}$icon"
|
||||
fi
|
@ -1,7 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
killall -q polybar
|
||||
|
||||
while pgrep -u $UID -x polybar >/dev/null; do sleep 0.5; done
|
||||
|
||||
echo "Bars stopped..."
|
@ -1,44 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# config location
|
||||
CONF_PATH=$HOME/.config/polybar
|
||||
|
||||
# Check WM
|
||||
cur_wm=$(wmctrl -m | grep Name | cut -d " " -f2)
|
||||
|
||||
if [[ $1 == --reload ]]; then
|
||||
if ! [[ $cur_wm == i3 ]]; then
|
||||
openbox --restart
|
||||
al-compositor --restart
|
||||
al-tint2restart
|
||||
else
|
||||
echo -e "WARN: Option [--reload] not meant for i3..\n\nUse [Super]+[Shift]+r to reload i3\n"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Terminate already running bar instances
|
||||
killall -q polybar
|
||||
|
||||
if pgrep -x "tint2" >/dev/null; then
|
||||
echo "Tint is running, not launching bars"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Wait until the processes have been shut down
|
||||
while pgrep -u $UID -x polybar >/dev/null; do sleep 0.5; done
|
||||
|
||||
|
||||
echo "WM is $cur_wm... Launching appropriate bars"
|
||||
|
||||
if [[ $cur_wm == i3 ]]; then # if i3 launch the i3-bar
|
||||
polybar -r --config=$CONF_PATH/config i3-bar &
|
||||
|
||||
elif [[ $cur_wm == bspwm ]]; then # if bspwm launch the bsp-bar
|
||||
polybar -r --config=$CONF_PATH/config bsp-bar &
|
||||
|
||||
else # otherwise we assume openbox
|
||||
polybar -r --config=$CONF_PATH/config openbox-bar &
|
||||
|
||||
fi
|
||||
|
||||
echo "Bars launched..."
|
@ -1,13 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
online=$(ip addr | grep "state UP" | cut -d ":" -f2)
|
||||
|
||||
#connected=""
|
||||
#offline=""
|
||||
connected=""
|
||||
offline=""
|
||||
if [[ "$online" ]]; then
|
||||
echo ${connected}
|
||||
else
|
||||
echo ${offline}; sleep 0.6; echo ${connected}
|
||||
fi
|
@ -1,11 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
pac=$(checkupdates | wc -l)
|
||||
|
||||
if [[ "$pac" > "1" ]]; then
|
||||
echo %{F#6BA4E7}$pac %{F#6BA4E7}
|
||||
|
||||
else
|
||||
echo
|
||||
|
||||
fi
|
@ -1,36 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
#Usage : redshift.sh [toggle]
|
||||
|
||||
START='redshift'
|
||||
STOP="killall redshift"
|
||||
if [[ "$@" = *toggle* ]]; then
|
||||
if pgrep redshift > /dev/null
|
||||
then
|
||||
$STOP
|
||||
else
|
||||
$START &
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
# Specifying the icon(s) in the script
|
||||
# This allows us to change its appearance conditionally
|
||||
icon=""
|
||||
|
||||
pgrep -x redshift &> /dev/null
|
||||
if [[ $? -eq 0 ]]; then
|
||||
temp=$(redshift -p 2>/dev/null | grep temp | cut -d' ' -f3)
|
||||
temp=${temp//K/}
|
||||
fi
|
||||
|
||||
# OPTIONAL: Append ' ${temp}K' after $icon
|
||||
if [[ -z $temp ]]; then
|
||||
echo " $icon " # Greyed out (not running)
|
||||
elif [[ $temp -ge 5000 ]]; then
|
||||
echo "%{F#6BA4E7} $icon " # Blue
|
||||
elif [[ $temp -ge 4000 ]]; then
|
||||
echo "%{F#F9F1AF} $icon " # Yellow
|
||||
else
|
||||
echo "%{F#E7816B} $icon " # Orange
|
||||
fi
|
@ -1,32 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
TRASH_DIRECTORY="${BLOCK_INSTANCE}"
|
||||
|
||||
if [[ "${TRASH_DIRECTORY}" = "" ]]; then
|
||||
TRASH_DIRECTORY="${XDG_DATA_HOME:-${HOME}/.local/share}/Trash"
|
||||
fi
|
||||
|
||||
# Left click
|
||||
if [[ "${BLOCK_BUTTON}" -eq 1 ]]; then
|
||||
xdg-open "${TRASH_DIRECTORY}/files"
|
||||
# Right click
|
||||
elif [[ "${BLOCK_BUTTON}" -eq 3 ]]; then
|
||||
# Delete all files permanently (unlink them)
|
||||
rm -r "${TRASH_DIRECTORY}/files"
|
||||
rm -r "${TRASH_DIRECTORY}/info"
|
||||
# Create new directory
|
||||
mkdir "${TRASH_DIRECTORY}/files"
|
||||
mkdir "${TRASH_DIRECTORY}/info"
|
||||
fi
|
||||
|
||||
TRASH_COUNT=$(ls -U -1 "${TRASH_DIRECTORY}/files" | wc -l)
|
||||
|
||||
URGENT_VALUE=30
|
||||
|
||||
echo "${TRASH_COUNT}"
|
||||
echo "${TRASH_COUNT}"
|
||||
echo ""
|
||||
|
||||
if [[ "${TRASH_COUNT}" -ge "${URGENT_VALUE}" ]]; then
|
||||
exit 31
|
||||
fi
|
Reference in New Issue
Block a user