This commit is contained in:
2023-05-24 14:14:36 +02:00
parent 5d399c7700
commit 10f6634765
596 changed files with 114803 additions and 375 deletions
+24
View File
@@ -0,0 +1,24 @@
[color]
BACKGROUND = #2E3440
FOREGROUND = #D8DEE9
ALTBACKGROUND = #39404f
ALTFOREGROUND = #768bb2
ACCENT = #81A1C1
BLACK = #3B4252
RED = #BF616A
GREEN = #A3BE8C
YELLOW = #EBCB8B
BLUE = #81A1C1
MAGENTA = #B48EAD
CYAN = #88C0D0
WHITE = #E5E9F0
ALTBLACK = #4C566A
ALTRED = #BF616A
ALTGREEN = #A3BE8C
ALTYELLOW = #EBCB8B
ALTBLUE = #81A1C1
ALTMAGENTA = #B48EAD
ALTCYAN = #8FBCBB
ALTWHITE = #ECEFF4
+99
View File
@@ -0,0 +1,99 @@
## Copyright (C) 2020-2023 Aditya Shakya <adi1090x@gmail.com>
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
;; Global WM Settings
[global/wm]
margin-bottom = 0
margin-top = 0
include-file = ../../system.ini
include-file = ./colors.ini
include-file = ./modules.ini
[bar/main]
monitor = ${env:MONITOR:}
monitor-strict = false
override-redirect = false
bottom = false
fixed-center = true
width = 100%
height = 24
offset-x = 0
offset-y = 0
background = ${color.BACKGROUND}
foreground = ${color.FOREGROUND}
radius-top = 0.0
radius-bottom = 0.0
line-size = 2
line-color = ${color.ACCENT}
border-size = 4
border-color = ${color.BACKGROUND}
padding = 1
module-margin-left = 0
module-margin-right = 0
font-0 = "Iosevka Nerd Font:size=10;3"
font-1 = "Iosevka Nerd Font:size=12;3"
font-2 = "google\-mdi:size=12;3"
font-3 = "Iosevka:style=bold:"size=12;3"
modules-left = i3
modules-center = mpd
modules-right = volume sep backlight sep network sep battery sep date
separator =
spacing = 0
dim-value = 1.0
wm-name = i3
locale =
tray-position = right
tray-detached = false
tray-maxsize = 16
tray-transparent = false
tray-background = ${color.BACKGROUND}
tray-offset-x = 0
tray-offset-y = 0
tray-padding = 0
tray-scale = 1.0
wm-restack = i3
enable-ipc = true
; i3
scroll-up =
scroll-down =
[settings]
throttle-output = 5
throttle-output-for = 10
throttle-input-for = 30
screenchange-reload = false
compositing-background = source
compositing-foreground = over
compositing-overline = over
compositing-underline = over
compositing-border = over
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
;; __________ ______
;; / ____/ __ \/ ____/
;; / __/ / / / / /_
;; / /___/ /_/ / __/
;; /_____/\____/_/
;;
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
+42
View File
@@ -0,0 +1,42 @@
#!/usr/bin/env bash
## Copyright (C) 2020-2023 Aditya Shakya <adi1090x@gmail.com>
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
CARD="$(light -L | grep 'backlight' | head -n1 | cut -d'/' -f3)"
INTERFACE="$(ip link | awk '/state UP/ {print $2}' | tr -d :)"
RFILE="$DIR/.module"
# Fix backlight and network modules
fix_modules() {
if [[ -z "$CARD" ]]; then
sed -i -e 's/backlight/bna/g' "$DIR"/config.ini
elif [[ "$CARD" != *"intel_"* ]]; then
sed -i -e 's/backlight/brightness/g' "$DIR"/config.ini
fi
if [[ "$INTERFACE" == e* ]]; then
sed -i -e 's/network/ethernet/g' "$DIR"/config.ini
fi
}
# Launch the bar
launch_bar() {
# 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 the bar
for mon in $(polybar --list-monitors | cut -d":" -f1); do
MONITOR=$mon polybar -q main -c "$DIR"/config.ini &
done
}
# Execute functions
if [[ ! -f "$RFILE" ]]; then
fix_modules
touch "$RFILE"
fi
launch_bar
+496
View File
@@ -0,0 +1,496 @@
## Copyright (C) 2020-2023 Aditya Shakya <adi1090x@gmail.com>
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
[module/i3]
type = internal/i3
; Only show workspaces defined on the same output as the bar
;
; Useful if you want to show monitor specific workspaces
; on different bars
;
; Default: false
pin-workspaces = true
; This will split the workspace name on ':'
; Default: false
strip-wsnumbers = true
; Sort the workspaces by index instead of the default
; sorting that groups the workspaces by output
; Default: false
index-sort = true
; Create click handler used to focus workspace
; Default: true
enable-click = true
; Create scroll handlers used to cycle workspaces
; Default: true
enable-scroll = true
; Wrap around when reaching the first/last workspace
; Default: true
wrapping-scroll = false
; Set the scroll cycle direction
; Default: true
reverse-scroll = false
; Use fuzzy (partial) matching on labels when assigning
; icons to workspaces
; Example: code;♚ will apply the icon to all workspaces
; containing 'code' in the label
; Default: false
fuzzy-match = true
; ws-icon-[0-9]+ = label;icon
; NOTE: The label needs to match the name of the i3 workspace
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;ﳴ
ws-icon-default =
; NOTE: You cannot skip icons, e.g. to get a ws-icon-6
; you must also define a ws-icon-5.
; Available tags:
; <label-state> (default) - gets replaced with <label-(focused|unfocused|visible|urgent)>
; <label-mode> (default)
format = <label-mode> <label-state>
format-background = ${color.BACKGROUND}
; Available tokens:
; %mode%
; Default: %mode%
label-mode = %mode%
label-mode-padding = 1
label-mode-background = ${color.YELLOW}
label-mode-foreground = ${color.BACKGROUND}
; Available tokens:
; %name%
; %icon%
; %index%
; %output%
; Default: %icon% %name%
label-focused = %icon%
label-focused-foreground = ${color.ACCENT}
label-focused-background = ${color.BACKGROUND}
label-focused-underline = ${color.ACCENT}
; Available tokens:
; %name%
; %icon%
; %index%
; %output%
; Default: %icon% %name%
label-unfocused = %icon%
label-unfocused-foreground = ${color.FOREGROUND}
; Available tokens:
; %name%
; %icon%
; %index%
; %output%
; Default: %icon% %name%
label-visible = %icon%
label-visible-foreground = ${color.GREEN}
; Available tokens:
; %name%
; %icon%
; %index%
; %output%
; Default: %icon% %name%
label-urgent = %icon%
label-urgent-foreground = ${color.RED}
; Paddings
label-focused-padding = 1
label-unfocused-padding = 1
label-visible-padding = 1
label-urgent-padding = 1
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
[module/volume]
type = internal/pulseaudio
; Sink to be used, if it exists (find using `pacmd list-sinks`, name field)
; If not, uses default sink
sink =
; Use PA_VOLUME_UI_MAX (~153%) if true, or PA_VOLUME_NORM (100%) if false
; Default: true
use-ui-max = false
; Interval for volume increase/decrease (in percent points)
; Default: 5
interval = 5
format-volume = <ramp-volume> <label-volume>
format-muted = <label-muted>
format-muted-prefix =
format-muted-prefix-font = 2
format-muted-prefix-foreground = ${color.RED}
label-volume = %percentage%%
label-muted = " Mute"
label-muted-foreground = ${color.ALTFOREGROUND}
ramp-volume-0 =
ramp-volume-1 =
ramp-volume-2 =
ramp-volume-3 = 奔
ramp-volume-4 = 奔
ramp-volume-5 = 奔
ramp-volume-6 =
ramp-volume-7 =
ramp-volume-8 =
ramp-volume-9 =
ramp-volume-font = 2
ramp-volume-foreground = ${color.BLUE}
ramp-headphones-0 =
ramp-headphones-1 =
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
[module/bna]
type = custom/text
content = " NA"
content-prefix =
content-prefix-font = 2
content-prefix-foreground = ${color.RED}
content-padding = 0
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
[module/backlight]
type = internal/xbacklight
card = intel_backlight
format = <ramp> <label>
label = %percentage%%
ramp-0 =
ramp-1 =
ramp-2 =
ramp-3 =
ramp-4 =
ramp-5 =
ramp-6 =
ramp-7 =
ramp-8 =
ramp-9 =
ramp-font = 2
ramp-foreground = ${color.MAGENTA}
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
[module/brightness]
type = internal/backlight
card = ${system.sys_graphics_card}
enable-scroll = true
format = <ramp> <label>
label = %percentage%%
ramp-0 =
ramp-1 =
ramp-2 =
ramp-3 =
ramp-4 =
ramp-5 =
ramp-6 =
ramp-7 =
ramp-8 =
ramp-9 =
ramp-font = 2
ramp-foreground = ${color.MAGENTA}
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
[module/battery]
type = internal/battery
full-at = 99
battery = ${system.sys_battery}
adapter = ${system.sys_adapter}
poll-interval = 2
time-format = %H:%M
format-charging = <animation-charging> <label-charging>
format-charging-prefix =
format-discharging = <ramp-capacity> <label-discharging>
format-full = <label-full>
format-full-prefix = " "
format-full-prefix-font = 2
format-full-prefix-foreground = ${color.RED}
label-charging = %percentage%%
label-discharging = %percentage%%
label-full = %percentage%%
ramp-capacity-0 =
ramp-capacity-1 =
ramp-capacity-2 =
ramp-capacity-3 =
ramp-capacity-4 =
ramp-capacity-font = 2
ramp-capacity-foreground = ${color.YELLOW}
animation-charging-0 =
animation-charging-1 =
animation-charging-2 =
animation-charging-3 =
animation-charging-4 =
animation-charging-font = 2
animation-charging-foreground = ${color.GREEN}
animation-charging-framerate = 750
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
[module/bspwm]
type = internal/bspwm
pin-workspaces = true
inline-mode = false
enable-click = true
enable-scroll = true
reverse-scroll = true
fuzzy-match = true
; ws-icon-[0-9]+ = label;icon
; Note that the label needs to correspond with the bspwm workspace name
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-default =
format = <label-state>
format-font = 2
label-monitor = %name%
; If any values for label-dimmed-N are defined, the workspace/mode
; colors will get overridden with those values if the monitor is out of focus
; To only override workspaces in a specific state, use:
; label-dimmed-focused
; label-dimmed-occupied
; label-dimmed-urgent
; label-dimmed-empty
;label-dimmed-foreground = ${color.FOREGROUND}
;label-dimmed-underline = ${color.YELLOW}
;label-dimmed-focused-background = ${color.BACKGROUND}
label-focused = %name%
label-focused-foreground = ${color.ACCENT}
label-focused-background = ${color.BACKGROUND}
label-focused-underline = ${color.ACCENT}
label-focused-padding = 1
label-occupied = %name%
label-occupied-foreground = ${color.GREEN}
label-occupied-background = ${color.BACKGROUND}
;label-occupied-underline = ${color.GREEN}
label-occupied-padding = 1
label-urgent = %name%
label-urgent-foreground = ${color.RED}
label-urgent-background = ${color.BACKGROUND}
label-urgent-underline = ${color.RED}
label-urgent-padding = 1
label-empty = %name%
label-empty-foreground = ${color.FOREGROUND}
label-empty-padding = 1
; Separator in between workspaces
label-separator = "∙"
label-separator-padding = 0
label-separator-foreground = ${color.ALTBACKGROUND}
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
[module/mod]
type = internal/bspwm
format = <label-mode>
format-background = ${color.YELLOW}
format-foreground = ${color.BACKGROUND}
format-padding = 1
label-monocle = "Monocle"
label-tiled = "Tiled"
label-floating = ", Float"
label-pseudotiled = ", Pseudo"
label-fullscreen = ", Full"
label-locked = " | Locked"
label-sticky = " | Sticky"
label-private = " | Private"
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
[module/date]
type = internal/date
interval = 1.0
time = %I:%M %p
time-alt = %a, %d %b %Y
format = <label>
format-prefix = " "
format-prefix-font = 3
format-prefix-foreground = ${color.RED}
label = %time%
label-font = 4
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
[module/mpd]
type = internal/mpd
;;host = 127.0.0.1
;;port = 6600
;;password = mysecretpassword
interval = 2
format-online = <label-song> <icon-prev> <toggle> <icon-next>
format-online-prefix = " "
format-online-prefix-foreground = ${color.GREEN}
format-playing = ${self.format-online}
format-paused = <label-song> <toggle>
format-offline = <label-offline>
format-offline-prefix = " "
format-offline-prefix-foreground = ${color.RED}
label-offline = "Offline"
label-song = "%title% | %artist%"
label-song-maxlen = 40
label-song-ellipsis = true
icon-play =
icon-play-font = 2
icon-play-foreground = ${color.GREEN}
icon-pause =
icon-pause-font = 2
icon-pause-foreground = ${color.YELLOW}
icon-stop =
icon-stop-foreground = ${color.RED}
icon-prev =
icon-prev-font = 2
icon-prev-foreground = ${color.CYAN}
icon-next =
icon-next-font = 2
icon-next-foreground = ${color.CYAN}
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
; If you use both a wired and a wireless network, add both modules in config.
[module/ethernet]
type = internal/network
interface = ${system.sys_network_interface}
interval = 1.0
accumulate-stats = true
unknown-as-up = true
format-connected = <label-connected>
format-connected-prefix = " "
format-connected-prefix-font = 3
format-connected-prefix-foreground = ${color.CYAN}
format-disconnected = <label-disconnected>
format-disconnected-prefix = " "
format-disconnected-prefix-font = 3
format-disconnected-prefix-foreground = ${color.RED}
format-disconnected-foreground = ${color.ALTFOREGROUND}
label-connected = "%{A1:~/.config/i3/scripts/network_menu &:}%downspeed% | %upspeed%%{A}"
label-disconnected = "%{A1:~/.config/i3/scripts/network_menu &:}Offline%{A}"
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
[module/network]
type = internal/network
interface = ${system.sys_network_interface}
interval = 1.0
;;ping-interval = 3
;;udspeed-minwidth = 5
accumulate-stats = true
unknown-as-up = true
format-connected = <ramp-signal> <label-connected>
format-disconnected = <label-disconnected>
format-disconnected-prefix = " "
format-disconnected-prefix-font = 3
format-disconnected-prefix-foreground = ${color.RED}
format-disconnected-foreground = ${color.ALTFOREGROUND}
label-connected = "%{A1:~/.config/i3/scripts/network_menu &:}%essid%%{A}"
label-disconnected = "%{A1:~/.config/i3/scripts/network_menu &:}Disconnected%{A}"
ramp-signal-0 =
ramp-signal-1 =
ramp-signal-2 =
ramp-signal-3 =
ramp-signal-4 =
ramp-signal-font = 3
ramp-signal-foreground = ${color.CYAN}
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
[module/sep]
type = custom/text
content =
content-background = ${color.BACKGROUND}
content-foreground = ${color.ALTBACKGROUND}
content-padding = 2
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
;; __________ ______
;; / ____/ __ \/ ____/
;; / __/ / / / / /_
;; / /___/ /_/ / __/
;; /_____/\____/_/
;;
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_