add bspwm config

and update polybar
This commit is contained in:
horhik 2020-09-05 01:10:45 +03:00
parent 4003d811aa
commit d75b36b562
601 changed files with 17835 additions and 0 deletions

34
.config/bspwm/bspwmrc Executable file
View File

@ -0,0 +1,34 @@
#! /bin/sh
pgrep -x sxhkd > /dev/null || sxhkd &
bspc monitor -d 1 2 3 4 5 6 7 8 9 0
#          
bspc config border_width 2
bspc config active_border_color "#44475a"
bspc config normal_border_color "#282a36"
bspc config focused_border_color "#ff5555"
bspc config window_gap 12
bspc config split_ratio 0.52
bspc config borderless_monocle true
bspc config gapless_monocle true
bspc rule -a Gimp desktop='^8' state=floating follow=on
bspc rule -a Chromium desktop='^2'
bspc rule -a mplayer2 state=floating
bspc rule -a Kupfer.py focus=on
bspc rule -a Screenkey manage=off
#Startup
$HOME/.config/polybar/launch.sh
$HOME/Scripts/startup/touchpad.sh
$HOME/Scripts/startup/wifi.sh
picom &
setxkbmap -layout us,fi,ru

View File

@ -0,0 +1,431 @@
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
;;
;; ____
;; / __ )____ ___________
;; / __ / __ `/ ___/ ___/
;; / /_/ / /_/ / / (__ )
;; /_____/\__,_/_/ /____/
;;
;; Created By Aditya Shakya @adi1090x
;;
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
[module/volume]
type = internal/alsa
format-volume = <bar-volume>
format-volume-background = ${color.mf}
format-volume-foreground = ${color.fg}
format-volume-padding = 1
format-muted = <label-muted>
format-muted-background = ${color.mf}
format-muted-foreground = ${color.red}
format-muted-padding = 1
label-volume = %percentage%%
label-muted = "Muted"
bar-volume-width = 10
bar-volume-gradient = false
bar-volume-indicator =
bar-volume-indicator-foreground = ${color.fg}
bar-volume-indicator-font = 2
bar-volume-fill =
bar-volume-foreground-0 = ${color.bn}
bar-volume-foreground-1 = ${color.bn}
bar-volume-foreground-2 = ${color.bn}
bar-volume-foreground-3 = ${color.bn}
bar-volume-foreground-4 = ${color.bm}
bar-volume-foreground-5 = ${color.bm}
bar-volume-foreground-6 = ${color.bm}
bar-volume-foreground-7 = ${color.bd}
bar-volume-foreground-8 = ${color.bd}
bar-volume-fill-font = 2
bar-volume-empty =
bar-volume-empty-foreground = ${color.fg}
bar-volume-empty-font = 2
[module/volume_i]
type = internal/alsa
format-volume = <ramp-volume>
format-volume-background = ${color.blue}
format-volume-foreground = ${color.fg}
format-volume-padding = 1
format-muted-background = ${color.blue}
format-muted-foreground = ${color.red}
format-muted-padding = 1
label-muted = ""
label-muted-foreground = ${color.fg}
ramp-volume-0 =
ramp-volume-1 =
ramp-volume-2 =
ramp-volume-3 =
ramp-volume-4 =
ramp-headphones-0 =
ramp-headphones-1 =
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
[module/brightness]
type = internal/xbacklight
card = intel_backlight
format = <bar>
format-background = ${color.mf}
format-foreground = ${color.fg}
format-padding = 1
bar-width = 10
bar-gradient = false
bar-indicator =
bar-indicator-foreground = ${color.mf}
bar-indicator-font = 2
bar-fill =
bar-foreground-0 = ${color.bn}
bar-foreground-1 = ${color.bn}
bar-foreground-2 = ${color.bn}
bar-foreground-3 = ${color.bm}
bar-foreground-4 = ${color.bm}
bar-foreground-5 = ${color.bd}
bar-foreground-6 = ${color.bd}
bar-foreground-7 = ${color.bd}
bar-foreground-8 = ${color.bd}
bar-fill-font = 2
bar-empty =
bar-empty-foreground = ${color.fg}
bar-empty-font = 2
[module/brightness_i]
type = internal/xbacklight
card = intel_backlight
format = <ramp>
format-background = ${color.lime}
format-foreground = ${color.fg}
format-padding = 1
ramp-0 =
ramp-1 =
ramp-2 =
ramp-3 =
ramp-4 =
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
[module/battery_bar]
type = internal/battery
full-at = 99
battery = BAT1
adapter = ACAD
poll-interval = 2
time-format = %H:%M
format-charging = <bar-capacity>
format-charging-background = ${color.mf}
format-charging-foreground = ${color.fg}
format-charging-padding = 1
format-discharging = <bar-capacity>
format-discharging-background = ${color.mf}
format-discharging-foreground = ${color.fg}
format-discharging-padding = 1
label-full = Fully Charged
label-full-foreground = ${color.fg}
label-full-background = ${color.mf}
label-full-padding = 1
bar-capacity-width = 10
bar-capacity-gradient = false
bar-capacity-indicator =
bar-capacity-indicator-foreground = ${color.fg}
bar-capacity-indicator-font = 2
bar-capacity-fill =
bar-capacity-foreground-0 = ${color.bd}
bar-capacity-foreground-1 = ${color.bd}
bar-capacity-foreground-2 = ${color.bd}
bar-capacity-foreground-3 = ${color.bm}
bar-capacity-foreground-4 = ${color.bm}
bar-capacity-foreground-5 = ${color.bm}
bar-capacity-foreground-6 = ${color.bm}
bar-capacity-foreground-7 = ${color.bn}
bar-capacity-foreground-8 = ${color.bn}
bar-capacity-fill-font = 2
bar-capacity-empty =
bar-capacity-empty-foreground = ${color.fg}
bar-capacity-empty-font = 2
[module/battery_bar_i]
type = internal/battery
full-at = 99
battery = BAT1
adapter = ACAD
poll-interval = 2
time-format = %H:%M
format-charging = <animation-charging>
format-charging-background = ${color.green}
format-charging-foreground = ${color.fg}
format-charging-padding = 1
format-discharging = <ramp-capacity>
format-discharging-background = ${color.pink}
format-discharging-foreground = ${color.fg}
format-discharging-padding = 1
label-charging = %percentage%%
label-discharging = %percentage%%
label-full =
label-full-background = ${color.green}
label-full-foreground = ${color.fg}
label-full-padding = 1
ramp-capacity-0 =
ramp-capacity-1 =
ramp-capacity-2 =
ramp-capacity-3 =
animation-charging-0 =
animation-charging-1 =
animation-charging-2 =
animation-charging-3 =
animation-charging-framerate = 750
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
[module/cpu_bar]
type = internal/cpu
interval = 0.5
format = <bar-load> <label>
format-background = ${color.mf}
format-foreground = ${color.fg}
format-padding = 1
label = "%percentage%%"
bar-load-width = 10
bar-load-gradient = false
bar-load-indicator =
bar-load-indicator-foreground = ${color.fg}
bar-load-indicator-font = 2
bar-load-fill =
bar-load-foreground-0 = ${color.bn}
bar-load-foreground-1 = ${color.bn}
bar-load-foreground-2 = ${color.bn}
bar-load-foreground-3 = ${color.bm}
bar-load-foreground-4 = ${color.bm}
bar-load-foreground-5 = ${color.bm}
bar-load-foreground-6 = ${color.bd}
bar-load-foreground-7 = ${color.bd}
bar-load-foreground-8 = ${color.bd}
bar-load-fill-font = 2
bar-load-empty =
bar-load-empty-foreground = ${color.fg}
bar-load-empty-font = 2
[module/cpu_bar_i]
type = internal/cpu
interval = 0.5
format =
format-background = ${color.teal}
format-foreground = ${color.fg}
format-padding = 1
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
[module/filesystem_bar]
type = internal/fs
mount-0 = /
interval = 10
fixed-values = false
format-mounted = <bar-used> <label-mounted>
format-mounted-background = ${color.mf}
format-mounted-foreground = ${color.fg}
format-mounted-padding = 1
label-mounted = %used%/%total%
bar-used-width = 10
bar-used-gradient = false
bar-used-indicator =
bar-used-indicator-foreground = ${color.fg}
bar-used-indicator-font = 2
bar-used-fill =
bar-used-foreground-0 = ${color.bn}
bar-used-foreground-1 = ${color.bn}
bar-used-foreground-2 = ${color.bn}
bar-used-foreground-3 = ${color.bn}
bar-used-foreground-4 = ${color.bn}
bar-used-foreground-5 = ${color.bm}
bar-used-foreground-6 = ${color.bm}
bar-used-foreground-7 = ${color.bd}
bar-used-foreground-8 = ${color.bd}
bar-used-fill-font = 2
bar-used-empty =
bar-used-empty-foreground = ${color.fg}
bar-used-empty-font = 2
[module/filesystem_bar_i]
type = internal/fs
mount-0 = /
interval = 10
fixed-values = true
format-mounted =
format-mounted-background = ${color.green}
format-mounted-foreground = ${color.fg}
format-mounted-padding = 1
format-unmounted =
format-unmounted-background = ${color.red}
format-unmounted-foreground = ${color.fg}
format-unmounted-padding = 1
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
[module/memory_bar]
type = internal/memory
interval = 2
format = <bar-used> <label>
format-background = ${color.mf}
format-foreground = ${color.fg}
format-padding = 1
label = "%mb_used%"
bar-used-width = 10
bar-used-gradient = false
bar-used-indicator =
bar-used-indicator-foreground = ${color.fg}
bar-used-indicator-font = 2
bar-used-fill =
bar-used-foreground-0 = ${color.bn}
bar-used-foreground-1 = ${color.bn}
bar-used-foreground-2 = ${color.bn}
bar-used-foreground-3 = ${color.bm}
bar-used-foreground-4 = ${color.bm}
bar-used-foreground-5 = ${color.bm}
bar-used-foreground-6 = ${color.bd}
bar-used-foreground-7 = ${color.bd}
bar-used-foreground-8 = ${color.bd}
bar-used-fill-font = 2
bar-used-empty =
bar-used-empty-foreground = ${color.fg}
bar-used-empty-font = 2
[module/memory_bar_i]
type = internal/memory
interval = 3
format =
format-background = ${color.brown}
format-foreground = ${color.fg}
format-padding = 1
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
[module/mpd_bar]
type = internal/mpd
interval = 1
format-online = <label-song> <bar-progress> <label-time>
format-online-background = ${color.mf}
format-online-padding = 1
label-song = "%title%"
label-song-maxlen = 25
label-song-ellipsis = true
label-offline = "mpd is offline"
icon-play =
icon-pause =
icon-stop =
icon-prev =
icon-next =
bar-progress-width = 10
bar-progress-gradient = true
bar-progress-indicator =
bar-progress-indicator-foreground = ${color.fg}
bar-progress-indicator-font = 2
bar-progress-fill =
bar-progress-foreground-0 = ${color.bn}
bar-progress-foreground-1 = ${color.bn}
bar-progress-foreground-2 = ${color.bn}
bar-progress-foreground-3 = ${color.bm}
bar-progress-foreground-4 = ${color.bm}
bar-progress-foreground-5 = ${color.bm}
bar-progress-foreground-6 = ${color.bd}
bar-progress-foreground-7 = ${color.bd}
bar-progress-foreground-8 = ${color.bd}
bar-progress-fill-font = 2
bar-progress-empty =
bar-progress-empty-foreground = ${color.fg}
bar-progress-empty-font = 2
[module/mpd_bar_i]
type = internal/mpd
interval = 2
format-online = <toggle>
format-online-background = ${color.red}
format-online-padding = 1
icon-play =
icon-pause =
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
;; __________ ______
;; / ____/ __ \/ ____/
;; / __/ / / / / /_
;; / /___/ /_/ / __/
;; /_____/\____/_/
;;
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_

View File

@ -0,0 +1,75 @@
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
;;
;; ______ __
;; / ____/___ / /___ __________
;; / / / __ \/ / __ \/ ___/ ___/
;; / /___/ /_/ / / /_/ / / (__ )
;; \____/\____/_/\____/_/ /____/
;;
;; Created By Aditya Shakya @adi1090x
;;
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
[color]
;; Active Colors
bg = #f0282a36
fg = #d8dee9
fg-alt = #d8dee9
#mf = #4c566a
mf = #f0282a36
# mf = #3b4252
ac = #3b4252
;; Bars
bn = #a3be8c
bm = #d08770
bd = #bf616a
trans = #00000000
white = #FFFFFF
black = #000000
;; Colors
# red = #ff5555
# pink = #ff79c6
# purple =#bd93f9
# blue = #6272a4
# cyan = #8be9fd
# teal = #81a1c1k
# green = #50fa7b
# lime = #a3be8c
# yellow = #f1fa8c
# amber = #d08779
# orange = #ffb86c
# brown = #AC8476
# grey = #8C8C8C
# indigo = #6C77BB
# blue-gray = #6D8895
red = #ff5555
pink = #44475a
purple =#44475a
blue = #44475a
cyan = #ff5555
teal = #44475a
green = #44475a
lime = #44475a
yellow = #44475a
amber = #44475a
orange = #44475a
brown = #44475a
grey = #44475a
indigo = #44475a
blue-gray = #44475a
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
;; __________ ______
;; / ____/ __ \/ ____/
;; / __/ / / / / /_
;; / /___/ /_/ / __/
;; /_____/\____/_/
;;
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_

View File

@ -0,0 +1,492 @@
;; |
;; | ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
;; | ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
;; | ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
;; | ░░░░░░░░░░░░░░█░█░█▀█░█▀▄░█░█░▀█▀░█░█░▀░█▀▀░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
;; | ░░░░░░░░░░░░░░█▀█░█░█░█▀▄░█▀█░░█░░█▀▄░░░▀▀█░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
;; | ░░░░░░░░░░░░░░▀░▀░▀▀▀░▀░▀░▀░▀░▀▀▀░▀░▀░░░▀▀▀░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
;; | ░░░░░░░░░░░░░░█▀▄░█▀█░▀█▀░█▀▀░▀█▀░█░░░█▀▀░█▀▀░░░░░░░░░░░░░░░░░░░░░░░░░░░░
;; | ░░░░░░░░░░░░░░█░█░█░█░░█░░█▀▀░░█░░█░░░█▀▀░▀▀█░░░░░░░░░░░░░░░░░░░░░░░░░░░░
;; | ░░░░░░░░░░░░░░▀▀░░▀▀▀░░▀░░▀░░░▀▀▀░▀▀▀░▀▀▀░▀▀▀░░░░░░░░░░░░░░░░░░░░░░░░░░░░
;; | ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
;; | ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
;; | ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
;;
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
;;
;; ____ __ __
;; / __ \____ / /_ __/ /_ ____ ______
;; / /_/ / __ \/ / / / / __ \/ __ `/ ___/
;; / ____/ /_/ / / /_/ / /_/ / /_/ / /
;; /_/ \____/_/\__, /_.___/\__,_/_/
;; /____/
;;
;; Created By Aditya Shakya @adi1090x
;;
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
;; Global WM Settings
[global/wm]
; Adjust the _NET_WM_STRUT_PARTIAL top value
; Used for top aligned bars
margin-bottom = 0
; Adjust the _NET_WM_STRUT_PARTIAL bottom value
; Used for bottom aligned bars
margin-top = 0
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
;; File Inclusion
; include an external file, like module file, etc.
include-file = ~/.config/polybar/colors.ini
include-file = ~/.config/polybar/modules.ini
include-file = ~/.config/polybar/user_modules.ini
include-file = ~/.config/polybar/bars.ini
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
;; Bar Settings
[bar/main]
height = 20
offset-x =72%
offset-y = 0.5%
monitor = eDP-1
monitor-fallback =
width = 27.5%
top = true
fixed-center = false
line-size = 2
cursor-click = pointer
#background = ${color.bg}
background = ${color.bg}
foreground = ${color.fg}
border-right = 0
border-left= 0
border-top=0
border-bottom = 0
border-color = transparent
radius = 0
font-0 = "FantasqueSansMono Nerd Font:size=10;2"
font-1 = "typicons:size=12;2"
font-2 = "xos4 Terminus:size=12;2"
font-3 = "FontAwesome:style=Regular:pixelsize=12"
font-4 = "JetBrainsMono Nerd Font:size:12"
font-5 = "Font Awesome 5 Free:size:12"
modules-left =
modules-center =
modules-right = redshift_i redshift battery_i battery memory_i memory pulseaudio_i pulseaudio network_i network keyboard_i keyboard date_i date
separator =
spacing = 0
dim-value = 1.0
wm-name = bspwm
locale =
wm-restack =
enable-ipc = true
; Fallback click handlers that will be called if
; there's no matching module handler found.
click-left =
click-middle =
click-right =
double-click-left =
double-click-middle =
double-click-right =
cursor-scroll =
;; WM Workspace Specific
; bspwm
scroll-up =
scroll-down =
;;scroll-up = bspc desktop -f prev.local
;;scroll-down = bspc desktop -f next.local
[bar/main3]
monitor = eDP-1
monitor-fallback =
width = 20%
height = 20
offset-x =42%
offset-y = 0.5%
top = true
line-size = 2
cursor-click = pointer
background = ${color.bg}
foreground = ${color.fg}
border-right = 0
border-left= 0
border-top= 0
border-bottom = 0
border-color = transparent
radius = 0
font-0 = "FantasqueSansMono Nerd Font:size=10;2"
font-1 = "typicons:size=12;2"
font-2 = "xos4 Terminus:size=12;2"
font-3 = "FontAwesome:style=Regular:pixelsize=12"
font-4 = "JetBrainsMono Nerd Font:size:12"
font-5 = "Font Awesome 5 Free:size:12"
modules-left =
modules-center = title
modules-right =
separator =
spacing = 0
dim-value = 1.0
wm-name = bspwm
locale =
wm-restack =
enable-ipc = true
; Fallback click handlers that will be called if
; there's no matching module handler found.
click-left =
click-middle =
click-right =
double-click-left =
double-click-middle =
double-click-right =
cursor-scroll =
;; WM Workspace Specific
; bspwm
scroll-up =
scroll-down =
;;scroll-up = bspc desktop -f prev.local
;;scroll-down = bspc desktop -f next.local
[bar/main2]
monitor = eDP-1
monitor-fallback =
width = 21%
height = 20
offset-x =0.5%
offset-y = 0.5%
top = true
line-size = 2
cursor-click = pointer
background = ${color.bg}
foreground = ${color.fg}
border-right = 0
border-left= 0
border-top= 0
border-bottom = 0
border-color = transparent
radius = 0
font-0 = "FantasqueSansMono Nerd Font:size=10;2"
font-1 = "typicons:size=12;2"
font-2 = "xos4 Terminus:size=12;2"
font-3 = "FontAwesome:style=Regular:pixelsize=12"
font-4 = "JetBrainsMono Nerd Font:size:12"
font-5 = "Font Awesome 5 Free:size:12"
modules-left =
modules-center = bspwm
modules-right =
separator =
spacing = 0
dim-value = 1.0
wm-name = bspwm
locale =
wm-restack =
enable-ipc = true
; Fallback click handlers that will be called if
; there's no matching module handler found.
click-left =
click-middle =
click-right =
double-click-left =
double-click-middle =
double-click-right =
cursor-scroll =
;; WM Workspace Specific
tray-position = left
tray-detached = true
tray-maxsize = 48
tray-transparent = false
tray-background = ${color.bg}
tray-offset-x = 21.5%
tray-offset-y =
; Pad the sides of each tray icon
tray-padding = 0
; Scale factor for tray clients
tray-scale = 1.0
; bspwm
scroll-up =
scroll-down =
;;scroll-up = bspc desktop -f prev.local
;;scroll-down = bspc desktop -f next.local
[bar/second]
; Use either of the following command to list available outputs:
; If unspecified, the application will pick the first one it finds.
; $ polybar -m | cut -d ':' -f 1
; $ xrandr -q | grep " connected" | cut -d ' ' -f1
monitor = HDMI-1
; Use the specified monitor as a fallback if the main one is not found.
width = 100%
height = 20
offset-x = 5%
offset-y = 2%
top = true
fixed-center = false
line-size = 2
cursor-click = pointer
background = ${color.bg}
foreground = ${color.fg}
border-right = 0
border-left= 0
border-top=0
border-bottom = 0
border-color = transparent
radius = 0
font-0 = "FantasqueSansMono Nerd Font:size=10;2"
font-1 = "typicons:size=12;2"
font-2 = "xos4 Terminus:size=12;2"
font-3 = "FontAwesome:style=Regular:pixelsize=12"
font-4 = "JetBrainsMono Nerd Font:size:12"
font-5 = "Font Awesome 5 Free:size:12"
; Modules are added to one of the available blocks
; modules-left = cpu ram
; modules-center = xwindow xbacklight
; modules-right = ipc clock
;; Available modules
;;
;alsa backlight battery
;bspwm cpu date
;filesystem github i3
;memory mpd wired-network
;network pulseaudio temperature
;keyboard title workspaces
;;
;; User modules
;checknetwork updates window_switch launcher powermenu sysmenu menu style
;;
;; Bars
;cpu_bar memory_bar filesystem_bar mpd_bar
;volume brightness battery_bar
modules-left = bspwm
modules-center = title
modules-right = cpu_i cpu filesystem_i filesystem pulseaudio_i pulseaudio keyboard_i keyboard
; The separator will be inserted between the output of each module
separator =
; This value is used to add extra spacing between elements
; @deprecated: This parameter will be removed in an upcoming version
spacing = 0
; Opacity value between 0.0 and 1.0 used on fade in/out
dim-value = 1.0
; Value to be used to set the WM_NAME atom
; If the value is empty or undefined, the atom value
; will be created from the following template: polybar-[BAR]_[MONITOR]
; NOTE: The placeholders are not available for custom values
wm-name = bspwm
; Locale used to localize various module data (e.g. date)
; Expects a valid libc locale, for example: sv_SE.UTF-8
locale =
; Position of the system tray window
; If empty or undefined, tray support will be disabled
; NOTE: A center aligned tray will cover center aligned modules
;
; Available positions:
; left
; center
; right
; none
tray-position = right
; If true, the bar will not shift its
; contents when the tray changes
tray-detached = true
; Tray icon max size
tray-maxsize = 16
; DEPRECATED! Since 3.3.0 the tray always uses pseudo-transparency
; Enable pseudo transparency
; Will automatically be enabled if a fully transparent
; background color is defined using `tray-background`
tray-transparent = false
; Background color for the tray container
; ARGB color (e.g. #f00, #ff992a, #ddff1023)
; By default the tray container will use the bar
; background color.
tray-background = ${color.bg}
; Tray offset defined as pixel value (e.g. 35) or percentage (e.g. 50%)
tray-offset-x = 0
tray-offset-y = 0
; Pad the sides of each tray icon
tray-padding = 0
; Scale factor for tray clients
tray-scale = 1.0
; Restack the bar window and put it above the
; selected window manager's root
;
; Fixes the issue where the bar is being drawn
; on top of fullscreen window's
;
; Currently supported WM's:
; bspwm
; i3 (requires: `override-redirect = true`)
wm-restack =
;override-redirect = true
; Set a DPI values used when rendering text
; This only affects scalable fonts
; dpi =
; Enable support for inter-process messaging
; See the Messaging wiki page for more details.
enable-ipc = true
; Fallback click handlers that will be called if
; there's no matching module handler found.
click-left =
click-middle =
click-right =
scroll-up =
scroll-down =
double-click-left =
double-click-middle =
double-click-right =
; Requires polybar to be built with xcursor support (xcb-util-cursor)
; Possible values are:
; - default : The default pointer as before, can also be an empty string (default)
; - pointer : Typically in the form of a hand
; - ns-resize : Up and down arrows, can be used to indicate scrolling
cursor-scroll =
;; WM Workspace Specific
; bspwm
;;scroll-up = bspwm-desknext
;;scroll-down = bspwm-deskprev
;;scroll-up = bspc desktop -f prev.local
;;scroll-down = bspc desktop -f next.local
;i3
;;scroll-up = i3wm-wsnext
;;scroll-down = i3wm-wsprev
;;scroll-up = i3-msg workspace next_on_output
;;scroll-down = i3-msg workspace prev_on_output
;openbox
;awesome
;etc
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
;; Application Settings
[settings]
; The throttle settings lets the eventloop swallow up til X events
; if they happen within Y millisecond after first event was received.
; This is done to prevent flood of update event.
;
; For example if 5 modules emit an update event at the same time, we really
; just care about the last one. But if we wait too long for events to swallow
; the bar would appear sluggish so we continue if timeout
; expires or limit is reached.
throttle-output = 5
throttle-output-for = 10
; Time in milliseconds that the input handler will wait between processing events
throttle-input-for = 30
; Reload upon receiving XCB_RANDR_SCREEN_CHANGE_NOTIFY events
screenchange-reload = false
; Compositing operators
; @see: https://www.cairographics.org/manual/cairo-cairo-t.html#cairo-operator-t
compositing-background = source
compositing-foreground = over
compositing-overline = over
compositing-underline = over
compositing-border = over
; Define fallback values used by all module formats
format-foreground =
format-background =
format-underline =
format-overline =
format-spacing =
format-padding =
format-margin =
format-offset =
; Enables pseudo-transparency for the bar
; If set to true the bar can be transparent without a compositor.
pseudo-transparency = false
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
;; __________ ______
;; / ____/ __ \/ ____/
;; / __/ / / / / /_
;; / /___/ /_/ / __/
;; /_____/\____/_/
;;
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_

View File

@ -0,0 +1,319 @@
# This file has been auto-generated by i3-config-wizard(1).
# It will not be overwritten, so edit it as you like.
#
# Should you change your keyboard layout some time, delete
# this file and re-run i3-config-wizard(1).
#Look at existing keybindings names
# ```xmodmap -pke | grep %key%```
# i3 config file (v4)
#
# Please see https://i3wm.org/docs/userguide.html for a complete reference!
set $mod Mod4
# Font for window titles. Will also be used by the bar unless a different font
# is used in the bar {} block below.
font pango:Roboto Mono 10, FontAwesome 10
# This font is widely installed, provides lots of unicode glyphs, right-to-left
# text rendering and scalability on retina/hidpi displays (thanks to pango).
#font pango:DejaVu Sans Mono 8
# The combination of xss-lock, nm-applet and pactl is a popular choice, so
# they are included here as an example. Modify as you see fit.
# xss-lock grabs a logind suspend inhibit lock and will use i3lock to lock the
# screen before suspend. Use loginctl lock-session to lock your screen.
exec --no-startup-id xss-lock --transfer-sleep-lock -- i3lock --nofork
# NetworkManager is the most popular way to manage wireless networks on Linux,
# and nm-applet is a desktop environment-independent system tray GUI for it.
exec --no-startup-id nm-applet
# Redshift Night Mode
# exec_always --no-startup-id redshift -P -O 4000
set $TERMINAL alacritty
exec_always export TERMINAL=alacritty
# Use pactl to adjust volume in PulseAudio.
set $refresh_i3status killall -SIGUSR1 i3status
bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +10% && $refresh_i3status
bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -10% && $refresh_i3status
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle && $refresh_i3status
bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle && $refresh_i3status
#Screen brightnes
bindsym XF86MonBrightnessUp exec lux -a 5
bindsym XF86MonBrightnessDown exec lux -s 5
# Use Mouse+$mod to drag floating windows to their wanted position
floating_modifier $mod
# start a terminal
bindsym $mod+Return exec alacritty
# kill focused window
bindsym $mod+Shift+q kill
# start dmenu (a program launcher)
#bindsym $mod+d exec "rofi -modi run,drun -show drun -line-padding 4 -columns 2 -width 40 -padding 30 -hide-scrollbar -show-icons -drun-icon-theme Papirus"
set $TERMINAL alacritty
set $dmenu dmenu-terminal $TERMINAL
bindsym $mod+t exec $dmenu
bindsym $mod+d exec dmenu_run
# There also is the (new) i3-dmenu-desktop which only displays applications
# shipping a .desktop file. It is a wrapper around dmenu, so you need that
# installed.
# bindsym $mod+d exec --no-startup-id i3-dmenu-desktop
# change focus
bindsym $mod+h focus left
bindsym $mod+j focus down
bindsym $mod+k focus up
bindsym $mod+l focus right
# alternatively, you can use the cursor keys:
bindsym $mod+Left focus left
bindsym $mod+Down focus down
bindsym $mod+Up focus up
bindsym $mod+Right focus right
# move focused window
bindsym $mod+Shift+h move left
bindsym $mod+Shift+j move down
bindsym $mod+Shift+k move up
bindsym $mod+Shift+l move right
# alternatively, you can use the cursor keys:
bindsym $mod+Shift+Left move left
bindsym $mod+Shift+Down move down
bindsym $mod+Shift+Up move up
bindsym $mod+Shift+Right move right
# split in horizontal orientation
bindsym $mod+semicolon split h
# split in vertical orientation
bindsym $mod+v split v
# enter fullscreen mode for the focused container
bindsym $mod+f fullscreen toggle
# change container layout (stacked, tabbed, toggle split)
bindsym $mod+s layout stacking
bindsym $mod+w layout tabbed
bindsym $mod+e layout toggle split
# toggle tiling / floating
bindsym $mod+Shift+space floating toggle
# change focus between tiling / floating windows
bindsym $mod+Shift+alt focus mode_toggle
# focus the parent container
bindsym $mod+a focus parent
# focus the child container
#bindsym $mod+d focus child
# Define names for default workspaces for which we configure key bindings later on.
# We use variables to avoid repeating the names in multiple places.
set $ws1 "1"
set $ws2 "2"
set $ws3 "3"
set $ws4 "4"
set $ws5 "5"
set $ws6 "6"
set $ws7 "7"
set $ws8 "8"
set $ws9 "9"
set $ws10 "10"
# switch to workspace
bindsym $mod+1 workspace number $ws1
bindsym $mod+2 workspace number $ws2
bindsym $mod+3 workspace number $ws3
bindsym $mod+4 workspace number $ws4
bindsym $mod+5 workspace number $ws5
bindsym $mod+6 workspace number $ws6
bindsym $mod+7 workspace number $ws7
bindsym $mod+8 workspace number $ws8
bindsym $mod+9 workspace number $ws9
bindsym $mod+0 workspace number $ws10
# move focused container to workspace
bindsym $mod+Shift+1 move container to workspace number $ws1
bindsym $mod+Shift+2 move container to workspace number $ws2
bindsym $mod+Shift+3 move container to workspace number $ws3
bindsym $mod+Shift+4 move container to workspace number $ws4
bindsym $mod+Shift+5 move container to workspace number $ws5
bindsym $mod+Shift+6 move container to workspace number $ws6
bindsym $mod+Shift+7 move container to workspace number $ws7
bindsym $mod+Shift+8 move container to workspace number $ws8
bindsym $mod+Shift+9 move container to workspace number $ws9
bindsym $mod+Shift+0 move container to workspace number $ws10
# reload the configuration file
bindsym $mod+Shift+c reload
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
bindsym $mod+Shift+r restart
# exit i3 (logs you out of your X session)
bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -B 'Yes, exit i3' 'i3-msg exit'"
# resize window (you can also use the mouse for that)
mode "resize" {
# These bindings trigger as soon as you enter the resize mode
# Pressing left will shrink the windows width.
# Pressing right will grow the windows width.
# Pressing up will shrink the windows height.
# Pressing down will grow the windows height.
bindsym h resize shrink width 10 px or 10 ppt
bindsym j resize grow height 10 px or 10 ppt
bindsym k resize shrink height 10 px or 10 ppt
bindsym l resize grow width 10 px or 10 ppt
# same bindings, but for the arrow keys
bindsym Left resize shrink width 10 px or 10 ppt
bindsym Down resize grow height 10 px or 10 ppt
bindsym Up resize shrink height 10 px or 10 ppt
bindsym Right resize grow width 10 px or 10 ppt
# back to normal: Enter or Escape or $mod+r
bindsym Return mode "default"
bindsym Escape mode "default"
bindsym $mod+r mode "default"
}
bindsym $mod+r mode "resize"
# Start i3bar to display a workspace bar (plus the system information i3status
# finds out, if available)
#---BAR POLYBAR---#
exec_always --no-startup-id ~/.config/polybar/launch.sh
###############Stylizing##################
for_window [class="^.*"] border pixel 3
# border_radius 3
border_radius 0
#client.focused #488444 #488444 #488444 #488444 #488444
client.focused_inactive #282a36 #282a36 #282a36 #282a36 #282a36
#client.focused_inactive #333333 #5f676a #ffffff #484e50 #5f676a
client.focused #44475a #44475a #44475a #44475a #44475a
#client.unfocused #4c566a #4c566a #4c566a #4c566a #4c566a
###############STARTUP Utilites##################
exec /home/horhik/scripts/Startup/wifi.sh #WIFI
###---touchpad--##
exec --no-startup-id /home/horhik/Scripts/startup/touchpad.sh #WIFI
exec --ho-startup-id sh ssh-agent bash ; ssh-add ~/.ssh/arch
#---Audio---#
exec_always --no-startup-id pacmd set-card-profile 1 output:analog-stereo
exec_always --no-startup-id asoundconf set-default-card CODEC
exec_always --no-startup-id asoundconf set-default-card CODEC
#exec pulseaudio
#---/Audio---#
exec_always --no-startup-id xrandr --output HDMI-1 --above eDP-1
###############STARTUP Apps##################
#wallpapers
#transparetncy:
exec_always --no-startup-id compton --config ~/.config/compton/compton.conf
#microphone
exec 'pactl set-card-profile alsa_card.usb-Burr-Brown_from_TI_USB_Audio_CODEC-00 output:iec958-stereo+input:analog-stereo'
#---GAPS---#
exec --no-startup-id i3-msg gaps inner all set 10
exec_always --no-startup-id i3-msg smart_borders on
set $mode_gaps Gaps: (h) plus, (j) enable, (k) reset, (l) minus
bindsym $mod+Shift+g mode "$mode_gaps"
mode "$mode_gaps" {
bindsym j gaps inner current plus 5
bindsym h gaps inner current set 10
bindsym l gaps inner current set 0
bindsym k gaps inner current minus 5
bindsym k gaps inner current minus 5
bindsym Return mode "default"
bindsym Escape mode "default"
}
set $mode_apps Apps:(n)otion,(f)irefox,(t)ick-tick,(m)ail,(p)rotonmail
bindsym $mod+Shift+a mode "$mode_apps"
set $firefox firefox-developer-edition
mode "$mode_apps" {
bindsym f exec $firefox
bindsym n exec $firefox --ssb https://notion.so & i3-msg mode 'default'
bindsym Shift+s exec $firefox --ssb https://music.yandex.com & i3-msg mode 'default'
bindsym t exec $firefox --ssb https://ticktick.com & i3-msg mode 'default'
bindsym m exec $firefox --ssb https://tutanota.io & i3-msg mode 'default'
bindsym p exec $firefox --ssb https://protonmail.com & i3-msg mode 'default'
bindsym q exec qdirstat
bindsym s exec flatpak run com.valvesoftware.Steam
#evince book reader
bindsym b exec evince
bindsym s exec $firefox https://soundcloud.com
#watch Toggl Timer
bindsym w exec surf https://toggl.com/app/timer
bindsym y exec $firefox music.yandex.ru/
bindsym d exec surf https://www.collinsdictionary.com/
#bindsym Return mode "default"
bindsym Escape mode "default"
}
#---shortcuts---#
bindsym $mod+Shift+s exec flameshot gui
#---Language---#
exec_always setxkbmap -layout us,ru
exec_always xkb-switch -s us,ru
bindsym $mod+space exec xkb-switch -n
#--Floating togglable windows--#
# Terminal
for_window [title="dropdown"] floating enable
for_window [title="dropdown"] resize set 825 600
for_window [title="dropdown"] move scratchpad
for_window [title="dropdown"] floating enable
for_window [title="dropdown"] border pixel 3
exec --no-startup-id alacritty -t dropdown -e tmux
bindsym $mod+u [title="dropdown"] scratchpad show; [title="dropdown"] move position center
# Toggl timer
for_window [title="@cgDISVMFxT:T | Toggl"] floating enable
for_window [title="@cgDISVMFxT:T | Toggl"] resize set 800 70
for_window [title="@cgDISVMFxT:T | Toggl"] move scratchpad
for_window [title="@cgDISVMFxT:T | Toggl"] floating enable
for_window [title="@cgDISVMFxT:T | Toggl"] border pixel 3
bindsym $mod+Shift+t [title="@cgDISVMFxT:T | Toggl"] scratchpad show; [title="@cgDISVMFxT:T | Toggl"] move position center
exec --no-startup-id surf https://toggl.com/app/timer
#Emoji
bindsym $mod+period exec rofimoji
# Usage
# Hit enter to insert the emoji directly
# Hit alt+c to copy it to the clipboard
# alt+t or alt+p can be used to select a specific input method
# alt+1 inserts the most recently used character (alt+2 for the second most recently one etc.)
exec variety
exec_always --no-startup-id variety --next
exec "workspace 6;exec append_layout ~/Scripts/bin/freelances2.json; exec ~/Scripts/bin/freelances"

View File

@ -0,0 +1,2 @@

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1 @@
bedeab7f-0e43-4481-a22a-22cceb6e1cc6

View File

@ -0,0 +1,33 @@
32
termsyn6x11b.icons.pcf -misc-termsyn.icons-bold-r-normal--11-79-100-100-c-60-iso8859-1
termsyn6x11b.pcf -misc-termsyn-bold-r-normal--11-79-100-100-c-60-iso8859-1
termsyn6x11b2.pcf -misc-termsyn-bold-r-normal--11-79-100-100-c-60-iso8859-2
termsyn6x11r.icons.pcf -misc-termsyn.icons-medium-r-normal--11-79-100-100-c-60-iso8859-1
termsyn6x11r.pcf -misc-termsyn-medium-r-normal--11-79-100-100-c-60-iso8859-1
termsyn6x11r2.pcf -misc-termsyn-medium-r-normal--11-79-100-100-c-60-iso8859-2
termsyn6x13b.icons.pcf -misc-termsyn.icons-bold-r-normal--13-120-75-75-c-60-iso8859-1
termsyn6x13b.pcf -misc-termsyn-bold-r-normal--13-120-75-75-c-60-iso8859-1
termsyn6x13b2.pcf -misc-termsyn-bold-r-normal--13-120-75-75-c-60-iso8859-2
termsyn6x13r.icons.pcf -misc-termsyn.icons-medium-r-normal--13-120-75-75-c-60-iso8859-1
termsyn6x13r.pcf -misc-termsyn-medium-r-normal--13-120-75-75-c-60-iso8859-1
termsyn6x13r2.pcf -misc-termsyn-medium-r-normal--13-120-75-75-c-60-iso8859-2
termsyn7x12b.icons.pcf -misc-termsyn.icons-bold-r-normal--12-87-100-100-c-70-iso8859-1
termsyn7x12b.pcf -misc-termsyn-bold-r-normal--12-87-100-100-c-70-iso8859-1
termsyn7x12b2.pcf -misc-termsyn-bold-r-normal--12-87-100-100-c-70-iso8859-2
termsyn7x12r.icons.pcf -misc-termsyn.icons-medium-r-normal--12-87-100-100-c-70-iso8859-1
termsyn7x12r.pcf -misc-termsyn-medium-r-normal--12-87-100-100-c-70-iso8859-1
termsyn7x12r2.pcf -misc-termsyn-medium-r-normal--12-87-100-100-c-70-iso8859-2
termsyn7x14b.icons.pcf -misc-termsyn.icons-bold-r-normal--14-101-100-100-c-70-iso8859-1
termsyn7x14b.pcf -misc-termsyn-bold-r-normal--14-101-100-100-c-70-iso8859-1
termsyn7x14b2.pcf -misc-termsyn-bold-r-normal--14-101-100-100-c-70-iso8859-2
termsyn7x14r.icons.pcf -misc-termsyn.icons-medium-r-normal--14-101-100-100-c-70-iso8859-1
termsyn7x14r.pcf -misc-termsyn-medium-r-normal--14-101-100-100-c-70-iso8859-1
termsyn7x14r2.pcf -misc-termsyn-medium-r-normal--14-101-100-100-c-70-iso8859-2
termsynu6x11b.pcf -misc-termsynu-bold-r-normal--11-79-100-100-c-60-iso10646-1
termsynu6x11r.pcf -misc-termsynu-medium-r-normal--11-79-100-100-c-60-iso10646-1
termsynu6x13b.pcf -misc-termsynu-bold-r-normal--13-120-75-75-c-60-iso10646-1
termsynu6x13r.pcf -misc-termsynu-medium-r-normal--13-120-75-75-c-60-iso10646-1
termsynu7x12b.pcf -misc-termsynu-bold-r-normal--12-87-100-100-c-70-iso10646-1
termsynu7x12r.pcf -misc-termsynu-medium-r-normal--12-87-100-100-c-70-iso10646-1
termsynu7x14b.pcf -misc-termsynu-bold-r-normal--14-101-100-100-c-70-iso10646-1
termsynu7x14r.pcf -misc-termsynu-medium-r-normal--14-101-100-100-c-70-iso10646-1

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,15 @@
#!/usr/bin/env sh
## Add this to your wm startup file.
# Terminate already running bar instances
killall -q polybar
# Wait until the processes have been shut down
while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done
# Launch bar1 and bar2
polybar -c ~/.config/polybar/config.ini main &
polybar -c ~/.config/polybar/config.ini main2 &
polybar -c ~/.config/polybar/config.ini main3 &
polybar -c ~/.config/polybar/config.ini second &

View File

@ -0,0 +1,722 @@
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
;;
;; __ ___ __ __
;; / |/ /___ ____/ /_ __/ /__ _____
;; / /|_/ / __ \/ __ / / / / / _ \/ ___/
;; / / / / /_/ / /_/ / /_/ / / __(__ )
;; /_/ /_/\____/\__,_/\__,_/_/\___/____/
;;
;; Created By Aditya Shakya @adi1090x
;;
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
[module/alsa]
type = internal/alsa
format-volume = <label-volume>
format-volume-background = ${color.mf}
format-volume-foreground = ${color.fg}
format-volume-padding = 1
label-volume = %percentage%%
format-muted-background = ${color.mf}
format-muted-foreground = ${color.red}
format-muted-padding = 1
label-muted = "Muted"
label-muted-foreground = ${color.red}
[module/alsa_i]
type = internal/alsa
format-volume = <ramp-volume>
format-volume-background = ${color.blue}
format-volume-foreground = ${color.fg}
format-volume-padding = 1
format-muted-background = ${color.blue}
format-muted-foreground = ${color.red}
format-muted-padding = 1
label-muted = ""
label-muted-foreground = ${color.fg}
ramp-volume-0 =
ramp-volume-1 =
ramp-volume-2 =
ramp-volume-3 =
ramp-volume-4 =
ramp-headphones-0 =
ramp-headphones-1 =
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
[module/backlight]
type = internal/xbacklight
card = intel_backlight
format = <ramp>
format-background = ${color.mf}
format-foreground = ${color.fg}
format-padding = 1
label = %percentage%%
; Available tags:
; <label> (default)
; <ramp>
; <bar>
; Available tokens:
; %percentage% (default)
; Only applies if <ramp> is used
ramp-0 = 🌕
ramp-1 = 🌔
ramp-2 = 🌓
ramp-3 = 🌒
ramp-4 = 🌑
; Only applies if <bar> is used
bar-width = 10
bar-indicator = |
bar-fill =
bar-empty =
[module/backlight_i]
type = internal/xbacklight
card = intel_backlight
format = <ramp>
format-background = ${color.lime}
format-foreground = ${color.fg}
format-padding = 1
ramp-0 =
ramp-1 =
ramp-2 =
ramp-3 =
ramp-4 =
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
[module/battery]
type = internal/battery
full-at = 99
battery = BAT1
adapter = ACAD
poll-interval = 2
time-format = %H:%M
format-charging = <label-charging>
format-charging-background = ${color.mf}
format-charging-foreground = ${color.fg}
format-charging-padding = 1
format-discharging = <label-discharging>
format-discharging-background = ${color.mf}
format-discharging-foreground = ${color.fg}
format-discharging-padding = 1
label-charging = %percentage%%
label-discharging = %percentage%%
label-full = Full!
label-full-foreground = ${color.fg}
label-full-background = ${color.mf}
label-full-padding = 1
[module/battery_i]
type = internal/battery
full-at = 99
battery = BAT1
adapter = ACAD
poll-interval = 2
time-format = %H:%M
format-charging = <animation-charging>
format-charging-background = ${color.green}
format-charging-foreground = ${color.fg}
format-charging-padding = 1
format-discharging = <ramp-capacity>
format-discharging-background = ${color.pink}
format-discharging-foreground = ${color.fg}
format-discharging-padding = 1
label-charging = %percentage%%
label-discharging = %percentage%%
label-full =
label-full-background = ${color.green}
label-full-foreground = ${color.fg}
label-full-padding = 1
ramp-capacity-0 =
ramp-capacity-1 =
ramp-capacity-2 =
ramp-capacity-3 =
animation-charging-0 =
animation-charging-1 =
animation-charging-2 =
animation-charging-3 =
animation-charging-framerate = 750
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
[module/bspwm]
type = internal/bspwm
pin-workspaces = true
inline-mode = true
enable-click = true
enable-scroll = true
reverse-scroll = true
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;"
ws-icon-8 = "9;"
ws-icon-9 = "0;"
ws-icon-default = " "
format = "<label-state> <label-mode>"
label-focused = " %icon% "
label-focused-foreground = ${color.fg}
label-focused-background = ${color.ac}
label-focused-underline = ${color.ac}
label-focused-padding = 1
label-unfocused = " %icon% %name% "
label-unfocused-foreground = ${color.fg}
label-unfocused-background = ${color.mf}
label-unfocused-underline = ${color.mf}
label-unfocused-padding = 1
label-visible = " %icon% %name% "
label-visible-underline = ${color.ac}
label-visible-padding = 1
label-mode = %mode%
label-mode-padding = 1
label-mode-background = ${color.ac}
label-urgent = " %icon% %name% "
label-urgent-foreground = ${color.fg}
label-urgent-background = ${color.red}
label-urgent-padding = 1
label-occupied = " %icon% %name% "
label-empty = " %icon% %name% "
label-empty-foreground = #6272a4
label-separator =
label-separator-padding = 1
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
[module/cpu]
type = internal/cpu
interval = 0.5
format = <label>
format-background = ${color.mf}
format-foreground = ${color.fg}
format-padding = 1
label = "%percentage%%"
[module/cpu_i]
type = internal/cpu
interval = 0.5
format =
format-background = ${color.teal}
format-foreground = ${color.fg}
format-padding = 1
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
[module/date]
type = internal/date
interval = 1.0
time = %I:%M %p
time-alt = %Y-%m-%d%
format = <label>
format-background = ${color.mf}
format-foreground = ${color.fg}
format-padding = 1
label = %time%
[module/date_i]
type = internal/date
interval = 1.0
time =
time-alt =
format = <label>
format-background = ${color.amber}
format-foreground = ${color.fg}
format-padding = 1
label = %time%
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
[module/filesystem]
type = internal/fs
mount-0 = /
interval = 10
fixed-values = true
format-mounted = <label-mounted>
format-mounted-background = ${color.mf}
format-mounted-foreground = ${color.fg}
format-mounted-padding = 1
format-unmounted = <label-unmounted>
format-unmounted-background = ${color.mf}
format-unmounted-foreground = ${color.fg}
format-unmounted-padding = 1
label-mounted = "%free%"
label-unmounted = %mountpoint%: not mounted
[module/filesystem_i]
type = internal/fs
mount-0 = /
interval = 10
fixed-values = true
format-mounted =
format-mounted-background = ${color.green}
format-mounted-foreground = ${color.fg}
format-mounted-padding = 1
format-unmounted =
format-unmounted-background = ${color.red}
format-unmounted-foreground = ${color.fg}
format-unmounted-padding = 1
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
;;[module/github]
;;type = internal/github
; Accessing an access token stored in file
;;token = ${file:/path/to/file/containing/github/access.token}
; Accessing an access token stored in an environment variable
;;token = ${env:GITHUB_ACCESS_TOKEN}
; Whether empty notifications should be displayed or not
;;empty-notifications = false
; Number of seconds in between requests
;;interval = 10
; Available tags:
; <label> (default)
;;format = <label>
; Available tokens:
; %notifications% (default)
; Default: Notifications: %notifications%
;;label = %notifications%
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
[module/i3]
type = internal/i3
pin-workspaces = true
strip-wsnumbers = false
index-sort = true
enable-click = true
enable-scroll = true
wrapping-scroll = false
reverse-scroll = false
;①②③④⑤⑥⑦⑧⑨⑩
;              
ws-icon-0 = "2;"
ws-icon-1 = "3;"
ws-icon-2 = "4;"
ws-icon-3 = "5;"
ws-icon-4 = "6;"
ws-icon-5 = "7;"
ws-icon-6 = "8;"
ws-icon-7 = "9;"
ws-icon-8 = "10;"
ws-icon-9 = "1;"
ws-icon-default = "null"
format = <label-state> <label-mode>
label-focused = %icon% %name%
label-focused-foreground = ${color.fg}
label-focused-background = ${color.ac}
label-focused-underline = ${color.ac}
label-focused-padding = 1
label-unfocused = %icon% %name%
label-unfocused-foreground = ${color.fg}
label-unfocused-background = ${color.mf}
label-unfocused-underline = ${color.mf}
label-unfocused-padding = 1
label-visible = %icon% %name%
label-visible-underline = ${color.ac}
label-visible-padding = 1
label-mode = %mode%
label-mode-padding = 2
label-mode-background = ${color.ac}
label-urgent = %icon% %name%
label-urgent-foreground = ${color.fg}
label-urgent-background = ${color.red}
label-urgent-padding = 1
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
[module/memory]
type = internal/memory
interval = 3
format = <label>
format-background = ${color.mf}
format-foreground = ${color.fg}
format-padding = 1
label = "%mb_used%"
[module/memory_i]
type = internal/memory
interval = 3
format =
format-background = ${color.brown}
format-foreground = ${color.fg}
format-padding = 1
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
[module/mpd]
type = internal/mpd
interval = 2
format-online = <label-song> <icon-next>
format-online-background = ${color.mf}
format-online-padding = 1
label-song = "%artist% - %title%"
label-song-maxlen = 20
label-song-ellipsis = true
label-offline = "MPD is offline"
icon-play =
icon-pause =
icon-stop =
icon-prev =
icon-next =
[module/mpd_i]
type = internal/mpd
interval = 2
format-online = <toggle>
format-online-background = ${color.red}
format-online-padding = 1
icon-play =
icon-pause =
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
[module/network]
type = internal/network
interface = wlp3s0
interval = 1.0
accumulate-stats = true
unknown-as-up = true
format-connected = <label-connected>
format-connected-background = ${color.mf}
format-connected-foreground = ${color.fg}
format-connected-padding = 1
format-disconnected = <label-disconnected>
format-disconnected-background = ${color.mf}
format-disconnected-foreground = ${color.fg}
format-disconnected-padding = 1
label-connected = "%essid%"
label-disconnected = "Disconnected"
[module/network_i]
type = internal/network
interface = wlp3s0
interval = 1.0
accumulate-stats = true
unknown-as-up = true
format-connected = <ramp-signal>
format-connected-background = ${color.purple}
format-connected-foreground = ${color.fg}
format-connected-padding = 1
format-disconnected = <label-disconnected>
format-disconnected-background = ${color.purple}
format-disconnected-foreground = ${color.fg}
format-disconnected-padding = 1
label-disconnected =
ramp-signal-0 =
ramp-signal-1 =
ramp-signal-2 =
ramp-signal-3 =
ramp-signal-4 =
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
[module/pulseaudio]
type = internal/pulseaudio
sink = alsa_output.pci-0000_12_00.3.analog-stereo
use-ui-max = true
interval = 5
format-volume = <label-volume>
format-volume-background = ${color.mf}
format-volume-foreground = ${color.fg}
format-volume-padding = 1
label-muted = Muted
format-muted-background = ${color.mf}
format-muted-foreground = ${color.red}
format-muted-padding = 1
[module/pulseaudio_i]
type = internal/alsa
format-volume = <ramp-volume>
format-volume-background = ${color.blue}
format-volume-foreground = ${color.fg}
format-volume-padding = 1
format-muted-background = ${color.blue}
format-muted-foreground = ${color.red}
format-muted-padding = 1
label-muted = ""
label-muted-foreground = ${color.fg}
ramp-volume-0 =
ramp-volume-1 =
ramp-volume-2 =
ramp-volume-3 =
ramp-volume-4 =
ramp-headphones-0 =
ramp-headphones-1 =
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
[module/temperature]
type = internal/temperature
interval = 0.5
thermal-zone = 0
warn-temperature = 60
units = true
format = <label>
format-background = ${color.mf}
format-foreground = ${color.fg}
format-padding = 1
format-warn = <label-warn>
format-warn-background = ${color.mf}
format-warn-foreground = ${color.red}
format-warn-padding = 1
label = %temperature-c%
label-warn = "%temperature-c%"
[module/temperature_i]
type = internal/temperature
interval = 0.5
thermal-zone = 0
warn-temperature = 60
units = true
format = <ramp>
format-background = ${color.cyan}
format-foreground = ${color.fg}
format-padding = 1
format-warn = <ramp>
format-warn-background = ${color.cyan}
format-warn-foreground = ${color.fg}
format-warn-padding = 1
ramp-0 =
ramp-1 =
ramp-2 =
ramp-3 =
ramp-4 =
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
[module/keyboard]
type = internal/xkeyboard
blacklist-0 = num lock
blacklist-1 = scroll lock
format = "<label-layout><label-indicator>"
format-background = ${color.mf}
format-foreground = ${color.fg}
format-padding = 1
label-layout = "%layout%"
label-indicator = %name%
label-indicator-foreground = ${color.fg}
[module/keyboard_i]
type = internal/xkeyboard
blacklist-0 = num lock
blacklist-1 = scroll lock
format =
format-background = ${color.blue-gray}
format-foreground = ${color.fg}
format-padding = 1
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
[module/title]
type = internal/xwindow
format = <label>
format-foreground = ${color.fg-alt}
label = %title%
label-maxlen = 40
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
[module/workspaces]
type = internal/xworkspaces
pin-workspaces = true
strip-wsnumbers = false
index-sort = true
enable-click = true
enable-scroll = true
;
;icon-0 = 1;1
;icon-1 = 2;2
;icon-2 = 3;3
;icon-3 = 4;4
;icon-4 = 5;5
;icon-5 = 6;6
;icon-6 = 7;7
;icon-7 = 8;8
;icon-8 = 9;9
;icon-9 = 10;0
;icon-default = 
;
icon-0 = 1;www
icon-1 = 2;prog
icon-2 = 3;debug
icon-3 = 4;chat
icon-4 = 5;λ
icon-6 = 6;</>
icon-7 = 7;study
icon-8 = 8;music
icon-9 = 9;youtube
icon-default = null
format = <label-state>
format-padding = 0
label-monitor = %name%
label-active = %icon%
label-active-foreground = ${color.fg}
label-active-background = ${color.ac}
label-occupied = %icon%
label-occupied-foreground = ${color.fg}
label-occupied-background = ${color.bg}
label-urgent = %icon%
label-urgent-foreground = ${color.fg}
label-urgent-background = ${color.red}
label-empty = %icon%
label-empty-foreground = ${color.fg}
label-empty-background = ${color.mf}
label-active-padding = 1
label-urgent-padding = 1
label-occupied-padding = 1
label-empty-padding = 1
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
;; __________ ______
;; / ____/ __ \/ ____/
;; / __/ / / / / /_
;; / /___/ /_/ / __/
;; /_____/\____/_/
;;
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_

View File

@ -0,0 +1,15 @@
# Script: battery-combined-shell
A shell script that shows the battery status.
It supports two rechargeable batteries and changing icons. It works even if only one battery is used.
## Module
```ini
[module/battery-combined-shell]
type = custom/script
exec = ~/polybar-scripts/battery-combined-shell.sh
interval = 10
```

View File

@ -0,0 +1,61 @@
#!/bin/sh
PATH_AC="/sys/class/power_supply/AC"
PATH_BATTERY_0="/sys/class/power_supply/BAT0"
PATH_BATTERY_1="/sys/class/power_supply/BAT1"
ac=0
battery_level_0=0
battery_level_1=0
battery_max_0=0
battery_max_1=0
if [ -f "$PATH_AC/online" ]; then
ac=$(cat "$PATH_AC/online")
fi
if [ -f "$PATH_BATTERY_0/energy_now" ]; then
battery_level_0=$(cat "$PATH_BATTERY_0/energy_now")
fi
if [ -f "$PATH_BATTERY_0/energy_full" ]; then
battery_max_0=$(cat "$PATH_BATTERY_0/energy_full")
fi
if [ -f "$PATH_BATTERY_1/energy_now" ]; then
battery_level_1=$(cat "$PATH_BATTERY_1/energy_now")
fi
if [ -f "$PATH_BATTERY_1/energy_full" ]; then
battery_max_1=$(cat "$PATH_BATTERY_1/energy_full")
fi
battery_level=$(("$battery_level_0 + $battery_level_1"))
battery_max=$(("$battery_max_0 + $battery_max_1"))
battery_percent=$(("$battery_level * 100"))
battery_percent=$(("$battery_percent / $battery_max"))
if [ "$ac" -eq 1 ]; then
icon="#1"
if [ "$battery_percent" -gt 97 ]; then
echo "$icon"
else
echo "$icon $battery_percent %"
fi
else
if [ "$battery_percent" -gt 85 ]; then
icon="#21"
elif [ "$battery_percent" -gt 60 ]; then
icon="#22"
elif [ "$battery_percent" -gt 35 ]; then
icon="#23"
elif [ "$battery_percent" -gt 10 ]; then
icon="#24"
else
icon="#25"
fi
echo "$icon $battery_percent %"
fi

View File

@ -0,0 +1,31 @@
# Script: battery-combined-tlp
A shell script that shows the battery status.
It uses TLP and requires root privileges. Note that the icon doesn't change.
![battery-combined-tlp](screenshots/1.png)
## Dependencies
* `tlp`
## Configuration
You have to add the `tlp-stat` command to the `/etc/sudoers` NOPASSWD of your user:
```ini
user ALL=(ALL) NOPASSWD: /usr/bin/tlp-stat
```
## Module
```ini
[module/battery-combined-tlp]
type = custom/script
exec = ~/polybar-scripts/battery-combined-tlp.sh
interval = 10
```

View File

@ -0,0 +1,5 @@
#!/bin/sh
battery=$(sudo tlp-stat -b | grep "Charge total" | tr -d -c "[:digit:],.")
echo "# $battery %"

Binary file not shown.

After

Width:  |  Height:  |  Size: 841 B

View File

@ -0,0 +1,4 @@
SUBSYSTEM=="power_supply", ENV{POWER_SUPPLY_ONLINE}=="0", \
RUN+="/home/user/.config/polybar/battery-combined-udev.sh --update"
SUBSYSTEM=="power_supply", ENV{POWER_SUPPLY_ONLINE}=="1", \
RUN+="/home/user/.config/polybar/battery-combined-udev.sh --update"

View File

@ -0,0 +1,22 @@
# Script: battery-combined-udev
A shell script that shows the battery status. This is an extended version of [battery-combined-shell](../battery-combined-shell).
It supports two rechargeable batteries and changing icons. It works even if only one battery is used.
This script is able to display power supply changes in real time. For this udev is being used.
## Configuration
Copy `95-battery.rules` to `/etc/udev/rules.d/95-battery.rules`. Make sure that the paths in the file have been modified properly.
## Module
```ini
[module/battery-combined-udev]
type = custom/script
exec = ~/polybar-scripts/battery-combined-udev.sh
tail = true
```

View File

@ -0,0 +1,88 @@
#!/bin/sh
battery_print() {
PATH_AC="/sys/class/power_supply/AC"
PATH_BATTERY_0="/sys/class/power_supply/BAT0"
PATH_BATTERY_1="/sys/class/power_supply/BAT1"
ac=0
battery_level_0=0
battery_level_1=0
battery_max_0=0
battery_max_1=0
if [ -f "$PATH_AC/online" ]; then
ac=$(cat "$PATH_AC/online")
fi
if [ -f "$PATH_BATTERY_0/energy_now" ]; then
battery_level_0=$(cat "$PATH_BATTERY_0/energy_now")
fi
if [ -f "$PATH_BATTERY_0/energy_full" ]; then
battery_max_0=$(cat "$PATH_BATTERY_0/energy_full")
fi
if [ -f "$PATH_BATTERY_1/energy_now" ]; then
battery_level_1=$(cat "$PATH_BATTERY_1/energy_now")
fi
if [ -f "$PATH_BATTERY_1/energy_full" ]; then
battery_max_1=$(cat "$PATH_BATTERY_1/energy_full")
fi
battery_level=$(("$battery_level_0 + $battery_level_1"))
battery_max=$(("$battery_max_0 + $battery_max_1"))
battery_percent=$(("$battery_level * 100"))
battery_percent=$(("$battery_percent / $battery_max"))
if [ "$ac" -eq 1 ]; then
icon="#1"
if [ "$battery_percent" -gt 97 ]; then
echo "$icon"
else
echo "$icon $battery_percent %"
fi
else
if [ "$battery_percent" -gt 85 ]; then
icon="#21"
elif [ "$battery_percent" -gt 60 ]; then
icon="#22"
elif [ "$battery_percent" -gt 35 ]; then
icon="#23"
elif [ "$battery_percent" -gt 10 ]; then
icon="#24"
else
icon="#25"
fi
echo "$icon $battery_percent %"
fi
}
path_pid="/tmp/polybar-battery-combined-udev.pid"
case "$1" in
--update)
pid=$(cat $path_pid)
if [ "$pid" != "" ]; then
kill -10 "$pid"
fi
;;
*)
echo $$ > $path_pid
trap exit INT
trap "echo" USR1
while true; do
battery_print
sleep 30 &
wait
done
;;
esac

