mirror of
https://github.com/dcarrillo/dotfiles.git
synced 2024-12-22 17:28:01 +00:00
[polybar] Add custom date module
This commit is contained in:
parent
5a007f25e8
commit
c132945659
@ -66,9 +66,8 @@ font-3 = NotoSans-Regular:size=18:weight=bold;2
|
||||
font-4 = NotoSans-Regular:size=18:weight=bold;-7
|
||||
|
||||
modules-left = spotify
|
||||
modules-center = date
|
||||
modules-center = custom_date
|
||||
modules-right = updates cpu_bar memory_bar vpn wireless wired alsa_bar
|
||||
|
||||
cursor-click = pointer
|
||||
cursor-scroll = ns-resize
|
||||
|
||||
|
@ -21,14 +21,14 @@ label-song-ellipsis = true
|
||||
|
||||
type = custom/script
|
||||
exec = ~/.config/polybar/scripts/cpu_usage.py
|
||||
format-prefix = "%{A1:$TERMINAL_CMD 'top -o %CPU' &:} %{A-}"
|
||||
format-prefix = "%{A1:$TERMINAL_CMD 'top -o %CPU' &:}CPU %{A-}"
|
||||
format-prefix-foreground = ${colors.foreground-alt}
|
||||
interval = 5
|
||||
|
||||
[module/memory_bar]
|
||||
type = internal/memory
|
||||
format = <bar-used>
|
||||
format-prefix = "%{A1:$TERMINAL_CMD 'top -o RES' &:}RAM %{A-}"
|
||||
format-prefix = "%{A1:$TERMINAL_CMD 'top -o RES' &:} %{A-}"
|
||||
format-prefix-foreground = ${colors.foreground-alt}
|
||||
|
||||
bar-used-width = 10
|
||||
@ -106,6 +106,13 @@ time-alt = %H:%M:%S
|
||||
|
||||
label = %{F#f5a70a}%{T4}%time%%{F-}%{T-} | %date%
|
||||
|
||||
[module/custom_date]
|
||||
|
||||
type = custom/script
|
||||
exec = ~/.config/polybar/scripts/custom_date
|
||||
interval = 1
|
||||
click-left = gnome-calendar
|
||||
|
||||
[module/alsa_bar]
|
||||
type = internal/alsa
|
||||
|
||||
@ -142,4 +149,3 @@ exec = ~/.config/polybar/scripts/check_updates
|
||||
tail = true
|
||||
interval = 5
|
||||
click-left = $TERMINAL_CMD "yay -Suy" &
|
||||
|
||||
|
7
.config/polybar/scripts/custom_date
Executable file
7
.config/polybar/scripts/custom_date
Executable file
@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
date=$(date "+%H:%M | %d de %B")
|
||||
hour_minute=$(echo "$date" | cut -f 1 -d"|")
|
||||
day_of_month=$(echo "$date" | cut -f 2 -d"|")
|
||||
|
||||
echo %{F#F5A70A}%{T4}"${hour_minute}"%{F-}%{T-} \|"$day_of_month"
|
Loading…
Reference in New Issue
Block a user