Rename graphics module to system76-power

- Display current graphics mode rather than nvidia driver version
This commit is contained in:
Sravan Balaji 2024-05-11 12:43:16 -04:00
parent d88c08a666
commit 8dee563611
2 changed files with 59 additions and 59 deletions

View File

@ -5920,10 +5920,10 @@ media-playing-overline = ${self.background}
tray-background = ${self.background} tray-background = ${self.background}
; right ; right
graphics-foreground = ${self.green} system76-power-foreground = ${self.green}
graphics-background = ${self.background} system76-power-background = ${self.background}
graphics-underline = ${self.background} system76-power-underline = ${self.background}
graphics-overline = ${self.background} system76-power-overline = ${self.background}
kernel-foreground = ${self.orange} kernel-foreground = ${self.orange}
kernel-background = ${self.background} kernel-background = ${self.background}
@ -6001,15 +6001,15 @@ Define module update intervals in seconds.
#+BEGIN_SRC conf :tangle polybar/config.ini #+BEGIN_SRC conf :tangle polybar/config.ini
[intervals] [intervals]
media-playing = 1 media-playing = 1
graphics = 86400 system76-power = 86400
kernel = 86400 kernel = 86400
cpu = 1 cpu = 1
memory = 1 memory = 1
filesystem = 600 filesystem = 600
date = 1 date = 1
time = 1 time = 1
dunst = 1 dunst = 1
#+END_SRC #+END_SRC
**** Global Window Manager **** Global Window Manager
@ -6155,7 +6155,7 @@ font-8 = "NotoSansYi:size=11;3"
; modules-right = ipc clock ; modules-right = ipc clock
modules-left = powermenu-left powermenu powermenu-right dwm volume-left volume volume-right media-playing-left media-playing-change media-playing-prev media-playing-play-pause media-playing-next media-playing media-playing-right modules-left = powermenu-left powermenu powermenu-right dwm volume-left volume volume-right media-playing-left media-playing-change media-playing-prev media-playing-play-pause media-playing-next media-playing media-playing-right
; modules-center = ; modules-center =
modules-right = kernel-left kernel kernel-right graphics-left graphics graphics-right cpu-left cpu cpu-right memory-left memory memory-right filesystem-left filesystem filesystem-right date-left date date-right time-left time time-right dunst-left dunst-status dunst-clear dunst-history-view dunst-history-clear dunst-history-length dunst-right modules-right = kernel-left kernel kernel-right system76-power-left system76-power system76-power-right cpu-left cpu cpu-right memory-left memory memory-right filesystem-left filesystem filesystem-right date-left date date-right time-left time time-right dunst-left dunst-status dunst-clear dunst-history-view dunst-history-clear dunst-history-length dunst-right
; The separator will be inserted between the output of each module ; The separator will be inserted between the output of each module
separator = "" separator = ""
@ -6803,36 +6803,36 @@ label-padding = ${sizes.module-padding}
; scroll-down = echo scroll down %counter% ; scroll-down = echo scroll down %counter%
#+END_SRC #+END_SRC
**** Graphics **** System76 Power
#+BEGIN_SRC conf :tangle polybar/config.ini #+BEGIN_SRC conf :tangle polybar/config.ini
[module/graphics-left] [module/system76-power-left]
type = custom/text type = custom/text
content = " " content = " "
content-foreground = ${colors.graphics-background} content-foreground = ${colors.system76-power-background}
content-underline = ${colors.graphics-underline} content-underline = ${colors.system76-power-underline}
content-overline = ${colors.graphics-overline} content-overline = ${colors.system76-power-overline}
content-padding = ${sizes.module-padding} content-padding = ${sizes.module-padding}
#+END_SRC #+END_SRC
#+BEGIN_SRC conf :tangle polybar/config.ini #+BEGIN_SRC conf :tangle polybar/config.ini
[module/graphics-right] [module/system76-power-right]
type = custom/text type = custom/text
content = " " content = " "
content-foreground = ${colors.graphics-background} content-foreground = ${colors.system76-power-background}
content-underline = ${colors.graphics-underline} content-underline = ${colors.system76-power-underline}
content-overline = ${colors.graphics-overline} content-overline = ${colors.system76-power-overline}
content-padding = ${sizes.module-padding} content-padding = ${sizes.module-padding}
#+END_SRC #+END_SRC
#+BEGIN_SRC conf :tangle polybar/config.ini #+BEGIN_SRC conf :tangle polybar/config.ini
[module/graphics] [module/system76-power]
type = custom/script type = custom/script
; Available tokens: ; Available tokens:
; %counter% ; %counter%
; Command to be executed (using "/bin/sh -c [command]") ; Command to be executed (using "/bin/sh -c [command]")
exec = echo "󰢮 $(modinfo nvidia | grep ^version | cut -d ' ' -f9)" exec = echo "󰢮 $(sudo system76-power graphics)"
; Conditional command that, if defined, needs to exit successfully ; Conditional command that, if defined, needs to exit successfully
; before the main exec command is invoked. ; before the main exec command is invoked.
@ -6845,16 +6845,16 @@ tail = false
; Seconds to sleep between updates ; Seconds to sleep between updates
; Default: 5 (0 if `tail = true`) ; Default: 5 (0 if `tail = true`)
interval = ${intervals.graphics} interval = ${intervals.system76-power}
; Available tags: ; Available tags:
; <output> - deprecated ; <output> - deprecated
; <label> (default) ; <label> (default)
format = <label> format = <label>
format-foreground = ${colors.graphics-foreground} format-foreground = ${colors.system76-power-foreground}
format-background = ${colors.graphics-background} format-background = ${colors.system76-power-background}
format-underline = ${colors.graphics-underline} format-underline = ${colors.system76-power-underline}
format-overline = ${colors.graphics-overline} format-overline = ${colors.system76-power-overline}
; Available tokens: ; Available tokens:
; %output% ; %output%

