some changes...

This commit is contained in:
Harri Lahtinen 2023-07-28 00:07:23 +03:00
parent f57ce48a34
commit 006c022a84
5 changed files with 16 additions and 638 deletions

View File

@ -66,7 +66,7 @@ client.placeholder $base00 $base00 $base05 $base00 $base00
client.background $base07
bindsym $mod+d exec dmenu_run -nb '#2E3440' -sb '#88C0D0' -nf '#ECEFF4' -sf '#2E3440' -fn 'UbuntuMono Nerd Font-20' -h '35'
bindsym $mod+d exec dmenu_run -nb '#2E3440' -sb '#88C0D0' -nf '#ECEFF4' -sf '#2E3440' -fn 'UbuntuMono Nerd Font-20' -h '35'
# End flavours
###---Starting External Scripts---###
@ -74,8 +74,8 @@ bindsym $mod+d exec dmenu_run -nb '#2E3440' -sb '#88C0D0' -nf '#ECEFF4'
#exec --no-startup-id xrdb -merge .Xresources
#Start mopidy
#exec --no-startup-id mopidy &
#Twmn
exec --no-startup-id twmnd &
#Dunst
exec --no-startup-id dunst &
#Album art for mpd/mopidy
#Mpdscribble
#exec --no-startup-id mpdscribble --no-daemon &
@ -334,7 +334,7 @@ bindsym $mod+F1 exec --no-startup-id arandr
bindsym $mod+F2 exec --no-startup-id sudo systemctl hibernate
bindsym $mod+F3 exec --no-startup-id sudo systemctl restart NetworkManager
bindsym $mod+F4 exec --no-startup-id ~/.config/polybar/launch.sh
bindsym $mod+F5 exec --no-startup-id sudo systemctl restart bluetooth.service
bindsym $mod+F5 exec --no-startup-id sudo systemctl restart iwd.service
#bindsym $mod+F6 exec --no-startup-id systemctl --user restart wallpaper.service
###---Arrow Keys---###

View File

