Compare commits
No commits in common. "7665a9a4ccd1d98bc74408819a2c7d921b078d7e" and "37cb01915d7cd3af8b4fe119cc819dad41ecfcc0" have entirely different histories.
7665a9a4cc
...
37cb01915d
12 changed files with 21 additions and 163 deletions
|
@ -11,7 +11,7 @@ with lib; let
|
||||||
codium = "${config.home-manager.users.${config.custom.username}.programs.vscode.package}/bin/codium";
|
codium = "${config.home-manager.users.${config.custom.username}.programs.vscode.package}/bin/codium";
|
||||||
firefox-esr = "${config.home-manager.users.${config.custom.username}.programs.firefox.finalPackage}/bin/firefox-esr";
|
firefox-esr = "${config.home-manager.users.${config.custom.username}.programs.firefox.finalPackage}/bin/firefox-esr";
|
||||||
gnome-text-editor = "${pkgs.gnome-text-editor}/bin/gnome-text-editor";
|
gnome-text-editor = "${pkgs.gnome-text-editor}/bin/gnome-text-editor";
|
||||||
hyprctl = "${config.programs.hyprland.package}/bin/hyprctl";
|
hyprctl = "${pkgs.hyprland}/bin/hyprctl";
|
||||||
hyprlock = "${config.home-manager.users.${config.custom.username}.programs.hyprlock.package}/bin/hyprlock";
|
hyprlock = "${config.home-manager.users.${config.custom.username}.programs.hyprlock.package}/bin/hyprlock";
|
||||||
hyprpicker = "${pkgs.hyprpicker}/bin/hyprpicker";
|
hyprpicker = "${pkgs.hyprpicker}/bin/hyprpicker";
|
||||||
inhibit = "~/.local/bin/inhibit";
|
inhibit = "~/.local/bin/inhibit";
|
||||||
|
@ -153,8 +153,6 @@ in {
|
||||||
(key "Return" "Super+Shift" "fullscreen" "0") # Fullscreen
|
(key "Return" "Super+Shift" "fullscreen" "0") # Fullscreen
|
||||||
(key "Right" "Super" "movewindow" "r")
|
(key "Right" "Super" "movewindow" "r")
|
||||||
(key "Right" "Super+Shift" "movewindoworgroup" "r")
|
(key "Right" "Super+Shift" "movewindoworgroup" "r")
|
||||||
(key "Semicolon" "Super" "exec" "${hyprpicker} --autocopy")
|
|
||||||
(key "Semicolon" "Super+Shift" "exec" "${hyprpicker} --autocopy --format rgb")
|
|
||||||
(key "Slash" "Super" "exec" vrr)
|
(key "Slash" "Super" "exec" vrr)
|
||||||
(key "Space" "Ctrl" "exec" (concatStringsSep " " [
|
(key "Space" "Ctrl" "exec" (concatStringsSep " " [
|
||||||
"${toggle}"
|
"${toggle}"
|
||||||
|
@ -227,9 +225,8 @@ in {
|
||||||
(key "O" "Super" "togglespecialworkspace" "office")
|
(key "O" "Super" "togglespecialworkspace" "office")
|
||||||
(key "O" "Super+Ctrl" "exec" "${onlyoffice}")
|
(key "O" "Super+Ctrl" "exec" "${onlyoffice}")
|
||||||
(key "O" "Super+Shift" "movetoworkspacesilent" "special:office")
|
(key "O" "Super+Shift" "movetoworkspacesilent" "special:office")
|
||||||
(key "P" "Ctrl+Alt" "exec" "${pkill} 1password")
|
(key "P" "Super" "exec" "${hyprpicker} --autocopy")
|
||||||
(key "P" "Super" "togglespecialworkspace" "password")
|
(key "P" "Super+Shift" "exec" "${hyprpicker} --autocopy --format rgb")
|
||||||
(key "P" "Super+Shift" "movetoworkspacesilent" "special:password")
|
|
||||||
(key "Q" "Ctrl+Alt" "exec" "${kill} -9 $(${hyprctl} -j activewindow | ${jq} .pid)")
|
(key "Q" "Ctrl+Alt" "exec" "${kill} -9 $(${hyprctl} -j activewindow | ${jq} .pid)")
|
||||||
(key "Q" "Ctrl+Alt+Shift" "exec" "close") # Quit all windows
|
(key "Q" "Ctrl+Alt+Shift" "exec" "close") # Quit all windows
|
||||||
(key "Q" "Super" "killactive" null)
|
(key "Q" "Super" "killactive" null)
|
||||||
|
@ -239,8 +236,8 @@ in {
|
||||||
(key "S" "Super+Shift" "exec" steam)
|
(key "S" "Super+Shift" "exec" steam)
|
||||||
(key "T" "Ctrl+Alt" "exec" "${pkill} kitty")
|
(key "T" "Ctrl+Alt" "exec" "${pkill} kitty")
|
||||||
(key "T" "Super" "togglespecialworkspace" "terminal")
|
(key "T" "Super" "togglespecialworkspace" "terminal")
|
||||||
(key "T" "Super+Ctrl" "exec" kitty)
|
|
||||||
(key "T" "Super+Shift" "movetoworkspacesilent" "special:terminal")
|
(key "T" "Super+Shift" "movetoworkspacesilent" "special:terminal")
|
||||||
|
(key "T" "Super+Shift" "exec" kitty)
|
||||||
(key "V" "Super" "exec" "${kitty} --app-id clipboard --override font_size=12 ${clipse}")
|
(key "V" "Super" "exec" "${kitty} --app-id clipboard --override font_size=12 ${clipse}")
|
||||||
(key "V" "Super+Shift" "exec" "${clipse} --clear && ${notify-send} clipse 'Clipboard cleared' --urgency low")
|
(key "V" "Super+Shift" "exec" "${clipse} --clear && ${notify-send} clipse 'Clipboard cleared' --urgency low")
|
||||||
(key "W" "Super" "togglespecialworkspace" "vm")
|
(key "W" "Super" "togglespecialworkspace" "vm")
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
with lib; let
|
with lib; let
|
||||||
hyprctl = "${config.programs.hyprland.package}/bin/hyprctl";
|
hyprctl = "${pkgs.hyprland}/bin/hyprctl";
|
||||||
|
|
||||||
cfg = config.custom.desktops.hyprland.plugins;
|
cfg = config.custom.desktops.hyprland.plugins;
|
||||||
in {
|
in {
|
||||||
|
|
|
@ -5,11 +5,8 @@
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
with lib; let
|
with lib; let
|
||||||
_1password = "${config.programs._1password-gui.package}/bin/1password";
|
|
||||||
gamescope = "${config.programs.gamescope.package}/bin/gamescope";
|
gamescope = "${config.programs.gamescope.package}/bin/gamescope";
|
||||||
hyprctl = "${config.programs.hyprland.package}/bin/hyprctl";
|
|
||||||
kitty = "${config.home-manager.users.${config.custom.username}.programs.kitty.package}/bin/kitty";
|
kitty = "${config.home-manager.users.${config.custom.username}.programs.kitty.package}/bin/kitty";
|
||||||
launch = "~/.local/bin/launch";
|
|
||||||
loupe = "${pkgs.loupe}/bin/loupe";
|
loupe = "${pkgs.loupe}/bin/loupe";
|
||||||
onlyoffice = "${pkgs.onlyoffice-bin}/bin/onlyoffice-desktopeditors";
|
onlyoffice = "${pkgs.onlyoffice-bin}/bin/onlyoffice-desktopeditors";
|
||||||
pgrep = "${pkgs.procps}/bin/pgrep";
|
pgrep = "${pkgs.procps}/bin/pgrep";
|
||||||
|
@ -32,7 +29,6 @@ in {
|
||||||
"special:android, on-created-empty:${waydroid} app launch com.YoStarEN.Arknights"
|
"special:android, on-created-empty:${waydroid} app launch com.YoStarEN.Arknights"
|
||||||
"special:music, on-created-empty:${youtube-music}"
|
"special:music, on-created-empty:${youtube-music}"
|
||||||
"special:office, on-created-empty:[tile] ${onlyoffice}"
|
"special:office, on-created-empty:[tile] ${onlyoffice}"
|
||||||
"special:password, on-created-empty:${launch} --tile ${_1password}"
|
|
||||||
"special:steam, on-created-empty:${steam}"
|
"special:steam, on-created-empty:${steam}"
|
||||||
"special:terminal, on-created-empty:${kitty}"
|
"special:terminal, on-created-empty:${kitty}"
|
||||||
"special:vm, on-created-empty:${pgrep} -x vm || ${virt-manager}"
|
"special:vm, on-created-empty:${pgrep} -x vm || ${virt-manager}"
|
||||||
|
@ -172,10 +168,6 @@ in {
|
||||||
(class "libreoffice.+" rules)
|
(class "libreoffice.+" rules)
|
||||||
(class "ONLYOFFICE Desktop Editors" rules)
|
(class "ONLYOFFICE Desktop Editors" rules)
|
||||||
];
|
];
|
||||||
password = rules: [
|
|
||||||
(class "1Password" rules)
|
|
||||||
(class "Bitwarden" rules)
|
|
||||||
];
|
|
||||||
pip = rules: [
|
pip = rules: [
|
||||||
(title "Picture.in.[Pp]icture" rules)
|
(title "Picture.in.[Pp]icture" rules)
|
||||||
];
|
];
|
||||||
|
@ -219,7 +211,6 @@ in {
|
||||||
(tag.game ["fullscreen" "group barred" "idleinhibit always" "noborder" "noshadow" "renderunfocused" "workspace name:game"])
|
(tag.game ["fullscreen" "group barred" "idleinhibit always" "noborder" "noshadow" "renderunfocused" "workspace name:game"])
|
||||||
(tag.music ["tile" "workspace special:music"])
|
(tag.music ["tile" "workspace special:music"])
|
||||||
(tag.office ["workspace special:office"])
|
(tag.office ["workspace special:office"])
|
||||||
(tag.password ["center" "workspace special:password"])
|
|
||||||
(tag.pip ["keepaspectratio" "move ${pip.x} ${pip.y}" "pin" "size ${pip.w} ${pip.h}"])
|
(tag.pip ["keepaspectratio" "move ${pip.x} ${pip.y}" "pin" "size ${pip.w} ${pip.h}"])
|
||||||
(tag.social ["group" "tile"])
|
(tag.social ["group" "tile"])
|
||||||
(tag.steam ["workspace special:steam"])
|
(tag.steam ["workspace special:steam"])
|
||||||
|
@ -232,6 +223,10 @@ in {
|
||||||
(class "Tap Wizard 2.x86_64" ["workspace 0"])
|
(class "Tap Wizard 2.x86_64" ["workspace 0"])
|
||||||
|
|
||||||
#!! Expressions are not wrapped in ^$
|
#!! Expressions are not wrapped in ^$
|
||||||
|
(fields {
|
||||||
|
class = "^1Password$";
|
||||||
|
title = "^1Password$";
|
||||||
|
} ["center"])
|
||||||
(fields {
|
(fields {
|
||||||
class = "^com\\.github\\.wwmm\\.easyeffects$";
|
class = "^com\\.github\\.wwmm\\.easyeffects$";
|
||||||
title = "^Easy Effects$"; # Main window
|
title = "^Easy Effects$"; # Main window
|
||||||
|
|
|
@ -5,7 +5,6 @@
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
with lib; let
|
with lib; let
|
||||||
_1password = "${config.programs._1password-gui.package}/bin/1password";
|
|
||||||
clipse = "${pkgs.clipse}/bin/clipse";
|
clipse = "${pkgs.clipse}/bin/clipse";
|
||||||
firefox-esr = "${
|
firefox-esr = "${
|
||||||
config.home-manager.users.${config.custom.username}.programs.firefox.finalPackage
|
config.home-manager.users.${config.custom.username}.programs.firefox.finalPackage
|
||||||
|
@ -74,7 +73,6 @@ in {
|
||||||
sway-audio-idle-inhibit # Inhibit idle while audio is playing
|
sway-audio-idle-inhibit # Inhibit idle while audio is playing
|
||||||
"${clipse} --clear" # Clear clipboard history
|
"${clipse} --clear" # Clear clipboard history
|
||||||
"${clipse} --listen" # Monitor clipboard
|
"${clipse} --listen" # Monitor clipboard
|
||||||
"${_1password} --silent" # Launch password manager in background
|
|
||||||
"[group new lock; tile] ${firefox-esr}"
|
"[group new lock; tile] ${firefox-esr}"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
@ -5,9 +5,9 @@
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
with lib; let
|
with lib; let
|
||||||
cfg = config.custom.programs._1password;
|
cfg = config.custom.programs."1password";
|
||||||
in {
|
in {
|
||||||
options.custom.programs._1password.enable = mkOption {default = false;};
|
options.custom.programs."1password".enable = mkOption {default = false;};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
programs = {
|
programs = {
|
||||||
|
|
|
@ -37,7 +37,7 @@ with lib; {
|
||||||
})
|
})
|
||||||
|
|
||||||
(mkIf config.custom.full {
|
(mkIf config.custom.full {
|
||||||
_1password.enable = true;
|
"1password".enable = true;
|
||||||
adb.enable = true;
|
adb.enable = true;
|
||||||
ags.enable = true;
|
ags.enable = true;
|
||||||
#// anyrun.enable = true;
|
#// anyrun.enable = true;
|
||||||
|
|
|
@ -14,23 +14,5 @@ in {
|
||||||
programs.ssh.extraConfig = ''
|
programs.ssh.extraConfig = ''
|
||||||
StrictHostKeyChecking no
|
StrictHostKeyChecking no
|
||||||
'';
|
'';
|
||||||
|
|
||||||
home-manager.users.${config.custom.username} = {
|
|
||||||
programs.ssh = {
|
|
||||||
enable = true;
|
|
||||||
|
|
||||||
extraConfig = ''
|
|
||||||
Host *
|
|
||||||
IdentityAgent ~/.1password/agent.sock
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
# Work around FHS permissions
|
|
||||||
# https://github.com/nix-community/home-manager/issues/322#issuecomment-1856128020
|
|
||||||
home.file.".ssh/config" = {
|
|
||||||
target = ".ssh/config_source";
|
|
||||||
onChange = "cat ~/.ssh/config_source > ~/.ssh/config && chmod 400 ~/.ssh/config";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,7 +10,9 @@ with lib; let
|
||||||
bluetoothctl = "${pkgs.bluez}/bin/bluetoothctl";
|
bluetoothctl = "${pkgs.bluez}/bin/bluetoothctl";
|
||||||
easyeffects = "${pkgs.easyeffects}/bin/easyeffects";
|
easyeffects = "${pkgs.easyeffects}/bin/easyeffects";
|
||||||
echo = "${pkgs.coreutils}/bin/echo";
|
echo = "${pkgs.coreutils}/bin/echo";
|
||||||
hyprctl = "${config.programs.hyprland.package}/bin/hyprctl";
|
hyprctl = "${
|
||||||
|
config.home-manager.users.${config.custom.username}.wayland.windowManager.hyprland.finalPackage
|
||||||
|
}/bin/hyprctl";
|
||||||
inhibit = config.home-manager.users.${config.custom.username}.home.file.".local/bin/inhibit".source;
|
inhibit = config.home-manager.users.${config.custom.username}.home.file.".local/bin/inhibit".source;
|
||||||
jq = "${pkgs.jq}/bin/jq";
|
jq = "${pkgs.jq}/bin/jq";
|
||||||
loginctl = "${pkgs.systemd}/bin/loginctl";
|
loginctl = "${pkgs.systemd}/bin/loginctl";
|
||||||
|
@ -170,7 +172,6 @@ in {
|
||||||
game = "";
|
game = "";
|
||||||
music = "";
|
music = "";
|
||||||
office = "";
|
office = "";
|
||||||
password = "";
|
|
||||||
pip = "";
|
pip = "";
|
||||||
scratchpad = "";
|
scratchpad = "";
|
||||||
steam = "";
|
steam = "";
|
||||||
|
|
|
@ -91,12 +91,6 @@ in {
|
||||||
libnotify
|
libnotify
|
||||||
systemd
|
systemd
|
||||||
])
|
])
|
||||||
(bash "launch" [
|
|
||||||
argc
|
|
||||||
coreutils
|
|
||||||
hyprland
|
|
||||||
jq
|
|
||||||
])
|
|
||||||
(bash "left" [
|
(bash "left" [
|
||||||
argc
|
argc
|
||||||
hyprland
|
hyprland
|
||||||
|
|
|
@ -1,113 +0,0 @@
|
||||||
#! /usr/bin/env bash
|
|
||||||
|
|
||||||
# @describe Wrapper for launching applications with window rules
|
|
||||||
# Relies on polling for the next open window, not the process id
|
|
||||||
# Race conditions are possible with active usage during application start
|
|
||||||
#
|
|
||||||
# https://github.com/sigoden/argc
|
|
||||||
|
|
||||||
# @meta combine-shorts
|
|
||||||
# @option -M --move Move next window to absolute position (X[%] Y[%]) (requires floating)
|
|
||||||
# @option -R --resize Resize next window to absolute dimensions (W[%] H[%]) (requires floating)
|
|
||||||
# @option -W --workspace Move next window to workspace
|
|
||||||
# @flag -a --active Focus and raise next window (raise requires floating)
|
|
||||||
# @flag -c --center Center next window (requires floating)
|
|
||||||
# @flag -f --float Float next window
|
|
||||||
# @flag -g --group Add next window to the active group
|
|
||||||
# @flag -l --lock Lock next window's group
|
|
||||||
# @flag -m --maximize Maximize next window
|
|
||||||
# @flag -n --new Add next window to a new group
|
|
||||||
# @flag -p --pin Pin next window (requires floating)
|
|
||||||
# @flag -s --fullscreen Fullscreen next window
|
|
||||||
# @flag -t --tile Tile next window
|
|
||||||
# @arg commands+ Commands to execute in an exec dispatcher
|
|
||||||
|
|
||||||
eval "$(argc --argc-eval "$0" "$@")"
|
|
||||||
|
|
||||||
# Get initial count of open windows
|
|
||||||
count="$(hyprctl -j clients | jq length)"
|
|
||||||
|
|
||||||
# Launch application
|
|
||||||
hyprctl dispatch exec "${argc_commands[@]:-}"
|
|
||||||
|
|
||||||
# Poll for next window
|
|
||||||
c=0
|
|
||||||
|
|
||||||
while (("$(hyprctl -j clients | jq length)" <= "$count")); do
|
|
||||||
# Increment timeout counter
|
|
||||||
((c += 1))
|
|
||||||
|
|
||||||
# Time out after 60 seconds
|
|
||||||
if (("$c" >= 60 * 10)); then
|
|
||||||
notify-send "> launch" "Polling timed out" --urgency critical
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
|
|
||||||
sleep 0.1
|
|
||||||
done
|
|
||||||
|
|
||||||
# Get address of last window
|
|
||||||
window="address:$(hyprctl -j clients | jq -r ".[-1].address")"
|
|
||||||
|
|
||||||
# Set batch rules on window
|
|
||||||
batch=
|
|
||||||
|
|
||||||
### Floating rules
|
|
||||||
if [[ "${argc_float:-}" ]]; then
|
|
||||||
batch+="dispatch setfloating $window;"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ "${argc_center:-}" ]]; then
|
|
||||||
batch+="dispatch focuswindow $window; dispatch centerwindow;"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ "${argc_move:-}" ]]; then
|
|
||||||
batch+="dispatch movewindowpixel exact ${argc_move:-},$window;"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ "${argc_pin:-}" ]]; then
|
|
||||||
batch+="dispatch pin $window;"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ "${argc_resize:-}" ]]; then
|
|
||||||
batch+="dispatch resizewindowpixel exact ${argc_resize:-},$window;"
|
|
||||||
fi
|
|
||||||
|
|
||||||
### Group rules
|
|
||||||
if [[ "${argc_new:-}" ]]; then
|
|
||||||
batch+="dispatch focuswindow $window; dispatch togglegroup;" # Requires no initial group
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ "${argc_lock:-}" ]]; then
|
|
||||||
batch+="dispatch focuswindow $window; dispatch lockactivegroup lock;"
|
|
||||||
fi
|
|
||||||
|
|
||||||
### Global rules
|
|
||||||
if [[ "${argc_active:-}" ]]; then
|
|
||||||
batch+="dispatch alterzorder top,$window; dispatch focuswindow $window;" # Handles floating
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ "${argc_fullscreen:-}" ]]; then
|
|
||||||
batch+="dispatch focuswindow $window; dispatch fullscreen 0;"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ "${argc_group:-}" ]]; then
|
|
||||||
batch+="dispatch focuswindow $window; dispatch moveintogroup up;" # Assumes up direction
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ "${argc_maximize:-}" ]]; then
|
|
||||||
batch+="dispatch focuswindow $window; dispatch fullscreen 1;"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ "${argc_tile:-}" ]]; then
|
|
||||||
batch+="dispatch settiled $window;"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ "${argc_workspace:-}" ]]; then
|
|
||||||
batch+="dispatch movetoworkspacesilent ${argc_workspace:-},$window;"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Dispatch batch commands
|
|
||||||
if [[ "${batch:-}" ]]; then
|
|
||||||
hyprctl --batch "$batch"
|
|
||||||
fi
|
|
|
@ -6,7 +6,9 @@
|
||||||
}:
|
}:
|
||||||
with lib; let
|
with lib; let
|
||||||
grep = "${pkgs.gnugrep}/bin/grep";
|
grep = "${pkgs.gnugrep}/bin/grep";
|
||||||
hyprctl = "${config.programs.hyprland.package}/bin/hyprctl";
|
hyprctl = "${
|
||||||
|
config.home-manager.users.${config.custom.username}.wayland.windowManager.hyprland.finalPackage
|
||||||
|
}/bin/hyprctl";
|
||||||
hyprlock = "${
|
hyprlock = "${
|
||||||
config.home-manager.users.${config.custom.username}.programs.hyprlock.package
|
config.home-manager.users.${config.custom.username}.programs.hyprlock.package
|
||||||
}/bin/hyprlock";
|
}/bin/hyprlock";
|
||||||
|
|
|
@ -6,7 +6,9 @@
|
||||||
}:
|
}:
|
||||||
with lib; let
|
with lib; let
|
||||||
chayang = "${pkgs.chayang}/bin/chayang";
|
chayang = "${pkgs.chayang}/bin/chayang";
|
||||||
hyprctl = "${config.programs.hyprland.package}/bin/hyprctl";
|
hyprctl = "${
|
||||||
|
config.home-manager.users.${config.custom.username}.wayland.windowManager.hyprland.package
|
||||||
|
}/bin/hyprctl";
|
||||||
loginctl = "${pkgs.systemd}/bin/loginctl";
|
loginctl = "${pkgs.systemd}/bin/loginctl";
|
||||||
pgrep = "${pkgs.procps}/bin/pgrep";
|
pgrep = "${pkgs.procps}/bin/pgrep";
|
||||||
swaylock = "${
|
swaylock = "${
|
||||||
|
|
Loading…
Add table
Reference in a new issue