fix: flameshot on hyprland

This commit is contained in:
Ryan Yin
2025-05-30 21:50:25 +08:00
parent 4a4427cf2d
commit c539962c96
3 changed files with 20 additions and 7 deletions

View File

@@ -40,5 +40,10 @@
services = {
playerctld.enable = true;
flameshot = {
enable = true;
package = pkgs.flameshot.override {enableWlrSupport = true;};
};
};
}

View File

@@ -17,9 +17,6 @@
remmina
freerdp # required by remmina
# misc
flameshot
# my custom hardened packages
pkgs.nixpaks.qq
pkgs.nixpaks.qq-desktop-item

View File

@@ -70,16 +70,29 @@ dwindle {
}
#-- Window Rules ----------------------------------------------------
windowrule=float, class:^(foot-float)$
windowrule=float, class:^(yad|nm-connection-editor|pavucontrolk)$
windowrule=float, class:^(xfce-polkit|kvantummanager|qt5ct)$
windowrule=float, class:^(feh|imv|Gpicview|Gimp|nomacs)$
windowrule=float, class:^(VirtualBox Manager|qemu|Qemu-system-x86_64)$
windowrule=float, class:^(xfce4-appfinder)$
# foot
windowrule=float, class:^(foot-float)$
windowrule=float, class:^(foot-full)$
windowrule=move 0 0, class:^(foot-full)$
windowrule=size 100% 100%,class:^(foot-full)$
# flameshot
windowrule = move 0 0,class:(flameshot)
windowrule = pin,class:(flameshot)
windowrule = noborder,class:(flameshot)
windowrule = stayfocused,class:(flameshot)
windowrule = float,class:(flameshot)
# avoid transparency
windowrule = opaque,class:(flameshot)
# wlogout
windowrule=float,class:^(wlogout)$
windowrule=move 0 0,class:^(wlogout)$
windowrule=size 100% 100%,class:^(wlogout)$
@@ -134,9 +147,7 @@ bind=,XF86AudioStop,exec,mpc stop
# -- Screenshots --
bind=,Print,exec,hyprshot -m output -o ~/Pictures/Screenshots -- imv
bind=SUPER,Print,exec,hyprshot -m window -o ~/Pictures/Screenshots -- imv
# flameshot do not recognize hyprland as a wayland compositor, so we set it to sway here
bind=CTRL,Print,exec,XDG_CURRENT_DESKTOP=sway flameshot gui --raw -p ~/Pictures/Screenshots | wl-copy
# bind=CTRL,Print,exec,hyprshot -m region -o ~/Pictures/Screenshots -- imv
bind=CTRL,Print,exec,flameshot gui --raw -p ~/Pictures/Screenshots | wl-copy
# Focus
bind=SUPER,left,movefocus,l