Add graphics module to show nvidia driver version
This commit is contained in:
92
README.org
92
README.org
@@ -5919,6 +5919,11 @@ media-playing-overline = ${self.background}
|
||||
tray-background = ${self.background}
|
||||
|
||||
; right
|
||||
graphics-foreground = ${self.green}
|
||||
graphics-background = ${self.background}
|
||||
graphics-underline = ${self.background}
|
||||
graphics-overline = ${self.background}
|
||||
|
||||
kernel-foreground = ${self.orange}
|
||||
kernel-background = ${self.background}
|
||||
kernel-underline = ${self.background}
|
||||
@@ -5996,6 +6001,7 @@ Define module update intervals in seconds.
|
||||
#+BEGIN_SRC conf :tangle polybar/config.ini
|
||||
[intervals]
|
||||
media-playing = 1
|
||||
graphics = 86400
|
||||
kernel = 86400
|
||||
cpu = 1
|
||||
memory = 1
|
||||
@@ -6145,7 +6151,7 @@ font-5 = "IPAPGothic:size=11;3"
|
||||
; 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-center =
|
||||
modules-right = kernel-left kernel kernel-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 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
|
||||
|
||||
; The separator will be inserted between the output of each module
|
||||
separator = ""
|
||||
@@ -6760,7 +6766,7 @@ interval = ${intervals.kernel}
|
||||
; Available tags:
|
||||
; <output> - deprecated
|
||||
; <label> (default)
|
||||
format = %{A1:kitty bash -c "fastfetch && nvidia-smi && sleep 15":}<label>%{A}
|
||||
format = %{A1:kitty bash -c "fastfetch && sleep 15":}<label>%{A}
|
||||
format-foreground = ${colors.kernel-foreground}
|
||||
format-background = ${colors.kernel-background}
|
||||
format-underline = ${colors.kernel-underline}
|
||||
@@ -6793,6 +6799,86 @@ label-padding = ${sizes.module-padding}
|
||||
; scroll-down = echo scroll down %counter%
|
||||
#+END_SRC
|
||||
|
||||
**** Graphics
|
||||
|
||||
#+BEGIN_SRC conf :tangle polybar/config.ini
|
||||
[module/graphics-left]
|
||||
type = custom/text
|
||||
content = " "
|
||||
content-foreground = ${colors.graphics-background}
|
||||
content-underline = ${colors.graphics-underline}
|
||||
content-overline = ${colors.graphics-overline}
|
||||
content-padding = ${sizes.module-padding}
|
||||
#+END_SRC
|
||||
|
||||
#+BEGIN_SRC conf :tangle polybar/config.ini
|
||||
[module/graphics-right]
|
||||
type = custom/text
|
||||
content = " "
|
||||
content-foreground = ${colors.graphics-background}
|
||||
content-underline = ${colors.graphics-underline}
|
||||
content-overline = ${colors.graphics-overline}
|
||||
content-padding = ${sizes.module-padding}
|
||||
#+END_SRC
|
||||
|
||||
#+BEGIN_SRC conf :tangle polybar/config.ini
|
||||
[module/graphics]
|
||||
type = custom/script
|
||||
|
||||
; Available tokens:
|
||||
; %counter%
|
||||
; Command to be executed (using "/bin/sh -c [command]")
|
||||
exec = echo " $(modinfo nvidia | grep ^version | cut -d ' ' -f9)"
|
||||
|
||||
; Conditional command that, if defined, needs to exit successfully
|
||||
; before the main exec command is invoked.
|
||||
; Default: ""
|
||||
; exec-if = pgrep -x myservice
|
||||
|
||||
; Will the script output continous content?
|
||||
; Default: false
|
||||
tail = false
|
||||
|
||||
; Seconds to sleep between updates
|
||||
; Default: 5 (0 if `tail = true`)
|
||||
interval = ${intervals.graphics}
|
||||
|
||||
; Available tags:
|
||||
; <output> - deprecated
|
||||
; <label> (default)
|
||||
format = <label>
|
||||
format-foreground = ${colors.graphics-foreground}
|
||||
format-background = ${colors.graphics-background}
|
||||
format-underline = ${colors.graphics-underline}
|
||||
format-overline = ${colors.graphics-overline}
|
||||
|
||||
; Available tokens:
|
||||
; %output%
|
||||
; Default: %output%
|
||||
label = %output%
|
||||
label-padding = ${sizes.module-padding}
|
||||
|
||||
; Available tokens:
|
||||
; %counter%
|
||||
; %pid%
|
||||
;
|
||||
; "click-(left|middle|right)" will be executed using "/bin/sh -c [command]"
|
||||
click-left = nvidia-settings
|
||||
; click-middle = echo middle %counter%
|
||||
click-right = ~/.scripts/cpu-gpu.sh --rofi
|
||||
; double-click-left = echo double left %counter%
|
||||
; double-click-middle = echo double middle %counter%
|
||||
; double-click-right = echo double right %counter%
|
||||
|
||||
; Available tokens:
|
||||
; %counter%
|
||||
; %pid%
|
||||
;
|
||||
; "scroll-(up|down)" will be executed using "/bin/sh -c [command]"
|
||||
; scroll-up = echo scroll up %counter%
|
||||
; scroll-down = echo scroll down %counter%
|
||||
#+END_SRC
|
||||
|
||||
**** CPU
|
||||
|
||||
#+BEGIN_SRC conf :tangle polybar/config.ini
|
||||
@@ -7006,7 +7092,7 @@ format-mounted = %{A1:qdirstat &:}<label-mounted>%{A}
|
||||
|
||||
; Available tags:
|
||||
; <label-unmounted> (default)
|
||||
format-unmounted = %{A1:gnome-disks &:} <label-unmounted> %{A}
|
||||
format-unmounted = %{A1:gnome-disks &:}<label-unmounted>%{A}
|
||||
|
||||
; Available tokens:
|
||||
; %mountpoint%
|
||||
|
@@ -74,6 +74,11 @@ media-playing-overline = ${self.background}
|
||||
tray-background = ${self.background}
|
||||
|
||||
; right
|
||||
graphics-foreground = ${self.green}
|
||||
graphics-background = ${self.background}
|
||||
graphics-underline = ${self.background}
|
||||
graphics-overline = ${self.background}
|
||||
|
||||
kernel-foreground = ${self.orange}
|
||||
kernel-background = ${self.background}
|
||||
kernel-underline = ${self.background}
|
||||
@@ -135,6 +140,7 @@ maxlen = ${xrdb:polybar.maxlen:50}
|
||||
|
||||
[intervals]
|
||||
media-playing = 1
|
||||
graphics = 86400
|
||||
kernel = 86400
|
||||
cpu = 1
|
||||
memory = 1
|
||||
@@ -276,7 +282,7 @@ font-5 = "IPAPGothic:size=11;3"
|
||||
; 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-center =
|
||||
modules-right = kernel-left kernel kernel-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 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
|
||||
|
||||
; The separator will be inserted between the output of each module
|
||||
separator = ""
|
||||
@@ -744,7 +750,7 @@ interval = ${intervals.kernel}
|
||||
; Available tags:
|
||||
; <output> - deprecated
|
||||
; <label> (default)
|
||||
format = %{A1:kitty bash -c "fastfetch && nvidia-smi && sleep 15":}<label>%{A}
|
||||
format = %{A1:kitty bash -c "fastfetch && sleep 15":}<label>%{A}
|
||||
format-foreground = ${colors.kernel-foreground}
|
||||
format-background = ${colors.kernel-background}
|
||||
format-underline = ${colors.kernel-underline}
|
||||
@@ -776,6 +782,78 @@ label-padding = ${sizes.module-padding}
|
||||
; scroll-up = echo scroll up %counter%
|
||||
; scroll-down = echo scroll down %counter%
|
||||
|
||||
[module/graphics-left]
|
||||
type = custom/text
|
||||
content = " "
|
||||
content-foreground = ${colors.graphics-background}
|
||||
content-underline = ${colors.graphics-underline}
|
||||
content-overline = ${colors.graphics-overline}
|
||||
content-padding = ${sizes.module-padding}
|
||||
|
||||
[module/graphics-right]
|
||||
type = custom/text
|
||||
content = " "
|
||||
content-foreground = ${colors.graphics-background}
|
||||
content-underline = ${colors.graphics-underline}
|
||||
content-overline = ${colors.graphics-overline}
|
||||
content-padding = ${sizes.module-padding}
|
||||
|
||||
[module/graphics]
|
||||
type = custom/script
|
||||
|
||||
; Available tokens:
|
||||
; %counter%
|
||||
; Command to be executed (using "/bin/sh -c [command]")
|
||||
exec = echo " $(modinfo nvidia | grep ^version | cut -d ' ' -f9)"
|
||||
|
||||
; Conditional command that, if defined, needs to exit successfully
|
||||
; before the main exec command is invoked.
|
||||
; Default: ""
|
||||
; exec-if = pgrep -x myservice
|
||||
|
||||
; Will the script output continous content?
|
||||
; Default: false
|
||||
tail = false
|
||||
|
||||
; Seconds to sleep between updates
|
||||
; Default: 5 (0 if `tail = true`)
|
||||
interval = ${intervals.graphics}
|
||||
|
||||
; Available tags:
|
||||
; <output> - deprecated
|
||||
; <label> (default)
|
||||
format = <label>
|
||||
format-foreground = ${colors.graphics-foreground}
|
||||
format-background = ${colors.graphics-background}
|
||||
format-underline = ${colors.graphics-underline}
|
||||
format-overline = ${colors.graphics-overline}
|
||||
|
||||
; Available tokens:
|
||||
; %output%
|
||||
; Default: %output%
|
||||
label = %output%
|
||||
label-padding = ${sizes.module-padding}
|
||||
|
||||
; Available tokens:
|
||||
; %counter%
|
||||
; %pid%
|
||||
;
|
||||
; "click-(left|middle|right)" will be executed using "/bin/sh -c [command]"
|
||||
click-left = nvidia-settings
|
||||
; click-middle = echo middle %counter%
|
||||
click-right = ~/.scripts/cpu-gpu.sh --rofi
|
||||
; double-click-left = echo double left %counter%
|
||||
; double-click-middle = echo double middle %counter%
|
||||
; double-click-right = echo double right %counter%
|
||||
|
||||
; Available tokens:
|
||||
; %counter%
|
||||
; %pid%
|
||||
;
|
||||
; "scroll-(up|down)" will be executed using "/bin/sh -c [command]"
|
||||
; scroll-up = echo scroll up %counter%
|
||||
; scroll-down = echo scroll down %counter%
|
||||
|
||||
[module/cpu-left]
|
||||
type = custom/text
|
||||
content = " "
|
||||
@@ -966,7 +1044,7 @@ format-mounted = %{A1:qdirstat &:}<label-mounted>%{A}
|
||||
|
||||
; Available tags:
|
||||
; <label-unmounted> (default)
|
||||
format-unmounted = %{A1:gnome-disks &:} <label-unmounted> %{A}
|
||||
format-unmounted = %{A1:gnome-disks &:}<label-unmounted>%{A}
|
||||
|
||||
; Available tokens:
|
||||
; %mountpoint%
|
||||
|
Reference in New Issue
Block a user