View File

@ -0,0 +1,29 @@
# Script: battery-cyberpower
A shell script that shows the battery status for CyberPower UPS devices.
This script is able to display power supply changes in real time.
## Dependencies
* `pwrstat` from CyberPower's website
## Configuration
You have to add the `pwrstat` command to the `/etc/sudoers` NOPASSWD of your user:
```ini
user ALL=(ALL) NOPASSWD: /usr/bin/pwrstat
```
## Module
```ini
[module/battery-cyberpower]
type = custom/script
exec = ~/polybar-scripts/battery-cyberpower.sh
tail = true
```

View File

@ -0,0 +1,56 @@
#!/bin/sh
ICON_AC="#1"
ICON_BATTERY_FULL="#21"
ICON_BATTERY_GOOD="#22"
ICON_BATTERY_LOW="#23"
ICON_BATTERY_CAUTION="#24"
ICON_BATTERY_EMPTY="#25"
SHOW_ESTIMATION=1
battery_print() {
battery_info="$(sudo pwrstat -status)"
battery_capacity="$(echo "$battery_info" | awk '/Capacity/{print $3}')"
battery_ac="$(echo "$battery_info" | awk '/Power Supply by/{print $4,$5}')"
battery_load="$(echo "$battery_info" | grep "Load" | cut -d \( -f 2 | tr -d ' %)')"
battery_remaining="$(echo "$battery_info" | awk '/Remaining Runtime/{print $3}')"
output=""
if [ "$battery_ac" = "Utility Power" ]; then
if [ "$battery_capacity" -gt 97 ]; then
output="$ICON_AC"
else
output="$ICON_AC $battery_capacity %"
fi
else
if [ "$battery_capacity" -gt 85 ]; then
output="$ICON_BATTERY_FULL $battery_capacity %"
elif [ "$battery_capacity" -gt 60 ]; then
output="$ICON_BATTERY_GOOD $battery_capacity %"
elif [ "$battery_capacity" -gt 35 ]; then
output="$ICON_BATTERY_LOW $battery_capacity %"
elif [ "$battery_capacity" -gt 10 ]; then
output="$ICON_BATTERY_CAUTION $battery_capacity %"
else
output="$ICON_BATTERY_EMPTY $battery_capacity %"
fi
fi
if [ "$SHOW_ESTIMATION" -eq 1 ]; then
output="$output ($battery_load % / $battery_remaining min)"
fi
echo "$output"
}
trap exit INT
trap "echo" USR1
while true; do
battery_print "$@"
sleep 30 &
wait
done

View File

@ -0,0 +1,44 @@
# Script: easteregg-pornhub
A script that shows a button and opens a random video at a large porn website.
![easteregg-pornhub](screenshots/1.png)
## Configuration
Set your browser at the `click-left` option in your module.
You should also enable the overline and underline option in your polybar.
```ini
[bar/barname]
overline-size = 5
underline-size = 4
```
## Module
```ini
[module/easteregg-pornhub]
type = custom/script
exec = echo " hub "
interval = 3600
click-left = "firefox --private-window https://pornhub.com/random" &
format = <label>
format-prefix = " Porn "
format-prefix-foreground = #ffffff
format-prefix-background = #000000
format-overline = #000000
format-underline = #000000
format-foreground = #000000
format-background = #ffa500
format-suffix = " "
format-suffix-background = #000000
format-suffix-foreground = #000000
```

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@ -0,0 +1,29 @@
# Script: inbox-imap-pythongpg
A script that shows if there are unread mails in your IMAPs inbox. Passwords are encrypted with gpg.
![inbox-imap-pythongpg](screenshots/1.png)
## Configuration
You must have a gpg key to secure your password in configuration files. Encrypt your password using your gpg key like this.
```ini
echo 'your password' > /tmp/imappass
gpg -er 'your gpg keyid' /tmp/imappass
mv /tmp/imappass.gpg ~/.imappass.gpg
shred /tmp/imappass && rm /tmp/imappass
```
For Gmail, you must allow [less secure apps](https://myaccount.google.com/security#connectedapps).
## Module
```ini
[module/inbox-imap-pythongpg]
type = custom/script
exec = ~/polybar-scripts/inbox-imap-pythongpg.py
interval = 60
```

View File

@ -0,0 +1,14 @@
#!/usr/bin/python
import imaplib
import os
import subprocess
completed_process = subprocess.run(['gpg', '-dq', os.path.join(os.getenv('HOME'), '.imappass.gpg')], check=True, stdout=subprocess.PIPE, encoding="utf-8");
password = completed_process.stdout[:-1]
obj = imaplib.IMAP4_SSL('imap.mail.net', 993)
# Only put your email address below.
obj.login('your email address', password)
obj.select()
print(len(obj.search(None, 'unseen')[1][0].split()))

Binary file not shown.

After

Width:  |  Height:  |  Size: 542 B

View File

@ -0,0 +1,3 @@
machine mail.server.tld
login username
password supersecretpw

View File

@ -0,0 +1,27 @@
# Script: inbox-imap-shellnetrc
A script that shows if there are unread mails in your IMAP inbox.
This script actually use IMAPs. `curl` can also handle unencrypted IMAP. You only need to change the protocol in the command.
The login data is stored in a `.netrc`. This is more secure because the password is not visible in the process list.
## Dependencies
* `curl`
## Configuration
For Gmail, you must allow [less secure apps](https://myaccount.google.com/security#connectedapps).
## Module
```ini
[module/inbox-imap-shellnetrc]
type = custom/script
exec = ~/polybar-scripts/inbox-imap-shellnetrc.sh
interval = 60
```

View File

@ -0,0 +1,12 @@
#!/bin/sh
SERVER=""
NETRC=".netrc"
inbox=$(curl -sf --netrc-file "$NETRC" -X "STATUS INBOX (UNSEEN)" imaps://"$SERVER"/INBOX | tr -d -c "[:digit:]")
if [ "$inbox" ] && [ "$inbox" -gt 0 ]; then
echo "# $inbox"
else
echo ""
fi

View File

@ -0,0 +1,3 @@
machine mail.server.tld
login username
password supersecretpw

View File

@ -0,0 +1,22 @@
# Script: inbox-pop3-shellnetrc
A script that shows if there are unread mails in your POP3 inbox.
This script actually use POP3s. `curl` can also handle unencrypted POP3. You only need to change the protocol in the command.
The login data is stored in a `.netrc`. This is more secure because the password is not visible in the process list.
## Dependencies
* `curl`
## Module
```ini
[module/inbox-pop3-shellnetrc]
type = custom/script
exec = ~/polybar-scripts/inbox-pop3-shellnetrc.sh
interval = 60
```

View File

@ -0,0 +1,12 @@
#!/bin/sh
SERVER=""
NETRC=".netrc"
inbox=$(curl -sf --netrc-file "$NETRC" pop3s://"$SERVER" | wc -l)
if [ "$inbox" -gt 0 ]; then
echo "# $inbox"
else
echo ""
fi

View File

@ -0,0 +1,30 @@
# Script: info-airqualityindex
A script that shows the local World Air Quality Index. It's an indicator for the air pollution.
![info-airqualityindex](screenshots/1.png)
## Dependencies
* `curl`
* `jq`
## Configuration
You need an API token. [Request one](https://aqicn.org/data-platform/token/).
Choose a city and make sure that the result is what you expect. `berlin` is a valid `CITY` here: http://aqicn.org/city/berlin/. Or use the [map](https://aqicn.org/map/) to find a monitoring station near you. `germany/berlin/friedrichshain-frankfurter-allee` works also as `CITY`.
If `CITY` is left empty, the location is retrieved via the Mozilla Location API.
## Module
```ini
[module/info-airqualityindex]
type = custom/script
exec = ~/polybar-scripts/info-airqualityindex.sh
interval = 600
```

View File

@ -0,0 +1,41 @@
#!/bin/sh
TOKEN=""
CITY=""
API="https://api.waqi.info/feed"
if [ -n "$CITY" ]; then
aqi=$(curl -sf "$API/$CITY/?token=$TOKEN")
else
location=$(curl -sf https://location.services.mozilla.com/v1/geolocate?key=geoclue)
if [ -n "$location" ]; then
location_lat="$(echo "$location" | jq '.location.lat')"
location_lon="$(echo "$location" | jq '.location.lng')"
aqi=$(curl -sf "$API/geo:$location_lat;$location_lon/?token=$TOKEN")
fi
fi
if [ -n "$aqi" ]; then
if [ "$(echo "$aqi" | jq -r '.status')" = "ok" ]; then
aqi=$(echo "$aqi" | jq '.data.aqi')
if [ "$aqi" -lt 50 ]; then
echo "%{F#009966}#%{F-} $aqi"
elif [ "$aqi" -lt 100 ]; then
echo "%{F#ffde33}#%{F-} $aqi"
elif [ "$aqi" -lt 150 ]; then
echo "%{F#ff9933}#%{F-} $aqi"
elif [ "$aqi" -lt 200 ]; then
echo "%{F#cc0033}#%{F-} $aqi"
elif [ "$aqi" -lt 300 ]; then
echo "%{F#660099}#%{F-} $aqi"
else
echo "%{F#7e0023}#%{F-} $aqi"
fi
else
echo "$aqi" | jq -r '.data'
fi
fi

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@ -0,0 +1,20 @@
# Script: info-dualshock4
A shell script that shows the battery level of a DualShock 4 Controller.
![info-dualshock4](screenshots/1.png)
## Configuration
The Icon is from [Font Awesome 5](https://fontawesome.com/icons/playstation?style=brands).
## Module
```ini
[module/battery-dualshock4]
type= custom/script
exec = ~/polybar-scripts/info-dualshock4.sh
interval = 10
```

View File

@ -0,0 +1,5 @@
#!/bin/sh
for i in /sys/class/power_supply/sony_controller_battery_*/capacity; do
echo "# $(cat /sys/class/power_supply/sony_controller_battery_"$i"/capacity)%"
done

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

View File

@ -0,0 +1,18 @@
# Script: info-ethermine
This script reports the current hashrate (in MH/s) for your ethermine account.
## Dependencies
* `python-requests`
## Module
```ini
[module/info-ethermine]
type = custom/script
exec = ~/polybar-scripts/info-ethermine.sh
interval = 60
```

View File

@ -0,0 +1,12 @@
#!/usr/bin/env python3
import requests
miner = ""
data = requests.get(f"https://api.ethermine.org/miner/{miner}/dashboard").json()['data']['statistics']
data = data[-1]
current_hash_rate = data["currentHashrate"]
currentMHs = round(current_hash_rate/1e6, 1)
print(f"{currentMHs}MH/s")

View File

@ -0,0 +1,15 @@
# Script: info-eyestrain
A script for avoiding digital eye strain.
It follows the 20-20-20 rule. The timer displays how long it is until the next break. You can add this to send a notification and play a sound when the time is up.
## Module
```ini
[module/info-eyestrain]
type = custom/script
exec = ~/polybar-scripts/info-eyestrain.sh
interval = 60
```

View File

@ -0,0 +1,10 @@
#!/bin/sh
time=$((20 - $(date '+%-M') % 20))
#if [ $time -eq 20 ]; then
# notify-send 'Break' &
# ogg123 beep.ogg &> /dev/null &
#fi
echo "$time"

View File

@ -0,0 +1,33 @@
# Script: info-hackspeed
A small script that shows your typing speed. Happy Hacking!
![info-hackspeed](screenshots/1.png)
## Dependencies
* `xorg-xinput`
* `awk`
* coreutils (`rm`, `stdbuf`, `mktemp`, `stat`, you probably have this)
## Configuration
* `KEYBOARD_ID`: name of your keyboard. See Setup above. Default: `AT Translated Set 2 keyboard`
* `METRIC`: either `cpm` (characters per minute) of `wpm` ([words per minute, 1 word = 5 characters](https://en.wikipedia.org/wiki/Words_per_minute)). Default: `cpm`
* `FORMAT`: format string according to which the metric will be output. Default: `# %d $METRIC`
* `INTERVAL`: amount of seconds to gather data. Default: 20
* `LAYOUT`: keyboard layout, to be able to only count letters and numbers. Currently supported are `qwerty` and `azerty`. If you have a different layout, please contribute a condition for it! See the script's source code. Use the special value `dontcare` to count all keys, not just letters and numbers. Default: `qwerty`
If after 20 seconds the value stays at 0 even though you're typing, you may have to configure the name of your keyboard. Change the setting `KEYBOARD_ID` (see Configuration below) in the script. You can find your keyboard description with `xinput list --short`.
## Module
```ini
[module/info-hackspeed]
type = custom/script
exec = ~/polybar-scripts/info-hackspeed.sh
tail = true
```

View File

@ -0,0 +1,63 @@
#!/bin/sh
# shellcheck disable=SC2016,SC2059
KEYBOARD_ID="AT Translated Set 2 keyboard"
# cpm: characters per minute
# wpm: words per minute (1 word = 5 characters)
METRIC=cpm
FORMAT="# %d $METRIC"
INTERVAL=20
# If you have a keyboard layout that is not listed here yet, create a condition
# yourself. $3 is the key index. Use `xinput test "AT Translated Set 2 keyboard"`
# to see key codes in real time. Be sure to open a pull request for your
# layout's condition!
LAYOUT=qwerty
case "$LAYOUT" in
qwerty) CONDITION='($3 >= 10 && $3 <= 19) || ($3 >= 24 && $3 <= 33) || ($3 >= 37 && $3 <= 53) || ($3 >= 52 && $3 <= 58)'; ;;
azerty) CONDITION='($3 >= 10 && $3 <= 19) || ($3 >= 24 && $3 <= 33) || ($3 >= 37 && $3 <= 54) || ($3 >= 52 && $3 <= 57)'; ;;
qwertz) CONDITION='($3 >= 10 && $3 <= 20) || ($3 >= 24 && $3 <= 34) || ($3 == 36) || ($3 >= 38 && $3 <= 48) || ($3 >= 52 && $3 <= 58)'; ;;
dontcare) CONDITION='1'; ;; # Just register all key presses, not only letters and numbers
*) echo "Unsupported layout \"$LAYOUT\""; exit 1; ;;
esac
# We have to account for the fact we're not listening a whole minute
multiply_by=60
divide_by=$INTERVAL
case "$METRIC" in
wpm) divide_by=$((divide_by * 5)); ;;
cpm) ;;
*) echo "Unsupported metric \"$METRIC\""; exit 1; ;;
esac
hackspeed_cache="$(mktemp -p '' hackspeed_cache.XXXXX)"
trap 'rm "$hackspeed_cache"' EXIT
# Write a dot to our cache for each key press
printf '' > "$hackspeed_cache"
xinput test "$KEYBOARD_ID" | \
stdbuf -o0 awk '$1 == "key" && $2 == "press" && ('"$CONDITION"') {printf "."}' >> "$hackspeed_cache" &
while true; do
# Ask the kernel how big the file is with the command `stat`. The number we
# get is the file size in bytes, which equals the amount of dots the file
# contains, and hence how much keys were pressed since the file was last
# cleared.
lines=$(stat --format %s "$hackspeed_cache")
# Truncate the cache file so that in the next iteration, we count only new
# keypresses
printf '' > "$hackspeed_cache"
# The shell only does integer operations, so make sure to first multiply and
# then divide
value=$((lines * multiply_by / divide_by))
printf "$FORMAT\\n" "$value"
sleep $INTERVAL
done

Binary file not shown.

After

Width:  |  Height:  |  Size: 539 B

Some files were not shown because too many files have changed in this diff Show More