Created
January 30, 2017 12:04
-
-
Save Calvein/002772fa2703a3186dc4df184fea306a to your computer and use it in GitHub Desktop.
Polybar config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[colors] | |
background = #1b2b34 | |
foreground = #d8dee9 | |
transparent = #00ffffff | |
base08 = #ec5f67 | |
red = #ec5f67 | |
base09 = #f99157 | |
orange = #f99157 | |
base0a = #fac863 | |
yellow = #fac863 | |
base0b = #99c794 | |
green = #99c794 | |
base0c = #5fb3b3 | |
teal = #5fb3b3 | |
base0d = #6699cc | |
blue = #6699cc | |
base0e = #c594c5 | |
purple = #c594c5 | |
base0f = #ab7967 | |
brown = #ab7967 | |
[bar/master] | |
monitor = eDP-1 | |
width = 100% | |
height = 32 | |
; Hack to remove the bottom padding only | |
border-bottom-size = -7 | |
line-size = 3 | |
separator = " " | |
background = ${colors.background} | |
foreground = ${colors.foreground} | |
font-0 = Hack:size=12 | |
; 1px lower for up/down | |
font-1 = Hack:size=12;1 | |
; 2px lower for datetime | |
font-2 = Hack:size=12;2 | |
font-3 = FontAwesome:pixelsize=13 | |
[module/network] | |
type = internal/network | |
interface = wlp2s0 | |
ping-interval = 3 | |
[bar/top] | |
inherit = bar/master | |
modules-left = volume mpd | |
modules-center = title | |
modules-right = wifi powermenu | |
format-connected-padding = 1 | |
label-connected-padding-left = 1 | |
accumulate-stats = true | |
[module/volume] | |
type = internal/volume | |
ramp-volume-0 = | |
ramp-volume-1 = | |
ramp-volume-2 = | |
format-volume = <ramp-volume> <label-volume> | |
format-volume-padding = 1 | |
label-muted = | |
label-muted-foreground = ${colors.red} | |
format-muted-padding = 1 | |
mapping = true | |
[module/mpd] | |
type = internal/mpd | |
host = 127.0.0.1 | |
port = 6600 | |
format-online = <icon-prev> <toggle> <icon-next> <label-time> | <label-song> | |
label-song = %artist:0:30:...% - %title:0:30:...% | |
format-offline-foreground = ${colors.red} | |
label-offline = mpd is offline | |
icon-play = | |
icon-pause = | |
icon-stop = | |
icon-prev = | |
icon-next = | |
icon-seekb = | |
icon-seekf = | |
icon-random = | |
icon-repeat = | |
; Only applies if <bar-progress> is used | |
bar-progress-width = 10 | |
bar-progress-indicator = | | |
bar-progress-fill = ─ | |
bar-progress-empty = ─ | |
[module/title] | |
type = internal/xwindow | |
label = %title:0:70:...% | |
format-underline = ${colors.foreground} | |
[module/wifi] | |
inherit = module/network | |
label-connected = %{A:echo %local_ip% | xclip -sel clip:}%local_ip%%{A} %{A:termite -e "sudo wifi-menu" &:} %essid%%{A} | |
label-connected-padding-left = 0 | |
format-disconnected-padding = 1 | |
format-disconnected-foreground = ${colors.yellow} | |
label-disconnected = %{A:termite -e "sudo wifi-menu" &:}%{A} | |
[module/powermenu] | |
type = custom/menu | |
; Padding doesn't seem to be working | |
label-open = " " | |
label-open-foreground = ${colors.red} | |
label-close = cancel | |
label-close-foreground = ${colors.red} | |
label-separator = " | " | |
menu-0-0 = reboot | |
menu-0-0-exec = menu-open-1 | |
menu-0-1 = power off | |
menu-0-1-exec = menu-open-2 | |
menu-1-0 = cancel | |
menu-1-0-exec = menu-open-0 | |
menu-1-1 = reboot | |
menu-1-1-exec = termite -e 'sudo reboot' | |
menu-2-0 = power off | |
menu-2-0-exec = termite -e 'sudo poweroff' | |
menu-2-1 = cancel | |
menu-2-1-exec = menu-open-0 | |
[bar/bottom] | |
inherit = bar/master | |
bottom = true | |
modules-left = cpu ram temperature up-speed down-speed home root pkg | |
modules-center = workspaces | |
modules-right = backlight battery time | |
[module/cpu] | |
type = internal/cpu | |
interval = 0.5 | |
format-prefix = | |
format-prefix-foreground = ${colors.blue} | |
format-overline = ${colors.blue} | |
format-padding = 1 | |
label = %{A:termite -e htop &:}%percentage:2%%%{A} | |
label-padding-left = 1 | |
[module/ram] | |
type = internal/memory | |
interval = 3 | |
format-prefix = | |
format-prefix-foreground = ${colors.orange} | |
format-overline = ${colors.orange} | |
format-padding = 1 | |
label = %{A:termite -e htop &:}%percentage_used:2%%%{A} | |
label-padding-left = 1 | |
[module/temperature] | |
type = custom/script | |
exec = $HOME/.config/polybar/temperature.sh | |
interval = 10 | |
format-prefix = | |
format-prefix-foreground = ${colors.red} | |
format-overline = ${colors.red} | |
format-padding = 1 | |
label = %output%°C | |
label-padding-left = 1 | |
[module/up-speed] | |
inherit = module/network | |
format-connected-prefix = | |
format-connected-prefix-foreground = ${colors.teal} | |
format-connected-overline = ${colors.teal} | |
format-connected-padding = 1 | |
label-connected = %{T2}%upspeed:9%%{T-} | |
label-padding-left = 1 | |
[module/down-speed] | |
inherit = module/network | |
format-connected-prefix = | |
format-connected-prefix-foreground = ${colors.green} | |
format-connected-overline = ${colors.green} | |
format-connected-padding = 1 | |
label-connected = %{T2}%downspeed:9%%{T-} | |
label-padding-left = 1 | |
[module/home] | |
type = internal/fs | |
interval = 3600 | |
mount-0 = /home/calvein | |
format-mounted-prefix = | |
format-mounted-prefix-foreground = ${colors.yellow} | |
format-mounted-overline = ${colors.yellow} | |
format-mounted-padding = 1 | |
label-mounted = %{A:termite -e ranger &:}%free%%{A} | |
label-mounted-padding-left = 1 | |
[module/root] | |
type = internal/fs | |
interval = 3600 | |
mount-0 = / | |
format-mounted-prefix = | |
format-mounted-prefix-foreground = ${colors.brown} | |
format-mounted-overline = ${colors.brown} | |
format-mounted-padding = 1 | |
label-mounted = %{A:termite -e "ranger /" &:}%free%%{A} | |
label-mounted-padding-left = 1 | |
[module/pkg] | |
type = custom/script | |
interval = 600 | |
format = <label> | |
format-overline = ${colors.red} | |
label = %output% | |
; Check if connected to the internet by pinging duckduckgo | |
exec-if = "ping -q -w 2 -c 1 176.34.135.167 > /dev/null" | |
exec = $HOME/.config/polybar/pkg.sh | |
[module/workspaces] | |
type = internal/i3 | |
format = <label-mode> <label-state> | |
index-sort = true | |
label-focused = | |
label-focused-padding = 1 | |
label-unfocused = | |
label-unfocused-padding = 1 | |
label-unfocused-underlinde = ${colors.foreground} | |
label-urgent = | |
label-urgent-padding = 1 | |
label-urgent-foreground = ${colors.red} | |
label-visible = | |
label-visible-foreground = ${colors.foreground} | |
label-visible-padding = 1 | |
[module/backlight] | |
type = internal/backlight | |
card = intel_backlight | |
format-prefix = | |
format-prefix-foreground = ${colors.yellow} | |
format-padding = 1 | |
format-overline = ${colors.yellow} | |
label = %percentage% | |
label-padding-left = 1 | |
[module/battery] | |
type = internal/battery | |
full-at = 98 | |
battery = BAT0 | |
adapter = AC0 | |
time-format = %H:%M | |
format-charging = <animation-charging> <label-charging> | |
format-charging-foreground = ${colors.green} | |
format-charging-overline = ${colors.green} | |
format-charging-padding = 1 | |
format-discharging = <ramp-capacity> <label-discharging> | |
format-full-overline = ${colors.green} | |
format-full-padding = 1 | |
label-charging = %{F#b7b8b9}%percentage:2%%%{F-} %time% | |
label-discharging = %percentage:2%% %time% %{o- -o} | |
label-full = %{F#99c794}%{F-} %percentage%% %{F#fac863}%{F-} | |
format-padding = 1 | |
; Red | |
ramp-capacity-0 = %{F#ec5f67 o#ec5f67 +o} %{F-} | |
ramp-capacity-1 = %{F#ec5f67 o#ec5f67 +o} %{F-} | |
; Yellow | |
ramp-capacity-2 = %{F#fac863 o#fac863 +o} %{F-} | |
ramp-capacity-3 = %{F#fac863 o#fac863 +o} %{F-} | |
; Green | |
ramp-capacity-4 = %{F#99c794 o#99c794 +o} %{F-} | |
animation-charging-0 = | |
animation-charging-1 = | |
animation-charging-2 = | |
animation-charging-3 = | |
animation-charging-4 = | |
label-padding-left = 1 | |
[module/time] | |
type = internal/date | |
interval = 1 | |
format-prefix = | |
format-prefix-foreground = ${colors.teal} | |
format-overline = ${colors.teal} | |
format-padding = 1 | |
date = %a, %d %b | |
time = %T | |
label = %{T3}%date% %time%%{T-} | |
label-margin-top = 10 | |
label-padding-left = 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
totalPac=$(checkupdates | wc -l) | |
totalAur=$(cower -u | wc -l) | |
check=$((totalPac + totalAur)) | |
if [[ "$check" != "0" ]] | |
then | |
pac="%{A:termite -e 'yaourt -Syu' &:}$totalPac%{A}" | |
icon="%{F#ec5f67}%{F-}" | |
aur="%{A:termite -e 'yaourt -Syu --aur' &:}$totalAur%{A}" | |
echo "$pac $icon $aur" | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# this script read the core(s) temperature using lm sensors then calculate the average | |
# and send it to the ganglia using gmetric | |
# Based on the original from: http://computational.engineering.or.id/LM_Sensors#Integrasi_Dengan_Ganglia | |
# assumes that the lines reported by lm sensors are formated like this | |
# Core 0: +48.0°C (high = +90.0°C, crit = +100.0°C) | |
SENSORS=/usr/bin/sensors | |
let count=0 | |
sum=0.0 | |
for temp in $($SENSORS | grep "^Core" | grep -e '+.*C' | cut -f 2 -d '+' | cut -f 1 -d ' ' | sed 's/°C//'); do | |
sum=$(echo $sum+$temp | bc) | |
# echo $temp, $sum | |
let count+=1 | |
done | |
temp=$(echo "$sum/$count" | bc) | |
echo $temp |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment