Setup scratchpads
This commit is contained in:
parent
f8bcbb144f
commit
f27ca0cfd0
|
@ -53,6 +53,7 @@
|
|||
home.sessionVariables = {
|
||||
EDITOR = "emacsclient -c";
|
||||
VISUAL = "emacsclient -c";
|
||||
ALTERNATE_EDITOR = "";
|
||||
};
|
||||
}))
|
||||
(lib.mkIf (config.nathan.programs.emacs.enable && pkgs.stdenv.isLinux) {
|
||||
|
|
|
@ -52,10 +52,11 @@ in with lib; {
|
|||
evince
|
||||
# Productivity
|
||||
libreoffice-fresh
|
||||
## Sway addons
|
||||
## Hyprland addons
|
||||
font-awesome
|
||||
inputs.nixpkgs-unstable.legacyPackages.${pkgs.system}.hyprpaper
|
||||
swayosd
|
||||
inputs.self.packages.${pkgs.system}.pyprland
|
||||
# For fancy x11 scaling
|
||||
sommelier
|
||||
# Polkit
|
||||
|
@ -138,7 +139,7 @@ in with lib; {
|
|||
|
||||
bind = $mainMod, Q, exec, alacritty
|
||||
bind = $mainMod, C, killactive,
|
||||
bind = $mainMod, M, exit,
|
||||
# bind = $mainMod, M, exit,
|
||||
bind = $mainMod, E, exec, dolphin
|
||||
bind = $mainMod, V, togglefloating,
|
||||
bind = $mainMod, R, exec, ${fuzzel-command}
|
||||
|
@ -215,6 +216,32 @@ in with lib; {
|
|||
windowrulev2 = noborder,class:^(.gamescope-wrapped)$,title:VMware Workstation
|
||||
windowrulev2 = rounding 0,class:^(.gamescope-wrapped)$,title:VMware Workstation
|
||||
|
||||
## Scratchpads
|
||||
|
||||
# Alacritty
|
||||
bind = SUPER ALT, Q, exec, pypr toggle term
|
||||
$dropterm = ^(alacritty-dropterm)$
|
||||
windowrule = float,$dropterm
|
||||
windowrule = size 40% 50%,$dropterm
|
||||
windowrule = workspace special silent,$dropterm
|
||||
windowrule = center,$dropterm
|
||||
|
||||
# Emacs
|
||||
bind = SUPER ALT, W, exec, pypr toggle emacs
|
||||
$scratchmacs = title:^(scratchmacs)$
|
||||
windowrulev2 = float,$scratchmacs
|
||||
windowrulev2 = size 40% 50%,$scratchmacs
|
||||
windowrulev2 = workspace special silent,$scratchmacs
|
||||
windowrulev2 = center,$scratchmacs
|
||||
|
||||
# Ario
|
||||
bind = SUPER ALT, E, exec, pypr toggle ario
|
||||
$dropario = class:^(ario)$
|
||||
windowrulev2 = float,$dropario
|
||||
windowrulev2 = size 50% 70%,$dropario
|
||||
windowrulev2 = workspace special silent,$dropario
|
||||
windowrulev2 = center,$dropario
|
||||
|
||||
# Clipboard history management
|
||||
exec-once=wl-paste --watch cliphist store
|
||||
bind = $mainMod, X, exec, cliphist list | ${fuzzel-command} --dmenu | cliphist decode | wl-copy
|
||||
|
@ -273,7 +300,54 @@ in with lib; {
|
|||
onChange = ''
|
||||
mkdir -p ~/.config/shortcuts/shortcuts
|
||||
'';
|
||||
|
||||
};
|
||||
# Setup pyprland
|
||||
systemd.user.services.pypr = {
|
||||
Unit = {
|
||||
Description = "pypr";
|
||||
After = [ "graphical-session.target" ];
|
||||
};
|
||||
Service = {
|
||||
Type = "simple";
|
||||
ExecStart = "${inputs.self.packages.${pkgs.system}.pyprland}/bin/pypr";
|
||||
Restart = "on-failure";
|
||||
};
|
||||
Install = { WantedBy = [ "graphical-session.target" ]; };
|
||||
};
|
||||
# And its config file
|
||||
xdg.configFile."hypr/pyprland.json" = let
|
||||
emacsStart = pkgs.writeShellScript "emacsStart.sh" ''
|
||||
exec emacsclient -c --frame-parameters='(quote (name . "scratchmacs"))'
|
||||
'';
|
||||
# https://github.com/hyprland-community/pyprland/issues/6
|
||||
# "emacs": {
|
||||
# "command": "${emacsStart}",
|
||||
# "animation": "",
|
||||
# "unfocus": "hide"
|
||||
# }
|
||||
in {
|
||||
text = ''
|
||||
{
|
||||
"pyprland": {
|
||||
"plugins": [
|
||||
"scratchpads"
|
||||
]
|
||||
},
|
||||
"scratchpads": {
|
||||
"term": {
|
||||
"command": "alacritty --class alacritty-dropterm --working-directory ~ -e tmux new -A -s scratch",
|
||||
"animation": "",
|
||||
"unfocus": "hide"
|
||||
},
|
||||
"ario": {
|
||||
"command": "ario",
|
||||
"animation": "",
|
||||
"unfocus": "hide"
|
||||
}
|
||||
}
|
||||
}
|
||||
'';
|
||||
onChange = "systemctl --user restart pypr";
|
||||
};
|
||||
#########################
|
||||
## SwayNotificationCenter (notifications)
|
||||
|
|
|
@ -18,7 +18,8 @@ in {
|
|||
mpc-cli
|
||||
calibre
|
||||
playerctl
|
||||
ymuse
|
||||
ncmpcpp
|
||||
ario
|
||||
];
|
||||
# Register haruna as the default video player
|
||||
xdg.mimeApps.defaultApplications = {
|
||||
|
|
Loading…
Reference in New Issue