diff options
| author | Spacedio <spacedio@thernusen.net> | 2026-02-22 10:07:58 -0500 |
|---|---|---|
| committer | Spacedio <spacedio@thernusen.net> | 2026-02-22 10:07:58 -0500 |
| commit | 569d1ef6983c7aa39f778513a9f8e4cd251f7d6a (patch) | |
| tree | 08f465d64fc9f7d51ef95b6066a6798609817641 /polybar/.config | |
| download | dotfiles-569d1ef6983c7aa39f778513a9f8e4cd251f7d6a.tar.gz | |
Initial commit
Diffstat (limited to 'polybar/.config')
| -rw-r--r-- | polybar/.config/polybar/colors.ini | 51 | ||||
| -rw-r--r-- | polybar/.config/polybar/config.ini | 222 | ||||
| -rwxr-xr-x | polybar/.config/polybar/launch.sh | 16 | ||||
| -rwxr-xr-x | polybar/.config/polybar/scripts/mic.sh | 23 |
4 files changed, 312 insertions, 0 deletions
diff --git a/polybar/.config/polybar/colors.ini b/polybar/.config/polybar/colors.ini new file mode 100644 index 0000000..0ff5a29 --- /dev/null +++ b/polybar/.config/polybar/colors.ini @@ -0,0 +1,51 @@ +;;# Tokyo-night +;[colors] + +;foreground = #a9b1d6 +;foreground2 = #bbc2cf +;background = #1a1b26 + +;black = #32344a +;red = #f7768e +;green = #9ece6a +;yellow = #ebcb8c +;blue = #7aa2f7 +;magenta = #ad8ee6 +;cyan = #449dab +;white = #e5e9f0 + +;alert = #bd2c40 + + +;# Tokyo-night-storm +[colors] +foreground = #a9b1d6 +foreground2 = #bbc2cf +background = #24283b + +black = #414868 +red = #f7768e +green = #9ece6a +yellow = #e0af68 +blue = #7aa2f7 +magenta = #bb9af7 +cyan = #7dcfff +white = #e5e9f0 + +alert = #bd2c40 + +;;# Dracula +;background = #21222c +;foreground = #f8f8f2 + +;black = #21222c +;red = #ff5555 +;green = #50fa7b +;yellow = #f1fa8c +;blue = #bd93f9 +;magenta = #ff92df +;cyan = #8be9fd +;white = #f8f8f2 + + + diff --git a/polybar/.config/polybar/config.ini b/polybar/.config/polybar/config.ini new file mode 100644 index 0000000..b6d3693 --- /dev/null +++ b/polybar/.config/polybar/config.ini @@ -0,0 +1,222 @@ +;========================================================== +; +; +; ██████╗ ██████╗ ██╗ ██╗ ██╗██████╗ █████╗ ██████╗ +; ██╔══██╗██╔═══██╗██║ ╚██╗ ██╔╝██╔══██╗██╔══██╗██╔══██╗ +; ██████╔╝██║ ██║██║ ╚████╔╝ ██████╔╝███████║██████╔╝ +; ██╔═══╝ ██║ ██║██║ ╚██╔╝ ██╔══██╗██╔══██║██╔══██╗ +; ██║ ╚██████╔╝███████╗██║ ██████╔╝██║ ██║██║ ██║ +; ╚═╝ ╚═════╝ ╚══════╝╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝ +; +; by husseinhareb :) +; +;========================================================== + +include-file = $HOME/.config/polybar/colors.ini + + +;[colors] +;background = #1E1E2E +;background-alt = #1E1E2E +;foreground = #C5C8C6 +;primary = #F0C674 +;secondary = #8ABEB7 +;alert = #A54242 +;disabled = #707880 +;white = #EAEAEA +;grey = #61616C +;green = #25D865 +;blue = #168ECA +;mauve = #490761 + +[settings] +screenchange-reload = true +pseudo-transparency = true + +[bar/main] + +width = 100% +height = 30pt +radius = 0 +;cursor-click = pointer +background = ${colors.background} +foreground = ${colors.foreground} + +font-0 = "Hasklug Nerd Font:weight=Regular:size=12" +font-1 = "Symbols Nerd Font Mono:size=14" + +line-size = 4pt + +;border-size = 1pt +;border-color = #0000000 + +padding-left = 1 +padding-right = 1 + +module-margin = 0 + + +;border-bottom-size = 1 +;border-bottom-color = ${colors.background2} + +;padding-left = 1 +;padding-right = 1 +;module-margin = 1 + +modules-left = void space space date space space xwindow +modules-center = xworkspaces +modules-right = cpu space space memory space separator space mic space space pulseaudio space separator space wlan space separator space battery space + +;modules-right = pulseaudio cpu memory wlan battery date + +[module/xworkspaces] +type = internal/xworkspaces + +label-active = +label-active-padding = 1 +label-active-foreground = ${colors.disabled} +label-active-font = 1 + +label-occupied = +label-occupied-padding = 1 +label-occupied-font = 1 + +label-empty = +label-empty-background = ${colors.background} +label-empty-padding = 1 +label-empty-font = 1 + +[module/xwindow] +type = internal/xwindow +label = %title:0:60:...% +label-foreground = ${colors.white} + +[network-base] +type = internal/network +interval = 5 +format-connected = <label-connected> +format-disconnected = <label-disconnected> +label-disconnected = %{F#F0C674}%ifname%%{F#707880} disconnected + +[module/cpu] +type = internal/cpu +interval = 2 +format-prefix = "CPU " +format-prefix-foreground = ${colors.primary} +label = %percentage:2%% + +[module/wlan] +inherit = network-base +interface-type = wireless +label-connected = %{F#F0C674}%ifname%%{F-} %essid% %local_ip% + +[module/memory] +type = internal/memory +interval = 2 +;format-prefix = " " +format-prefix-foreground = ${colors.magenta} +label = %gb_used% %percentage_used%% +label-foreground = ${colors.foreground} + +;[module/wlan] +;inherit = network-base +;interface-type = wireless + +;interval = 1 +;format-connected-prefix-foreground = ${colors.white} +;format-connected-foreground = ${colors.white} +;format-connected = <label-connected> +;label-connected = +;label-connected-padding = 0 + +;format-disconnected = <label-disconnected> +;format-disconnected-padding = 0 +;label-disconnected = +;label-disconnected-foreground = ${colors.white} +;label-disconnected-padding = 0 + +[module/mic] +type = custom/script +exec = ~/.config/polybar/scripts/mic.sh +interval = 1 # Update interval in seconds +format-foreground = ${colors.foreground} +format = <label> +label = %output% +click-left = ~/Scripts/mic.sh 1 + +[module/pulseaudio] +type = internal/pulseaudio + +format-volume-prefix = " " +format-volume-foreground = ${colors.foreground} +format-volume-prefix-foreground = ${colors.foreground} +format-volume = <label-volume> +label-volume = %percentage%% + +label-muted = %percentage%% +label-muted-foreground = ${colors.disabled} + +[module/battery] +type = internal/battery +full-at = 99 +low-at = 20 +battery = BAT0 +adapter = ADP1 +poll-interval = 5 +format-charging-foreground = ${colors.foreground} +format-discharging-foreground = ${colors.foreground} +format-charging = <animation-charging><label-charging> +format-discharging = <ramp-capacity><label-discharging> +label-charging = %percentage%% +label-discharging =%percentage%% +label-full = Full +label-low = LOW + +ramp-capacity-0 = " " +ramp-capacity-1 = " " +ramp-capacity-2 = " " +ramp-capacity-3 = " " +ramp-capacity-4 = " " + +bar-capacity-width = 10 + +animation-charging-0 = " " +animation-charging-1 = " " +animation-charging-2 = " " +animation-charging-3 = " " +animation-charging-4 = " " +animation-charging-framerate = 750 + +animation-discharging-0 = " " +animation-discharging-1 = " " +animation-discharging-2 = " " +animation-discharging-3 = " " +animation-discharging-4 = " " + +animation-discharging-framerate = 500 + +animation-low-0 = ! +animation-low-1 = +animation-low-framerate = 200 + +[module/date] +type = internal/date +interval = 1 +date = %I:%M %p|%d-%m +label = %date% +label-foreground = ${colors.primary} + +[module/void] +type = custom/text +content = +content-foreground = ${colors.green} +content-margin = 0 + +[module/space] +type = custom/text +content = " " + +[module/separator] +type = custom/text +content = "|" +content-foreground = ${colors.disabled} diff --git a/polybar/.config/polybar/launch.sh b/polybar/.config/polybar/launch.sh new file mode 100755 index 0000000..e0605ce --- /dev/null +++ b/polybar/.config/polybar/launch.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +# Terminate already running bar instances +pkill polybar + +# Wait until the processes have been shut down +while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done + +# Launch the default bar(s) +# Replace 'mybar' with the name(s) of your bar(s) defined in the config file +polybar & +# If you have multiple bars, you can launch them here as well, e.g.: +# polybar top & +# polybar bottom & + +echo "Bars launched..." diff --git a/polybar/.config/polybar/scripts/mic.sh b/polybar/.config/polybar/scripts/mic.sh new file mode 100755 index 0000000..2ed3165 --- /dev/null +++ b/polybar/.config/polybar/scripts/mic.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +mic_source=$(pactl info | grep "Default Source:" | awk '{print $3}') + +if [ "$1" == "1" ]; then + # Left mouse button clicked - toggle microphone mute status + pactl set-source-mute "$mic_source" toggle +fi + +# Get the microphone status (mute/unmute) +mic_status=$(pactl list sources | awk -v mic_source="$mic_source" '/^Source/ {in_source=0} $0 ~ ("Name: " mic_source) {in_source=1} in_source && /Mute:/ {print $2}') + +mic_volume=$(pactl list sources | awk -v mic_source="$mic_source" '/^Source/ {in_source=0} $0 ~ ("Name: " mic_source) {in_source=1} in_source && /Volume:/ {print $5}') + +# Convert the volume to percentage +mic_percentage=$(awk -v volume="$mic_volume" 'BEGIN {split(volume, a, "%"); print a[1]}') + +# Check the microphone status and set the output accordingly +if [ "$mic_status" == "yes" ]; then + echo " Muted" +else + echo " $mic_percentage%" +fi |
