Diary on 2026-02-28
2026-02-28 Saturday 🌧
Last updated on
flameshot configuration in labwc
Under Wayland/labwc, the configuration UI for flameshot no longer includes manual screenshot shortcut settings. After some digging, I learned we can configure them directly in labwc by adding a keybind to the keyboard section of the labwc config file ~/.config/labwc/rc.xml.
<keyboard> ... <!-- flameshot --> <keybind key="A-X"> <action name="Execute" command="flameshot gui"/> </keybind></keyboard>...</keyboard>- default key mapping in labwc
- W - window/super/logo
- A - alt
- C - ctrl
- S - shift
And the grim option has been removed, so you need to configure it with portals.
- install portals
Terminal window apt install xdg-desktop-portal xdg-desktop-portal-wlr xdg-desktop-portal-lxqt - configure portals
~/.config/xdg-desktop-portal/labwc-portals.conf, here we use lxqt, if you use other desktop, you can use gtkxdg-desktop-portal-gtk[preferred]default=lxqtorg.freedesktop.impl.portal.Screencast=wlrorg.freedesktop.impl.portal.Screenshot=wlr - restart portal service
sh systemctl --user restart xdg-desktop-portal-wlr xdg-desktop-portal-lxqt xdg-desktop-portal - make it autostart
mkdir ~/.config/systemd/user/default.target.wants cd ~/.config/systemd/user/default.target.wants ln -s /usr/lib/systemd/user/xdg-desktop-portal.service . ln -s /usr/lib/systemd/user/xdg-desktop-portal-wlr.service . ln -s /usr/lib/systemd/user/xdg-desktop-portal-lxqt.service .
screen scale for labwc
previously i set the scale in lxqt env, this makes the app title bar overlapp with top panel, so i need to find a proper way to scale the screen, as it is 4k, font is too small
use randr is a better approach, just add the following line to ~/.config/labwc/autostart
wlr-randr --output DP-2 --scale 1.3