@ -1,614 +0,0 @@
; vim:ft=dosini
; _ _ _ _
; |_)/ \|\_/|_) /\ |_)
; | \_/|_| |_)/--\| \
;
[colors]
include-file = ~/.config/polybar/colors.ini
[bar/top]
monitor = ${env:MONITOR:eDP-1}
include-file = ~/.config/polybar/top-bar
modules-left = i3 arrow01 xwindow arrow0
modules-center =
modules-right = arrow10 redshift arrow9 vpn-wireguard-wg arrow7 wlan arrow6 pkg arrow5 pulseaudio-devices arrow4 battery arrow3 backlight arrow2 networkmanager arrow1 popup-calendar
;tray-position = right
;tray-padding = 2
;tray-transparent = true
;tray-background = #0063ff
[bar/bottom]
monitor = ${env:MONITOR:eDP-1}
include-file = ~/.config/polybar/bottom-bar
modules-left = hostname arrowb01
modules-center = cpu memory temperature filesystem
modules-right = arrowb1 openweather
[module/arrowb01]
type = custom/text
content = ""
content-foreground = ${colors.base0C}
content-background = ${colors.background}
[module/arrowb1]
type = custom/text
content = ""
content-foreground = ${colors.base0B}
content-background = ${colors.background}
[module/arrowb2]
type = custom/text
content = ""
content-foreground = ${colors.base09}
content-background = ${colors.background}
[module/arrow01]
type = custom/text
content = ""
content-foreground = ${colors.base03}
content-background = ${colors.base0A}
[module/arrow0]
type = custom/text
content = ""
content-foreground = ${colors.base0A}
content-background = ${colors.background}
[module/arrow1]
type = custom/text
content = ""
content-foreground = ${colors.base07}
content-background = ${colors.base0A}
[module/arrow2]
type = custom/text
content = ""
content-foreground = ${colors.base0A}
content-background = ${colors.base0F}
[module/arrow3]
type = custom/text
content = ""
content-foreground = ${colors.base0F}
content-background = ${colors.base08}
[module/arrow4]
type = custom/text
content = ""
content-foreground = ${colors.base08}
content-background = ${colors.base09}
[module/arrow5]
type = custom/text
content = ""
content-foreground = ${colors.base09}
content-background = ${colors.base0C}
[module/arrow6]
type = custom/text
content = ""
content-foreground = ${colors.base0C}
content-background = ${colors.base0B}
[module/arrow7]
type = custom/text
content = ""
content-foreground = ${colors.base0B}
content-background = ${colors.base0A}
[module/arrow8]
type = custom/text
content = ""
content-foreground = ${colors.base0F}
content-background = ${colors.base0A}
[module/arrow9]
type = custom/text
content = ""
content-foreground = ${colors.base0A}
content-background = ${colors.base09}
[module/arrow10]
type = custom/text
content = ""
content-foreground = ${colors.base09}
content-background = ${colors.background}
[module/pulseaudio-devices]
type = custom/script
label = "%output%"
label-font = 2
interval = 2.0
exec = ~/.config/polybar/scripts/pipewire/sound.sh
click-right = exec pavucontrol &
click-left = ~/.config/polybar/scripts/pipewire/sound.sh mute &
scroll-up = ~/.config/polybar/scripts/pipewire/sound.sh up &
scroll-down = ~/.config/polybar/scripts/pipewire/sound.sh down &
format-foreground = ${colors.base00}
format-background = ${colors.base09}
[module/bluetoothctl]
type = custom/script
exec = ~/.config/polybar/scripts/bluetoothctl.sh
tail = true
click-left = ~/.config/polybar/scripts/bluetoothctl.sh --toggle
label = " %output% "
label-foreground = ${colors.base00}
label-background = ${colors.base09}
;[module/vpn-nordvpn-status]
;type = custom/script
;exec = ~/.config/polybar/scripts/nordvpn/vpn-nordvpn-status.sh
;interval = 5
;label = " %output% "
;label-foreground = ${colors.base00}
;label-background = ${colors.base0F}
[module/vpn]
type = custom/script
exec = ~/.config/polybar/scripts/nordvpn/vpn_module.sh
click-left = ~/.config/polybar/scripts/nordvpn/vpn_module.sh --toggle-connection
click-right = ~/.config/polybar/scripts/nordvpn/vpn_module.sh --location-menu
click-middle = ~/.config/polybar/scripts/nordvpn/vpn_module.sh --ip_address
interval = 5
format = "  <label> "
format-background = ${colors.base0F}
[module/pavolume]
type = custom/script
tail = true
label = " %output% "
exec = ~/.config/polybar/scripts/pavolume.sh --listen
click-right = exec pavucontrol
click-left = ~/.config/polybar/scripts/pavolume.sh --togmute
scroll-up = ~/.config/polybar/scripts/pavolume.sh --up
scroll-down = ~/.config/polybar/scripts/pavolume.sh --down
format-foreground = ${colors.base00}
format-background = ${colors.base09}
[module/filesystem]
type = internal/fs
mount-0 = /
interval = 10
fixed-values = true
spacing = 4
format-mounted = <label-mounted>
format-unmounted = <label-unmounted>
label-mounted = "  %percentage_used%%"
label-mounted-foreground = ${colors.base09}
label-mounted-background = ${colors.background}
label-unmounted = %mountpoint%: not mounted
label-unmounted-foreground = ${colors.base0D}
[module/redshift]
type = custom/script
format-prefix = " "
exec = source ~/.config/polybar/scripts/redshift/env.sh && ~/.config/polybar/scripts/redshift/redshift.sh temperature
click-left = source ~/.config/polybar/scripts/redshift/env.sh && ~/.config/polybar/scripts/redshift/redshift.sh toggle
scroll-up = source ~/.config/polybar/scripts/redshift/env.sh && ~/.config/polybar/scripts/redshift/redshift.sh increase
scroll-down = source ~/.config/polybar/scripts/redshift/env.sh && ~/.config/polybar/scripts/redshift/redshift.sh decrease
interval=0.5
format-foreground = ${colors.base00}
format-background = ${colors.base09}
[module/backlight]
type = custom/script
interval = 0.2
exec = ~/.config/polybar/scripts/backlight.sh
scroll-up = exec light -A 5
scroll-down = exec light -U 5
format-prefix = "  "
format-prefix-foreground = ${colors.base00}
format-prefix-background = ${colors.base0F}
label = "%output%% "
label-foreground = ${colors.base00}
label-background = ${colors.base0F}
[module/popup-calendar]
type = custom/script
exec = ~/.config/polybar/scripts/popup-calendar.sh
interval = 5
click-left = ~/.config/polybar/scripts/popup-calendar.sh --popup
format-prefix = "  "
format-prefix-foreground = ${colors.base00}
format-prefix-background = ${colors.base07}
label = "%output% "
format-foreground = ${colors.base00}
format-background = ${colors.base07}
[module/vpncheck]
type = custom/script
exec = pgrep openvpn
interval = 5
label = "VPN "
format-prefix = "  "
format-prefix-foreground = ${colors.base00}
format-prefix-background = ${colors.base09}
label-foreground = ${colors.base00}
label-background = ${colors.base09}
[module/hostname]
type = custom/script
interval = 256
format = "<label>"
format-prefix = "  "
;format-prefix = ""
exec = echo "$(uname -nr)"
format-prefix-foreground = ${colors.base00}
format-prefix-background = ${colors.base0C}
label = "%output% "
label-foreground = ${colors.base00}
label-background = ${colors.base0C}
[module/vpn-wireguard-wg]
type = custom/script
exec = ~/.config/polybar/scripts/wireguard/vpn-wireguard-wg.sh
interval = 5
click-left = ~/.config/polybar/scripts/wireguard/vpn-wireguard-wg.sh --toggle &
label-foreground = ${colors.base00}
label-background = ${colors.base0A}
[module/temperature]
type = internal/temperature
thermal-zone = 6
#hwmon-path = /sys/devices/platform/coretemp.0/hwmon/hwmon6/temp1_input
hwmon-path = ${env:HWMON_PATH}
warn-temperature = 65
format = <ramp> <label>
format-underline = ${colors.base09}
format-warn = <ramp> <label-warn>
format-warn-underline = ${self.format-underline}
label = "%temperature-c% "
label-warn = " %temperature-c% "
label-warn-foreground = ${colors.base0C}
ramp-0 = " "
ramp-1 = " "
ramp-2 = " "
ramp-3 = " "
ramp-4 = " "
ramp-foreground = ${colors.base09}
[module/pkg]
type = custom/script
exec = "~/.config/polybar/scripts/arch/arch-updates.sh -s"
tail = true
format = "<label> "
#format-prefix = "  "
format-prefix = "  "
format-prefix-foreground = ${colors.base00}
format-foreground = ${colors.base00}
format-background = ${colors.base0C}
click-left = kitty -e yay --noconfirm -Syu
click-right = "~/.config/polybar/scripts/arch/arch-updates.sh -c&"
click-middle = "~/.config/polybar/scripts/arch/arch-updates.sh -n"
[module/openweather]
type = custom/script
exec = ~/.config/polybar/scripts/openweather.sh
tail = true
interval = 600
click-left = ~/.config/polybar/scripts/wttr.sh
format = <label>
format-foreground = ${colors.base00}
format-background = ${colors.base0B}
[module/i3]
type = internal/i3
format = <label-state> <label-mode>
index-sort = true
wrapping-scroll = false
; Only show workspaces on the same output as the bar
pin-workspaces = true
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:;
label-mode-padding = 1
label-mode-foreground = ${colors.base09}
label-mode-background = ${colors.base03}
; focused = Active workspace on focused monitor
label-focused = %icon%
label-focused-foreground = ${colors.base0D}
label-focused-background = ${colors.base03}
label-focused-padding = 1
; unfocused = Inactive workspace on any monitor
label-unfocused = %icon%
label-unfocused-foreground = ${colors.base09}
label-unfocused-background = ${colors.base03}
label-unfocused-padding = 1
; urgent = Workspace with urgency hint set
label-urgent = %icon%
label-urgent-background = ${colors.base0C}
label-urgent-padding = 1
[module/fm]
type = custom/text
content = " "
content-foreground = ${colors.base09}
click-left = st -e ranger &
click-right = pcmanfm &
[module/term]
type = custom/text
content = " "
content-foreground = ${colors.base09}
click-left = st &
click-right = st -e tmux new -s tmux1 &
[module/vpn1]
type = custom/text
content = " "
content-foreground = ${colors.base09}
click-left = "exec nordvpn connect"
click-right = "exec nordvpn disconnect"
[module/editor]
type = custom/text
content = " "
content-foreground = ${colors.base09}
click-left = st -e nvim &
click-right = leafpad &
[module/chrome]
type = custom/text
content = " "
content-foreground = ${colors.base09}
click-left = google-chrome-stable &
[module/music]
type = custom/text
content = " "
content-foreground = ${colors.base09}
click-left = st -e ncmpcpp &
click-right = gpmdp &
[module/workspace]
type = custom/script
interval = 1
label = %{A4:wmctrl -s "$(($(xprop -root _NET_CURRENT_DESKTOP | cut -d '=' -f 2 | cut -d ' ' -f 2)+1))":}%{A5:wmctrl -s "$(($(xprop -root _NET_CURRENT_DESKTOP | cut -d '=' -f 2 | cut -d ' ' -f 2)-1))":}%output%  %{A}%{A}
exec = echo "$(($(xprop -root _NET_CURRENT_DESKTOP | cut -d '=' -f 2 | cut -d ' ' -f 2)+1))"
format = <label>
format-prefix = "  "
format-prefix-foreground = ${colors.base00}
format-prefix-background = ${colors.base08}
format-background = ${colors.base08}
[module/window_count]
type = custom/script
interval = 1
label = %{A1:rofi -width 30 -location 1 -xoffset 3 -show window:}%output% %{A}
exec = echo "$(($(lsw | wc -l)-1))"
format = <label>
format-prefix = " "
format-prefix-foreground = ${colors.base0D}
[module/xtitle]
type = custom/script
interval = 1
label = %output%
label-maxlen = 40
exec = echo "$(xtitle)"
format = <label>
format-background = ${colors.base01}
format-prefix = " "
format-prefix-foreground = ${colors.base09}
format-padding = 1
[module/xwindow]
type = internal/xwindow
;format-padding = ${spacing.padding}
;label = "  %title%"
;label = "%title%"
label = " %title:0:30:...%"
label-maxlen = 150
label-foreground = ${colors.base00}
label-background = ${colors.base0A}
[module/mpd]
type = internal/mpd
format-online = <icon-prev> <icon-stop> <toggle> <icon-next> <label-song>
format-online-prefix = " "
format-online-prefix-foreground = ${colors.base0D}
fomat-online-foreground = ${colors.base0C}
format-online-background = ${colors.base01}
format-online-padding = 1
icon-play = 
icon-pause = 
icon-stop = 
icon-prev = 
icon-next = 
icon-random = 
label-song = %title%
label-song-maxlen = 25
label-song-ellipsis = true
toggle-on-foreground = ${colors.base09}
toggle-off-foreground = ${colors.base0D}
[module/xkeyboard]
type = internal/xkeyboard
color0list-0 = num lock
format-prefix = " "
format-prefix-foreground = ${colors.base0D}
label-layout = %layout%
label-indicator-padding = 1
label-indicator-margin = 1
label-indicator-foreground = ${colors.base08}
label-indicator-background = ${colors.background}
[module/cpu]
format-label = internal/cpu
format = <label>
type = internal/cpu
interval = 2
label = " %percentage%% "
format-foreground = ${colors.base09}
[module/memory]
type = internal/memory
interval = 2
label = " %percentage_used%%"
format-foreground = ${colors.base09}
[module/cputemp]
type = custom/script
exec = sensors | grep --max-count=1 "temp1" | awk '{print substr($0,16,2)}'
interval = 10
label = " %output%°C"
format-foreground = ${colors.base0D}
[module/clock]
type = custom/script
interval = 5
exec = echo "$(date +%R)"
format = <label>
;format-prefix = " "
format-foreground = ${colors.base0D}
label = %{A1:gsimplecal &:}%output%%{A}
[module/alsa]
type = internal/alsa
master-soundcard = default
speaker-soundcard = default
headphone-soundcard = default
master-mixer = Master
speaker-mixer = Speaker
headphone-mixer = Headphone
headphone-id = 19
mapped = true
interval = 5
format-volume = <ramp-volume> <label-volume>
label-volume = %percentage%%
label-volume-foreground = ${colors.base09}
format-muted = <label-muted>
format-muted-foreground = ${colors.base0C}
label-muted =  muted
ramp-volume-0 = 
ramp-volume-1 = 
ramp-volume-foreground = ${colors.base09}
ramp-headphones-0 = 
ramp-headphones-1 = 
[module/battery]
type = internal/battery
battery = BAT0
adapter = AC
full-at = 98
time-format = %H:%M
label-full = "%percentage%% "
label-charging = " %percentage%% "
label-discharging = " %percentage%% "
format-charging = <animation-charging><label-charging>
format-discharging = <animation-discharging><label-discharging>
format-charging-foreground = ${colors.base00}
format-charging-background = ${colors.base08}
label-charging-foreground = ${colors.base00}
label-charging-background = ${colors.base08}
format-discharging-foreground = ${colors.base00}
format-discharging-background = ${colors.base08}
label-discharging-foreground = ${colors.base00}
label-discharging-background = ${colors.base08}
format-full-prefix = "  "
format-full-prefix-foreground = ${colors.base00}
format-full-prefix-background = ${colors.base08}
format-low = ${colors.base00}
label-full-foreground = ${colors.base00}
label-full-background = ${colors.base08}
animation-charging-0 = " "
animation-charging-1 = " "
animation-charging-2 = " "
animation-charging-3 = " "
animation-charging-4 = " "
animation-charging-foreground = ${colors.base00}
animation-charging-background = ${colors.base08}
animation-charging-framerate = 500
animation-discharging-0 = " "
animation-discharging-1 = " "
animation-discharging-2 = " "
animation-discharging-3 = " "
animation-discharging-4 = " "
animation-discharging-framerate = 1000
animation-discharging-foreground = ${colors.base00}
animation-discharging-background = ${colors.base08}
[module/networkmanager]
type = custom/text
content = " net  "
content-foreground = ${colors.base00}
content-background = ${colors.base0A}
click-left = networkmanager_dmenu
[module/eth]
type = internal/network
interface = enp0s25
interval = 3.0
format-connected = <label-connected>
format-connected-prefix = " "
format-connected-prefix-foreground = ${colors.base0D}
format-disconnected = <label-disconnected>
label-connected = %{A1:networkmanager_dmenu:}%downspeed%%{A}
label-connected-foreground = ${colors.base09}
label-disconnected =
[module/wlan]
type = internal/network
interface = wlan0
interval = 3.0
format-connected = <label-connected>
label-connected = "  %essid%  %signal%  %upspeed:7%  %downspeed:7% "
format-connected-foreground = ${colors.base00}
format-connected-background = ${colors.base0B}
format-disconnected = <label-disconnected>
label-disconnected = "%{A1:connman-gtk &:}%{A}"
format-disconnected-foreground = ${colors.base00}
format-disconnected-background = ${colors.base08}
ramp-signal-0 = 
ramp-signal-1 = 
ramp-signal-2 = 
ramp-signal-3 = 
ramp-signal-4 = 
ramp-signal-foreground = ${colors.base00}
[module/powermenu]
type = custom/menu
format-spacing = 1
label-open = 
label-open-font = 2
label-open-foreground = ${colors.base08}
label-close = 
label-close-foreground = ${colors.base09}
label-separator = |
label-separator-foreground = ${colors.base0D}
menu-0-0 = 
menu-0-0-foreground = ${colors.base0C}
menu-0-0-exec = menu-open-1
menu-0-1 = 
menu-0-1-foreground = ${colors.base08}
menu-0-1-exec = menu-open-2
menu-1-0 = reboot?
menu-1-0-exec = /sbin/reboot
menu-1-1 = 
menu-1-1-exec = menu-open-0
menu-2-0 = 
menu-2-0-exec = menu-open-0
menu-2-1 = shutdown?
menu-2-1-exec = /sbin/poweroff
[settings]
screenchange-reload = true
;compositing-background = xor
;compositing-background = screen
;compositing-foreground = source
;compositing-border = over
;[global/wm]
;margin-top = 0
;margin-bottom = 0

