Compare commits

...

4 Commits

Author SHA1 Message Date
Sravan Balaji
8dee563611 Rename graphics module to system76-power
- Display current graphics mode rather than nvidia driver version
2024-05-11 12:43:16 -04:00
Sravan Balaji
d88c08a666 Merge remote-tracking branch 'upstream/master' 2024-05-08 09:56:23 -04:00
Sravan Balaji
22f2f25a50 Unmanage steam notification toasts 2024-05-06 08:45:33 -04:00
bakkeby
dd1e34dbd6 switchtag: make sure to unfocus the selected client (if any) when triggering switchtag and potentially moving to another monitor ref. #425 2024-05-04 22:23:24 +02:00
4 changed files with 62 additions and 59 deletions

View File

@@ -4327,6 +4327,7 @@ static const Rule rules[] = {
RULE(.wintype = WTYPE "TOOLBAR", .isfloating = 1)
RULE(.wintype = WTYPE "SPLASH", .isfloating = 1)
RULE(.wintype = WTYPE "NOTIFICATION", .unmanaged = 1) // 1 - the window will be placed above all other windows
RULE(.title = "notificationtoasts_11_desktop", .unmanaged = 1) // 1 - the window will be placed above all other windows
RULE(.title = "Picture in picture", .isfloating = 1)
RULE(.class = "Beeper", .tags = 1 << 0)
RULE(.class = "Signal", .tags = 1 << 0)
@@ -5919,10 +5920,10 @@ 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}
system76-power-foreground = ${self.green}
system76-power-background = ${self.background}
system76-power-underline = ${self.background}
system76-power-overline = ${self.background}
kernel-foreground = ${self.orange}
kernel-background = ${self.background}
@@ -6000,15 +6001,15 @@ 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
filesystem = 600
date = 1
time = 1
dunst = 1
media-playing = 1
system76-power = 86400
kernel = 86400
cpu = 1
memory = 1
filesystem = 600
date = 1
time = 1
dunst = 1
#+END_SRC
**** Global Window Manager
@@ -6154,7 +6155,7 @@ font-8 = "NotoSansYi: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 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
separator = ""
@@ -6802,36 +6803,36 @@ label-padding = ${sizes.module-padding}
; scroll-down = echo scroll down %counter%
#+END_SRC
**** Graphics
**** System76 Power
#+BEGIN_SRC conf :tangle polybar/config.ini
[module/graphics-left]
[module/system76-power-left]
type = custom/text
content = " "
content-foreground = ${colors.graphics-background}
content-underline = ${colors.graphics-underline}
content-overline = ${colors.graphics-overline}
content-foreground = ${colors.system76-power-background}
content-underline = ${colors.system76-power-underline}
content-overline = ${colors.system76-power-overline}
content-padding = ${sizes.module-padding}
#+END_SRC
#+BEGIN_SRC conf :tangle polybar/config.ini
[module/graphics-right]
[module/system76-power-right]
type = custom/text
content = " "
content-foreground = ${colors.graphics-background}
content-underline = ${colors.graphics-underline}
content-overline = ${colors.graphics-overline}
content-foreground = ${colors.system76-power-background}
content-underline = ${colors.system76-power-underline}
content-overline = ${colors.system76-power-overline}
content-padding = ${sizes.module-padding}
#+END_SRC
#+BEGIN_SRC conf :tangle polybar/config.ini
[module/graphics]
[module/system76-power]
type = custom/script
; Available tokens:
; %counter%
; 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
; before the main exec command is invoked.
@@ -6844,16 +6845,16 @@ tail = false
; Seconds to sleep between updates
; Default: 5 (0 if `tail = true`)
interval = ${intervals.graphics}
interval = ${intervals.system76-power}
; 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}
format-foreground = ${colors.system76-power-foreground}
format-background = ${colors.system76-power-background}
format-underline = ${colors.system76-power-underline}
format-overline = ${colors.system76-power-overline}
; Available tokens:
; %output%

View File

@@ -474,6 +474,7 @@ static const Rule rules[] = {
RULE(.wintype = WTYPE "TOOLBAR", .isfloating = 1)
RULE(.wintype = WTYPE "SPLASH", .isfloating = 1)
RULE(.wintype = WTYPE "NOTIFICATION", .unmanaged = 1) // 1 - the window will be placed above all other windows
RULE(.title = "notificationtoasts_11_desktop", .unmanaged = 1) // 1 - the window will be placed above all other windows
RULE(.title = "Picture in picture", .isfloating = 1)
RULE(.class = "Beeper", .tags = 1 << 0)
RULE(.class = "Signal", .tags = 1 << 0)

1
dwm.c
View File

@@ -968,6 +968,7 @@ applyrules(Client *c)
if (r->switchtag)
#endif // SWALLOW_PATCH
{
unfocus(selmon->sel, 1, NULL);
selmon = c->mon;
if (r->switchtag == 2 || r->switchtag == 4)
newtagset = c->mon->tagset[c->mon->seltags] ^ c->tags;

View File

@@ -74,10 +74,10 @@ 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}
system76-power-foreground = ${self.green}
system76-power-background = ${self.background}
system76-power-underline = ${self.background}
system76-power-overline = ${self.background}
kernel-foreground = ${self.orange}
kernel-background = ${self.background}
@@ -139,15 +139,15 @@ tray-scale = ${xrdb:polybar.tray-scale:1}
maxlen = ${xrdb:polybar.maxlen:50}
[intervals]
media-playing = 1
graphics = 86400
kernel = 86400
cpu = 1
memory = 1
filesystem = 600
date = 1
time = 1
dunst = 1
media-playing = 1
system76-power = 86400
kernel = 86400
cpu = 1
memory = 1
filesystem = 600
date = 1
time = 1
dunst = 1
[global/wm]
; Adjust the _NET_WM_STRUT_PARTIAL top value
@@ -285,7 +285,7 @@ font-8 = "NotoSansYi: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 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
separator = ""
@@ -785,29 +785,29 @@ label-padding = ${sizes.module-padding}
; scroll-up = echo scroll up %counter%
; scroll-down = echo scroll down %counter%
[module/graphics-left]
[module/system76-power-left]
type = custom/text
content = " "
content-foreground = ${colors.graphics-background}
content-underline = ${colors.graphics-underline}
content-overline = ${colors.graphics-overline}
content-foreground = ${colors.system76-power-background}
content-underline = ${colors.system76-power-underline}
content-overline = ${colors.system76-power-overline}
content-padding = ${sizes.module-padding}
[module/graphics-right]
[module/system76-power-right]
type = custom/text
content = " "
content-foreground = ${colors.graphics-background}
content-underline = ${colors.graphics-underline}
content-overline = ${colors.graphics-overline}
content-foreground = ${colors.system76-power-background}
content-underline = ${colors.system76-power-underline}
content-overline = ${colors.system76-power-overline}
content-padding = ${sizes.module-padding}
[module/graphics]
[module/system76-power]
type = custom/script
; Available tokens:
; %counter%
; 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
; before the main exec command is invoked.
@@ -820,16 +820,16 @@ tail = false
; Seconds to sleep between updates
; Default: 5 (0 if `tail = true`)
interval = ${intervals.graphics}
interval = ${intervals.system76-power}
; 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}
format-foreground = ${colors.system76-power-foreground}
format-background = ${colors.system76-power-background}
format-underline = ${colors.system76-power-underline}
format-overline = ${colors.system76-power-overline}
; Available tokens:
; %output%