Commit abd2a8c9 authored by James T. Lee's avatar James T. Lee
Browse files

sway: Use sw cursor on raspberrypi

Workaround pointer graphic corruption when it moves between outputs--at
least that's what I think is triggering it.  Don't have enough info yet
to file a bug.
parent e7e2e6d8
...@@ -25,10 +25,17 @@ class nest::role::workstation::sway { ...@@ -25,10 +25,17 @@ class nest::role::workstation::sway {
$dpi = 0 + inline_template('<%= ((@text_scaling_factor / @gui_scaling_factor) * 96.0).round %>') $dpi = 0 + inline_template('<%= ((@text_scaling_factor / @gui_scaling_factor) * 96.0).round %>')
$dpi_scale = 0.0 + inline_template('<%= (@text_scaling_factor / @gui_scaling_factor).round(3) %>') $dpi_scale = 0.0 + inline_template('<%= (@text_scaling_factor / @gui_scaling_factor).round(3) %>')
# Hardware cursor becomes corrupted when floating between monitors on
# raspberrypi. Watch dri/drm/sway updates for improvements.
$no_hardware_cursors = $::platform ? {
'raspberrypi' => 1,
default => 0,
}
$sway_wrapper_content = @("END_WRAPPER"/$) $sway_wrapper_content = @("END_WRAPPER"/$)
#!/bin/bash #!/bin/bash
# Workaround https://github.com/swaywm/sway/issues/3109 # Workaround https://github.com/swaywm/sway/issues/3109
exec "\$SHELL" -c "env GDK_DPI_SCALE=${dpi_scale} QT_FONT_DPI=${dpi} /usr/bin/sway.real \${*@Q}" exec "\$SHELL" -c "env GDK_DPI_SCALE=${dpi_scale} QT_FONT_DPI=${dpi} WLR_NO_HARDWARE_CURSORS=${no_hardware_cursors} /usr/bin/sway.real \${*@Q}"
| END_WRAPPER | END_WRAPPER
file { '/usr/bin/sway': file { '/usr/bin/sway':
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment