diff --git a/awesome/scripts/toggle_performance.sh b/awesome/scripts/toggle_performance.sh new file mode 100755 index 0000000..338754c --- /dev/null +++ b/awesome/scripts/toggle_performance.sh @@ -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 diff --git a/i3/config b/i3/config index a932d6a..8c1ea83 100644 --- a/i3/config +++ b/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 diff --git a/polybar/config.ini b/polybar/config.ini index 81490f4..1770a54 100644 --- a/polybar/config.ini +++ b/polybar/config.ini @@ -19,45 +19,62 @@ 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 = " " +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} format-foreground = ${colors.white} -date = " %a %b %d, %H:%M:%S " +date = " %a %b %d, %H:%M:%S " [module/cpu] ; Powerline settings @@ -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} -; Other settings -type = internal/memory -format-background = ${self.background} -format-foreground = ${colors.white} -label = " %gb_used% " - -[module/temperature] -; Powerline settings -inherit = powerline-templates/right-to-left-item background = ${colors.background} background-next = ${colors.blue} ; Other settings -type = internal/temperature +type = internal/memory format-background = ${self.background} format-foreground = ${colors.white} -thermal-zone = 6 -label = " %temperature-c% " +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 = "