diff options
author | sternenseemann <sternenseemann@systemli.org> | 2022-10-09 12:21:42 +0200 |
---|---|---|
committer | sternenseemann <sternenseemann@systemli.org> | 2022-10-10 15:22:40 +0200 |
commit | d2c18b5cbd80bc3bc9e9cf42fda9a1d7ee6cf52f (patch) | |
tree | 095412b8832721983a7aefd5a2c181a938647215 /machines/sternenseemann/desktop-sway.nix | |
parent | 507eb19d3c5affcd9e43fff43216c4c899c9511a (diff) |
machines/sternenseemann: move desktop-sway.nix into profiles module
Making it a proper module with options allows us to selectively switch off stuff we don't need, e.g. saneterm. This should help keeping the closure of ludwig smallish. Additionally refactor font handling in the module: Instead of including fonts.nix and assuming Bitstream Vera is available, we check fonts.fontconfig.defaultFonts for the font to prefer.
Diffstat (limited to 'machines/sternenseemann/desktop-sway.nix')
-rw-r--r-- | machines/sternenseemann/desktop-sway.nix | 139 |
1 files changed, 0 insertions, 139 deletions
diff --git a/machines/sternenseemann/desktop-sway.nix b/machines/sternenseemann/desktop-sway.nix deleted file mode 100644 index e38f07d3..00000000 --- a/machines/sternenseemann/desktop-sway.nix +++ /dev/null @@ -1,139 +0,0 @@ -# TODO(sterni) icons, GTK -# TODO(sterni) X11 cursor -{ config, pkgs, lib, ... }: - -let - inherit (pkgs.vuizvui.profpatsch) - getBins - ; - - inherit (pkgs.vuizvui.sternenseemann) - tep - ; - - bins = (getBins pkgs.bemenu [ "bemenu" "bemenu-run" ]) - // (getBins tep [ "tep" ]) - // (getBins pkgs.grim [ "grim" ]) - // (getBins pkgs.slurp [ "slurp" ]) - // (getBins pkgs.mako [ "makoctl" ]) - // (getBins screenshot [ "screenshot" ]) - // (getBins pkgs.foot [ "foot" ]) - // (getBins pkgs.dash [ "dash" ]) - // (getBins config.vuizvui.user.sternenseemann.programs.saneterm.package [ "saneterm" ]) - ; - - screenshot = pkgs.writers.writeDashBin "screenshot" '' - if [ "$1" != "full" ]; then - additionalOpts="-g '$(${bins.slurp})'" - else - shift - fi - - $SHELL -c "${bins.grim} $additionalOpts $@" - ''; - - defaultFont = "Bitstream Vera Sans Mono"; - -in - -{ - imports = [ - ./fonts.nix - ]; - - config = { - vuizvui.user.sternenseemann.services.sway = { - enable = true; - additionalBinds = { - "$mod+g" = "${bins.tep} copy -l 25 -p 'tep>' -i"; - "$mod+c" = "${bins.makoctl} dismiss -a"; - "$mod+x" = bins.screenshot; - "$mod+Shift+Return" = "${bins.saneterm} -- ${bins.dash} -l"; - }; - term = bins.foot; - menu = "${bins.bemenu-run} -l 10 -i"; - lockArgs = [ - "-c" "FFC0CB" "-k" "-l" - ]; - font = { - name = defaultFont; - size = 10; - }; - extraConfig = '' - exec ${pkgs.gnome.gnome-keyring}/bin/gnome-keyring-daemon --start --components=secrets - - exec ${pkgs.nextcloud-client}/bin/nextcloud - ''; - }; - - vuizvui.programs.foot = { - enable = true; - settings = { - include = "${pkgs.foot.themes}/share/foot/themes/selenized-white"; - - font = [ - { - font = defaultFont; - options = { size = 8; }; - } - { - font = "Noto Color Emoji"; - options = { size = 8; }; - } - ]; - - tweak = { - grapheme-shaping = "yes"; - }; - - key-bindings = { - scrollback-up-page = "Control+Shift+Page_Up"; - scrollback-down-page = "Control+Shift+Page_Down"; - search-start = "Control+Shift+F"; - font-increase = "Control+Shift+b"; - font-decrease = "Control+Shift+t"; - font-reset = "Control+Shift+0"; - }; - - mouse-bindings = { - primary-paste = "none"; - }; - - mouse = { - alternate-scroll-mode = "yes"; - }; - - scrollback = { - lines = 10000; - indicator-position = "none"; - }; - }; - }; - - vuizvui.user.sternenseemann.programs.saneterm.enable = true; - - # notifications - services.dbus.packages = [ pkgs.mako ]; - - # for nextcloud-client - services.gnome.gnome-keyring.enable = true; - programs.dconf.enable = true; - - environment.systemPackages = with pkgs; [ - bemenu # better dmenu - xwayland qt5.qtwayland - wl-clipboard # instead of xsel - grim slurp screenshot # screenshots - mako # notifications - nextcloud-client - gnome.adwaita-icon-theme - ]; - - programs.fish.shellAliases = { - "hdmi2-above" = '' - sway output HDMI-A-2 position 0 0 && sway output eDP-1 position 0 1440 - ''; - "workspace-move" = "sway move workspace output"; - }; - }; -} |