home

My NixOS systems configurations.
Log | Files | Refs | LICENSE

commit 838c2d959c53c56dbcca36517790ba324bd053ba
parent dbb9b43c28ded44996ac19bcd9531d2f6ac1c4b8
Author: Vincent Demeester <vincent@sbr.pm>
Date:   Mon, 22 Aug 2022 10:49:44 +0200

users/vincent: sway scratchpad and emacs pgtk

Signed-off-by: Vincent Demeester <vincent@sbr.pm>

Diffstat:
Musers/vincent/desktop/sway.nix | 22+++++++++++++++++-----
Musers/vincent/dev/emacs.nix | 5+++--
2 files changed, 20 insertions(+), 7 deletions(-)

diff --git a/users/vincent/desktop/sway.nix b/users/vincent/desktop/sway.nix @@ -137,10 +137,16 @@ in criteria.class = "Spotify"; } { - command = "move to scratchpad"; + command = "move to scratchpad, scratchpad show"; criteria = { - app_id = "kitty"; - class = "metask"; + app_id = "metask"; + }; + } + { + command = "move to scratchpad, scratchpad show"; + criteria = { + app_id = "emacs"; + title = "^_emacs scratchpad_$"; }; } ]; @@ -148,8 +154,8 @@ in { command = "mako"; } { command = "${pkgs.networkmanagerapplet}/bin/nm-applet --indicator"; } { command = "systemctl --user restart waybar"; always = true; } - { command = "${pkgs.kitty}/bin/kitty --title metask --class metask tmux"; } - { command = ''emacsclient -n -c -F "((name . \"_emacs scratchpad_\"))''; } + # { command = "${pkgs.kitty}/bin/kitty --title metask --class metask tmux"; } + # { command = ''emacsclient -n -c -F "((name . \"_emacs scratchpad_\"))''; } ]; }; extraConfig = @@ -187,6 +193,12 @@ in bindsym XF86AudioLowerVolume exec ${pkgs.pamixer}/bin/pamixer -ud 5 && ${pkgs.pamixer}/bin/pamixer --get-volume > $SWAYSOCK.wob bindsym XF86AudioMute exec ${pkgs.pamixer}/bin/pamixer --toggle-mute && ( ${pkgs.pamixer}/bin/pamixer --get-mute && echo 0 > $SWAYSOCK.wob ) || ${pkgs.pamixer}/bin/pamixer --get-volume > $SWAYSOCK.wob + bindsym XF86AudioPlay exec "playerctl play-pause" + bindsym XF86AudioNext exec "playerctl next" + bindsym XF86AudioPrev exec "playerctl previous" + + bindcode ${mod}+49 exec swaymsg [app_id="metask"] scratchpad show || exec ${pkgs.kitty}/bin/kitty --title metask --class metask tmux + bindcode ${mod}+Shift+49 exec swaymsg '[app_id="emacs" title="^_emacs scratchpad_$"]' scratchpad show || exec ${config.programs.emacs.package}/bin/emacsclient -c -F "((name . \"_emacs scratchpad_\"))" ''; }; programs = { diff --git a/users/vincent/dev/emacs.nix b/users/vincent/dev/emacs.nix @@ -157,8 +157,9 @@ in ]; programs.emacs = { enable = true; - # emacsPgtkNativeComp - package = (pkgs.emacsNativeComp.override { withGTK3 = true; withGTK2 = false; withX = true; withXwidgets = true; }); + # FIXME: choose depending on the enabled modules + package = (pkgs.emacsPgtkNativeComp.override { withGTK3 = true; withGTK2 = false; }); + # package = (pkgs.emacsNativeComp.override { withGTK3 = true; withGTK2 = false; withX = true; withXwidgets = true; }); extraPackages = myExtraPackages; }; services.emacs = {