hyprland: modify android window rules
Signed-off-by: Myned <dev@bjork.tech>
This commit is contained in:
parent
fac2c7e340
commit
ee27d25fb1
2 changed files with 33 additions and 2 deletions
|
@ -30,7 +30,7 @@ in {
|
|||
"plugin:hyprbars:nobar, class:^dropdown$"
|
||||
"plugin:hyprbars:nobar, class:^org\\.gnome\\.Nautilus$, title:^New Folder$"
|
||||
"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, title:^Picture.in.[Pp]icture$"
|
||||
];
|
||||
|
|
|
@ -48,6 +48,37 @@ in {
|
|||
### Static geometry rules
|
||||
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
|
||||
clipboard = rec {
|
||||
x = tr (width / scale / 2 - (toInt w) / 2);
|
||||
|
@ -217,7 +248,7 @@ in {
|
|||
(fullscreen true ["idleinhibit focus"])
|
||||
(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.dropdown ["move ${dropdown.x} ${dropdown.y}" "pin" "size ${dropdown.w} ${dropdown.h}"])
|
||||
(tag.editor ["group override set" "tile"])
|
||||
|
|
Loading…
Reference in a new issue