aboutsummaryrefslogtreecommitdiffstats
path: root/.config
diff options
context:
space:
mode:
authorVidhu Kant Sharma <vidhukant@vidhukant.com>2025-09-03 16:01:49 +0530
committerVidhu Kant Sharma <vidhukant@vidhukant.com>2025-09-03 16:01:49 +0530
commitc829dac7f42c381ae38e33283b4bb12515c26928 (patch)
tree96ebefaa8a2b34b9a64ddfe264bdaf9e742db475 /.config
parentaeb8bb6aae141b1674738bdfd58167ed0f9a10dc (diff)
added brightness and xwindow module
Diffstat (limited to '.config')
-rw-r--r--.config/polybar/bars.ini2
-rw-r--r--.config/polybar/colors.ini10
-rw-r--r--.config/polybar/modules.ini27
-rw-r--r--.config/polybar/powerline.ini5
4 files changed, 35 insertions, 9 deletions
diff --git a/.config/polybar/bars.ini b/.config/polybar/bars.ini
index 3b95f1f..d2e4cfa 100644
--- a/.config/polybar/bars.ini
+++ b/.config/polybar/bars.ini
@@ -69,7 +69,7 @@ font-2 = "Hack Nerd Font:style=Regular:size=11;3"
font-3 = "Hack Nerd Font:style=Regular:size=20;5"
font-4 = "Source Han Sans JP:style=Heavy:size=11;2" # font-1 but bold, make sure to edit accordingly
-modules-left = powerline0 date powerline1 wlan eth powerline2 storage-root powerline1 storage-home powerline2 cpu powerline1 temperature powerline2 memory powerline3
+modules-left = powerline0 date powerline1 wlan eth powerline2 storage-root powerline1 storage-home powerline2 cpu powerline1 temperature powerline2 memory powerline1 backlight powerline3 xwindow
modules-right = ewmh pulseaudio battery
override-redirect = true
diff --git a/.config/polybar/colors.ini b/.config/polybar/colors.ini
index fb10e26..84c268e 100644
--- a/.config/polybar/colors.ini
+++ b/.config/polybar/colors.ini
@@ -1,9 +1,7 @@
[colors]
mauve = #cba6f7
red = #f38ba8
-green = #a6e3a1
mantle = #181825
-teal = #94e2d5
peach = #fab387
background = #E611111b
@@ -16,12 +14,13 @@ systray-bg = ${colors.background}
module-color-0 = ${colors.mantle}
module-color-1 = ${colors.mauve}
-xwindow-fg = ${colors.module-color-0}
+xwindow-fg = ${colors.module-color-1}
+xwindow-bg = ${colors.background}
ws-active-fg = ${colors.foreground-alt}
ws-active-bg = ${colors.module-color-1}
-ws-occupied-fg = ${colors.teal}
+ws-occupied-fg = ${colors.module-color-1}
ws-occupied-bg = ${colors.background}
ws-empty-fg = ${colors.foreground-dull}
@@ -73,3 +72,6 @@ batt-discharging-fg = ${colors.foreground-alt}
batt-full-bg = ${colors.module-bg}
batt-full-fg = ${colors.module-color-0}
+
+backlight-bg = ${colors.module-color-0}
+backlight-fg = ${colors.foreground}
diff --git a/.config/polybar/modules.ini b/.config/polybar/modules.ini
index e88a788..2b6bb2a 100644
--- a/.config/polybar/modules.ini
+++ b/.config/polybar/modules.ini
@@ -12,8 +12,9 @@ label = %time%
[module/xwindow]
type = internal/xwindow
-label = " %title:0:50:...%"
+label = " %title:0:75:...%"
label-foreground = ${colors.xwindow-fg}
+label-background = ${colors.xwindow-bg}
[module/storage-root]
type = internal/fs
@@ -176,3 +177,27 @@ label-urgent = %name%
label-urgent-foreground = ${colors.ws-urgent-fg}
label-urgent-background = ${colors.ws-urgent-bg}
label-urgent-padding = 3
+
+[module/backlight]
+type = internal/backlight
+
+card = amdgpu_bl2
+use-actual-brightness = true
+poll-interval = 0
+
+label = " %{T3}󰳲 %{T-}%percentage%% "
+format-foreground = ${colors.backlight-fg}
+format-background = ${colors.backlight-bg}
+
+; Enable changing the backlight with the scroll wheel
+; NOTE: This may require additional configuration on some systems. Polybar will
+; write to `/sys/class/backlight/${self.card}/brightness` which requires polybar
+; to have write access to that file.
+; DO NOT RUN POLYBAR AS ROOT.
+; The recommended way is to add the user to the
+; `video` group and give that group write-privileges for the `brightness` file.
+; See the ArchWiki for more information:
+; https://wiki.archlinux.org/index.php/Backlight#ACPI
+; Default: false
+enable-scroll = true
+scroll-interval = 1
diff --git a/.config/polybar/powerline.ini b/.config/polybar/powerline.ini
index 5343edb..85ace58 100644
--- a/.config/polybar/powerline.ini
+++ b/.config/polybar/powerline.ini
@@ -23,13 +23,12 @@ content-background = ${colors.module-color-1}
type = custom/text
content = ""
content-font = 4
-content-foreground = ${colors.module-color-1}
+content-foreground = ${colors.module-color-0}
content-background = ${colors.background}
[module/powerline4]
type = custom/text
-content = ""
+content = ""
content-font = 4
content-foreground = ${colors.module-color-1}
content-background = ${colors.background}
-