View File

@ -74,10 +74,10 @@ media-playing-overline = ${self.background}
tray-background = ${self.background} tray-background = ${self.background}
; right ; right
graphics-foreground = ${self.green} system76-power-foreground = ${self.green}
graphics-background = ${self.background} system76-power-background = ${self.background}
graphics-underline = ${self.background} system76-power-underline = ${self.background}
graphics-overline = ${self.background} system76-power-overline = ${self.background}
kernel-foreground = ${self.orange} kernel-foreground = ${self.orange}
kernel-background = ${self.background} kernel-background = ${self.background}
@ -139,15 +139,15 @@ tray-scale = ${xrdb:polybar.tray-scale:1}
maxlen = ${xrdb:polybar.maxlen:50} maxlen = ${xrdb:polybar.maxlen:50}
[intervals] [intervals]
media-playing = 1 media-playing = 1
graphics = 86400 system76-power = 86400
kernel = 86400 kernel = 86400
cpu = 1 cpu = 1
memory = 1 memory = 1
filesystem = 600 filesystem = 600
date = 1 date = 1
time = 1 time = 1
dunst = 1 dunst = 1
[global/wm] [global/wm]
; Adjust the _NET_WM_STRUT_PARTIAL top value ; Adjust the _NET_WM_STRUT_PARTIAL top value
@ -285,7 +285,7 @@ font-8 = "NotoSansYi:size=11;3"
; modules-right = ipc clock ; modules-right = ipc clock
modules-left = powermenu-left powermenu powermenu-right dwm volume-left volume volume-right media-playing-left media-playing-change media-playing-prev media-playing-play-pause media-playing-next media-playing media-playing-right modules-left = powermenu-left powermenu powermenu-right dwm volume-left volume volume-right media-playing-left media-playing-change media-playing-prev media-playing-play-pause media-playing-next media-playing media-playing-right
; modules-center = ; modules-center =
modules-right = kernel-left kernel kernel-right graphics-left graphics graphics-right cpu-left cpu cpu-right memory-left memory memory-right filesystem-left filesystem filesystem-right date-left date date-right time-left time time-right dunst-left dunst-status dunst-clear dunst-history-view dunst-history-clear dunst-history-length dunst-right modules-right = kernel-left kernel kernel-right system76-power-left system76-power system76-power-right cpu-left cpu cpu-right memory-left memory memory-right filesystem-left filesystem filesystem-right date-left date date-right time-left time time-right dunst-left dunst-status dunst-clear dunst-history-view dunst-history-clear dunst-history-length dunst-right
; The separator will be inserted between the output of each module ; The separator will be inserted between the output of each module
separator = "" separator = ""
@ -785,29 +785,29 @@ label-padding = ${sizes.module-padding}
; scroll-up = echo scroll up %counter% ; scroll-up = echo scroll up %counter%
; scroll-down = echo scroll down %counter% ; scroll-down = echo scroll down %counter%
[module/graphics-left] [module/system76-power-left]
type = custom/text type = custom/text
content = " " content = " "
content-foreground = ${colors.graphics-background} content-foreground = ${colors.system76-power-background}
content-underline = ${colors.graphics-underline} content-underline = ${colors.system76-power-underline}
content-overline = ${colors.graphics-overline} content-overline = ${colors.system76-power-overline}
content-padding = ${sizes.module-padding} content-padding = ${sizes.module-padding}
[module/graphics-right] [module/system76-power-right]
type = custom/text type = custom/text
content = " " content = " "
content-foreground = ${colors.graphics-background} content-foreground = ${colors.system76-power-background}
content-underline = ${colors.graphics-underline} content-underline = ${colors.system76-power-underline}
content-overline = ${colors.graphics-overline} content-overline = ${colors.system76-power-overline}
content-padding = ${sizes.module-padding} content-padding = ${sizes.module-padding}
[module/graphics] [module/system76-power]
type = custom/script type = custom/script
; Available tokens: ; Available tokens:
; %counter% ; %counter%
; Command to be executed (using "/bin/sh -c [command]") ; Command to be executed (using "/bin/sh -c [command]")
exec = echo "󰢮 $(modinfo nvidia | grep ^version | cut -d ' ' -f9)" exec = echo "󰢮 $(sudo system76-power graphics)"
; Conditional command that, if defined, needs to exit successfully ; Conditional command that, if defined, needs to exit successfully
; before the main exec command is invoked. ; before the main exec command is invoked.
@ -820,16 +820,16 @@ tail = false
; Seconds to sleep between updates ; Seconds to sleep between updates
; Default: 5 (0 if `tail = true`) ; Default: 5 (0 if `tail = true`)
interval = ${intervals.graphics} interval = ${intervals.system76-power}
; Available tags: ; Available tags:
; <output> - deprecated ; <output> - deprecated
; <label> (default) ; <label> (default)
format = <label> format = <label>
format-foreground = ${colors.graphics-foreground} format-foreground = ${colors.system76-power-foreground}
format-background = ${colors.graphics-background} format-background = ${colors.system76-power-background}
format-underline = ${colors.graphics-underline} format-underline = ${colors.system76-power-underline}
format-overline = ${colors.graphics-overline} format-overline = ${colors.system76-power-overline}
; Available tokens: ; Available tokens:
; %output% ; %output%