Setup scratchpads
This commit is contained in:
parent
f8bcbb144f
commit
f27ca0cfd0
|
@ -53,6 +53,7 @@
|
||||||
home.sessionVariables = {
|
home.sessionVariables = {
|
||||||
EDITOR = "emacsclient -c";
|
EDITOR = "emacsclient -c";
|
||||||
VISUAL = "emacsclient -c";
|
VISUAL = "emacsclient -c";
|
||||||
|
ALTERNATE_EDITOR = "";
|
||||||
};
|
};
|
||||||
}))
|
}))
|
||||||
(lib.mkIf (config.nathan.programs.emacs.enable && pkgs.stdenv.isLinux) {
|
(lib.mkIf (config.nathan.programs.emacs.enable && pkgs.stdenv.isLinux) {
|
||||||
|
|
|
@ -52,10 +52,11 @@ in with lib; {
|
||||||
evince
|
evince
|
||||||
# Productivity
|
# Productivity
|
||||||
libreoffice-fresh
|
libreoffice-fresh
|
||||||
## Sway addons
|
## Hyprland addons
|
||||||
font-awesome
|
font-awesome
|
||||||
inputs.nixpkgs-unstable.legacyPackages.${pkgs.system}.hyprpaper
|
inputs.nixpkgs-unstable.legacyPackages.${pkgs.system}.hyprpaper
|
||||||
swayosd
|
swayosd
|
||||||
|
inputs.self.packages.${pkgs.system}.pyprland
|
||||||
# For fancy x11 scaling
|
# For fancy x11 scaling
|
||||||
sommelier
|
sommelier
|
||||||
# Polkit
|
# Polkit
|
||||||
|
@ -138,7 +139,7 @@ in with lib; {
|
||||||
|
|
||||||
bind = $mainMod, Q, exec, alacritty
|
bind = $mainMod, Q, exec, alacritty
|
||||||
bind = $mainMod, C, killactive,
|
bind = $mainMod, C, killactive,
|
||||||
bind = $mainMod, M, exit,
|
# bind = $mainMod, M, exit,
|
||||||
bind = $mainMod, E, exec, dolphin
|
bind = $mainMod, E, exec, dolphin
|
||||||
bind = $mainMod, V, togglefloating,
|
bind = $mainMod, V, togglefloating,
|
||||||
bind = $mainMod, R, exec, ${fuzzel-command}
|
bind = $mainMod, R, exec, ${fuzzel-command}
|
||||||
|
@ -215,6 +216,32 @@ in with lib; {
|
||||||
windowrulev2 = noborder,class:^(.gamescope-wrapped)$,title:VMware Workstation
|
windowrulev2 = noborder,class:^(.gamescope-wrapped)$,title:VMware Workstation
|
||||||
windowrulev2 = rounding 0,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
|
# Clipboard history management
|
||||||
exec-once=wl-paste --watch cliphist store
|
exec-once=wl-paste --watch cliphist store
|
||||||
bind = $mainMod, X, exec, cliphist list | ${fuzzel-command} --dmenu | cliphist decode | wl-copy
|
bind = $mainMod, X, exec, cliphist list | ${fuzzel-command} --dmenu | cliphist decode | wl-copy
|
||||||
|
@ -273,7 +300,54 @@ in with lib; {
|
||||||
onChange = ''
|
onChange = ''
|
||||||
mkdir -p ~/.config/shortcuts/shortcuts
|
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)
|
## SwayNotificationCenter (notifications)
|
||||||
|
|
|
@ -18,7 +18,8 @@ in {
|
||||||
mpc-cli
|
mpc-cli
|
||||||
calibre
|
calibre
|
||||||
playerctl
|
playerctl
|
||||||
ymuse
|
ncmpcpp
|
||||||
|
ario
|
||||||
];
|
];
|
||||||
# Register haruna as the default video player
|
# Register haruna as the default video player
|
||||||
xdg.mimeApps.defaultApplications = {
|
xdg.mimeApps.defaultApplications = {
|
||||||
|
|
Loading…
Reference in New Issue