First commit

This commit is contained in:
Yusuf İpek
2022-12-10 12:44:53 +03:00
commit b9f81411ac
26 changed files with 904 additions and 0 deletions
+11
View File
@@ -0,0 +1,11 @@
[colors]
background = #303643
background-module = #303643
light-blue = #9fa7ca
white = #ffffff
shade-1 = #5D5E72
shade-2 = #7A7B8C
shade-3 = #A0A0AB
shade-4 = #CACACE
shade-5 = #F8F8F8
+37
View File
@@ -0,0 +1,37 @@
include-file = $HOME/.config/polybar/colors.ini
[bar/main]
monitor = ${env:MONITOR}
width = 100%
height = 20
border-size = 5
line-size = 1
border-color = ${colors.background}
background = ${colors.background}
modules-left = round-left i3 round-right
modules-center = round-left title round-right
modules-right = round-left memory sep cpu sep networkspeeddown sep networkspeedup sep pipewire sep date round-righ
tray-detached = false
tray-offset-x = 0
tray-offset-y = 0
tray-padding = 2
tray-maxsize = 20
tray-scale = 1.0
tray-position = right
include-file = $HOME/.config/polybar/fonts.ini
include-file = $HOME/.config/polybar/modules/i3.ini
include-file = $HOME/.config/polybar/modules/date.ini
include-file = $HOME/.config/polybar/modules/round-left.ini
include-file = $HOME/.config/polybar/modules/round-right.ini
include-file = $HOME/.config/polybar/modules/pulseaudio.ini
include-file = $HOME/.config/polybar/modules/cpu.ini
include-file = $HOME/.config/polybar/modules/memory.ini
include-file = $HOME/.config/polybar/modules/network.ini
include-file = $HOME/.config/polybar/modules/title.ini
include-file = $HOME/.config/polybar/modules/sep.ini
include-file = $HOME/.config/polybar/modules/temperature.ini
include-file = $HOME/.config/polybar/modules/screenshot.ini
include-file = $HOME/.config/polybar/modules/pipewire.ini
include-file = $HOME/.config/polybar/modules/networkspeeddown.ini
include-file = $HOME/.config/polybar/modules/networkspeedup.ini
+4
View File
@@ -0,0 +1,4 @@
font-0 = "Noto Sans:size=10;1"
font-7 = "Material Icons:size=11;4"
font-8 = "JetBrainsMono Nerd Font:style=Medium Italic:size=15;4"
font-9 = "JetBrainsMono Nerd Font:style=Normal:size=8;3"
+8
View File
@@ -0,0 +1,8 @@
#!/bin/bash
killall -q polybar
echo "---" | tee -a /tmp/polybar.log
MONITOR="HDMI-0" polybar main 2>&1 | tee -a /tmp/polybar.log & disown
MONITOR="DVI-D-0" polybar main 2>&1 | tee -a /tmp/polybar.log & disown
echo "Bars launched..."
+8
View File
@@ -0,0 +1,8 @@
[module/cpu]
type = internal/cpu
interval = 1
format = <label>%
label =  %percentage%
format-background = ${colors.background-module}
format-padding = 1
+12
View File
@@ -0,0 +1,12 @@
[module/date]
type = internal/date
interval = 1
time = " %H:%M"
time-alt = " %a, %b %d %H:%M:%S"
format = <label>
format-background = ${colors.background-module}
format-padding = 1
format-prefix = %{T5}%{T-}
label = %{T2}%time%%{T-}
+7
View File
@@ -0,0 +1,7 @@
[module/filesystem]
type = internal/fs
interval = 180
mount-0 = /
label-mounted = %{F#0a81f5}%mountpoint%%{F-}%percentage_used%%
label-unmounted = %mountpoint% not mounted
label-unmounted-foreground = ${colors.foreground}
+19
View File
@@ -0,0 +1,19 @@
[module/i3]
type = internal/i3
format-background = ${colors.background-module}
index-sort = true
enable-click = true
#label-focused-background = ${colors.workspace-selected}
label-focused-underline = ${colors.light-blue}
label-focused = "%name%"
label-unfocused = "%name%"
label-visible = "%name%"
label-urgent = "%name%"
label-focused-padding = 2
label-unfocused-padding = 2
label-visible-padding = 2
label-urgent-padding = 2
label-mode-padding = 2
+9
View File
@@ -0,0 +1,9 @@
[module/memory]
type = internal/memory
interval = 5
format = <label>
format-background = ${colors.background-module}
format-padding = 1
label =  %gb_used% / %gb_total%
+9
View File
@@ -0,0 +1,9 @@
[module/network]
type = internal/network
interface = enp3s0
interface-type = wired
label-connected-background = ${colors.background-module}
label-disconnected-background = ${colors.background-module}
interval = 1
+15
View File
@@ -0,0 +1,15 @@
[module/networkspeeddown]
;https://github.com/jaagr/polybar/wiki/Module:-network
type = internal/network
;interface = wlp3s0
;interface = enp14s0
;interface = enp0s31f6
;interface = eth0
interface = enp3s0
label-connected = "%downspeed:7%"
format-connected = <label-connected>
format-connected-prefix = "D"
format-connected-prefix-foreground = #ffffffff
format-connected-foreground = ${colors.foreground}
format-connected-background = ${colors.background}
#format-connected-underline = #62FF00
+15
View File
@@ -0,0 +1,15 @@
[module/networkspeedup]
;https://github.com/jaagr/polybar/wiki/Module:-network
type = internal/network
;interface = wlp3s0
;interface = enp14s0
;interface = enp0s31f6
;interface = eth0
interface = enp3s0
label-connected = "%upspeed:7%"
format-connected = <label-connected>
format-connected-prefix = "U"
format-connected-prefix-foreground = #fffffff
format-connected-foreground = ${colors.foreground}
format-connected-background = ${colors.background}
#format-connected-underline = #f01313
+32
View File
@@ -0,0 +1,32 @@
[module/pipewire]
type = custom/script
tail = true
format-underline = ${colors.cyan}
label-padding = 2
label-foreground = ${colors.foreground}
# Icons mixed from Font Awesome 5 and Material Icons
# You can copy-paste your options for each possible action, which is more
# trouble-free but repetitive, or apply only the relevant ones (for example
# --node-blacklist is only needed for next-node).
exec = pulseaudio-control --icons-volume "" --icon-muted "" --node-nicknames-from "device.description" --node-nickname "alsa_output.pci-0000_00_1b.0.analog-stereo: Speakers" --node-nickname "alsa_output.usb-Kingston_HyperX_Virtual_Surround_Sound_00000000-00.analog-stereo: Headphones" listen
click-right = exec pavucontrol &
click-left = pulseaudio-control togmute
click-middle = pulseaudio-control --node-blacklist "alsa_output.pci-0000_01_00.1.hdmi-stereo-extra2" next-node
scroll-up = pulseaudio-control --volume-max 150 up
scroll-down = pulseaudio-control --volume-max 150 down
[module/pulseaudio-control-input]
type = custom/script
tail = true
format-underline = ${colors.cyan}
label-padding = 2
label-foreground = ${colors.foreground}
# Use --node-blacklist to remove the unwanted PulseAudio .monitor that are child of sinks
exec = pulseaudio-control --node-type input --icons-volume "" --icon-muted "" --node-nickname "alsa_output.pci-0000_0c_00.3.analog-stereo: Webcam" --node-nickname "alsa_output.usb-Kingston_HyperX_Virtual_Surround_Sound_00000000-00.analog-stereo: Headphones" --node-blacklist "*.monitor" listen
click-right = exec pavucontrol &
click-left = pulseaudio-control --node-type input togmute
click-middle = pulseaudio-control --node-type input next-node
scroll-up = pulseaudio-control --node-type input --volume-max 130 up
scroll-down = pulseaudio-control --node-type input --volume-max 130 down
+25
View File
@@ -0,0 +1,25 @@
#!/bin/bash
function main() {
SOURCE=$(pw-record --list-targets | sed -n 's/^*.*"\(.*\)" prio=.*$/\1/p')
SINK=$(pw-play --list-targets | sed -n 's/^*.*"\(.*\)" prio=.*$/\1/p')
VOLUME=$(pactl list sinks | sed -n "/${SINK}/,/Volume/ s!^[[:space:]]\+Volume:.* \([[:digit:]]\+\)%.*!\1!p")
IS_MUTED=$(pactl list sinks | sed -n "/${SINK}/,/Mute/ s/Mute: \(yes\)/\1/p")
action=$1
if [ "${action}" == "up" ]; then
pactl set-sink-volume @DEFAULT_SINK@ +10%
elif [ "${action}" == "down" ]; then
pactl set-sink-volume @DEFAULT_SINK@ -10%
elif [ "${action}" == "mute" ]; then
pactl set-sink-mute @DEFAULT_SINK@ toggle
else
if [ "${IS_MUTED}" != "" ]; then
echo "${SOURCE} |  MUTED ${SINK}"
else
echo "${SOURCE} |  ${VOLUME}% ${SINK}"
fi
fi
}
main "$@"
+18
View File
@@ -0,0 +1,18 @@
[module/pulseaudio]
type = internal/pulseaudio
use-ui-max = false
format-volume = <ramp-volume> <label-volume>
format-volume-background = ${colors.background-module}
format-muted-background = ${colors.background-module}
format-volume-padding = 1
format-muted-padding = 1
label-muted =  Mute
ramp-volume-0 =
ramp-volume-1 =
ramp-volume-2 =
ramp-volume-3 =
click-right = pavucontrol
+5
View File
@@ -0,0 +1,5 @@
[module/round-left]
type = custom/text
content = %{T9}%{T-}
content-foreground = ${colors.background-module}
+5
View File
@@ -0,0 +1,5 @@
[module/round-right]
type = custom/text
content = %{T9}%{T-}
content-foreground = ${colors.background-module}
+6
View File
@@ -0,0 +1,6 @@
[module/screenshot]
type = custom/text
content = %{T10}  %{T-}
content-background = ${colors.background-module}
click-left = flameshot gui
+5
View File
@@ -0,0 +1,5 @@
[module/sep]
type = custom/text
content =" | "
content-background = ${colors.background-module}
content-foreground = ${colors.light-blue}
+16
View File
@@ -0,0 +1,16 @@
[module/temperature]
type = internal/temperature
thermal-zone = 0
warn-temperature = 60
format-padding = 1
format = <label>
format-warn = <label-warn>
format-background = ${colors.background-module}
format-warn-background = ${colors.bg}
format-warn-padding = 1
label =  %temperature-c%
label-warn =  %temperature-c%
+8
View File
@@ -0,0 +1,8 @@
[module/title]
type = internal/xwindow
format = <label>
format-background = ${colors.background-module}
label = " %title% "
label-maxlen = 40
label-empty = Desktop