Add polybar config

This commit is contained in:
Tanguy Herbron 2020-07-05 00:48:06 +02:00
parent 0a8b6af948
commit d232f91ee0
19 changed files with 2736 additions and 0 deletions

361
.config/polybar/config Normal file
View File

@ -0,0 +1,361 @@
==========================================================
;
;
; ██████╗ ██████╗ ██╗ ██╗ ██╗██████╗ █████╗ ██████╗
; ██╔══██╗██╔═══██╗██║ ╚██╗ ██╔╝██╔══██╗██╔══██╗██╔══██╗
; ██████╔╝██║ ██║██║ ╚████╔╝ ██████╔╝███████║██████╔╝
; ██╔═══╝ ██║ ██║██║ ╚██╔╝ ██╔══██╗██╔══██║██╔══██╗
; ██║ ╚██████╔╝███████╗██║ ██████╔╝██║ ██║██║ ██║
; ╚═╝ ╚═════╝ ╚══════╝╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝
;
;
; To learn more about how to configure Polybar
; go to https://github.com/polybar/polybar
;
; The README contains a lot of information
;
;==========================================================
[colors]
background = ${xrdb:background:#000000}
color1 = ${xrdb:color1:#ff5555}
color2 = ${xrdb:color4:#ff5555}
color3 = ${xrdb:color7:#ff5555}
; _
; | |__ __ _ _ __ ___
; | '_ \ / _` | '__/ __|
; | |_) | (_| | | \__ \
; |_.__/ \__,_|_| |___/
[bar/bar]
enable-ipc=true
height = 35
width = 100%
bottom = true
background = ${colors.background}
;background = ${colors.primary}
foreground = ${colors.color1}
line-size = 2
font-0=Iosevka:size=10;3
font-1=Font Awesome 5 Free Solid:size=8;3
font-2=Font Awesome 5 Free Regular:size=8;3
font-3=Font Awesome 5 Brands:size=8;3
font-4=font\-logos:size=11;3
font-5=IPAGothic:size=11:antialias=true;3
modules-left = launcher i3
; Spotify (scripts at github.com/dietervanhoof/polybar-spotify-controls)
;modules-center = previous playpause next spotify
; Mpd
modules-center = mpd
modules-right = cpu memory time pulseaudio power
scroll-up = i3wm-wsnext
scroll-down = i3wm-wsprev
wm-restack = i3
override-redirect = false
; _ _
; _ __ ___ ___ __| |_ _| | ___ ___
; | '_ ` _ \ / _ \ / _` | | | | |/ _ \/ __|
; | | | | | | (_) | (_| | |_| | | __/\__ \
; |_| |_| |_|\___/ \__,_|\__,_|_|\___||___/
[module/launcher]
type=custom/text
content = 
content-font=5
content-foreground=${colors.color1}
content-padding=2
click-left=launcher
;The script above is to be found here : https://github.com/ngynLk/scripts
[module/xwindow]
type = internal/xwindow
label = %title:0:40:...%
label-color1 = ${colors.color1}
label-background = ${colors.background}
label-padding = 2
[module/i3]
type = internal/i3
format = <label-state> <label-mode>
format-foreground = ${colors.color1}
format-background = ${colors.background}
index-sort = true
enable-click = true
reverse-scroll = false
label-focused = %index%
label-focused-overline = ${colors.color1}
label-focused-padding = 2
label-unfocused = %index%
label-unfocused-padding = 2
label-urgent = 
label-urgent-padding = 2
label-urgent-foreground = ${colors.background}
label-urgent-background = ${colors.color1}
label-urgent-overline = ${colors.background}
label-urgent-font = 2
;ws-icon-0 = 1;
;ws-icon-1 = 2;
;ws-icon-2 = 3;
;ws-icon-9 = 10;
;ws-icon-default = 
[module/power]
type = custom/text
content = 
content-foreground = ${colors.color3}
click-left = powermenu
;The script above is to be found here : https://github.com/ngynLk/scripts
content-padding = 2
[module/mpd]
type = internal/mpd
host = 127.0.0.1
port = 6600
format-online = <icon-prev> <toggle> <icon-next> <label-song> <label-time>
format-online-padding = 2
format-online-foreground = ${colors.color2}
format-online-background = ${colors.background}
label-song-foreground = ${colors.color2}
label-song-background = ${colors.background}
label-song-padding = 2
label-time-foreground = ${colors.color2}
label-time-background = ${colors.background}
label-time-padding = 1
format-offline = <label-offline>
label-offline =  offline
format-offline-padding = 2
format-offline-foreground = ${colors.color2}
format-offline-background = ${colors.background}
bar-progress-width = 35
bar-progress-indicator = |
bar-progress-fill = ─
bar-progress-empty = ─
icon-prev = 
icon-stop = 
icon-play = 
icon-pause = 
icon-next = 
;icon-prev = 
;icon-stop = 
;icon-play = 
;icon-pause = 
;icon-next = 
label-song-maxlen = 75
label-song-ellipsis = true
[module/cpu]
type = internal/cpu
interval = 2
format-prefix = " "
format-padding = 2
format-foreground = ${colors.color3}
label = %percentage%%
[module/memory]
type = internal/memory
interval = 2
format-padding = 2
format-prefix = " "
format-foreground = ${colors.color3}
label = %percentage_used%%
[module/wlan]
type = internal/network
interface = wlx0013eff2094e
interval = 3.0
format-connected =  <label-connected>
label-connected = %essid%
label-connected-color1 = ${colors.color1}
;format-disconnected =
format-disconnected = <label-disconnected>
label-disconnected = %ifname% disconnected
label-disconnected-color1 = ${colors.color1}
ramp-signal-0 = 
ramp-signal-1 = 
ramp-signal-2 = 
ramp-signal-3 = 
ramp-signal-4 = 
ramp-signal-color1 = ${colors.color1}
[module/eth]
type = internal/network
interface = eno1
interval = 3.0
format-connected-prefix = " "
format-connected-prefix-color1 = ${colors.color1-alt}
label-connected = %local_ip%
format-disconnected =
;format-disconnected = <label-disconnected>
;format-disconnected-underline = ${self.format-connected-underline}
;label-disconnected = %ifname% disconnected
;label-disconnected-color1 = ${colors.color1-alt}
[module/time]
type = internal/date
interval = 10
format-margin = 0
time = "%H:%M"
date = "%d %b"
label =  %date%, %time%
label-foreground = ${colors.color3}
label-background = ${colors.background}
label-padding = 2
[module/pulseaudio]
type = internal/pulseaudio
format-margin = 1
format-volume = <ramp-volume><label-volume>
label-volume = %percentage:3:3%%
format-volume-foreground = ${colors.color3}
format-volume-background = ${colors.background}
format-volume-padding = 2
use-ui-max = false
interval = 5
ramp-volume-0 = ""
ramp-volume-1 = ""
ramp-volume-2 = ""
label-muted = ""
label-muted-background = ${colors.background}
label-muted-foreground = ${colors.color3}
label-muted-padding = 2
[module/temperature]
type = internal/temperature
thermal-zone = 0
warn-temperature = 60
format = <label>
format-warn = <ramp> <label-warn>
label = %temperature-c%
label-warn = %temperature-c%
label-warn-color1 = ${colors.secondary}
ramp-0 = 
ramp-1 = 
ramp-2 = 
[module/powermenu]
type = custom/menu
expand-right = true
format-spacing = 1
format-margin = 0
format-background = ${colors.background}
format-foreground = ${colors.color3}
format-padding = 2
label-open = 
label-close = 
label-separator = |
; reboot
menu-0-1 = 
menu-0-1-exec = menu-open-2
; poweroff
menu-0-2 = 
menu-0-2-exec = menu-open-3
; logout
menu-0-0 = 
menu-0-0-exec = menu-open-1
menu-2-0 = 
menu-2-0-exec = reboot
menu-3-0 = 
menu-3-0-exec = poweroff
menu-1-0 = 
menu-1-0-exec = i3-msg exit || openbox --exit
;Spotify modules
[module/previous]
type = custom/script
format-font = 2
format-padding = 2
format-foreground = ${colors.color2}
exec = echo ""
exec-if = "pgrep spotify"
click-left = "dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Previous"
[module/next]
type = custom/script
format-font = 2
format-padding = 2
format-foreground = ${colors.color2}
exec = echo ""
exec-if = "pgrep spotify"
click-left = "dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Next"
[module/playpause]
type = custom/ipc
format-font = 2
format-padding = 0
format-foreground = ${colors.color2}
; Default
hook-0 = echo ""
; Playing
hook-1 = echo ""
; Paused
hook-2 = echo ""
initial = 2
click-left = "dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.PlayPause"
[module/spotify]
type = custom/ipc
format-foreground = ${colors.color2}
; Default
hook-0 = echo ""
; Playing/paused show song name and artist
hook-1 = python3 ~/.scripts/spotify/spotify_status.py
initial = 2
click-left = i3-msg '[class="Spotify"] focus'
[settings]
screenchange-reload = true
;compositing-background = xor
;compositing-background = screen
;compositing-foreground = source
;compositing-border = over
;pseudo-transparency = true
[global/wm]
margin-top = 0
margin-bottom = 0
; vim:ft=dosini

View File

@ -0,0 +1,426 @@
;==========================================================
;
;
; ██████╗ ██████╗ ██╗ ██╗ ██╗██████╗ █████╗ ██████╗
; ██╔══██╗██╔═══██╗██║ ╚██╗ ██╔╝██╔══██╗██╔══██╗██╔══██╗
; ██████╔╝██║ ██║██║ ╚████╔╝ ██████╔╝███████║██████╔╝
; ██╔═══╝ ██║ ██║██║ ╚██╔╝ ██╔══██╗██╔══██║██╔══██╗
; ██║ ╚██████╔╝███████╗██║ ██████╔╝██║ ██║██║ ██║
; ╚═╝ ╚═════╝ ╚══════╝╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝
;
;
; To learn more about how to configure Polybar
; go to https://github.com/polybar/polybar
;
; The README contains a lot of information
;
;==========================================================
[colors]
;background = ${xrdb:color0:#222}
background = #222
background-alt = #444
;foreground = ${xrdb:color7:#222}
foreground = #dfdfdf
foreground-alt = #555
primary = #ffb52a
secondary = #e60053
alert = #bd2c40
[bar/example]
;monitor = ${env:MONITOR:HDMI-1}
width = 100%
height = 27
;offset-x = 1%
;offset-y = 1%
radius = 6.0
fixed-center = false
background = ${colors.background}
foreground = ${colors.foreground}
line-size = 3
line-color = #f00
border-size = 4
border-color = #00000000
padding-left = 0
padding-right = 2
module-margin-left = 1
module-margin-right = 2
font-0 = fixed:pixelsize=10;1
font-1 = unifont:fontformat=truetype:size=8:antialias=false;0
font-2 = siji:pixelsize=10;1
modules-left = bspwm i3
modules-center =
modules-right = filesystem xbacklight memory cpu wlan eth battery temperature date powermenu
tray-position = right
tray-padding = 2
;tray-background = #0063ff
;wm-restack = bspwm
;wm-restack = i3
;override-redirect = true
;scroll-up = bspwm-desknext
;scroll-down = bspwm-deskprev
;scroll-up = i3wm-wsnext
;scroll-down = i3wm-wsprev
cursor-click = pointer
cursor-scroll = ns-resize
[module/xwindow]
type = internal/xwindow
label = %title:0:30:...%
[module/xkeyboard]
type = internal/xkeyboard
blacklist-0 = num lock
format-prefix = " "
format-prefix-foreground = ${colors.foreground-alt}
format-prefix-underline = ${colors.secondary}
label-layout = %layout%
label-layout-underline = ${colors.secondary}
label-indicator-padding = 2
label-indicator-margin = 1
label-indicator-background = ${colors.secondary}
label-indicator-underline = ${colors.secondary}
[module/filesystem]
type = internal/fs
interval = 25
mount-0 = /
label-mounted = %{F#0a81f5}%mountpoint%%{F-}: %percentage_used%%
label-unmounted = %mountpoint% not mounted
label-unmounted-foreground = ${colors.foreground-alt}
[module/bspwm]
type = internal/bspwm
label-focused = %index%
label-focused-background = ${colors.background-alt}
label-focused-underline= ${colors.primary}
label-focused-padding = 2
label-occupied = %index%
label-occupied-padding = 2
label-urgent = %index%!
label-urgent-background = ${colors.alert}
label-urgent-padding = 2
label-empty = %index%
label-empty-foreground = ${colors.foreground-alt}
label-empty-padding = 2
; Separator in between workspaces
; label-separator = |
[module/i3]
type = internal/i3
format = <label-state> <label-mode>
index-sort = true
wrapping-scroll = false
; Only show workspaces on the same output as the bar
;pin-workspaces = true
label-mode-padding = 2
label-mode-foreground = #000
label-mode-background = ${colors.primary}
; focused = Active workspace on focused monitor
label-focused = %index%
label-focused-background = ${colors.background-alt}
label-focused-underline= ${colors.primary}
label-focused-padding = 2
; unfocused = Inactive workspace on any monitor
label-unfocused = %index%
label-unfocused-padding = 2
; visible = Active workspace on unfocused monitor
label-visible = %index%
label-visible-background = ${self.label-focused-background}
label-visible-underline = ${self.label-focused-underline}
label-visible-padding = ${self.label-focused-padding}
; urgent = Workspace with urgency hint set
label-urgent = %index%
label-urgent-background = ${colors.alert}
label-urgent-padding = 2
; Separator in between workspaces
; label-separator = |
[module/mpd]
type = internal/mpd
format-online = <label-song> <icon-prev> <icon-stop> <toggle> <icon-next>
icon-prev = 
icon-stop = 
icon-play = 
icon-pause = 
icon-next = 
label-song-maxlen = 25
label-song-ellipsis = true
[module/xbacklight]
type = internal/xbacklight
format = <label> <bar>
label = BL
bar-width = 10
bar-indicator = |
bar-indicator-foreground = #fff
bar-indicator-font = 2
bar-fill = ─
bar-fill-font = 2
bar-fill-foreground = #9f78e1
bar-empty = ─
bar-empty-font = 2
bar-empty-foreground = ${colors.foreground-alt}
[module/backlight-acpi]
inherit = module/xbacklight
type = internal/backlight
card = intel_backlight
[module/cpu]
type = internal/cpu
interval = 2
format-prefix = " "
format-prefix-foreground = ${colors.foreground-alt}
format-underline = #f90000
label = %percentage:2%%
[module/memory]
type = internal/memory
interval = 2
format-prefix = " "
format-prefix-foreground = ${colors.foreground-alt}
format-underline = #4bffdc
label = %percentage_used%%
[module/wlan]
type = internal/network
interface = net1
interval = 3.0
format-connected = <ramp-signal> <label-connected>
format-connected-underline = #9f78e1
label-connected = %essid%
format-disconnected =
;format-disconnected = <label-disconnected>
;format-disconnected-underline = ${self.format-connected-underline}
;label-disconnected = %ifname% disconnected
;label-disconnected-foreground = ${colors.foreground-alt}
ramp-signal-0 = 
ramp-signal-1 = 
ramp-signal-2 = 
ramp-signal-3 = 
ramp-signal-4 = 
ramp-signal-foreground = ${colors.foreground-alt}
[module/eth]
type = internal/network
interface = enp0s3
interval = 3.0
format-connected-underline = #55aa55
format-connected-prefix = " "
format-connected-prefix-foreground = ${colors.foreground-alt}
label-connected = %local_ip%
format-disconnected =
;format-disconnected = <label-disconnected>
;format-disconnected-underline = ${self.format-connected-underline}
;label-disconnected = %ifname% disconnected
;label-disconnected-foreground = ${colors.foreground-alt}
[module/date]
type = internal/date
interval = 5
date =
date-alt = " %Y-%m-%d"
time = %H:%M
time-alt = %H:%M:%S
format-prefix = 
format-prefix-foreground = ${colors.foreground-alt}
format-underline = #0a6cf5
label = %date% %time%
[module/pulseaudio]
type = internal/pulseaudio
format-volume = <label-volume> <bar-volume>
label-volume = VOL %percentage%%
label-volume-foreground = ${root.foreground}
label-muted = 🔇 muted
label-muted-foreground = #666
bar-volume-width = 10
bar-volume-foreground-0 = #55aa55
bar-volume-foreground-1 = #55aa55
bar-volume-foreground-2 = #55aa55
bar-volume-foreground-3 = #55aa55
bar-volume-foreground-4 = #55aa55
bar-volume-foreground-5 = #f5a70a
bar-volume-foreground-6 = #ff5555
bar-volume-gradient = false
bar-volume-indicator = |
bar-volume-indicator-font = 2
bar-volume-fill = ─
bar-volume-fill-font = 2
bar-volume-empty = ─
bar-volume-empty-font = 2
bar-volume-empty-foreground = ${colors.foreground-alt}
[module/alsa]
type = internal/alsa
format-volume = <label-volume> <bar-volume>
label-volume = VOL
label-volume-foreground = ${root.foreground}
format-muted-prefix = " "
format-muted-foreground = ${colors.foreground-alt}
label-muted = sound muted
bar-volume-width = 10
bar-volume-foreground-0 = #55aa55
bar-volume-foreground-1 = #55aa55
bar-volume-foreground-2 = #55aa55
bar-volume-foreground-3 = #55aa55
bar-volume-foreground-4 = #55aa55
bar-volume-foreground-5 = #f5a70a
bar-volume-foreground-6 = #ff5555
bar-volume-gradient = false
bar-volume-indicator = |
bar-volume-indicator-font = 2
bar-volume-fill = ─
bar-volume-fill-font = 2
bar-volume-empty = ─
bar-volume-empty-font = 2
bar-volume-empty-foreground = ${colors.foreground-alt}
[module/battery]
type = internal/battery
battery = BAT0
adapter = AC
full-at = 98
format-charging = <animation-charging> <label-charging>
format-charging-underline = #ffb52a
format-discharging = <animation-discharging> <label-discharging>
format-discharging-underline = ${self.format-charging-underline}
format-full-prefix = " "
format-full-prefix-foreground = ${colors.foreground-alt}
format-full-underline = ${self.format-charging-underline}
ramp-capacity-0 = 
ramp-capacity-1 = 
ramp-capacity-2 = 
ramp-capacity-foreground = ${colors.foreground-alt}
animation-charging-0 = 
animation-charging-1 = 
animation-charging-2 = 
animation-charging-foreground = ${colors.foreground-alt}
animation-charging-framerate = 750
animation-discharging-0 = 
animation-discharging-1 = 
animation-discharging-2 = 
animation-discharging-foreground = ${colors.foreground-alt}
animation-discharging-framerate = 750
[module/temperature]
type = internal/temperature
thermal-zone = 0
warn-temperature = 60
format = <ramp> <label>
format-underline = #f50a4d
format-warn = <ramp> <label-warn>
format-warn-underline = ${self.format-underline}
label = %temperature-c%
label-warn = %temperature-c%
label-warn-foreground = ${colors.secondary}
ramp-0 = 
ramp-1 = 
ramp-2 = 
ramp-foreground = ${colors.foreground-alt}
[module/powermenu]
type = custom/menu
expand-right = true
format-spacing = 1
label-open = 
label-open-foreground = ${colors.secondary}
label-close =  cancel
label-close-foreground = ${colors.secondary}
label-separator = |
label-separator-foreground = ${colors.foreground-alt}
menu-0-0 = reboot
menu-0-0-exec = menu-open-1
menu-0-1 = power off
menu-0-1-exec = menu-open-2
menu-1-0 = cancel
menu-1-0-exec = menu-open-0
menu-1-1 = reboot
menu-1-1-exec = sudo reboot
menu-2-0 = power off
menu-2-0-exec = sudo poweroff
menu-2-1 = cancel
menu-2-1-exec = menu-open-0
[settings]
screenchange-reload = true
;compositing-background = xor
;compositing-background = screen
;compositing-foreground = source
;compositing-border = over
;pseudo-transparency = false
[global/wm]
margin-top = 5
margin-bottom = 5
; vim:ft=dosini
; Enable IPC for quick reload
enable-ipc = true

265
.config/polybar/config.ini Normal file
View File

@ -0,0 +1,265 @@
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
;;
;; ____ __ __
;; / __ \____ / /_ __/ /_ ____ ______
;; / /_/ / __ \/ / / / / __ \/ __ `/ ___/
;; / ____/ /_/ / / /_/ / /_/ / /_/ / /
;; /_/ \____/_/\__, /_.___/\__,_/_/
;; /____/
;;
;; Created By Aditya Shakya @adi1090x
;;
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
[color]
bg = #1F1F1F
fg = #FFFFFF
fg-alt = #A9ABB0
acolor = #00897b
curgent = #e53935
coccupied = #1e88e5
## Material Colors
red = #e53935
pink = #d81b60
purple = #8e24aa
deep-purple = #5e35b1
indigo = #3949ab
blue = #1e88e5
light-blue = #039be5
cyan = #00acc1
teal = #00897b
green = #43a047
light-green = #7cb342
lime = #c0ca33
yellow = #fdd835
amber = #ffb300
orange = #fb8c00
deep-orange = #f4511e
brown = #6d4c41
grey = #757575
blue-gray = #546e7a
;==========================================================
[bar/main]
monitor =
width = 90%
height = 40
offset-x = 5%
offset-y = 2%
bottom = true
fixed-center = false
line-size = 2
background = ${color.bg}
foreground = ${color.fg}
border-size = 3
border-color = ${color.bg}
module-margin-left = 1
module-margin-right = 1
;==========================================================
font-0 = "Fantasque Sans Mono:pixelsize=12;2"
font-1 = "Material Icons:size=13;4"
;==========================================================
cursor-click = pointer
;tray-position = right
;tray-padding = 0
;tray-maxsize = 16
enable-ipc = true
scroll-up = i3wm-wsnext
scroll-down = i3wm-wsprev
;== Module Location ========================================================
modules-left = menu workspaces term files browser settings
modules-right = mpd pkg volume battery network date powermenu
;== Modules ========================================================
[module/menu]
type = custom/text
content =
;alt-icon = 
content-padding = 2
content-background = ${color.acolor}
content-foreground = ${color.fg}
click-left = $HOME/.config/polybar/scripts/menu
click-middle = $HOME/.config/polybar/scripts/menu_full
click-right = $HOME/.config/polybar/scripts/color-switch.sh
[module/workspaces]
type = internal/xworkspaces
pin-workspaces = false
enable-click = true
enable-scroll = true
format-padding = 0
icon-0 = 1;
icon-1 = 2;
icon-2 = 3;
icon-3 = 4;
;icon-4 = 5;
icon-default =
format = <label-state>
label-active = %icon%
label-occupied = %icon%
label-urgent = %icon%
label-empty = %icon%
label-occupied-padding = 2
label-empty-padding = 2
label-urgent-padding = 2
label-active-padding = 2
label-active-foreground = ${color.acolor}
label-urgent-foreground = ${color.curgent}
label-empty-foreground = ${color.fg}
label-occupied-foreground = ${color.coccupied}
label-active-underline = ${color.acolor}
label-urgent-underline = ${color.curgent}
label-occupied-underline = ${color.coccupied}
[module/term]
type = custom/text
content =
content-foreground = ${color.fg-alt}
click-left = termite &
click-middle = urxvt &
click-right = xfce4-terminal &
[module/files]
type = custom/text
content =
content-padding = 1
content-foreground = ${color.fg-alt}
click-left = thunar &
click-right = ranger &
[module/browser]
type = custom/text
content =
content-padding = 1
content-foreground = ${color.fg-alt}
click-left = chromium &
click-right = firefox &
[module/settings]
type = custom/text
content =
content-padding = 1
content-foreground = ${color.fg-alt}
click-left = xfce4-settings &
click-right = lxappearance &
;==========================================================
[module/mpd]
type = internal/mpd
;format-online = <toggle> <label-song>
format-online =  <label-song>
icon-play =
icon-pause =
label-song-maxlen = 25
label-song-ellipsis = true
;==========================================================
[module/pkg]
type = custom/script
exec = $HOME/.config/polybar/scripts/updates.sh
;exec-if = "ping -q -w 2 -c 1 176.34.135.167 > /dev/null"
;label = %{A1:termite -e "aurman -Syyu" & disown:} %{A3:termite -e "aurman -Syyu" & disown:}%output%%{A} %{A}
tail = true
[module/battery]
type = internal/battery
full-at = 99
time-format = %H:%M
battery = BAT1
adapter = AC
format-charging = <animation-charging> <label-charging>
;label-charging = %percentage%% (%time%)
label-charging = %percentage%%
format-discharging = <ramp-capacity> <label-discharging>
;label-discharging = %percentage%% (%time%)
label-discharging = %percentage%%
format-full = <label-full>
format-full-prefix = " "
ramp-capacity-0 =
ramp-capacity-1 =
ramp-capacity-2 =
ramp-capacity-3 =
ramp-capacity-4 =
ramp-capacity-0-foreground = ${color.red}
ramp-capacity-foreground = ${color.fg}
bar-capacity-width = 10
animation-charging-0 = ""
animation-charging-1 = ""
animation-charging-2 = ""
animation-charging-3 = ""
animation-charging-4 = ""
animation-charging-framerate = 750
[module/volume]
type = internal/alsa
;speaker-mixer = Speaker
;headphone-mixer = Headphone
;headphone-id = 16
;mapped = true
format-volume = <ramp-volume> <label-volume>
label-volume = %percentage%%
format-muted-prefix = " "
label-muted = MUTE
ramp-volume-0 =
ramp-volume-1 =
ramp-volume-2 =
ramp-volume-3 =
ramp-volume-4 =
ramp-volume-5 =
ramp-volume-6 =
[module/network]
type = custom/script
exec = $HOME/.config/polybar/scripts/check-network
click-left = networkmanager_dmenu &
click-right = networkmanager_dmenu &
tail = true
[module/date]
type = internal/date
interval = 30
label = %time%
time =  %H:%M %p
time-alt =  %Y-%m-%d
[module/powermenu]
type = custom/text
content =
content-padding = 2
content-background = ${color.acolor}
content-foreground = ${color.fg}
click-left = $HOME/.config/polybar/scripts/sysmenu
click-right = $HOME/.config/polybar/scripts/sysmenu
;== EOF ========================================================

Binary file not shown.

Binary file not shown.

14
.config/polybar/launch.sh Executable file
View File

@ -0,0 +1,14 @@
#!/usr/bin/env sh
config_file =
echo "test"
# Terminate already running bar instances
killall -q polybar
# Wait until the processes have been shut down
while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done
# Launch polybar
polybar -rq top_bar -c $HOME/.config/polybar/test1 &
polybar -rq bottom_bar -c $HOME/.config/polybar/test1 &

View File

@ -0,0 +1,4 @@
KERNEL=="sd*", ACTION=="add", ATTR{removable}=="1", \
RUN+="/home/ishaan/.config/polybar/scripts/system-usb-udev/system-usb-udev.sh --update"
KERNEL=="sd*", ACTION=="remove", \
RUN+="/home/ishaan/.config/polybar/scripts/system-usb-udev/system-usb-udev.sh --update"

View File

@ -0,0 +1,20 @@
#!/usr/bin/env bash
count=0
disconnected=""
wireless_connected=""
ethernet_connected=""
ID="$(ip link | awk '/state UP/ {print $2}')"
while true; do
if (ping -c 1 archlinux.org || ping -c 1 google.com || ping -c 1 bitbucket.org || ping -c 1 github.com || ping -c 1 sourceforge.net) &>/dev/null; then
if [[ $ID == e* ]]; then
echo "$ethernet_connected" ; sleep 25
else
echo "$wireless_connected" ; sleep 25
fi
else
echo "$disconnected" ; sleep 0.5
fi
done

View File

@ -0,0 +1,117 @@
#!/usr/bin/bash
#
# checkupdates: Safely print a list of pending updates.
#
# Copyright (c) 2013 Kyle Keen <keenerd@gmail.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
declare -r myname='checkupdates'
declare -r myver='1.0.0'
plain() {
(( QUIET )) && return
local mesg=$1; shift
printf "${BOLD} ${mesg}${ALL_OFF}\n" "$@" >&1
}
msg() {
(( QUIET )) && return
local mesg=$1; shift
printf "${GREEN}==>${ALL_OFF}${BOLD} ${mesg}${ALL_OFF}\n" "$@" >&1
}
msg2() {
(( QUIET )) && return
local mesg=$1; shift
printf "${BLUE} ->${ALL_OFF}${BOLD} ${mesg}${ALL_OFF}\n" "$@" >&1
}
ask() {
local mesg=$1; shift
printf "${BLUE}::${ALL_OFF}${BOLD} ${mesg}${ALL_OFF}" "$@" >&1
}
warning() {
local mesg=$1; shift
printf "${YELLOW}==> $(gettext "WARNING:")${ALL_OFF}${BOLD} ${mesg}${ALL_OFF}\n" "$@" >&2
}
error() {
local mesg=$1; shift
printf "${RED}==> $(gettext "ERROR:")${ALL_OFF}${BOLD} ${mesg}${ALL_OFF}\n" "$@" >&2
}
# check if messages are to be printed using color
unset ALL_OFF BOLD BLUE GREEN RED YELLOW
if [[ -t 2 && ! $USE_COLOR = "n" ]]; then
# prefer terminal safe colored and bold text when tput is supported
if tput setaf 0 &>/dev/null; then
ALL_OFF="$(tput sgr0)"
BOLD="$(tput bold)"
BLUE="${BOLD}$(tput setaf 4)"
GREEN="${BOLD}$(tput setaf 2)"
RED="${BOLD}$(tput setaf 1)"
YELLOW="${BOLD}$(tput setaf 3)"
else
ALL_OFF="\e[1;0m"
BOLD="\e[1;1m"
BLUE="${BOLD}\e[1;34m"
GREEN="${BOLD}\e[1;32m"
RED="${BOLD}\e[1;31m"
YELLOW="${BOLD}\e[1;33m"
fi
fi
readonly ALL_OFF BOLD BLUE GREEN RED YELLOW
if (( $# > 0 )); then
echo "${myname} v${myver}"
echo
echo "Safely print a list of pending updates"
echo
echo "Usage: ${myname}"
echo
echo 'Note: Export the "CHECKUPDATES_DB" variable to change the path of the temporary database.'
exit 0
fi
if ! type -P fakeroot >/dev/null; then
error 'Cannot find the fakeroot binary.'
exit 1
fi
if [[ -z $CHECKUPDATES_DB ]]; then
CHECKUPDATES_DB="${TMPDIR:-/tmp}/checkup-db-${USER}/"
fi
trap 'rm -f $CHECKUPDATES_DB/db.lck' INT TERM EXIT
DBPath="$(pacman-conf DBPath)"
if [[ -z "$DBPath" ]] || [[ ! -d "$DBPath" ]]; then
DBPath="/var/lib/pacman/"
fi
mkdir -p "$CHECKUPDATES_DB"
ln -s "${DBPath}/local" "$CHECKUPDATES_DB" &> /dev/null
if ! fakeroot -- pacman -Sy --dbpath "$CHECKUPDATES_DB" --logfile /dev/null &> /dev/null; then
error 'Cannot fetch updates'
exit 1
fi
pacman -Qu --dbpath "$CHECKUPDATES_DB" 2> /dev/null | grep -v '\[.*\]'
exit 0
# vim: set noet:

View File

@ -0,0 +1,100 @@
#!/bin/bash
## Author : Aditya Shakya
## Github : adi1090x
# Custom Rofi Script
BORDER="#1F1F1F"
SEPARATOR="#1F1F1F"
FOREGROUND="#FFFFFF"
BACKGROUND="#1F1F1F"
BACKGROUND_ALT="#252525"
HIGHLIGHT_BACKGROUND="#00897b"
HIGHLIGHT_FOREGROUND="#1F1F1F"
BLACK="#000000"
WHITE="#ffffff"
RED="#e53935"
GREEN="#43a047"
YELLOW="#fdd835"
BLUE="#1e88e5"
MAGENTA="#00897b"
CYAN="#00acc1"
PINK="#d81b60"
PURPLE="#8e24aa"
INDIGO="#3949ab"
TEAL="#00897b"
LIME="#c0ca33"
AMBER="#ffb300"
ORANGE="#fb8c00"
BROWN="#6d4c41"
GREY="#757575"
BLUE_GREY="#546e7a"
DEEP_PURPLE="#5e35b1"
DEEP_ORANGE="#f4511e"
LIGHT_BLUE="#039be5"
LIGHT_GREEN="#7cb342"
SDIR="$HOME/.config/polybar/scripts"
# Launch Rofi
MENU="$(rofi -no-lazy-grab -sep "|" -dmenu -i -p 'Style :' \
-hide-scrollbar true \
-bw 0 \
-lines 5 \
-line-padding 10 \
-padding 20 \
-width 30 \
-xoffset 68 -yoffset -70 \
-location 7 \
-columns 2 \
-show-icons -icon-theme "Papirus" \
-font "Fantasque Sans Mono 10" \
-color-enabled true \
-color-window "$BACKGROUND,$BORDER,$SEPARATOR" \
-color-normal "$BACKGROUND_ALT,$FOREGROUND,$BACKGROUND_ALT,$HIGHLIGHT_BACKGROUND,$HIGHLIGHT_FOREGROUND" \
-color-active "$BACKGROUND,$MAGENTA,$BACKGROUND_ALT,$HIGHLIGHT_BACKGROUND,$HIGHLIGHT_FOREGROUND" \
-color-urgent "$BACKGROUND,$YELLOW,$BACKGROUND_ALT,$HIGHLIGHT_BACKGROUND,$HIGHLIGHT_FOREGROUND" \
<<< "♥ amber|♥ blue|♥ blue-grey|♥ brown|♥ cyan|♥ deep-orange|♥ deep-purple|♥ green|♥ grey|♥ indigo|♥ blue-light|♥ green-light|♥ lime|♥ orange|♥ pink|♥ purple|♥ red|♥ teal|♥ yellow|♥ amber-dark|♥ blue-dark|♥ blue-grey-dark|♥ brown-dark|♥ cyan-dark|♥ deep-orange-dark|♥ deep-purple-dark|♥ green-dark|♥ grey-dark|♥ indigo-dark|♥ blue-light-dark|♥ green-light-dark|♥ lime-dark|♥ orange-dark|♥ pink-dark|♥ purple-dark|♥ red-dark|♥ teal-dark|♥ yellow-dark")"
case "$MENU" in
## Light Colors
*amber) $SDIR/colors-light.sh -amber ;;
*blue) $SDIR/colors-light.sh -blue ;;
*blue-grey) $SDIR/colors-light.sh -blue-grey ;;
*brown) $SDIR/colors-light.sh -brown ;;
*cyan) $SDIR/colors-light.sh -cyan ;;
*deep-orange) $SDIR/colors-light.sh -deep-orange ;;
*deep-purple) $SDIR/colors-light.sh -deep-purple ;;
*green) $SDIR/colors-light.sh -green ;;
*grey) $SDIR/colors-light.sh -grey ;;
*indigo) $SDIR/colors-light.sh -indigo ;;
*blue-light) $SDIR/colors-light.sh -light-blue ;;
*green-light) $SDIR/colors-light.sh -light-green ;;
*lime) $SDIR/colors-light.sh -lime ;;
*orange) $SDIR/colors-light.sh -orange ;;
*pink) $SDIR/colors-light.sh -pink ;;
*purple) $SDIR/colors-light.sh -purple ;;
*red) $SDIR/colors-light.sh -red ;;
*teal) $SDIR/colors-light.sh -teal ;;
*yellow) $SDIR/colors-light.sh -yellow ;;
## Dark Colors
*amber-dark) $SDIR/colors-dark.sh -amber ;;
*blue-dark) $SDIR/colors-dark.sh -blue ;;
*blue-grey-dark) $SDIR/colors-dark.sh -blue-grey ;;
*brown-dark) $SDIR/colors-dark.sh -brown ;;
*cyan-dark) $SDIR/colors-dark.sh -cyan ;;
*deep-orange-dark) $SDIR/colors-dark.sh -deep-orange ;;
*deep-purple-dark) $SDIR/colors-dark.sh -deep-purple ;;
*green-dark) $SDIR/colors-dark.sh -green ;;
*grey-dark) $SDIR/colors-dark.sh -grey ;;
*indigo-dark) $SDIR/colors-dark.sh -indigo ;;
*blue-light-dark) $SDIR/colors-dark.sh -light-blue ;;
*green-light-dark) $SDIR/colors-dark.sh -light-green ;;
*lime-dark) $SDIR/colors-dark.sh -lime ;;
*orange-dark) $SDIR/colors-dark.sh -orange ;;
*pink-dark) $SDIR/colors-dark.sh -pink ;;
*purple-dark) $SDIR/colors-dark.sh -purple ;;
*red-dark) $SDIR/colors-dark.sh -red ;;
*teal-dark) $SDIR/colors-dark.sh -teal ;;
*yellow-dark) $SDIR/colors-dark.sh -yellow
esac

View File

@ -0,0 +1,263 @@
#!/bin/bash
## Author : Aditya Shakya
## Github : adi1090x
PDIR="$HOME/.config/polybar"
LAUNCH="polybar-msg cmd restart"
if [[ $1 = "-amber" ]]; then
# Replacing colors
sed -i -e 's/bg = .*/bg = #1F1F1F/g' $PDIR/config.ini
sed -i -e 's/fg = .*/fg = #FFFFFF/g' $PDIR/config.ini
sed -i -e 's/fg-alt = .*/fg-alt = #A9ABB0/g' $PDIR/config.ini
sed -i -e 's/acolor = .*/acolor = #ffb300/g' $PDIR/config.ini
sed -i -e 's/HIGHLIGHT_BACKGROUND=.*/HIGHLIGHT_BACKGROUND="#ffb300"/g' $PDIR/scripts/menu
sed -i -e 's/HIGHLIGHT_BACKGROUND=.*/HIGHLIGHT_BACKGROUND="#ffb300"/g' $PDIR/scripts/menu_full
sed -i -e 's/HIGHLIGHT_BACKGROUND=.*/HIGHLIGHT_BACKGROUND="#ffb300"/g' $PDIR/scripts/sysmenu
sed -i -e 's/HIGHLIGHT_BACKGROUND=.*/HIGHLIGHT_BACKGROUND="#ffb300"/g' $PDIR/scripts/color-switch.sh
# Restarting polybar
$LAUNCH &
elif [[ $1 = "-blue" ]]; then
# Replacing colors
sed -i -e 's/bg = .*/bg = #1F1F1F/g' $PDIR/config.ini
sed -i -e 's/fg = .*/fg = #FFFFFF/g' $PDIR/config.ini
sed -i -e 's/fg-alt = .*/fg-alt = #A9ABB0/g' $PDIR/config.ini
sed -i -e 's/acolor = .*/acolor = #1e88e5/g' $PDIR/config.ini
sed -i -e 's/HIGHLIGHT_BACKGROUND=.*/HIGHLIGHT_BACKGROUND="#1e88e5"/g' $PDIR/scripts/menu
sed -i -e 's/HIGHLIGHT_BACKGROUND=.*/HIGHLIGHT_BACKGROUND="#1e88e5"/g' $PDIR/scripts/menu_full
sed -i -e 's/HIGHLIGHT_BACKGROUND=.*/HIGHLIGHT_BACKGROUND="#1e88e5"/g' $PDIR/scripts/sysmenu
sed -i -e 's/HIGHLIGHT_BACKGROUND=.*/HIGHLIGHT_BACKGROUND="#1e88e5"/g' $PDIR/scripts/color-switch.sh
# Restarting polybar
$LAUNCH &
elif [[ $1 = "-blue-grey" ]]; then
# Replacing colors
sed -i -e 's/bg = .*/bg = #1F1F1F/g' $PDIR/config.ini
sed -i -e 's/fg = .*/fg = #FFFFFF/g' $PDIR/config.ini
sed -i -e 's/fg-alt = .*/fg-alt = #A9ABB0/g' $PDIR/config.ini
sed -i -e 's/acolor = .*/acolor = #546e7a/g' $PDIR/config.ini
sed -i -e 's/HIGHLIGHT_BACKGROUND=.*/HIGHLIGHT_BACKGROUND="#546e7a"/g' $PDIR/scripts/menu
sed -i -e 's/HIGHLIGHT_BACKGROUND=.*/HIGHLIGHT_BACKGROUND="#546e7a"/g' $PDIR/scripts/menu_full
sed -i -e 's/HIGHLIGHT_BACKGROUND=.*/HIGHLIGHT_BACKGROUND="#546e7a"/g' $PDIR/scripts/sysmenu
sed -i -e 's/HIGHLIGHT_BACKGROUND=.*/HIGHLIGHT_BACKGROUND="#546e7a"/g' $PDIR/scripts/color-switch.sh
# Restarting polybar
$LAUNCH &
elif [[ $1 = "-brown" ]]; then
# Replacing colors
sed -i -e 's/bg = .*/bg = #1F1F1F/g' $PDIR/config.ini
sed -i -e 's/fg = .*/fg = #FFFFFF/g' $PDIR/config.ini
sed -i -e 's/fg-alt = .*/fg-alt = #A9ABB0/g' $PDIR/config.ini
sed -i -e 's/acolor = .*/acolor = #6d4c41/g' $PDIR/config.ini
sed -i -e 's/HIGHLIGHT_BACKGROUND=.*/HIGHLIGHT_BACKGROUND="#6d4c41"/g' $PDIR/scripts/menu
sed -i -e 's/HIGHLIGHT_BACKGROUND=.*/HIGHLIGHT_BACKGROUND="#6d4c41"/g' $PDIR/scripts/menu_full
sed -i -e 's/HIGHLIGHT_BACKGROUND=.*/HIGHLIGHT_BACKGROUND="#6d4c41"/g' $PDIR/scripts/sysmenu
sed -i -e 's/HIGHLIGHT_BACKGROUND=.*/HIGHLIGHT_BACKGROUND="#6d4c41"/g' $PDIR/scripts/color-switch.sh
# Restarting polybar
$LAUNCH &
elif [[ $1 = "-cyan" ]]; then
# Replacing colors
sed -i -e 's/bg = .*/bg = #1F1F1F/g' $PDIR/config.ini
sed -i -e 's/fg = .*/fg = #FFFFFF/g' $PDIR/config.ini
sed -i -e 's/fg-alt = .*/fg-alt = #A9ABB0/g' $PDIR/config.ini
sed -i -e 's/acolor = .*/acolor = #00acc1/g' $PDIR/config.ini
sed -i -e 's/HIGHLIGHT_BACKGROUND=.*/HIGHLIGHT_BACKGROUND="#00acc1"/g' $PDIR/scripts/menu
sed -i -e 's/HIGHLIGHT_BACKGROUND=.*/HIGHLIGHT_BACKGROUND="#00acc1"/g' $PDIR/scripts/menu_full
sed -i -e 's/HIGHLIGHT_BACKGROUND=.*/HIGHLIGHT_BACKGROUND="#00acc1"/g' $PDIR/scripts/sysmenu
sed -i -e 's/HIGHLIGHT_BACKGROUND=.*/HIGHLIGHT_BACKGROUND="#00acc1"/g' $PDIR/scripts/color-switch.sh
# Restarting polybar
$LAUNCH &
elif [[ $1 = "-deep-orange" ]]; then
# Replacing colors
sed -i -e 's/bg = .*/bg = #1F1F1F/g' $PDIR/config.ini
sed -i -e 's/fg = .*/fg = #FFFFFF/g' $PDIR/config.ini
sed -i -e 's/fg-alt = .*/fg-alt = #A9ABB0/g' $PDIR/config.ini
sed -i -e 's/acolor = .*/acolor = #f4511e/g' $PDIR/config.ini
sed -i -e 's/HIGHLIGHT_BACKGROUND=.*/HIGHLIGHT_BACKGROUND="#f4511e"/g' $PDIR/scripts/menu
sed -i -e 's/HIGHLIGHT_BACKGROUND=.*/HIGHLIGHT_BACKGROUND="#f4511e"/g' $PDIR/scripts/menu_full
sed -i -e 's/HIGHLIGHT_BACKGROUND=.*/HIGHLIGHT_BACKGROUND="#f4511e"/g' $PDIR/scripts/sysmenu
sed -i -e 's/HIGHLIGHT_BACKGROUND=.*/HIGHLIGHT_BACKGROUND="#f4511e"/g' $PDIR/scripts/color-switch.sh
# Restarting polybar
$LAUNCH &
elif [[ $1 = "-deep-purple" ]]; then
# Replacing colors
sed -i -e 's/bg = .*/bg = #1F1F1F/g' $PDIR/config.ini
sed -i -e 's/fg = .*/fg = #FFFFFF/g' $PDIR/config.ini
sed -i -e 's/fg-alt = .*/fg-alt = #A9ABB0/g' $PDIR/config.ini
sed -i -e 's/acolor = .*/acolor = #5e35b1/g' $PDIR/config.ini
sed -i -e 's/HIGHLIGHT_BACKGROUND=.*/HIGHLIGHT_BACKGROUND="#5e35b1"/g' $PDIR/scripts/menu
sed -i -e 's/HIGHLIGHT_BACKGROUND=.*/HIGHLIGHT_BACKGROUND="#5e35b1"/g' $PDIR/scripts/menu_full
sed -i -e 's/HIGHLIGHT_BACKGROUND=.*/HIGHLIGHT_BACKGROUND="#5e35b1"/g' $PDIR/scripts/sysmenu
sed -i -e 's/HIGHLIGHT_BACKGROUND=.*/HIGHLIGHT_BACKGROUND="#5e35b1"/g' $PDIR/scripts/color-switch.sh
# Restarting polybar
$LAUNCH &
elif [[ $1 = "-green" ]]; then
# Replacing colors
sed -i -e 's/bg = .*/bg = #1F1F1F/g' $PDIR/config.ini
sed -i -e 's/fg = .*/fg = #FFFFFF/g' $PDIR/config.ini
sed -i -e 's/fg-alt = .*/fg-alt = #A9ABB0/g' $PDIR/config.ini
sed -i -e 's/acolor = .*/acolor = #43a047/g' $PDIR/config.ini
sed -i -e 's/HIGHLIGHT_BACKGROUND=.*/HIGHLIGHT_BACKGROUND="#43a047"/g' $PDIR/scripts/menu
sed -i -e 's/HIGHLIGHT_BACKGROUND=.*/HIGHLIGHT_BACKGROUND="#43a047"/g' $PDIR/scripts/menu_full
sed -i -e 's/HIGHLIGHT_BACKGROUND=.*/HIGHLIGHT_BACKGROUND="#43a047"/g' $PDIR/scripts/sysmenu
sed -i -e 's/HIGHLIGHT_BACKGROUND=.*/HIGHLIGHT_BACKGROUND="#43a047"/g' $PDIR/scripts/color-switch.sh
# Restarting polybar
$LAUNCH &
elif [[ $1 = "-grey" ]]; then
# Replacing colors
sed -i -e 's/bg = .*/bg = #1F1F1F/g' $PDIR/config.ini
sed -i -e 's/fg = .*/fg = #FFFFFF/g' $PDIR/config.ini
sed -i -e 's/fg-alt = .*/fg-alt = #A9ABB0/g' $PDIR/config.ini
sed -i -e 's/acolor = .*/acolor = #757575/g' $PDIR/config.ini
sed -i -e 's/HIGHLIGHT_BACKGROUND=.*/HIGHLIGHT_BACKGROUND="#757575"/g' $PDIR/scripts/menu
sed -i -e 's/HIGHLIGHT_BACKGROUND=.*/HIGHLIGHT_BACKGROUND="#757575"/g' $PDIR/scripts/menu_full
sed -i -e 's/HIGHLIGHT_BACKGROUND=.*/HIGHLIGHT_BACKGROUND="#757575"/g' $PDIR/scripts/sysmenu
sed -i -e 's/HIGHLIGHT_BACKGROUND=.*/HIGHLIGHT_BACKGROUND="#757575"/g' $PDIR/scripts/color-switch.sh
# Restarting polybar
$LAUNCH &
elif [[ $1 = "-indigo" ]]; then
# Replacing colors
sed -i -e 's/bg = .*/bg = #1F1F1F/g' $PDIR/config.ini
sed -i -e 's/fg = .*/fg = #FFFFFF/g' $PDIR/config.ini
sed -i -e 's/fg-alt = .*/fg-alt = #A9ABB0/g' $PDIR/config.ini
sed -i -e 's/acolor = .*/acolor = #3949ab/g' $PDIR/config.ini
sed -i -e 's/HIGHLIGHT_BACKGROUND=.*/HIGHLIGHT_BACKGROUND="#3949ab"/g' $PDIR/scripts/menu
sed -i -e 's/HIGHLIGHT_BACKGROUND=.*/HIGHLIGHT_BACKGROUND="#3949ab"/g' $PDIR/scripts/menu_full
sed -i -e 's/HIGHLIGHT_BACKGROUND=.*/HIGHLIGHT_BACKGROUND="#3949ab"/g' $PDIR/scripts/sysmenu
sed -i -e 's/HIGHLIGHT_BACKGROUND=.*/HIGHLIGHT_BACKGROUND="#3949ab"/g' $PDIR/scripts/color-switch.sh
# Restarting polybar
$LAUNCH &
elif [[ $1 = "-light-blue" ]]; then
# Replacing colors
sed -i -e 's/bg = .*/bg = #1F1F1F/g' $PDIR/config.ini
sed -i -e 's/fg = .*/fg = #FFFFFF/g' $PDIR/config.ini
sed -i -e 's/fg-alt = .*/fg-alt = #A9ABB0/g' $PDIR/config.ini
sed -i -e 's/acolor = .*/acolor = #039be5/g' $PDIR/config.ini
sed -i -e 's/HIGHLIGHT_BACKGROUND=.*/HIGHLIGHT_BACKGROUND="#039be5"/g' $PDIR/scripts/menu
sed -i -e 's/HIGHLIGHT_BACKGROUND=.*/HIGHLIGHT_BACKGROUND="#039be5"/g' $PDIR/scripts/menu_full
sed -i -e 's/HIGHLIGHT_BACKGROUND=.*/HIGHLIGHT_BACKGROUND="#039be5"/g' $PDIR/scripts/sysmenu
sed -i -e 's/HIGHLIGHT_BACKGROUND=.*/HIGHLIGHT_BACKGROUND="#039be5"/g' $PDIR/scripts/color-switch.sh
# Restarting polybar
$LAUNCH &
elif [[ $1 = "-light-green" ]]; then
# Replacing colors
sed -i -e 's/bg = .*/bg = #1F1F1F/g' $PDIR/config.ini
sed -i -e 's/fg = .*/fg = #FFFFFF/g' $PDIR/config.ini
sed -i -e 's/fg-alt = .*/fg-alt = #A9ABB0/g' $PDIR/config.ini
sed -i -e 's/acolor = .*/acolor = #7cb342/g' $PDIR/config.ini
sed -i -e 's/HIGHLIGHT_BACKGROUND=.*/HIGHLIGHT_BACKGROUND="#7cb342"/g' $PDIR/scripts/menu
sed -i -e 's/HIGHLIGHT_BACKGROUND=.*/HIGHLIGHT_BACKGROUND="#7cb342"/g' $PDIR/scripts/menu_full
sed -i -e 's/HIGHLIGHT_BACKGROUND=.*/HIGHLIGHT_BACKGROUND="#7cb342"/g' $PDIR/scripts/sysmenu
sed -i -e 's/HIGHLIGHT_BACKGROUND=.*/HIGHLIGHT_BACKGROUND="#7cb342"/g' $PDIR/scripts/color-switch.sh
# Restarting polybar
$LAUNCH &
elif [[ $1 = "-lime" ]]; then
# Replacing colors
sed -i -e 's/bg = .*/bg = #1F1F1F/g' $PDIR/config.ini
sed -i -e 's/fg = .*/fg = #FFFFFF/g' $PDIR/config.ini
sed -i -e 's/fg-alt = .*/fg-alt = #A9ABB0/g' $PDIR/config.ini
sed -i -e 's/acolor = .*/acolor = #c0ca33/g' $PDIR/config.ini
sed -i -e 's/HIGHLIGHT_BACKGROUND=.*/HIGHLIGHT_BACKGROUND="#c0ca33"/g' $PDIR/scripts/menu
sed -i -e 's/HIGHLIGHT_BACKGROUND=.*/HIGHLIGHT_BACKGROUND="#c0ca33"/g' $PDIR/scripts/menu_full
sed -i -e 's/HIGHLIGHT_BACKGROUND=.*/HIGHLIGHT_BACKGROUND="#c0ca33"/g' $PDIR/scripts/sysmenu
sed -i -e 's/HIGHLIGHT_BACKGROUND=.*/HIGHLIGHT_BACKGROUND="#c0ca33"/g' $PDIR/scripts/color-switch.sh
# Restarting polybar
$LAUNCH &
elif [[ $1 = "-orange" ]]; then
# Replacing colors
sed -i -e 's/bg = .*/bg = #1F1F1F/g' $PDIR/config.ini
sed -i -e 's/fg = .*/fg = #FFFFFF/g' $PDIR/config.ini
sed -i -e 's/fg-alt = .*/fg-alt = #A9ABB0/g' $PDIR/config.ini
sed -i -e 's/acolor = .*/acolor = #fb8c00/g' $PDIR/config.ini
sed -i -e 's/HIGHLIGHT_BACKGROUND=.*/HIGHLIGHT_BACKGROUND="#fb8c00"/g' $PDIR/scripts/menu
sed -i -e 's/HIGHLIGHT_BACKGROUND=.*/HIGHLIGHT_BACKGROUND="#fb8c00"/g' $PDIR/scripts/menu_full
sed -i -e 's/HIGHLIGHT_BACKGROUND=.*/HIGHLIGHT_BACKGROUND="#fb8c00"/g' $PDIR/scripts/sysmenu
sed -i -e 's/HIGHLIGHT_BACKGROUND=.*/HIGHLIGHT_BACKGROUND="#fb8c00"/g' $PDIR/scripts/color-switch.sh
# Restarting polybar
$LAUNCH &
elif [[ $1 = "-pink" ]]; then
# Replacing colors
sed -i -e 's/bg = .*/bg = #1F1F1F/g' $PDIR/config.ini
sed -i -e 's/fg = .*/fg = #FFFFFF/g' $PDIR/config.ini
sed -i -e 's/fg-alt = .*/fg-alt = #A9ABB0/g' $PDIR/config.ini
sed -i -e 's/acolor = .*/acolor = #d81b60/g' $PDIR/config.ini
sed -i -e 's/HIGHLIGHT_BACKGROUND=.*/HIGHLIGHT_BACKGROUND="#d81b60"/g' $PDIR/scripts/menu
sed -i -e 's/HIGHLIGHT_BACKGROUND=.*/HIGHLIGHT_BACKGROUND="#d81b60"/g' $PDIR/scripts/menu_full
sed -i -e 's/HIGHLIGHT_BACKGROUND=.*/HIGHLIGHT_BACKGROUND="#d81b60"/g' $PDIR/scripts/sysmenu
sed -i -e 's/HIGHLIGHT_BACKGROUND=.*/HIGHLIGHT_BACKGROUND="#d81b60"/g' $PDIR/scripts/color-switch.sh
# Restarting polybar
$LAUNCH &
elif [[ $1 = "-purple" ]]; then
# Replacing colors
sed -i -e 's/bg = .*/bg = #1F1F1F/g' $PDIR/config.ini
sed -i -e 's/fg = .*/fg = #FFFFFF/g' $PDIR/config.ini
sed -i -e 's/fg-alt = .*/fg-alt = #A9ABB0/g' $PDIR/config.ini
sed -i -e 's/acolor = .*/acolor = #8e24aa/g' $PDIR/config.ini
sed -i -e 's/HIGHLIGHT_BACKGROUND=.*/HIGHLIGHT_BACKGROUND="#8e24aa"/g' $PDIR/scripts/menu
sed -i -e 's/HIGHLIGHT_BACKGROUND=.*/HIGHLIGHT_BACKGROUND="#8e24aa"/g' $PDIR/scripts/menu_full
sed -i -e 's/HIGHLIGHT_BACKGROUND=.*/HIGHLIGHT_BACKGROUND="#8e24aa"/g' $PDIR/scripts/sysmenu
sed -i -e 's/HIGHLIGHT_BACKGROUND=.*/HIGHLIGHT_BACKGROUND="#8e24aa"/g' $PDIR/scripts/color-switch.sh
# Restarting polybar
$LAUNCH &
elif [[ $1 = "-red" ]]; then
# Replacing colors
sed -i -e 's/bg = .*/bg = #1F1F1F/g' $PDIR/config.ini
sed -i -e 's/fg = .*/fg = #FFFFFF/g' $PDIR/config.ini
sed -i -e 's/fg-alt = .*/fg-alt = #A9ABB0/g' $PDIR/config.ini
sed -i -e 's/acolor = .*/acolor = #e53935/g' $PDIR/config.ini
sed -i -e 's/HIGHLIGHT_BACKGROUND=.*/HIGHLIGHT_BACKGROUND="#e53935"/g' $PDIR/scripts/menu
sed -i -e 's/HIGHLIGHT_BACKGROUND=.*/HIGHLIGHT_BACKGROUND="#e53935"/g' $PDIR/scripts/menu_full
sed -i -e 's/HIGHLIGHT_BACKGROUND=.*/HIGHLIGHT_BACKGROUND="#e53935"/g' $PDIR/scripts/sysmenu
sed -i -e 's/HIGHLIGHT_BACKGROUND=.*/HIGHLIGHT_BACKGROUND="#e53935"/g' $PDIR/scripts/color-switch.sh
# Restarting polybar
$LAUNCH &
elif [[ $1 = "-teal" ]]; then
# Replacing colors
sed -i -e 's/bg = .*/bg = #1F1F1F/g' $PDIR/config.ini
sed -i -e 's/fg = .*/fg = #FFFFFF/g' $PDIR/config.ini
sed -i -e 's/fg-alt = .*/fg-alt = #A9ABB0/g' $PDIR/config.ini
sed -i -e 's/acolor = .*/acolor = #00897b/g' $PDIR/config.ini
sed -i -e 's/HIGHLIGHT_BACKGROUND=.*/HIGHLIGHT_BACKGROUND="#00897b"/g' $PDIR/scripts/menu
sed -i -e 's/HIGHLIGHT_BACKGROUND=.*/HIGHLIGHT_BACKGROUND="#00897b"/g' $PDIR/scripts/menu_full
sed -i -e 's/HIGHLIGHT_BACKGROUND=.*/HIGHLIGHT_BACKGROUND="#00897b"/g' $PDIR/scripts/sysmenu
sed -i -e 's/HIGHLIGHT_BACKGROUND=.*/HIGHLIGHT_BACKGROUND="#00897b"/g' $PDIR/scripts/color-switch.sh
# Restarting polybar
$LAUNCH &
elif [[ $1 = "-yellow" ]]; then
# Replacing colors
sed -i -e 's/bg = .*/bg = #1F1F1F/g' $PDIR/config.ini
sed -i -e 's/fg = .*/fg = #FFFFFF/g' $PDIR/config.ini
sed -i -e 's/fg-alt = .*/fg-alt = #A9ABB0/g' $PDIR/config.ini
sed -i -e 's/acolor = .*/acolor = #fdd835/g' $PDIR/config.ini
sed -i -e 's/HIGHLIGHT_BACKGROUND=.*/HIGHLIGHT_BACKGROUND="#fdd835"/g' $PDIR/scripts/menu
sed -i -e 's/HIGHLIGHT_BACKGROUND=.*/HIGHLIGHT_BACKGROUND="#fdd835"/g' $PDIR/scripts/menu_full
sed -i -e 's/HIGHLIGHT_BACKGROUND=.*/HIGHLIGHT_BACKGROUND="#fdd835"/g' $PDIR/scripts/sysmenu
sed -i -e 's/HIGHLIGHT_BACKGROUND=.*/HIGHLIGHT_BACKGROUND="#fdd835"/g' $PDIR/scripts/color-switch.sh
# Restarting polybar
$LAUNCH &
else
echo "Available options:
-amber -blue -blue-grey -brown
-cyan -deep-orange -deep-purple -green
-grey -indigo -light-blue -light-green
-lime -orange -pink -purple
-red -teal -yellow"
fi

View File

@ -0,0 +1,187 @@
#!/bin/bash
## Author : Aditya Shakya
## Github : adi1090x
PDIR="$HOME/.config/polybar"
LAUNCH="polybar-msg cmd restart"
if [[ $1 = "-amber" ]]; then
# Replacing colors
sed -i -e 's/bg = .*/bg = #FFFFFF/g' $PDIR/config.ini
sed -i -e 's/fg = .*/fg = #2E2E2E/g' $PDIR/config.ini
sed -i -e 's/fg-alt = .*/fg-alt = #424242/g' $PDIR/config.ini
sed -i -e 's/acolor = .*/acolor = #ffb300/g' $PDIR/config.ini
# Restarting polybar
$LAUNCH &
elif [[ $1 = "-blue" ]]; then
# Replacing colors
sed -i -e 's/bg = .*/bg = #FFFFFF/g' $PDIR/config.ini
sed -i -e 's/fg = .*/fg = #2E2E2E/g' $PDIR/config.ini
sed -i -e 's/fg-alt = .*/fg-alt = #424242/g' $PDIR/config.ini
sed -i -e 's/acolor = .*/acolor = #1e88e5/g' $PDIR/config.ini
# Restarting polybar
$LAUNCH &
elif [[ $1 = "-blue-grey" ]]; then
# Replacing colors
sed -i -e 's/bg = .*/bg = #FFFFFF/g' $PDIR/config.ini
sed -i -e 's/fg = .*/fg = #2E2E2E/g' $PDIR/config.ini
sed -i -e 's/fg-alt = .*/fg-alt = #424242/g' $PDIR/config.ini
sed -i -e 's/acolor = .*/acolor = #546e7a/g' $PDIR/config.ini
# Restarting polybar
$LAUNCH &
elif [[ $1 = "-brown" ]]; then
# Replacing colors
sed -i -e 's/bg = .*/bg = #FFFFFF/g' $PDIR/config.ini
sed -i -e 's/fg = .*/fg = #2E2E2E/g' $PDIR/config.ini
sed -i -e 's/fg-alt = .*/fg-alt = #424242/g' $PDIR/config.ini
sed -i -e 's/acolor = .*/acolor = #6d4c41/g' $PDIR/config.ini
# Restarting polybar
$LAUNCH &
elif [[ $1 = "-cyan" ]]; then
# Replacing colors
sed -i -e 's/bg = .*/bg = #FFFFFF/g' $PDIR/config.ini
sed -i -e 's/fg = .*/fg = #2E2E2E/g' $PDIR/config.ini
sed -i -e 's/fg-alt = .*/fg-alt = #424242/g' $PDIR/config.ini
sed -i -e 's/acolor = .*/acolor = #00acc1/g' $PDIR/config.ini
# Restarting polybar
$LAUNCH &
elif [[ $1 = "-deep-orange" ]]; then
# Replacing colors
sed -i -e 's/bg = .*/bg = #FFFFFF/g' $PDIR/config.ini
sed -i -e 's/fg = .*/fg = #2E2E2E/g' $PDIR/config.ini
sed -i -e 's/fg-alt = .*/fg-alt = #424242/g' $PDIR/config.ini
sed -i -e 's/acolor = .*/acolor = #f4511e/g' $PDIR/config.ini
# Restarting polybar
$LAUNCH &
elif [[ $1 = "-deep-purple" ]]; then
# Replacing colors
sed -i -e 's/bg = .*/bg = #FFFFFF/g' $PDIR/config.ini
sed -i -e 's/fg = .*/fg = #2E2E2E/g' $PDIR/config.ini
sed -i -e 's/fg-alt = .*/fg-alt = #424242/g' $PDIR/config.ini
sed -i -e 's/acolor = .*/acolor = #5e35b1/g' $PDIR/config.ini
# Restarting polybar
$LAUNCH &
elif [[ $1 = "-green" ]]; then
# Replacing colors
sed -i -e 's/bg = .*/bg = #FFFFFF/g' $PDIR/config.ini
sed -i -e 's/fg = .*/fg = #2E2E2E/g' $PDIR/config.ini
sed -i -e 's/fg-alt = .*/fg-alt = #424242/g' $PDIR/config.ini
sed -i -e 's/acolor = .*/acolor = #43a047/g' $PDIR/config.ini
# Restarting polybar
$LAUNCH &
elif [[ $1 = "-grey" ]]; then
# Replacing colors
sed -i -e 's/bg = .*/bg = #FFFFFF/g' $PDIR/config.ini
sed -i -e 's/fg = .*/fg = #2E2E2E/g' $PDIR/config.ini
sed -i -e 's/fg-alt = .*/fg-alt = #424242/g' $PDIR/config.ini
sed -i -e 's/acolor = .*/acolor = #757575/g' $PDIR/config.ini
# Restarting polybar
$LAUNCH &
elif [[ $1 = "-indigo" ]]; then
# Replacing colors
sed -i -e 's/bg = .*/bg = #FFFFFF/g' $PDIR/config.ini
sed -i -e 's/fg = .*/fg = #2E2E2E/g' $PDIR/config.ini
sed -i -e 's/fg-alt = .*/fg-alt = #424242/g' $PDIR/config.ini
sed -i -e 's/acolor = .*/acolor = #3949ab/g' $PDIR/config.ini
# Restarting polybar
$LAUNCH &
elif [[ $1 = "-light-blue" ]]; then
# Replacing colors
sed -i -e 's/bg = .*/bg = #FFFFFF/g' $PDIR/config.ini
sed -i -e 's/fg = .*/fg = #2E2E2E/g' $PDIR/config.ini
sed -i -e 's/fg-alt = .*/fg-alt = #424242/g' $PDIR/config.ini
sed -i -e 's/acolor = .*/acolor = #039be5/g' $PDIR/config.ini
# Restarting polybar
$LAUNCH &
elif [[ $1 = "-light-green" ]]; then
# Replacing colors
sed -i -e 's/bg = .*/bg = #FFFFFF/g' $PDIR/config.ini
sed -i -e 's/fg = .*/fg = #2E2E2E/g' $PDIR/config.ini
sed -i -e 's/fg-alt = .*/fg-alt = #424242/g' $PDIR/config.ini
sed -i -e 's/acolor = .*/acolor = #7cb342/g' $PDIR/config.ini
# Restarting polybar
$LAUNCH &
elif [[ $1 = "-lime" ]]; then
# Replacing colors
sed -i -e 's/bg = .*/bg = #FFFFFF/g' $PDIR/config.ini
sed -i -e 's/fg = .*/fg = #2E2E2E/g' $PDIR/config.ini
sed -i -e 's/fg-alt = .*/fg-alt = #424242/g' $PDIR/config.ini
sed -i -e 's/acolor = .*/acolor = #c0ca33/g' $PDIR/config.ini
# Restarting polybar
$LAUNCH &
elif [[ $1 = "-orange" ]]; then
# Replacing colors
sed -i -e 's/bg = .*/bg = #FFFFFF/g' $PDIR/config.ini
sed -i -e 's/fg = .*/fg = #2E2E2E/g' $PDIR/config.ini
sed -i -e 's/fg-alt = .*/fg-alt = #424242/g' $PDIR/config.ini
sed -i -e 's/acolor = .*/acolor = #fb8c00/g' $PDIR/config.ini
# Restarting polybar
$LAUNCH &
elif [[ $1 = "-pink" ]]; then
# Replacing colors
sed -i -e 's/bg = .*/bg = #FFFFFF/g' $PDIR/config.ini
sed -i -e 's/fg = .*/fg = #2E2E2E/g' $PDIR/config.ini
sed -i -e 's/fg-alt = .*/fg-alt = #424242/g' $PDIR/config.ini
sed -i -e 's/acolor = .*/acolor = #d81b60/g' $PDIR/config.ini
# Restarting polybar
$LAUNCH &
elif [[ $1 = "-purple" ]]; then
# Replacing colors
sed -i -e 's/bg = .*/bg = #FFFFFF/g' $PDIR/config.ini
sed -i -e 's/fg = .*/fg = #2E2E2E/g' $PDIR/config.ini
sed -i -e 's/fg-alt = .*/fg-alt = #424242/g' $PDIR/config.ini
sed -i -e 's/acolor = .*/acolor = #8e24aa/g' $PDIR/config.ini
# Restarting polybar
$LAUNCH &
elif [[ $1 = "-red" ]]; then
# Replacing colors
sed -i -e 's/bg = .*/bg = #FFFFFF/g' $PDIR/config.ini
sed -i -e 's/fg = .*/fg = #2E2E2E/g' $PDIR/config.ini
sed -i -e 's/fg-alt = .*/fg-alt = #424242/g' $PDIR/config.ini
sed -i -e 's/acolor = .*/acolor = #e53935/g' $PDIR/config.ini
# Restarting polybar
$LAUNCH &
elif [[ $1 = "-teal" ]]; then
# Replacing colors
sed -i -e 's/bg = .*/bg = #FFFFFF/g' $PDIR/config.ini
sed -i -e 's/fg = .*/fg = #2E2E2E/g' $PDIR/config.ini
sed -i -e 's/fg-alt = .*/fg-alt = #424242/g' $PDIR/config.ini
sed -i -e 's/acolor = .*/acolor = #00897b/g' $PDIR/config.ini
# Restarting polybar
$LAUNCH &
elif [[ $1 = "-yellow" ]]; then
# Replacing colors
sed -i -e 's/bg = .*/bg = #FFFFFF/g' $PDIR/config.ini
sed -i -e 's/fg = .*/fg = #2E2E2E/g' $PDIR/config.ini
sed -i -e 's/fg-alt = .*/fg-alt = #424242/g' $PDIR/config.ini
sed -i -e 's/acolor = .*/acolor = #fdd835/g' $PDIR/config.ini
# Restarting polybar
$LAUNCH &
else
echo "Available options:
-amber -blue -blue-grey -brown
-cyan -deep-orange -deep-purple -green
-grey -indigo -light-blue -light-green
-lime -orange -pink -purple
-red -teal -yellow"
fi

63
.config/polybar/scripts/menu Executable file
View File

@ -0,0 +1,63 @@
#!/bin/bash
# Custom Rofi Script
BORDER="#1F1F1F"
SEPARATOR="#1F1F1F"
FOREGROUND="#FFFFFF"
BACKGROUND="#1F1F1F"
BACKGROUND_ALT="#252525"
HIGHLIGHT_BACKGROUND="#00897b"
HIGHLIGHT_FOREGROUND="#1F1F1F"
BLACK="#000000"
WHITE="#ffffff"
RED="#e53935"
GREEN="#43a047"
YELLOW="#fdd835"
BLUE="#1e88e5"
MAGENTA="#00897b"
CYAN="#00acc1"
PINK="#d81b60"
PURPLE="#8e24aa"
INDIGO="#3949ab"
TEAL="#00897b"
LIME="#c0ca33"
AMBER="#ffb300"
ORANGE="#fb8c00"
BROWN="#6d4c41"
GREY="#757575"
BLUE_GREY="#546e7a"
DEEP_PURPLE="#5e35b1"
DEEP_ORANGE="#f4511e"
LIGHT_BLUE="#039be5"
LIGHT_GREEN="#7cb342"
# Launch Rofi
rofi -no-lazy-grab -show drun \
-display-drun "Applications :" -drun-display-format "{name}" \
-hide-scrollbar true \
-bw 0 \
-lines 10 \
-line-padding 10 \
-padding 20 \
-width 30 \
-xoffset 68 -yoffset -70 \
-location 7 \
-columns 2 \
-show-icons -icon-theme "Papirus" \
-font "Fantasque Sans Mono 10" \
-color-enabled true \
-color-window "$BACKGROUND,$BORDER,$SEPARATOR" \
-color-normal "$BACKGROUND_ALT,$FOREGROUND,$BACKGROUND_ALT,$HIGHLIGHT_BACKGROUND,$HIGHLIGHT_FOREGROUND" \
-color-active "$BACKGROUND,$MAGENTA,$BACKGROUND_ALT,$HIGHLIGHT_BACKGROUND,$HIGHLIGHT_FOREGROUND" \
-color-urgent "$BACKGROUND,$YELLOW,$BACKGROUND_ALT,$HIGHLIGHT_BACKGROUND,$HIGHLIGHT_FOREGROUND"
# More Options
# -fullscreen \
# Theming help
# color window = background, border, separator
# color normal = background, foreground, background-alt, highlight-background, highlight-foreground
# color active = background, foreground, background-alt, highlight-background, highlight-foreground
# color urgent = background, foreground, background-alt, highlight-background, highlight-foreground

View File

@ -0,0 +1,64 @@
#!/bin/bash
# Custom Rofi Script
BORDER="#1F1F1F"
SEPARATOR="#1F1F1F"
FOREGROUND="#FFFFFF"
BACKGROUND="#1F1F1F"
BACKGROUND_ALT="#252525"
HIGHLIGHT_BACKGROUND="#00897b"
HIGHLIGHT_FOREGROUND="#1F1F1F"
BLACK="#000000"
WHITE="#ffffff"
RED="#e53935"
GREEN="#43a047"
YELLOW="#fdd835"
BLUE="#1e88e5"
MAGENTA="#00897b"
CYAN="#00acc1"
PINK="#d81b60"
PURPLE="#8e24aa"
INDIGO="#3949ab"
TEAL="#00897b"
LIME="#c0ca33"
AMBER="#ffb300"
ORANGE="#fb8c00"
BROWN="#6d4c41"
GREY="#757575"
BLUE_GREY="#546e7a"
DEEP_PURPLE="#5e35b1"
DEEP_ORANGE="#f4511e"
LIGHT_BLUE="#039be5"
LIGHT_GREEN="#7cb342"
# Launch Rofi
rofi -no-lazy-grab -show drun \
-display-drun "Applications :" -drun-display-format "{name}" \
-hide-scrollbar true \
-bw 0 \
-lines 10 \
-line-padding 15 \
-padding 60 \
-width 30 \
-xoffset 10 -yoffset 40 \
-location 1 \
-fullscreen \
-columns 4 \
-show-icons -icon-theme "Papirus" \
-font "Fantasque Sans Mono 10" \
-color-enabled true \
-color-window "$BACKGROUND,$BORDER,$SEPARATOR" \
-color-normal "$BACKGROUND_ALT,$FOREGROUND,$BACKGROUND_ALT,$HIGHLIGHT_BACKGROUND,$HIGHLIGHT_FOREGROUND" \
-color-active "$BACKGROUND,$MAGENTA,$BACKGROUND_ALT,$HIGHLIGHT_BACKGROUND,$HIGHLIGHT_FOREGROUND" \
-color-urgent "$BACKGROUND,$YELLOW,$BACKGROUND_ALT,$HIGHLIGHT_BACKGROUND,$HIGHLIGHT_FOREGROUND"
# More Options
# -fullscreen \
# Theming help
# color window = background, border, separator
# color normal = background, foreground, background-alt, highlight-background, highlight-foreground
# color active = background, foreground, background-alt, highlight-background, highlight-foreground
# color urgent = background, foreground, background-alt, highlight-background, highlight-foreground

69
.config/polybar/scripts/sysmenu Executable file
View File

@ -0,0 +1,69 @@
#!/bin/bash
# Custom Rofi Script
BORDER="#1F1F1F"
SEPARATOR="#1F1F1F"
FOREGROUND="#FFFFFF"
BACKGROUND="#1F1F1F"
BACKGROUND_ALT="#252525"
HIGHLIGHT_BACKGROUND="#00897b"
HIGHLIGHT_FOREGROUND="#1F1F1F"
BLACK="#000000"
WHITE="#ffffff"
RED="#e53935"
GREEN="#43a047"
YELLOW="#fdd835"
BLUE="#1e88e5"
MAGENTA="#00897b"
CYAN="#00acc1"
PINK="#d81b60"
PURPLE="#8e24aa"
INDIGO="#3949ab"
TEAL="#00897b"
LIME="#c0ca33"
AMBER="#ffb300"
ORANGE="#fb8c00"
BROWN="#6d4c41"
GREY="#757575"
BLUE_GREY="#546e7a"
DEEP_PURPLE="#5e35b1"
DEEP_ORANGE="#f4511e"
LIGHT_BLUE="#039be5"
LIGHT_GREEN="#7cb342"
# Launch Rofi
MENU="$(rofi -no-lazy-grab -sep "|" -dmenu -i -p 'System :' \
-hide-scrollbar true \
-bw 0 \
-lines 4 \
-line-padding 10 \
-padding 20 \
-width 15 \
-xoffset -68 -yoffset -70 \
-location 5 \
-columns 1 \
-show-icons -icon-theme "Papirus" \
-font "Fantasque Sans Mono 10" \
-color-enabled true \
-color-window "$BACKGROUND,$BORDER,$SEPARATOR" \
-color-normal "$BACKGROUND_ALT,$FOREGROUND,$BACKGROUND_ALT,$HIGHLIGHT_BACKGROUND,$HIGHLIGHT_FOREGROUND" \
-color-active "$BACKGROUND,$MAGENTA,$BACKGROUND_ALT,$HIGHLIGHT_BACKGROUND,$HIGHLIGHT_FOREGROUND" \
-color-urgent "$BACKGROUND,$YELLOW,$BACKGROUND_ALT,$HIGHLIGHT_BACKGROUND,$HIGHLIGHT_FOREGROUND" \
<<< " Lock| Logout| Reboot| Shutdown")"
case "$MENU" in
*Lock) i3lock ;;
*Logout) openbox --exit;;
*Reboot) systemctl reboot ;;
*Shutdown) systemctl -i poweroff
esac
# More Options
# -fullscreen \
# Theming help
# color window = background, border, separator
# color normal = background, foreground, background-alt, highlight-background, highlight-foreground
# color active = background, foreground, background-alt, highlight-background, highlight-foreground
# color urgent = background, foreground, background-alt, highlight-background, highlight-foreground

View File

@ -0,0 +1,60 @@
#!/bin/sh
bluetooth_print() {
bluetoothctl | while read -r; do
if [ "$(systemctl is-active "bluetooth.service")" = "active" ]; then
printf '#1'
devices_paired=$(bluetoothctl paired-devices | grep Device | cut -d ' ' -f 2)
counter=0
echo "$devices_paired" | while read -r line; do
device_info=$(bluetoothctl info "$line")
if echo "$device_info" | grep -q "Connected: yes"; then
device_alias=$(echo "$device_info" | grep "Alias" | cut -d ' ' -f 2-)
if [ $counter -gt 0 ]; then
printf ", %s" "$device_alias"
else
printf " %s" "$device_alias"
fi
counter=$((counter + 1))
fi
done
printf '\n'
else
echo "#2"
fi
done
}
bluetooth_toggle() {
if bluetoothctl show | grep -q "Powered: no"; then
bluetoothctl power on >> /dev/null
sleep 1
devices_paired=$(bluetoothctl paired-devices | grep Device | cut -d ' ' -f 2)
echo "$devices_paired" | while read -r line; do
bluetoothctl connect "$line" >> /dev/null
done
else
devices_paired=$(bluetoothctl paired-devices | grep Device | cut -d ' ' -f 2)
echo "$devices_paired" | while read -r line; do
bluetoothctl disconnect "$line" >> /dev/null
done
bluetoothctl power off >> /dev/null
fi
}
case "$1" in
--toggle)
bluetooth_toggle
;;
*)
bluetooth_print
;;
esac

View File

@ -0,0 +1,91 @@
#!/bin/sh
usb_print() {
devices=$(lsblk -Jplno NAME,TYPE,RM,SIZE,MOUNTPOINT,VENDOR)
output=""
counter=0
for unmounted in $(echo "$devices" | jq -r '.blockdevices[] | select(.type == "part") | select(.rm == true) | select(.mountpoint == null) | .name'); do
unmounted=$(echo "$unmounted" | tr -d "[:digit:]")
unmounted=$(echo "$devices" | jq -r '.blockdevices[] | select(.name == "'"$unmounted"'") | .vendor')
unmounted=$(echo "$unmounted" | tr -d ' ')
if [ $counter -eq 0 ]; then
space=""
else
space=" "
fi
counter=$((counter + 1))
output="$output$space#1 $unmounted"
done
for mounted in $(echo "$devices" | jq -r '.blockdevices[] | select(.type == "part") | select(.rm == true) | select(.mountpoint != null) | .size'); do
if [ $counter -eq 0 ]; then
space=""
else
space=" "
fi
counter=$((counter + 1))
output="$output$space#2 $mounted"
done
echo "$output"
}
usb_update() {
pid=$(cat "$path_pid")
if [ "$pid" != "" ]; then
kill -10 "$pid"
fi
}
path_pid="/tmp/polybar-system-usb-udev.pid"
case "$1" in
--update)
usb_update
;;
--mount)
devices=$(lsblk -Jplno NAME,TYPE,RM,MOUNTPOINT)
for mount in $(echo "$devices" | jq -r '.blockdevices[] | select(.type == "part") | select(.rm == true) | select(.mountpoint == null) | .name'); do
# udisksctl mount --no-user-interaction -b "$mount"
# mountpoint=$(udisksctl mount --no-user-interaction -b $mount)
# mountpoint=$(echo $mountpoint | cut -d " " -f 4 | tr -d ".")
# terminal -e "bash -lc 'filemanager $mountpoint'"
mountpoint=$(udisksctl mount --no-user-interaction -b "$mount")
mountpoint=$(echo "$mountpoint" | cut -d " " -f 4 | tr -d ".")
termite -e "bash -lc 'mc $mountpoint'" &
done
usb_update
;;
--unmount)
devices=$(lsblk -Jplno NAME,TYPE,RM,MOUNTPOINT)
for unmount in $(echo "$devices" | jq -r '.blockdevices[] | select(.type == "part") | select(.rm == true) | select(.mountpoint != null) | .name'); do
udisksctl unmount --no-user-interaction -b "$unmount"
udisksctl power-off --no-user-interaction -b "$unmount"
done
usb_update
;;
*)
echo $$ > $path_pid
trap exit INT
trap "echo" USR1
while true; do
usb_print
sleep 60 &
wait
done
;;
esac

View File

@ -0,0 +1,46 @@
#!/usr/bin/env bash
BAR_ICON=""
NOTIFY_ICON=/usr/share/icons/Papirus/32x32/apps/system-software-update.svg
get_total_updates() { UPDATES=$(checkupdates 2>/dev/null | wc -l); }
while true; do
get_total_updates
# notify user of updates
if hash notify-send &>/dev/null; then
if (( UPDATES > 50 )); then
notify-send -u critical -i $NOTIFY_ICON \
"You really need to update!!" "$UPDATES New packages"
elif (( UPDATES > 25 )); then
notify-send -u normal -i $NOTIFY_ICON \
"You should update soon" "$UPDATES New packages"
elif (( UPDATES > 2 )); then
notify-send -u low -i $NOTIFY_ICON \
"$UPDATES New packages"
fi
fi
# when there are updates available
# every 10 seconds another check for updates is done
while (( UPDATES > 0 )); do
if (( UPDATES == 1 )); then
echo "$UPDATES"
elif (( UPDATES > 1 )); then
echo "$UPDATES"
else
echo $BAR_ICON
fi
sleep 10
get_total_updates
done
# when no updates are available, use a longer loop, this saves on CPU
# and network uptime, only checking once every 30 min for new updates
while (( UPDATES == 0 )); do
echo $BAR_ICON
sleep 1800
get_total_updates
done
done

586
.config/polybar/test1 Normal file
View File

@ -0,0 +1,586 @@
;://github.com/ishaan26/config_files.git==========================================================
;
;
; ██████╗ ██████╗ ██╗ ██╗ ██╗██████╗ █████╗ ██████╗
; ██╔══██╗██╔═══██╗██║ ╚██╗ ██╔╝██╔══██╗██╔══██╗██╔══██╗
; ██████╔╝██║ ██║██║ ╚████╔╝ ██████╔╝███████║██████╔╝
; ██╔═══╝ ██║ ██║██║ ╚██╔╝ ██╔══██╗██╔══██║██╔══██╗
; ██║ ╚██████╔╝███████╗██║ ██████╔╝██║ ██║██║ ██║
; ╚═╝ ╚═════╝ ╚══════╝╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝
;
;
; To learn more about how to configure Polybar
; go to https://github.com/polybar/polybar
;
; The README contains a lot of information
;
;==========================================================
[colors]
trans = #00000000
white = #FFFFFF
black = #000000
bg = #77333333
fg = #e0e0e0
fg-alt = #A9ABB0
shade1 = #0D47A1
shade2 = #1565C0
shade3 = #1976D2
shade4 = #1E88E5
shade5 = #2196F3
shade6 = #42A5F5
shade7 = #64B5F6
shade8 = #90CAF9
ashade8 = #2C2C2C
primary = #aa0D47A1
secondary = #e60053
alert = #bd2c40
spotify_green = #1DB954
[bar/top_bar]
width = 100%
height = 30
radius-bottom = 1.0
fixed-center = true
line-size = 5
background = #44111122
foreground = ${colors.fg}
border-color = ${colors.trans}
; border-size = 30
; border-radius = 10
padding-left = 0
padding-right = 0
module-margin-left = 0
module-margin-right = 0
font-0 = "GoogleSans Nerd Font:style=Regular;3"
font-1 = "GoogleSans Nerd Font:style=Regular;3"
font-2 = "GoogleSans Nerd Font:style=Bold;3"
font-3 = "Material Icons:style=Regular:size=16;5"
font-4 = "FontAwesome5Free:style=Solid:size=14;2"
font-5 = "FontAwesome:style=Regular:size=14;2"
font-6 = "FontAwesome5Free:style=Regular:size=14;2"
font-7 = "FontAwesome5Brands:style=Regular:size=14;2"
font-8 = "Ionicons:style=Regular"
modules-left = rofi-apps xwindow separator spotify
modules-center = popup-calendar
modules-right = backlight pulseaudio battery
tray-position = right
tray-padding = 5
tray-background = ${colors.primary}
; tray-background-radius = 10
cursor-click = pointer
cursor-scroll = ns-resize
[bar/bottom_bar]
inherit = bar/top_bar
height = 40
bottom = true
modules-center = i3
modules-right = system-uptime-pretty wlan separator filesystem memory cpu temperature
scroll-up = i3wm-wsnext
scroll-down = i3wm-wsprev
tray-position = none
[module/xwindow]
type = internal/xwindow
label = %title:0:125:...%
label-padding = 2
label-font = 3
[module/filesystem]
type = internal/fs
interval = 25
mount-0 = /
fixed-values = true
format-mounted-background =
format-mounted-padding = 2
label-mounted = %{A1:gnome-disks &:} %free% %{A}
label-unmounted = %mountpoint% not mounted
label-unmounted-foreground = ${colors.fg-alt}
[module/i3]
type = internal/i3
format = <label-state> <label-mode>
index-sort = true
wrapping-scroll = false
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;ﱘ
label-mode-padding = 2
label-mode-foreground = ${colors.fg}
label-mode-background = ${colors.bg}
; focused = Active workspace on focused monitor
label-focused = %icon%
label-focused-background = ${colors.bg}
label-focused-underline= ${colors.shade5}
label-focused-padding = 2
; unfocused = Inactive workspace on any monitor
label-unfocused = %icon%
label-unfocused-padding = 2
; visible = Active workspace on unfocused monitor
label-visible = %icon%
label-visible-background = ${self.label-focused-background}
label-visible-underline = ${self.label-focused-underline}
label-visible-padding = ${self.label-focused-padding}
; urgent = Workspace with urgency hint set
label-urgent = %icon%
label-urgent-background = ${colors.alert}
label-urgent-padding = 2
; Separator in between workspaces
;label-separator = |
[module/mpd]
type = internal/mpd
format-online = <label-song> <icon-prev> <icon-stop> <toggle> <icon-next>
host = 127.0.0.1
port = 6600
icon-prev = 
icon-stop = 
icon-play = 
icon-pause = 
icon-next = 
label-song-maxlen = 25
label-song-ellipsis = true
[module/backlight]
type = internal/backlight
; Use the following command to list available cards:
; $ ls -1 /sys/class/backlight/
card = intel_backlight
enable-scroll = true
format = <label>
format-background =
format-padding = 2
label =  %percentage%%
[module/cpu]
type = internal/cpu
interval = 2
format-prefix = %{A1:gnome-system-monitor -r &:} %{A}
format-padding = 2
format-prefix-foreground = ${colors.fg}
format-background =
label = %percentage:2%%
[module/memory]
type = internal/memory
interval = 2
format-prefix = %{A1:gnome-system-monitor -r &:} %{A}
format-padding = 2
format-prefix-foreground = ${colors.fg}
format-background =
label = %percentage_used%%
[module/wlan]
type = internal/network
interface = wlp2s0
interval = 3.0
format-connected = <label-connected>
format-connected-padding = 2
format-connected-background =
label-connected =  %downspeed%  %upspeed%
format-disconnected =
[module/eth]
type = internal/network
interface = enp3s0f1
interval = 3.0
format-connected-background =
format-connected-prefix = " "
format-connected-prefix-foreground = ${colors.fg-alt}
label-connected = %essid%
format-disconnected =
[module/date]
type = custom/script
exec = date +" %H:%M"
interval = 5
format-padding = 2
format-background =
[module/pulseaudio]
type = internal/pulseaudio
sink = alsa_output.pci-0000_00_1f.3.analog-stereo
use-ui-max = false
interval = 5
format-volume = <label-volume>
format-volume-padding = 2
format-volume-background =
label-volume = %{A1:exec ~/.config/rofi/scripts/volume.sh:} %percentage%% %{A}
label-volume-foreground = ${root.foreground}
label-muted = 婢 muted
label-muted-foreground = #111
[module/battery]
type = internal/battery
battery = BAT1
adapter = ACAD
full-at = 100
format-charging = %{A1:exec ~/.config/rofi/scripts/battery.sh:}<animation-charging> <label-charging> %{A}
format-charging-foreground = #8BC34A
format-charging-padding = 2
format-discharging = %{A1:exec ~/.config/rofi/scripts/battery.sh:}<ramp-capacity> <label-discharging> %{A}
format-discharging-padding = 2
format-discharging-foreground =
format-full-prefix = %{A1:exec ~/.config/rofi/scripts/battery.sh:} %{A}
format-full-prefix-foreground = ${colors.fg}
format-full-padding = 2
format-full-background =
ramp-capacity-0 = 
ramp-capacity-1 = 
ramp-capacity-2 = 
ramp-capacity-foreground = #ffb52a
animation-charging-0 = 
animation-charging-1 = 
animation-charging-2 = 
animation-charging-foreground = #8BC34A
animation-charging-framerate = 750
; animation-discharging-0 = 
; animation-discharging-1 = 
; animation-discharging-2 = 
; animation-discharging-foreground = #ffb52a
; animation-discharging-framerate = 750
[module/temperature]
type = internal/temperature
thermal-zone = 2
warn-temperature = 90
hwmon-path = /sys/devices/platform/coretemp.0/hwmon/hwmon4/temp1_input
format = <label>
format-padding = 4
format-background =
format-warn = <label-warn>
format-warn-padding = 4
; format-warn-foreground = ${colors.alert}
label =  %temperature-c%
label-warn =  %temperature-c%
label-warn-foreground = ${colors.alert}
; ramp-0 = 
; ramp-1 = 
; ramp-2 = 
; ramp-foreground = ${colors.fg}
[module/powermenu]
type = custom/menu
expand-right = true
format-spacing = 3
format-padding = 3amixer get Master | tail -n 1 | awk -F ' ' '{print $5}' | tr -d '[]%'
format-background = ${colors.primary}
label-open = 
label-open-foreground = ${colors.secondary}
label-close = 
label-close-foreground = ${colors.secondary}
label-separator = |
label-separator-foreground = ${colors.fg-alt}
menu-0-0 = ﰇ
menu-0-0-exec = menu-open-1
menu-0-1 = 
menu-0-1-exec = menu-open-2
menu-1-0 = cancel
menu-1-0-exec = menu-open-0
menu-1-1 = reboot
menu-1-1-exec = reboot
menu-2-0 = cancel
menu-2-0-exec = menu-open-0
menu-2-1 = power off
menu-2-1-exec = poweroff
[module/whatsapp]
type = custom/text
content = 甆
content-padding = 2
content-foreground = ${colors.fg-alt}
click-left = exec whatsdesk &
[module/chrome]
type = custom/text
content = 
content-padding = 2
content-foreground = ${colors.fg-alt}
click-left = exec google-chrome-stable &
[module/mail]
type = custom/text
content = 
content-padding = 2
content-foreground = ${colors.fg-alt}
click-left = exec mailspring &
[module/firefox]
type = custom/text
content = 
content-padding = 2
content-foreground = ${colors.fg-alt}
click-left = exec firefox &
[module/appstore]
type = custom/text
content = 率
content-padding = 2
content-foreground = ${colors.fg-alt}
click-left = exec gnome-software &
[module/vscode]
type = custom/text
content = 
content-padding = 2
content-foreground = ${colors.fg-alt}
click-left = exec code &
[module/atom]
type = custom/text
content = ﱦ
content-padding = 2
content-foreground = ${colors.fg-alt}
click-left = exec atom &
[module/libreoffice]
type = custom/text
content = 
content-padding = 2
content-foreground = ${colors.fg-alt}
click-left = exec libreoffice &
[module/androidstudio]
type = custom/text
content = 
content-padding = 2
content-foreground = ${colors.fg-alt}
click-left = flatpak run com.google.AndroidStudio &
[module/files]
type = custom/text
content = 
content-padding = 2
content-foreground = ${colors.fg-alt}
click-left = dolphin >/dev/null 2>&1 &
[module/terminal]
type = custom/text
content = 
content-padding = 2
content-foreground = ${colors.fg-alt}
click-left = konsole >/dev/null 2>&1 &
[module/spotify_app]
type = custom/text
content = 
content-padding = 2
content-foreground = ${colors.fg-alt}
click-left = exec snap run spotify &
[module/screenshot]
type = custom/text
content-padding = 2
content = %{A1:exec ~/.config/rofi/scripts/screenshot.sh:}%{A}
content-foreground = ${colors.fg-alt}
[module/separator]
type = custom/text
content = |
content-padding = 2
[module/google.com]
type = custom/text
content = 
content-padding = 2
content-foreground = ${colors.fg-alt}
click-left = exec google-chrome google.com &
[module/youtube.com]
type = custom/text
content = 
content-padding = 2
content-foreground = ${colors.fg-alt}
click-left = exec google-chrome youtube.com &
[module/reddit.com]
type = custom/text
content = 
content-padding = 2
content-foreground = ${colors.fg-alt}
click-left = exec google-chrome reddit.com &
[module/github.com]
type = custom/text
content = 
content-padding = 2
content-foreground = ${colors.fg-alt}
click-left = exec google-chrome github.com &
[module/rofi-apps]
type = custom/text
content = 
content-padding = 3
content-foreground = ${colors.fg}
content-background = ${colors.primary}
click-left = rofi -show drun -show-icons -theme ~/.config/rofi/themes/drun.rasi
[module/rofi-window]
type = custom/text
content = 
content-padding = 3
content-foreground = ${colors.fg}
content-background = ${colors.primary}
click-left = rofi -show window -show-icons -theme ~/.config/rofi/themes/window.rasi
[module/spotify]
type = custom/script
interval = 1
format-prefix = " "
format-prefix-foreground = ${colors.spotify_green}
format-padding = 2
format = <label>
// exec = python ~/Documents/OtherGits/polybar_plugins/polybar-spotify/spotify_status.py -f '{artist} - {song}' -t 50
[module/info-trash]
type = custom/script
// exec = ~/Documents/OtherGits/polybar_plugins/polybar-scripts/polybar-scripts/info-trash/info-trash.sh
format = <label>
format-padding = 2
format-foreground = ${colors.fg-alt}
format-prefix = "  "
interval = 60
click-left = dolphin ~/.local/share/Trash/files/ >/dev/null 2>&1 &
[module/popup-calendar]
type = custom/script
// exec = ~/Documents/OtherGits/polybar_plugins/polybar-scripts/polybar-scripts/popup-calendar/popup-calendar.sh
interval = 5
click-left = ~/Documents/OtherGits/polybar_plugins/polybar-scripts/polybar-scripts/popup-calendar/popup-calendar.sh --popup &
format = <label>
format-padding = 2
format-prefix = " "
[module/system-uptime-pretty]
type = custom/script
// exec = ~/Documents/OtherGits/polybar_plugins/polybar-scripts/polybar-scripts/system-uptime-pretty/system-uptime-pretty.sh
interval = 30
format = <label>
format-padding = 2
format-prefix = 祥
[module/system-usb-udev]
type = custom/script
exec = ~/.config/polybar/scripts/system-usb-udev/system-usb-udev.sh
tail = true
click-left = ~/.config/polybar/scripts/system-usb-udev/system-usb-udev.sh --mount &
click-right = ~/.config/polybar/scripts/system-usb-udev/system-usb-udev.sh --unmount &
format = <lable>
format-prefix = "hi"
[settings]
screenchange-reload = true
[global/wm]
margin-top = 5
margin-bottom = 0
; vim:ft=dosini