added modules for gpu temp, changed cpu temp module and some laptop ajustments
This commit is contained in:
parent
799b01cb1d
commit
0746f016d8
7 changed files with 133 additions and 48 deletions
|
@ -152,9 +152,9 @@ bindsym $mod+9 workspace number $ws9
|
|||
bindsym $mod+0 workspace number $ws10
|
||||
|
||||
# assign workspace to output
|
||||
workspace $ws1 output HDMI-1-0
|
||||
workspace $ws2 output HDMI-1-0
|
||||
workspace $ws5 output eDP-1
|
||||
workspace $ws1 output primary
|
||||
workspace $ws2 output primary
|
||||
workspace $ws5 output nonprimary
|
||||
|
||||
# move focused container to workspace
|
||||
bindsym $mod+Shift+1 move container to workspace number $ws1
|
||||
|
|
|
@ -23,7 +23,68 @@ include-file = $HOME/.config/polybar/themes/macchiato.ini
|
|||
screenchange-reload = true
|
||||
pseudo-transparency = true
|
||||
|
||||
[bar/default]
|
||||
[section/base]
|
||||
monitor = ${env:MONITOR:eDP1}
|
||||
|
||||
[bar/main]
|
||||
inherit = section/base
|
||||
width = 99.4%
|
||||
height = 24pt
|
||||
offset-x = 0.3%
|
||||
offset-y = 0.7%
|
||||
;radius = 8
|
||||
|
||||
modules-left = i3 sep title
|
||||
modules-center = date dot time
|
||||
modules-right = cpu dot gpu dot memory dot backlight dot pulseaudio sep filesystem sep battery
|
||||
|
||||
background = ${colors.base}
|
||||
foreground = ${colors.text}
|
||||
line-size = 3pt
|
||||
padding-right = 1
|
||||
|
||||
font-0 = FiraCode Nerd Font:size=10:weight=medium;2
|
||||
font-1 = JetBrainsMono Nerd Font:size=10:weight=bold;2
|
||||
font-2 = Inter:size=10:weight=regular;2
|
||||
|
||||
cursor-click = pointer
|
||||
enable-ipc = true
|
||||
|
||||
tray-position = right
|
||||
|
||||
override-redirect = true
|
||||
wm-restack = i3
|
||||
|
||||
[bar/secondary]
|
||||
inherit = section/base
|
||||
width = 99.4%
|
||||
height = 24pt
|
||||
offset-x = 0.3%
|
||||
offset-y = 0.7%
|
||||
;radius = 8
|
||||
|
||||
modules-left = i3
|
||||
modules-center = date dot time
|
||||
modules-right = cpu dot gpu dot memory dot pulseaudio sep filesystem
|
||||
|
||||
background = ${colors.base}
|
||||
foreground = ${colors.text}
|
||||
line-size = 3pt
|
||||
padding-right = 1
|
||||
|
||||
font-0 = FiraCode Nerd Font:size=10:weight=medium;2
|
||||
font-1 = JetBrainsMono Nerd Font:size=10:weight=bold;2
|
||||
font-2 = Inter:size=10:weight=regular;2
|
||||
|
||||
cursor-click = pointer
|
||||
;cursor-scroll = ns-resize
|
||||
enable-ipc = true
|
||||
|
||||
override-redirect = true
|
||||
wm-restack = i3
|
||||
|
||||
[bar/laptop]
|
||||
inherit = section/base
|
||||
width = 99.4%
|
||||
height = 24pt
|
||||
offset-x = 0.3%
|
||||
|
@ -47,10 +108,5 @@ cursor-click = pointer
|
|||
;cursor-scroll = ns-resize
|
||||
enable-ipc = true
|
||||
|
||||
tray-position = right
|
||||
|
||||
override-redirect = true
|
||||
wm-restack = i3
|
||||
|
||||
scroll-up = "#i3.prev"
|
||||
scroll-down = "#i3.next"
|
||||
|
|
|
@ -1,11 +1,24 @@
|
|||
#!/usr/bin/env sh
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Terminate already running bar instances
|
||||
killall -q polybar
|
||||
|
||||
# Wait until the processes have been shut down
|
||||
while pgrep -x polybar >/dev/null; do sleep 1; done
|
||||
|
||||
# Launch polybar
|
||||
polybar default &
|
||||
screens=$(xrandr --listactivemonitors | grep -v "Monitors" | cut -d" " -f6)
|
||||
|
||||
if [[ $(xrandr --listactivemonitors | grep -v "Monitors" | cut -d" " -f4 | cut -d"+" -f2- | uniq | wc -l) == 1 ]]; then
|
||||
MONITOR=$(polybar --list-monitors | cut -d":" -f1) TRAY_POS=right polybar main &
|
||||
else
|
||||
primary=$(xrandr --query | grep primary | cut -d" " -f1)
|
||||
|
||||
for m in $screens; do
|
||||
if [[ $primary == "$m" ]]; then
|
||||
MONITOR=$m TRAY_POS=right polybar main &
|
||||
else
|
||||
MONITOR=$m TRAY_POS=none polybar secondary &
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
|
|
|
@ -39,19 +39,53 @@ label-urgent-padding = 1
|
|||
label-empty = %name%
|
||||
label-empty-padding = 1
|
||||
|
||||
[module/title]
|
||||
type = internal/xwindow
|
||||
format = <label>
|
||||
;format-foreground = ${colors.text}
|
||||
format-padding = 2
|
||||
|
||||
label = %title%
|
||||
label-maxlen = 50
|
||||
|
||||
; Used instead of label when there is no window title
|
||||
; Available tokens:
|
||||
; None
|
||||
;label-empty = Empty
|
||||
;label-empty-foreground = ${colors.grey}
|
||||
|
||||
[module/cpu]
|
||||
type = internal/cpu
|
||||
type = custom/script
|
||||
exec = $HOME/.config/polybar/scripts/cpu_temp.sh
|
||||
|
||||
interval = 1
|
||||
label = CPU %percentage%%
|
||||
|
||||
label = %output%
|
||||
|
||||
format = <label>
|
||||
format-prefix =
|
||||
format-prefix-foreground = ${colors.blue}
|
||||
format-prefix-padding = 1
|
||||
format-prefix-padding-right = 1
|
||||
format-suffix = °C
|
||||
|
||||
[module/gpu]
|
||||
type = custom/script
|
||||
exec = $HOME/.config/polybar/scripts/gpu_temp.sh
|
||||
|
||||
interval = 1
|
||||
|
||||
label = %output%
|
||||
|
||||
format = <label>
|
||||
format-prefix =
|
||||
format-prefix-foreground = ${colors.green}
|
||||
format-prefix-padding-right = 1
|
||||
format-suffix = °C
|
||||
|
||||
[module/memory]
|
||||
type = internal/memory
|
||||
interval = 1
|
||||
label = RAM %used%
|
||||
label = %used%
|
||||
format = <label>
|
||||
format-prefix =
|
||||
format-prefix-foreground = ${colors.peach}
|
||||
|
@ -66,7 +100,7 @@ format-mounted-prefix =
|
|||
format-mounted-prefix-foreground = ${colors.yellow}
|
||||
format-mounted-prefix-padding-right = 1
|
||||
format-mounted = <label-mounted>
|
||||
label-mounted = %used%/%total%
|
||||
label-mounted = %free%
|
||||
|
||||
[module/pulseaudio]
|
||||
type = internal/pulseaudio
|
||||
|
@ -119,6 +153,7 @@ animation-packetloss-framerate = 500
|
|||
|
||||
[module/backlight]
|
||||
type = internal/backlight
|
||||
card = intel_backlight
|
||||
use-actual-brightness = true
|
||||
enable-scroll = true
|
||||
format = <ramp> <label>
|
||||
|
@ -140,6 +175,8 @@ ramp-6-foreground = ${colors.yellow}
|
|||
|
||||
[module/battery]
|
||||
type = internal/battery
|
||||
battery = BAT1
|
||||
adapter = ADP1
|
||||
full-at = 99
|
||||
low-at = 5
|
||||
poll-interval = 5
|
||||
|
@ -149,7 +186,7 @@ format-discharging = <ramp-capacity> <label-discharging>
|
|||
format-full= <label-full>
|
||||
format-low= <animation-low> <label-low>
|
||||
label-charging = %percentage%%
|
||||
label-discharging = %percentage%%
|
||||
label-discharging = %percentage%% %time%
|
||||
label-full = %percentage%%
|
||||
label-low = BATTERY LOW
|
||||
ramp-capacity-0 =
|
||||
|
@ -245,29 +282,4 @@ content = |
|
|||
content-foreground = ${colors.overlay0}
|
||||
content-padding = 1
|
||||
|
||||
; Specific Overwrites
|
||||
|
||||
[module/network-G41T-R3]
|
||||
inherit = module/network
|
||||
interface = wls32
|
||||
interface-type = wireless
|
||||
|
||||
[module/network-E5-476G]
|
||||
inherit = module/network
|
||||
interface = wlp3s0
|
||||
interface-type = wireless
|
||||
|
||||
; $ ls -1 /sys/class/backlight/
|
||||
|
||||
[module/backlight-E5-476G]
|
||||
inherit = module/backlight
|
||||
card = intel_backlight
|
||||
|
||||
; $ ls -1 /sys/class/power_supply/
|
||||
|
||||
[module/battery-E5-476G]
|
||||
inherit = module/battery
|
||||
battery = BAT1
|
||||
adapter = ACAD
|
||||
|
||||
|
||||
|
|
3
.config/polybar/scripts/cpu_temp.sh
Executable file
3
.config/polybar/scripts/cpu_temp.sh
Executable file
|
@ -0,0 +1,3 @@
|
|||
#! /usr/bin/bash
|
||||
|
||||
sensors | grep "Package id 0" | awk '{print $4}' | cut -d "." -f 1 | sed -e 's/+//'
|
3
.config/polybar/scripts/gpu_temp.sh
Executable file
3
.config/polybar/scripts/gpu_temp.sh
Executable file
|
@ -0,0 +1,3 @@
|
|||
#! /usr/bin/bash
|
||||
|
||||
nvidia-smi -q -d TEMPERATURE | grep "GPU Current Temp" | awk '{print $5}'
|
|
@ -11,6 +11,4 @@ configuration{
|
|||
sidebar-mode: true;
|
||||
}
|
||||
|
||||
//@theme "themes/catppuccin-frappe"
|
||||
|
||||
@theme "/home/tsousa/.config/rofi/themes/catppuccin-frappe.rasi"
|
||||
|
|
Loading…
Reference in a new issue