Add nvidia backend

This commit is contained in:
Ryan 2023-12-03 10:29:58 +08:00
parent 15ee8a7070
commit 8447ed667d
5 changed files with 197 additions and 6 deletions

View File

@ -1,7 +1,7 @@
# env setting for nvidia
env = LIBVA_DRIVER_NAME,nvidia
env = XDG_SESSION_TYPE,wayland
# env = GBM_BACKEND,nvidia-drm
env = GBM_BACKEND,nvidia-drm
env = WLR_DRM_DEVICES,/dev/dri/card0:/dev/dri/card1
env = __GLX_VENDOR_LIBRARY_NAME,nvidia
env = WLR_NO_HARDWARE_CURSORS,1

View File

@ -27,10 +27,6 @@ bind = $mainMod + SHIFT, l, swapwindow, r
bind = $mainMod + SHIFT, k, swapwindow, u
bind = $mainMod + SHIFT, j, swapwindow, d
# Grouping
bind = $mainMod, t, togglegroup
bind = $mainMod, TAB, changegroupactive
# Switch workspaces with mainMod + [0-9]
bind = $mainMod, 1, workspace, 1
bind = $mainMod, 2, workspace, 2

@ -1 +0,0 @@
Subproject commit 4db9b1f37a5f429aa5d103143176ba2f5dd20f16

View File

@ -0,0 +1,99 @@
{
"layer": "top",
"modules-left": [
"hyprland/workspaces"
],
"fixed-center": false,
"modules-center": [
"hyprland/window"
],
"modules-right": [
"tray",
"custom/notification",
"custom/player",
"cpu",
"memory",
"network",
"battery",
"clock"
],
"hyprland/workspaces": {
"on-scroll-up": "hyprctl dispatch workspace e-1",
"on-scroll-down": "hyprctl dispatch workspace e+1",
"show_special": true,
"on-click": "activate",
"persistent_workspaces": {
"9": ["HDMI-A-1"]
}
},
"hyprland/window": {
"max-length": 50,
"separate-outputs": true
},
"tray": {
"spacing": 10
},
"cpu": {
"format": " {load}",
"format-alt": " {usage}% @ {avg_frequency}GHz"
},
"memory": {
"format": "󰍛 {used:0.1f}G / {total:0.1f}G",
"format-alt": "󰓡 Swap: {swapUsed:0.1f}G / {swapTotal:0.1f}G"
},
"network": {
"format-wifi": " {essid} ({signalStrength}%)",
"format-ethernet": "󰈀 {ifname}",
"format-linked": " {ifname}",
"format-disconnected": "󰌙 Disconnected",
"format-alt": "󰩟 {ifname}: {ipaddr}/{cidr}",
"tooltip-format": "{ifname} via {gwaddr}"
},
"battery": {
"states": {
"good": 75,
"warning": 15,
"critical": 5
},
"format": "{icon} {capacity}%",
"format-charging": "🗲 {capacity}%",
"format-plugged": " {capacity}%",
"format-alt": "{icon} ETA: {time}",
"format-icons": [
"",
"",
"",
"",
""
]
},
"clock": {
"format": "{:󰅐 %H:%M\t %m-%d}",
"tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>"
},
"custom/notification": {
"tooltip": true,
"format": "{icon}",
"format-icons": {
"notification": " <span foreground='red'><sup></sup></span> New notifications",
"none": " No notifications",
"dnd-notification": " DND on",
"dnd-none": " DND on"
},
"return-type": "json",
"exec-if": "which swaync-client",
"exec": "swaync-client -swb",
"on-click": "swaync-client -t -sw",
"on-click-right": "swaync-client -d -sw",
"escape": true
},
"custom/player": {
"format": "󰎈 {}",
"return-type": "json",
"exec": "playerctl -a metadata --format '{\"text\": \"{{uc(playerName)}}: {{artist}} - {{markup_escape(title)}}\", \"tooltip\": \"{{playerName}} : {{markup_escape(title)}}\", \"class\": \"{{status}}\"}' -F",
"max-length": 35,
"on-click-middle": "playerctl play-pause",
"on-click-right": "plaerctl next",
"on-click-left": "playerctl previous"
}
}

View File

@ -0,0 +1,97 @@
{
"layer": "top",
"modules-left": [
"sway/workspaces"
],
"fixed-center": false,
"modules-center": [
"sway/window"
],
"modules-right": [
"tray",
"custom/notification",
"custom/player",
"cpu",
"memory",
"network",
"battery",
"clock"
],
"sway/workspaces": {
"show_special": true,
"on-click": "activate",
"persistent_workspaces": {
"9": ["HDMI-A-1"]
}
},
"sway/window": {
"max-length": 50,
"separate-outputs": true
},
"tray": {
"spacing": 10
},
"cpu": {
"format": " {load}",
"format-alt": " {usage}% @ {avg_frequency}GHz"
},
"memory": {
"format": "󰍛 {used:0.1f}G / {total:0.1f}G",
"format-alt": "󰓡 Swap: {swapUsed:0.1f}G / {swapTotal:0.1f}G"
},
"network": {
"format-wifi": " {essid} ({signalStrength}%)",
"format-ethernet": "󰈀 {ifname}",
"format-linked": " {ifname}",
"format-disconnected": "󰌙 Disconnected",
"format-alt": "󰩟 {ifname}: {ipaddr}/{cidr}",
"tooltip-format": "{ifname} via {gwaddr}"
},
"battery": {
"states": {
"good": 75,
"warning": 15,
"critical": 5
},
"format": "{icon} {capacity}%",
"format-charging": "🗲 {capacity}%",
"format-plugged": " {capacity}%",
"format-alt": "{icon} ETA: {time}",
"format-icons": [
"",
"",
"",
"",
""
]
},
"clock": {
"format": "{:󰅐 %H:%M\t %m-%d}",
"tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>"
},
"custom/notification": {
"tooltip": true,
"format": "{icon}",
"format-icons": {
"notification": " <span foreground='red'><sup></sup></span> New notifications",
"none": " No notifications",
"dnd-notification": " DND on",
"dnd-none": " DND on"
},
"return-type": "json",
"exec-if": "which swaync-client",
"exec": "swaync-client -swb",
"on-click": "swaync-client -t -sw",
"on-click-right": "swaync-client -d -sw",
"escape": true
},
"custom/player": {
"format": "󰎈 {}",
"return-type": "json",
"exec": "playerctl -a metadata --format '{\"text\": \"{{uc(playerName)}}: {{artist}} - {{markup_escape(title)}}\", \"tooltip\": \"{{playerName}} : {{markup_escape(title)}}\", \"class\": \"{{status}}\"}' -F",
"max-length": 35,
"on-click-middle": "playerctl play-pause",
"on-click-right": "plaerctl next",
"on-click-left": "playerctl previous"
}
}