Compare commits
3 Commits
2ef1d58ea7
...
c4ed00e6c8
| Author | SHA1 | Date | |
|---|---|---|---|
| c4ed00e6c8 | |||
| b720c1ff02 | |||
| 9ee5f40aa8 |
@@ -55,7 +55,7 @@
|
|||||||
enableFishIntegration = true;
|
enableFishIntegration = true;
|
||||||
|
|
||||||
settings = {
|
settings = {
|
||||||
font-family = myConfig.font.monospace;
|
font-family = myConfig.terminal.font;
|
||||||
confirm-close-surface = false;
|
confirm-close-surface = false;
|
||||||
app-notifications = false;
|
app-notifications = false;
|
||||||
window-padding-x = 15;
|
window-padding-x = 15;
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
home.packages = [
|
home.packages = [
|
||||||
|
# FIXME: does not dynamically update with matugen when open
|
||||||
inputs.nixovim.packages.${pkgs.system}.full
|
inputs.nixovim.packages.${pkgs.system}.full
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
+38
-38
@@ -4,53 +4,53 @@
|
|||||||
myConfig,
|
myConfig,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
|
# FIXME: waybar overlaps fullscreen display when restarting waybar
|
||||||
hakase-popup-launch = pkgs.writeShellScriptBin "hakase-popup-launch" ''
|
hakase-popup-launch = pkgs.writeShellScriptBin "hakase-popup-launch" ''
|
||||||
tui_name=$1
|
tui_name=$1
|
||||||
active_popup=$(${pkgs.hyprland}/bin/hyprctl clients -j | ${pkgs.jq}/bin/jq -r '.[] | select(.class | startswith("org.hakase.")) | .class')
|
active_popup=$(${pkgs.hyprland}/bin/hyprctl clients -j | ${pkgs.jq}/bin/jq -r '.[] | select(.class | startswith("org.hakase.")) | .class')
|
||||||
|
|
||||||
if [[ -z "''${tui_name}" ]]; then
|
if [[ -z "''${tui_name}" ]]; then
|
||||||
echo "Usage: $(basename "$0") [tui-name]"
|
echo "Usage: $(basename "$0") [tui-name]"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
popup_checker() {
|
|
||||||
if [[ -z "$active_popup" ]]; then
|
|
||||||
echo "no_popup"
|
|
||||||
elif [[ "$active_popup" != "org.hakase.popup.''${tui_name}" ]]; then
|
|
||||||
echo "different"
|
|
||||||
else
|
|
||||||
echo "same"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
|
popup_checker() {
|
||||||
|
if [[ -z "$active_popup" ]]; then
|
||||||
|
echo "no_popup"
|
||||||
|
elif [[ "$active_popup" != "org.hakase.popup.''${tui_name}" ]]; then
|
||||||
|
echo "different"
|
||||||
|
else
|
||||||
|
echo "same"
|
||||||
|
fi
|
||||||
|
}
|
||||||
launch() {
|
launch() {
|
||||||
exec ${pkgs.util-linux}/bin/setsid uwsm-app -- xdg-terminal-exec --app-id=org.hakase.popup."''${tui_name}" -e "''${tui_name}"
|
exec ${pkgs.util-linux}/bin/setsid uwsm-app -- xdg-terminal-exec --app-id=org.hakase.popup."''${tui_name}" -e "''${tui_name}"
|
||||||
}
|
}
|
||||||
|
|
||||||
focus() {
|
focus() {
|
||||||
exec ${pkgs.hyprland}/bin/hyprctl dispatch focuswindow "class:org.hakase.popup.''${tui_name}"
|
exec ${pkgs.hyprland}/bin/hyprctl dispatch focuswindow "class:org.hakase.popup.''${tui_name}"
|
||||||
}
|
}
|
||||||
|
|
||||||
replace() {
|
replace() {
|
||||||
${pkgs.hyprland}/bin/hyprctl dispatch closewindow "class:''${active_popup}"
|
${pkgs.hyprland}/bin/hyprctl dispatch closewindow "class:''${active_popup}"
|
||||||
sleep 0.3
|
sleep 0.3
|
||||||
launch
|
launch
|
||||||
}
|
}
|
||||||
|
|
||||||
run() {
|
run() {
|
||||||
local status
|
local status
|
||||||
status=$(popup_checker)
|
status=$(popup_checker)
|
||||||
|
|
||||||
if [[ "$status" == "no_popup" ]]; then
|
if [[ "$status" == "no_popup" ]]; then
|
||||||
launch
|
launch
|
||||||
elif [[ "$status" == "same" ]]; then
|
elif [[ "$status" == "same" ]]; then
|
||||||
focus
|
focus
|
||||||
elif [[ "$status" == "different" ]]; then
|
elif [[ "$status" == "different" ]]; then
|
||||||
replace
|
replace
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
run
|
run
|
||||||
'';
|
'';
|
||||||
in {
|
in {
|
||||||
wayland.windowManager.hyprland.settings = {
|
wayland.windowManager.hyprland.settings = {
|
||||||
|
|||||||
@@ -18,6 +18,7 @@
|
|||||||
};
|
};
|
||||||
terminal = {
|
terminal = {
|
||||||
default = "ghostty";
|
default = "ghostty";
|
||||||
|
font = "MonoLisa";
|
||||||
aliases = {
|
aliases = {
|
||||||
update = "sudo nixos-rebuild switch --flake ~/.config/nixos/#hakase";
|
update = "sudo nixos-rebuild switch --flake ~/.config/nixos/#hakase";
|
||||||
};
|
};
|
||||||
@@ -75,6 +76,7 @@
|
|||||||
};
|
};
|
||||||
terminal = {
|
terminal = {
|
||||||
default = "ghostty";
|
default = "ghostty";
|
||||||
|
font = "MonoLisa";
|
||||||
aliases = {
|
aliases = {
|
||||||
update = "sudo nixos-rebuild switch --flake ~/.config/nixos/#macbook";
|
update = "sudo nixos-rebuild switch --flake ~/.config/nixos/#macbook";
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user