From d5678de06b90d90ecf1bbcc7f27e99fb769ee236 Mon Sep 17 00:00:00 2001 From: Pedro Araujo Date: Wed, 15 Apr 2020 15:57:25 -0300 Subject: [PATCH] first commit --- README.md | 9 +++++++ colors | 27 +++++++++++++++++++++ config | 55 ++++++++++++++++++++++++++++++++++++++++++ launch.sh | 10 ++++++++ modules/battery | 37 ++++++++++++++++++++++++++++ modules/code | 6 +++++ modules/cpu | 11 +++++++++ modules/date | 15 ++++++++++++ modules/filemanager | 6 +++++ modules/firefox | 8 ++++++ modules/google-chrome | 8 ++++++ modules/i3 | 21 ++++++++++++++++ modules/launcher | 8 ++++++ modules/lockscreen | 6 +++++ modules/memory | 11 +++++++++ modules/pulseaudio | 19 +++++++++++++++ modules/session | 7 ++++++ modules/steam | 7 ++++++ modules/temperature | 20 +++++++++++++++ modules/terminal | 6 +++++ modules/title | 8 ++++++ modules/window | 6 +++++ modules/wlan | 22 +++++++++++++++++ modules/xbacklight | 10 ++++++++ polybar-fox.png | Bin 0 -> 543758 bytes 25 files changed, 343 insertions(+) create mode 100644 README.md create mode 100644 colors create mode 100644 config create mode 100755 launch.sh create mode 100644 modules/battery create mode 100644 modules/code create mode 100644 modules/cpu create mode 100644 modules/date create mode 100644 modules/filemanager create mode 100644 modules/firefox create mode 100644 modules/google-chrome create mode 100644 modules/i3 create mode 100644 modules/launcher create mode 100644 modules/lockscreen create mode 100644 modules/memory create mode 100644 modules/pulseaudio create mode 100644 modules/session create mode 100644 modules/steam create mode 100644 modules/temperature create mode 100644 modules/terminal create mode 100644 modules/title create mode 100644 modules/window create mode 100644 modules/wlan create mode 100644 modules/xbacklight create mode 100644 polybar-fox.png diff --git a/README.md b/README.md new file mode 100644 index 0000000..762e3f6 --- /dev/null +++ b/README.md @@ -0,0 +1,9 @@ +![alt text](https://raw.githubusercontent.com/Murzchnvok/polybar-fox/master/polybar-fox.png) + +## Font (SourceCodePro and FontAwesome) +- [Nerd Fonts GitHub](https://github.com/ryanoasis/nerd-fonts) +- ***Please search how to install FontAwesome on your system.*** +- On Debian/Ubuntu: `sudo apt install fonts-font-awesome` + +## Wallpaper +- [wallpapersden](https://wallpapersden.com/adventures-lonely-night-out-wallpaper/) \ No newline at end of file diff --git a/colors b/colors new file mode 100644 index 0000000..5b08925 --- /dev/null +++ b/colors @@ -0,0 +1,27 @@ +[colors] +black = #000 +white = #FFF + +success = #00c853 +warning = #ffea00 +danger = #ff1744 + +trans = #00000000 +semi-trans = #75000000 + +bg = #000 +fg = #FFF + +prefix = #142D4C +label = #385170 + +code = #CAE8D5 +filemanager = #ABD6BB +firefox = #FFEC4A +i3 = #29B488 +google-chrome = #4C8BF5 +launcher = #142D4C +session = #DD5144 +steam = #00ADEE +terminal = #63FC01 +window = #EAD673 \ No newline at end of file diff --git a/config b/config new file mode 100644 index 0000000..dae11df --- /dev/null +++ b/config @@ -0,0 +1,55 @@ +; To learn more about how to configure Polybar +; go to https://github.com/polybar/polybar + +include-file = /home/$USER/.config/polybar/colors + +include-file = /home/$USER/.config/polybar/modules/battery +include-file = /home/$USER/.config/polybar/modules/cpu +include-file = /home/$USER/.config/polybar/modules/date +include-file = /home/$USER/.config/polybar/modules/filemanager +include-file = /home/$USER/.config/polybar/modules/i3 +include-file = /home/$USER/.config/polybar/modules/launcher +include-file = /home/$USER/.config/polybar/modules/lockscreen +include-file = /home/$USER/.config/polybar/modules/memory +include-file = /home/$USER/.config/polybar/modules/pulseaudio +include-file = /home/$USER/.config/polybar/modules/session +include-file = /home/$USER/.config/polybar/modules/temperature +include-file = /home/$USER/.config/polybar/modules/title +include-file = /home/$USER/.config/polybar/modules/window +include-file = /home/$USER/.config/polybar/modules/wlan +include-file = /home/$USER/.config/polybar/modules/xbacklight + +include-file = /home/$USER/.config/polybar/modules/code +include-file = /home/$USER/.config/polybar/modules/firefox +include-file = /home/$USER/.config/polybar/modules/google-chrome +include-file = /home/$USER/.config/polybar/modules/steam +include-file = /home/$USER/.config/polybar/modules/terminal + +[bar/main] +width = 100% +height = 27 +bottom = true +fixed-center = true + +background = ${colors.semi-trans} +foreground = ${colors.fg} + +module-margin-right = 1 + +font-0 = "SauceCodePro Nerd Font:style=Medium:size=9;2" +font-1 = "FontAwesome:size=10;2" +font-2 = "FontAwesome:size=12;3" +font-3 = "FontAwesome:size=14;3" + +modules-left = launcher window filemanager google-chrome firefox steam code i3 +modules-right = memory cpu xbacklight pulseaudio wlan battery temperature date session + +tray-position = right +tray-maxsize = 16 +tray-background = ${colors.label} + +cursor-click = pointer +cursor-scroll = ns-resize + +[settings] +screenchange-reload = true diff --git a/launch.sh b/launch.sh new file mode 100755 index 0000000..0c23ae7 --- /dev/null +++ b/launch.sh @@ -0,0 +1,10 @@ +#!/usr/bin/env bash + +# Terminate already running bar instances +killall polybar + +# Wait until the processes have been shut down +while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done + +# Launch polybar +polybar main -c /home/$USER/.config/polybar/config & diff --git a/modules/battery b/modules/battery new file mode 100644 index 0000000..ff2a085 --- /dev/null +++ b/modules/battery @@ -0,0 +1,37 @@ +[module/battery] +type = internal/battery +battery = BAT1 +adapter = ACAD +full-at = 98 + +format-charging = +format-charging-background = ${colors.label} +format-charging-foreground = ${colors.white} +label-charging = " %percentage%% " +label-charging-background = ${colors.label} +label-charging-foreground = ${colors.white} + +format-discharging = +format-discharging-background = ${colors.label} +format-discharging-foreground = ${colors.white} +label-discharging = " %percentage%% " +label-discharging-background = ${colors.label} +label-discharging-foreground = ${colors.white} + +format-full-background = ${colors.label} +format-full-foreground = ${colors.white} +format-full-prefix = %{T2}%{T-} +format-full-prefix-background = ${colors.prefix} +format-full-prefix-foreground = ${colors.white} +format-full-prefix-padding = 1 +label-full = " %percentage%% " + +ramp-capacity-0 = %{T2}%{T-} +ramp-capacity-1 = %{T2}%{T-} +ramp-capacity-2 = %{T2}%{T-} +ramp-capacity-3 = %{T2}%{T-} +ramp-capacity-4 = %{T2}%{T-} +;ramp-capacity-5 = %{T2}%{T-} +ramp-capacity-background = ${colors.prefix} +ramp-capacity-foreground = ${colors.white} +ramp-capacity-padding = 1 \ No newline at end of file diff --git a/modules/code b/modules/code new file mode 100644 index 0000000..a8229d5 --- /dev/null +++ b/modules/code @@ -0,0 +1,6 @@ +[module/code] +type = custom/script +click-left = code +exec = echo %{T3}%{T-} +format-foreground = ${colors.code} +format-padding = 1 \ No newline at end of file diff --git a/modules/cpu b/modules/cpu new file mode 100644 index 0000000..b381d8b --- /dev/null +++ b/modules/cpu @@ -0,0 +1,11 @@ +[module/cpu] +type = internal/cpu +interval = 1 + +format-background = ${colors.label} +format-foreground = ${colors.white} +format-prefix = %{T2}%{T-} +format-prefix-background = ${colors.prefix} +format-prefix-foreground = ${colors.white} +format-prefix-padding = 1 +label = " %percentage:2%% " \ No newline at end of file diff --git a/modules/date b/modules/date new file mode 100644 index 0000000..92f8410 --- /dev/null +++ b/modules/date @@ -0,0 +1,15 @@ +[module/date] +type = internal/date +interval = 1 + +time = " %H:%M " +time-alt = " %H:%M %a %d/%m " + +format-background = ${colors.label} +format-foreground = ${colors.white} +format-prefix = %{T2}%{T-} +format-prefix-background = ${colors.prefix} +format-prefix-foreground = ${colors.white} +format-prefix-padding = 1 + +label = %time% \ No newline at end of file diff --git a/modules/filemanager b/modules/filemanager new file mode 100644 index 0000000..4b8a3bc --- /dev/null +++ b/modules/filemanager @@ -0,0 +1,6 @@ +[module/filemanager] +type = custom/script +click-left = xdg-open ~/ +exec = echo %{T3}%{T-} +format-foreground = ${colors.filemanager} +format-padding = 1 \ No newline at end of file diff --git a/modules/firefox b/modules/firefox new file mode 100644 index 0000000..61818db --- /dev/null +++ b/modules/firefox @@ -0,0 +1,8 @@ +[module/firefox] +type = custom/script +click-left = firefox --browser& +click-middle = killall firefox& +click-right = firefox --private-window& +exec = echo %{T3}%{T-} +format-foreground = ${colors.firefox} +format-padding = 1 \ No newline at end of file diff --git a/modules/google-chrome b/modules/google-chrome new file mode 100644 index 0000000..bf9c297 --- /dev/null +++ b/modules/google-chrome @@ -0,0 +1,8 @@ +[module/google-chrome] +type = custom/script +click-left = google-chrome --new-window& +click-middle = killall chrome& +click-right = google-chrome --incognito& +exec = echo %{T3}%{T-} +format-foreground = ${colors.google-chrome} +format-padding = 1 diff --git a/modules/i3 b/modules/i3 new file mode 100644 index 0000000..b517848 --- /dev/null +++ b/modules/i3 @@ -0,0 +1,21 @@ +[module/i3] +type = internal/i3 +format = +index-sort = true +wrapping-scroll = false + +label-focused = %{T2}%{T-} +label-focused-foreground = ${colors.i3} +label-focused-padding = 1 + +label-unfocused = %{T2}%{T-} +label-unfocused-foreground = ${colors.i3} +label-unfocused-padding = ${self.label-focused-padding} + +label-visible = %{T2}%{T-} +label-visible-foreground = ${self.label-focused-foreground} +label-visible-padding = ${self.label-focused-padding} + +label-urgent = %{T2}%{T-} +label-urgent-foreground = ${colors.danger} +label-urgent-padding = ${self.label-focused-padding} \ No newline at end of file diff --git a/modules/launcher b/modules/launcher new file mode 100644 index 0000000..20adc45 --- /dev/null +++ b/modules/launcher @@ -0,0 +1,8 @@ +[module/launcher] +type = custom/script +click-left = rofi -show drun +click-right = rofi -show run +exec = echo %{T4}%{T-} +format-background = ${colors.launcher} +format-foreground = ${colors.white} +format-padding = 1 \ No newline at end of file diff --git a/modules/lockscreen b/modules/lockscreen new file mode 100644 index 0000000..a913d00 --- /dev/null +++ b/modules/lockscreen @@ -0,0 +1,6 @@ +[module/lockscreen] +type = custom/script +click-left = i3lock -n -c 03101C -e -f +exec = echo %{T3}%{T-} +format-foreground = ${colors.white} +format-padding = 1 \ No newline at end of file diff --git a/modules/memory b/modules/memory new file mode 100644 index 0000000..6853372 --- /dev/null +++ b/modules/memory @@ -0,0 +1,11 @@ +[module/memory] +type = internal/memory +interval = 1 + +format-background = ${colors.label} +format-foreground = ${colors.white} +format-prefix = %{T2}%{T-} +format-prefix-background = ${colors.prefix} +format-prefix-foreground = ${colors.white} +format-prefix-padding = 1 +label = " %percentage_used%% " \ No newline at end of file diff --git a/modules/pulseaudio b/modules/pulseaudio new file mode 100644 index 0000000..d671afb --- /dev/null +++ b/modules/pulseaudio @@ -0,0 +1,19 @@ +[module/pulseaudio] +type = internal/pulseaudio +use-ui-max = false + +format-volume = +label-volume = " %percentage%% " +label-volume-background = ${colors.label} +label-volume-foreground = ${colors.white} +label-muted = %{T2}%{T-} 0% +label-muted-background = ${colors.prefix} +label-muted-foreground = ${colors.white} +label-muted-padding = 1 + +ramp-volume-0 = %{T2}%{T-} +ramp-volume-1 = %{T2}%{T-} +ramp-volume-2 = %{T2}%{T-} +ramp-volume-background = ${colors.prefix} +ramp-volume-foreground = ${colors.white} +ramp-volume-padding = 1 \ No newline at end of file diff --git a/modules/session b/modules/session new file mode 100644 index 0000000..a245f83 --- /dev/null +++ b/modules/session @@ -0,0 +1,7 @@ +[module/session] +type = custom/script +click-left = obsession-logout -p "" +exec = echo %{T2}%{T-} +format-background = ${colors.prefix} +format-foreground = ${colors.session} +format-padding = 1 \ No newline at end of file diff --git a/modules/steam b/modules/steam new file mode 100644 index 0000000..2279ff4 --- /dev/null +++ b/modules/steam @@ -0,0 +1,7 @@ +[module/steam] +type = custom/script +click-left = steam& +click-middle = killall steam& +exec = echo %{T3}%{T-} +format-foreground = ${colors.steam} +format-padding = 1 \ No newline at end of file diff --git a/modules/temperature b/modules/temperature new file mode 100644 index 0000000..9aa2459 --- /dev/null +++ b/modules/temperature @@ -0,0 +1,20 @@ +[module/temperature] +type = internal/temperature +thermal-zone = 0 +warn-temperature = 60 + +format =