lazygit: add lazygit to the list of programs that should be floating and centered

This commit is contained in:
Tigor Hutasuhut 2024-08-14 23:13:14 +07:00
parent 63f59061b3
commit d5cbb677e1
2 changed files with 24 additions and 6 deletions

View file

@ -40,6 +40,11 @@ in
layout = "dwindle";
};
master = {
mfact = 0.75;
new_status = "inherit";
};
dwindle = {
pseudotile = true;
preserve_split = true;
@ -84,12 +89,7 @@ in
# https://wiki.hyprland.org/Configuring/Binds
bind = [
# Programs
(
if config.profile.home.programs.zellij.enable then
''$mod, RETURN, exec, foot''
else
''$mod, RETURN, exec, wezterm''
)
''$mod, RETURN, exec, foot''
"$mod, E, exec, thunar"
"$mod, B, exec, microsoft-edge"
"$mod, D, exec, rofi -show drun -replace -i"
@ -220,6 +220,10 @@ in
config.profile.whatsapp.window_rule
''opaque,title:(.*)(- YouTube)(.*)$''
''opaque,class:^(mpv)$''
''float,class:^(lazygit)$''
''center,class:^(lazygit)$''
''size 90% 90%,class:^(lazygit)$''
''stayfocused,class:^(lazygit)$''
];
};
extraConfig = /*hyprlang*/ ''

View file

@ -20,5 +20,19 @@ in
};
};
};
programs.zsh.initExtra = /*bash*/ ''
function osc7-pwd() {
emulate -L zsh # also sets localoptions for us
setopt extendedglob
local LC_ALL=C
printf '\e]7;file://%s%s\e\' $HOST ''${PWD//(#m)([^@-Za-z&-;_~])/%''${(l:2::0:)$(([##16]#MATCH))}}
}
function chpwd-osc7-pwd() {
(( ZSH_SUBSHELL )) || osc7-pwd
}
add-zsh-hook -Uz chpwd chpwd-osc7-pwd
'';
};
}