View File

@ -1,23 +1,14 @@
#!/usr/bin/env sh
#!/usr/bin/env bash
# Terminate already running bar instances
killall -q polybar
# If all your bars have ipc enabled, you can use
polybar-msg cmd quit
# Otherwise you can use the nuclear option:
# killall -q polybar
# Wait until the processes have been shut down
while pgrep -x polybar >/dev/null; do sleep 1; done
# Launch bar1 and bar2
echo "---" | tee -a /tmp/polybar1.log /tmp/polybar2.log
polybar top 2>&1 | tee -a /tmp/polybar1.log & disown
polybar bottom 2>&1 | tee -a /tmp/polybar2.log & disown
# Set hwmon-path
for i in /sys/devices/platform/coretemp.0/hwmon/hwmon*/temp*_input; do
if [ "$(<$(dirname $i)/name): $(cat ${i%_*}_label 2>/dev/null || echo $(basename ${i%_*}))" = "coretemp: Package id 0" ]; then
export HWMON_PATH="$i"
fi
done
# Launch arch_updates script
~/.config/polybar/scripts/arch/arch-updates.sh & echo $! > ~/.config/polybar/scripts/arch/arch_updates.pid
# Launch
polybar top &
polybar bottom &
echo "Bar launched..."
echo "Bars launched..."

View File

@ -25,6 +25,7 @@ ctags
device-mapper
dialog
diffutils
dunst
e2fsprogs
etckeeper
exfat-utils
@ -183,6 +184,7 @@ wireguard-tools
wireless_tools
wpa_supplicant
xcursor-vanilla-dmz
xdg-desktop-portal
xdg-user-dirs
xdg-utils
xdo

View File

@ -39,7 +39,6 @@ redshift-minimal
rxfetch
systemd-boot-pacman-hook
ttf-weather-icons
twmn-git
wpgtk-git
yad-git
yay-bin