add hyprland windowrule and tagging functionality for opacity
This commit is contained in:
parent
63c10fdae6
commit
3f57c911b7
3 changed files with 20 additions and 3 deletions
|
|
@ -1,11 +1,19 @@
|
||||||
{inputs, ...}: let
|
{inputs, ...}: let
|
||||||
inherit (inputs.nixpkgs.lib) toHexString concatStrings strings;
|
inherit (inputs.nixpkgs.lib) toHexString concatStrings strings toLower;
|
||||||
inherit (strings) fixedWidthString;
|
inherit (strings) fixedWidthString;
|
||||||
|
|
||||||
padHex = n: fixedWidthString 2 "0" (toHexString n);
|
padHex = n: fixedWidthString 2 "0" (toHexString n);
|
||||||
in {
|
padHexLower = n: fixedWidthString 2 "0" (toLower (toHexString n));
|
||||||
|
|
||||||
toHex = color: concatStrings ["#" (padHex color.red) (padHex color.green) (padHex color.blue)];
|
toHex = color: concatStrings ["#" (padHex color.red) (padHex color.green) (padHex color.blue)];
|
||||||
toHexNoHash = color: concatStrings [(padHex color.red) (padHex color.green) (padHex color.blue)];
|
toHexNoHash = color: concatStrings [(padHex color.red) (padHex color.green) (padHex color.blue)];
|
||||||
toRGB = color: concatStrings ["rgb(" (toString color.red) "," (toString color.green) "," (toString color.blue) ")"];
|
toRGB = color: concatStrings ["rgb(" (toHexNoHash color) ")"];
|
||||||
|
toRGBHex = color: concatStrings ["rgb(" (padHexLower color.red) (padHexLower color.green) (padHexLower color.blue) ")"];
|
||||||
toRGBA = color: a: concatStrings ["rgba(" (toString color.red) "," (toString color.green) "," (toString color.blue) "," (toString a) ")"];
|
toRGBA = color: a: concatStrings ["rgba(" (toString color.red) "," (toString color.green) "," (toString color.blue) "," (toString a) ")"];
|
||||||
|
in {
|
||||||
|
toHex = toHex; # 0xrrggbb
|
||||||
|
toHexNoHash = toHexNoHash; # rrggbb
|
||||||
|
toRGB = toRGB; # rgb(red,green,blue)
|
||||||
|
toRGBHex = toRGBHex; # rgb(rrggbb)
|
||||||
|
toRGBA = toRGBA; # rgb(red,green,blue,opac[0-1])
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -78,6 +78,8 @@ in {
|
||||||
"nofocus,class:^$,title:^$,xwayland:1,floating:1,fullscreen:0,pinned:0"
|
"nofocus,class:^$,title:^$,xwayland:1,floating:1,fullscreen:0,pinned:0"
|
||||||
|
|
||||||
"opacity 1.0 override, initialTitle:^Picture-in-Picture$"
|
"opacity 1.0 override, initialTitle:^Picture-in-Picture$"
|
||||||
|
"opacity 1.0 override, tag:full-opacity"
|
||||||
|
"bordercolor ${catppuccin.toRGBHex colors.yellow}, tag:full-opacity"
|
||||||
|
|
||||||
"float, initialClass:CImg"
|
"float, initialClass:CImg"
|
||||||
"float, initialTitle:GLFW"
|
"float, initialTitle:GLFW"
|
||||||
|
|
|
||||||
|
|
@ -102,6 +102,13 @@ in {
|
||||||
dispatcher = "exec";
|
dispatcher = "exec";
|
||||||
params = "hyprlock";
|
params = "hyprlock";
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
flags = [];
|
||||||
|
mods = ["SUPER"];
|
||||||
|
key = "O";
|
||||||
|
dispatcher = "tagwindow";
|
||||||
|
params = "full-opacity";
|
||||||
|
}
|
||||||
{
|
{
|
||||||
flags = ["e"];
|
flags = ["e"];
|
||||||
mods = ["SUPER"];
|
mods = ["SUPER"];
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue