Add second config of polybar for pc

This commit is contained in:
samedamci 2020-03-08 11:37:23 +01:00
parent b6ae34fe41
commit 24d0ca9c90
3 changed files with 372 additions and 1 deletions

View File

@ -0,0 +1,363 @@
; _ _
; _ __ ___ | | _ _ | |__ __ _ _ __
; | '_ \ / _ \ | || | | || '_ \ / _` || '__|
; | |_) || (_) || || |_| || |_) || (_| || |
; | .__/ \___/ |_| \__, ||_.__/ \__,_||_|
; |_| |___/
;~~~~~~~~
; colors
;~~~~~~~~
[colors]
bg= ${xrdb:background}
fg = ${xrdb:foreground}
border = ${xrdb:border_unfocused}
;~~~~~
; bar
;~~~~~
[bar/polybarexe]
width = 100%
height = 24
fixed-center = true
font-0 = "DejaVu Sans Mono:pixelsize=10:antialias=true;3"
font-1 = "Font Awesome 5 Brands:pixelsize=13:antialias=true;3"
font-2 = "Font Awesome 5 Free:style=Solid:pixelsize=12:antialias=true;3"
background = ${colors.bg}
foreground = ${colors.fg}
line-size = 3
line-color = ${colors.fg}
border-size = 0
border-top-size = 0
border-bottom-size = 1
border-color = ${colors.border}
padding-left = 0
padding-right = 1
module-margin-left = 0
module-margin-right = 0
modules-left = bspwm
modules-center = mpd
modules-right = alsa sym2 fsroot sym5 fshome sym2 coreuse temperature memory sym2 clock sym2 updater sym2 powermenu
cursor-click = pointer
cursor-scroll = ns-resize
;~~~~~~~~~~~~
; workspaces
;~~~~~~~~~~~~
[module/bspwm]
type = internal/bspwm
pin-workspaces = true
inline-mode = false
enable-click = true
enable-scroll = false
reverse-scroll = false
fuzzy-match = 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;"
format = <label-state><label-mode>
label-monitor = %name%
label-focused = %index% %icon%
label-focused-background = ${colors.border}
label-focused-overline = ${colors.fg}
label-occupied = %index% %icon%
label-occupied-padding = 1
label-focused-padding = 1
label-unfocused-padding = 0
label-visible-padding = 0
label-urgent = %index% %icon%
label-urgent-padding = 1
label-empty =
;~~~~~
; MPD
;~~~~~
[module/mpd]
type = internal/mpd
host = localhost
port = 6600
interval = 2
format-online = <label-song>
label-song = %{F#dfdfdf}%{F-} %artist% - %title%
label-offline = %{F#dfdfdf}%{F-} mpd is offline
icon-play = 
icon-pause = 
icon-stop = 
icon-prev = 
icon-next = 
icon-seekb = 
icon-seekf = 
icon-random = 
icon-repeat = 
toggle-on-foreground = #ff
toggle-off-foreground = #55
;~~~~~~
; WiFI
;~~~~~~
[module/wireless-network]
type = internal/network
interface = wlp8s0
format-connected = <ramp-signal> <label-connected>
format-packetloss = <animation-packetloss>
label-connected = %{A1:st -e nmtui:}%local_ip%  %downspeed%  %upspeed%%{A}
label-disconnected = %{A1:st -e nmtui:}%{A3:st -e nmtui:}%{F#66} disconnected%{A}%{A}
ramp-signal-0 = 
ramp-signal-1 = 
ramp-signal-2 = 
ramp-signal-3 = 
ramp-signal-4 = 
ramp-signal-5 = 
animation-packetloss-0 = 
animation-packetloss-1 = 
animation-packetloss-0-foreground = #fff
animation-packetloss-1-foreground = #000000
animation-packetloss-framerate = 500
;~~~~~~~
; clock
;~~~~~~~
[module/clock]
type = internal/date
format = <label>
interval = 2
date = %a %d %b
; 24h systefs sym2 m
;time = %R
; 12h system
time = %I:%M%p
label = %{A1:gsimplecal & disown:}%{A3:gsimplecal & disown:} %time%%{A}%{A}
;~~~~~~~~~~~~
; pulseaudio
;~~~~~~~~~~~~
[module/pulseaudio]
type = internal/pulseaudio
use-ui-max = true
label-volume = %{A3:pavucontrol & disown:}%percentage:2%%%{A}
format-volume = <ramp-volume> <label-volume>
label-muted = " muted"
ramp-volume-0 = ""
ramp-volume-1 = ""
ramp-volume-2 = ""
ramp-volume-3 = ""
;~~~~~~~
; ALSA
;~~~~~~
[module/alsa]
type = internal/alsa
master-soundcard = default
speaker-soundcard = default
headphone-soundcard = default
format-volume = <ramp-volume> <label-volume>
format-muted = <label-muted>
label-muted = " muted"
label-muted-foreground = #66
ramp-volume-0 = 
ramp-volume-1 = 
ramp-volume-2 = 
ramp-headphones-0 = 
ramp-headphones-1 = 
;~~~~~~~~~
; Battery
;~~~~~~~~~
[module/battery]
type = internal/battery
label-padding = 30
battery = BAT0
adapter = ADP1
full-at = 98
poll-interval = 5
bar-capacity-width = 10
time-format = %H:%M
format-charging = <animation-charging> <label-charging>
format-discharging = <ramp-capacity> <label-discharging>
format-full = <ramp-capacity> <label-full>
ramp-capacity-0 = " "
ramp-capacity-1 = " "
ramp-capacity-2 = ""
ramp-capacity-3 = ""
ramp-capacity-4 = ""
ramp-capacity-5 = ""
ramp-capacity-6 = ""
ramp-capacity-7 = ""
ramp-capacity-8 = ""
ramp-capacity-9 = ""
ramp-capacity-0-foreground = #fff
ramp-capacity-1-foreground = #fff
animation-charging-0 = " "
animation-charging-1 = " "
animation-charging-2 = " "
animation-charging-3 = " "
animation-charging-4 = " "
animation-charging-framerate = 750
label-full = full
;~~~~~~~~~
; CPU use
;~~~~~~~~~
[module/coreuse]
type = internal/cpu
interval = 3
format-padding = 0
format = <label> <ramp-coreload>
label = %{A1:st -e htop -s PERCENT_CPU & disown:}%percentage:2%%%{A}
ramp-coreload-0 = ▂
ramp-coreload-1 = ▃
ramp-coreload-2 = ▄
ramp-coreload-3 = ▅
ramp-coreload-4 = ▆
ramp-coreload-5 = ▇
ramp-coreload-0-foreground = ${colors.fg}
ramp-coreload-1-foreground = ${colors.fg}
ramp-coreload-2-foreground = ${colors.fg}
ramp-coreload-3-foreground = ${colors.fg}
ramp-coreload-4-foreground = ${colors.fg}
ramp-coreload-5-foreground = ${colors.fg}
;~~~~~~~~~~~~~~~~~
; CPU Temperature
;~~~~~~~~~~~~~~~~~
[module/temperature]
type = internal/temperature
interval = 3
thermal-zone = 0
warn-temperature = 75
format = <ramp><label>
format-padding = 1
label = %{A1:st -e watch sensors & disown:} %temperature-c%%{A}
ramp-0 = ""
ramp-1 = ""
ramp-2 = ""
ramp-3 = ""
ramp-4 = ""
ramp-5 = ""
ramp-5-foreground = ${colors.fg}
format-warn = <label-warn>
label-warn = " %temperature-c%"
label-warn-padding = 1
label-warn-foreground = ${colors.fg}
;~~~~~~~~
; Memory
;~~~~~~~~
[module/memory]
type = internal/memory
interval = 3
format = <label>
label-padding = 0
label = %{A1:st -e htop -s PERCENT_MEM & disown:} %gb_used%%{A}
;~~~~~~
; Disk
;~~~~~~
[module/fsroot]
type = internal/fs
mount-0 = /
interval = 10
fixed-values = true
spacing = 2
format-mounted =  <label-mounted>
format-unmounted = <label-unmounted>
label-mounted = %mountpoint%: %percentage_used%%
label-unmounted = %mountpoint%: not mounted
label-unmounted-foreground = #55
[module/fshome]
type = internal/fs
mount-0 = /home
interval = 10
fixed-values = true
spacing = 2
format-mounted = <label-mounted>
format-unmounted = <label-unmounted>
label-mounted = : %percentage_used%%
label-unmounted = %mountpoint%: not mounted
label-unmounted-foreground = #55
;~~~~~~~~~
; Updater
;~~~~~~~~~
[module/updater]
type = custom/script
exec = ~/.scripts/update-check.sh
label =  %output%
click-left = ~/.scripts/updater.sh
click-right = yay -Quq | dmenu -l 30
interval = 60
;~~~~~~~~~~~
; powermenu
;~~~~~~~~~~~
[module/powermenu]
type = custom/script
format-foreground = ${colors.fg}
exec = echo ""
click-left = ~/.scripts/powermenu.sh
;~~~~~
; "|"
;~~~~~
[module/sym]
type = custom/script
exec = echo " |"
[module/sym2]
type = custom/script
exec = echo " | "
[module/sym3]
type = custom/script
exec = echo "| "
[module/sym4]
type = custom/script
exec = echo "|"
[module/sym5]
type = custom/script
exec = echo " "
; vim:ft=dosini

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/zsh
greeter() {
cat <<EOF
@ -37,6 +37,14 @@ cd botfiles/.config
cp -r * ~/.config/
if [ "$HOST" = "pc" ]; then
echo "Use pc config"
mv ~/.config/polybar/config.pc ~/.config/polybar/config
else if [ "$HOST" = "laptop" ]; then
echo "Use laptop config..."
mv ~/.config/polybar/config.laptop ~/.config/polybar/config
fi
cd..
mkdir -p ~/.local/share/TelegramDesktop/tdata/
cp shortcuts-custom.json ~/.local/share/TelegramDesktop/tdata