1
1
Fork 0

hyprland: modify android window rules

Signed-off-by: Myned <dev@bjork.tech>
This commit is contained in:
Myned 2024-10-29 17:02:07 -05:00
parent fac2c7e340
commit ee27d25fb1
Signed by: myned
GPG key ID: C7224454F7881A34
2 changed files with 33 additions and 2 deletions

View file

@ -30,7 +30,7 @@ in {
"plugin:hyprbars:nobar, class:^dropdown$" "plugin:hyprbars:nobar, class:^dropdown$"
"plugin:hyprbars:nobar, class:^org\\.gnome\\.Nautilus$, title:^New Folder$" "plugin:hyprbars:nobar, class:^org\\.gnome\\.Nautilus$, title:^New Folder$"
"plugin:hyprbars:nobar, class:^steam_app_.+$" "plugin:hyprbars:nobar, class:^steam_app_.+$"
"plugin:hyprbars:nobar, class:^waydroid.*$" "plugin:hyprbars:nobar, class:^[Ww]aydroid.*$"
"plugin:hyprbars:nobar, class:^Xdg-desktop-portal-gtk$" "plugin:hyprbars:nobar, class:^Xdg-desktop-portal-gtk$"
"plugin:hyprbars:nobar, title:^Picture.in.[Pp]icture$" "plugin:hyprbars:nobar, title:^Picture.in.[Pp]icture$"
]; ];

View file

@ -48,6 +48,37 @@ in {
### Static geometry rules ### Static geometry rules
tr = num: toString (builtins.floor num); # Convert truncated float to string tr = num: toString (builtins.floor num); # Convert truncated float to string
# Bottom center
android = rec {
x = tr (width / scale / 2 - (toInt w) / 2);
y = tr (height
/ scale
- (toInt h)
- gap
- padding
+ (
if ultrawide
then - border # Cause unknown
else 0
));
w = tr (
width
/ scale
* (
if ultrawide
then 0.5 # 50%
else 1
)
+ (
if ultrawide
then - gap / 2 * 2 # Center layout padding between windows
else - gap * 2
)
- border * 2
);
h = tr (height / scale * 0.5); # 50%
};
# Bottom center # Bottom center
clipboard = rec { clipboard = rec {
x = tr (width / scale / 2 - (toInt w) / 2); x = tr (width / scale / 2 - (toInt w) / 2);
@ -217,7 +248,7 @@ in {
(fullscreen true ["idleinhibit focus"]) (fullscreen true ["idleinhibit focus"])
(pinned true ["bordercolor rgb(073642) rgb(073642)"]) (pinned true ["bordercolor rgb(073642) rgb(073642)"])
(tag.android ["idleinhibit always" "tile" "workspace special:android"]) (tag.android ["idleinhibit always" "move ${android.x} ${android.y}" "size ${android.w} ${android.h}" "workspace special:android"])
(tag.clipboard ["move ${clipboard.x} ${clipboard.y}" "pin" "size ${clipboard.w} ${clipboard.h}" "stayfocused"]) (tag.clipboard ["move ${clipboard.x} ${clipboard.y}" "pin" "size ${clipboard.w} ${clipboard.h}" "stayfocused"])
(tag.dropdown ["move ${dropdown.x} ${dropdown.y}" "pin" "size ${dropdown.w} ${dropdown.h}"]) (tag.dropdown ["move ${dropdown.x} ${dropdown.y}" "pin" "size ${dropdown.w} ${dropdown.h}"])
(tag.editor ["group override set" "tile"]) (tag.editor ["group override set" "tile"])