Finish polybar
This commit is contained in:
parent
dd204af083
commit
d09d43071f
|
@ -0,0 +1,6 @@
|
|||
governor=$(cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor)
|
||||
if [[ $governor == "powersave" ]]; then
|
||||
sudo /opt/power/performance.sh
|
||||
else
|
||||
sudo /opt/power/powersave.sh
|
||||
fi
|
12
i3/config
12
i3/config
|
@ -6,10 +6,14 @@ exec --no-startup-id "feh --no-fehbg --bg-fill /home/user/.config/awesome/wallpa
|
|||
exec --no-startup-id "picom -b"
|
||||
exec --no-startup-id "polybar &"
|
||||
|
||||
bindsym --whole-window --border button7 exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +2%
|
||||
bindsym --whole-window --border button6 exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -2%
|
||||
bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +10%
|
||||
bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -10%
|
||||
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle
|
||||
bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle
|
||||
bindsym XF86MonBrightnessUp exec --no-startup-id brightnessctl s 10%+
|
||||
bindsym XF86MonBrightnessDown exec --no-startup-id brightnessctl s 10%-
|
||||
|
||||
# Use Mouse+$mod to drag floating windows to their wanted position
|
||||
floating_modifier $mod
|
||||
|
@ -19,10 +23,12 @@ floating_modifier $mod
|
|||
tiling_drag modifier titlebar
|
||||
|
||||
# start a terminal
|
||||
bindsym $mod+Return exec alacritty
|
||||
bindsym $mod+Return exec /home/user/.config/awesome/scripts/launch_alacritty.sh $(xprop -id $(xdotool getwindowfocus) | ag ^_NET_WM_PID | cut -d '=' -f 2)
|
||||
|
||||
bindsym $mod+minus split v; exec /home/user/.config/awesome/scripts/launch_alacritty.sh $(xprop -id $(xdotool getwindowfocus) | ag ^_NET_WM_PID | cut -d '=' -f 2)
|
||||
|
||||
bindsym $mod+bar split h; exec /home/user/.config/awesome/scripts/launch_alacritty.sh $(xprop -id $(xdotool getwindowfocus) | ag ^_NET_WM_PID | cut -d '=' -f 2)
|
||||
|
||||
bindsym $mod+minus split v; exec alacritty
|
||||
bindsym $mod+bar split h; exec alacritty
|
||||
|
||||
# kill focused window
|
||||
bindsym $mod+q kill
|
||||
|
|
|
@ -19,40 +19,57 @@ height = 26
|
|||
dpi-x = 96
|
||||
dpi-y = 96
|
||||
|
||||
tray-position = right
|
||||
tray-background = ${colors.blue}
|
||||
tray-offset-x = -7
|
||||
tray-padding = 5
|
||||
|
||||
; Set bar's default background/foreground color
|
||||
background = #12151cbb
|
||||
foreground = ${colors.white}
|
||||
|
||||
; Set bar's fonts list
|
||||
font-0 = "Noto Sans:size=11:antialias=true;3"
|
||||
font-0 = "Noto Sans:size=10.5:antialias=true;3"
|
||||
font-1 = "Source Code Pro:pixelsize=20:antialias=true;6"
|
||||
font-2 = "Source Code Pro:size=12:weight=bold:antialias=true;3"
|
||||
font-2 = "Source Code Pro:size=11:weight=bold:antialias=true;3"
|
||||
font-3 = "Font Awesome 6 Free Solid:size=11:antialias=true;3"
|
||||
font-4 = "Font Awesome 6 Free:size=11:antialias=true;3"
|
||||
font-5 = "Font Awesome 6 Brands:size=11:antialias=true;3"
|
||||
font-6 = "Font Awesome v4 Compatibility:size=11:antialias=true;3"
|
||||
|
||||
; Set modules list
|
||||
modules-left = xwindow
|
||||
modules-center = i3
|
||||
modules-right = pulseaudio temperature memory cpu date
|
||||
modules-right = date governor temperature memory clockspeed cpu pulseaudio battery startarrow
|
||||
fixed-center = true
|
||||
|
||||
;=======================================
|
||||
; Modules
|
||||
;=======================================
|
||||
[module/startarrow]
|
||||
inherit = powerline-modules/right-to-left-starting-arrow
|
||||
background = ${colors.blue}
|
||||
background-next = ${colors.background}
|
||||
|
||||
[module/pulseaudio]
|
||||
type = internal/pulseaudio
|
||||
inherit = powerline-templates/right-to-left-item
|
||||
background = ${colors.blue}
|
||||
background-next = ${root.background}
|
||||
background-next = ${colors.background}
|
||||
label-muted-foreground = ${colors.gray}
|
||||
format-foreground = ${colors.white}
|
||||
format-volume-background = ${colors.blue}
|
||||
format-muted-background = ${colors.blue}
|
||||
format-volume = " <ramp-volume> <label-volume> "
|
||||
label-muted = 🔇 muted
|
||||
ramp-volume-0 = 🔈
|
||||
ramp-volume-1 = 🔊
|
||||
|
||||
[module/date]
|
||||
; Powerline settings
|
||||
inherit = powerline-templates/right-to-left-item
|
||||
background = ${colors.blue}
|
||||
background-next = ${colors.background}
|
||||
background-next = ${root.background}
|
||||
; Other settings
|
||||
type = internal/date
|
||||
format-background = ${self.background}
|
||||
|
@ -68,30 +85,58 @@ background-next = ${colors.blue}
|
|||
type = internal/cpu
|
||||
format-background = ${self.background}
|
||||
format-foreground = ${colors.white}
|
||||
label = " CPU: %percentage%% "
|
||||
label = " CPU %percentage%% "
|
||||
|
||||
[module/memory]
|
||||
; Powerline settings
|
||||
inherit = powerline-templates/right-to-left-item
|
||||
background = ${colors.blue}
|
||||
background-next = ${colors.background}
|
||||
background = ${colors.background}
|
||||
background-next = ${colors.blue}
|
||||
; Other settings
|
||||
type = internal/memory
|
||||
format-background = ${self.background}
|
||||
format-foreground = ${colors.white}
|
||||
label = " %gb_used% "
|
||||
|
||||
[module/clockspeed]
|
||||
; Powerline settings
|
||||
inherit = powerline-templates/right-to-left-item
|
||||
background = ${colors.blue}
|
||||
background-next = ${colors.background}
|
||||
; Other settings
|
||||
type = custom/script
|
||||
format-background = ${self.background}
|
||||
format-foreground = ${colors.white}
|
||||
format-warn-background = ${self.background}
|
||||
exec = cat /proc/cpuinfo | grep MHz | cut -b 12- | sort -r | head -n 1 | xargs printf '%f / 1000\\n' | bc -l | awk '{printf "%.2f\\n", $0}'
|
||||
format = " <label> GHz "
|
||||
|
||||
[module/temperature]
|
||||
; Powerline settings
|
||||
inherit = powerline-templates/right-to-left-item
|
||||
background = ${colors.blue}
|
||||
background-next = ${colors.background}
|
||||
; Other settings
|
||||
type = custom/script
|
||||
format-background = ${colors.blue}
|
||||
format-foreground = ${colors.white}
|
||||
format-warn-background = ${self.background}
|
||||
exec = sensors | grep Package | cut -d ' ' -f 5 | cut -d '+' -f 2
|
||||
format = " <label> "
|
||||
|
||||
[module/governor]
|
||||
; Powerline settings
|
||||
inherit = powerline-templates/right-to-left-item
|
||||
background = ${colors.background}
|
||||
background-next = ${colors.blue}
|
||||
; Other settings
|
||||
type = internal/temperature
|
||||
type = custom/script
|
||||
format-background = ${self.background}
|
||||
format-foreground = ${colors.white}
|
||||
thermal-zone = 6
|
||||
label = " %temperature-c% "
|
||||
format-warn-background = ${self.background}
|
||||
exec = cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
|
||||
format = " <label> "
|
||||
click-left = /home/user/.config/awesome/scripts/toggle_performance.sh
|
||||
|
||||
[module/xwindow]
|
||||
; Other settings
|
||||
|
@ -102,6 +147,7 @@ background-next = ${root.background}
|
|||
format-background = ${self.background}
|
||||
format-foreground = ${colors.white}
|
||||
label = " %title% "
|
||||
label-maxlen = 100
|
||||
|
||||
|
||||
[module/i3]
|
||||
|
@ -118,3 +164,13 @@ label-unfocused-font=3
|
|||
label-separator-padding = 2
|
||||
label-focused = %index%
|
||||
label-unfocused = %index%
|
||||
|
||||
[module/battery]
|
||||
type = custom/script
|
||||
inherit = powerline-templates/right-to-left-item
|
||||
background = ${colors.background}
|
||||
background-next = ${colors.blue}
|
||||
format-background = ${self.background}
|
||||
format-foreground = ${colors.white}
|
||||
exec = upower -i /org/freedesktop/UPower/devices/battery_BAT1 | ag percentage | awk '{print $2}'
|
||||
format = " <label> "
|
||||
|
|
Loading…
Reference in New Issue