universedesktop: dwl processing

This commit is contained in:
2024-06-03 14:37:05 -04:00
parent c490063598
commit 4f3af0a21a
2 changed files with 14 additions and 6 deletions

View File

@@ -1,9 +1,4 @@
{ config, pkgs, lib, ... }: let
dwl-startup = pkgs.writeScript "dwl-startup.sh" ''
#!${pkgs.bash}/bin/bash
exec <&-
'';
launch_emacs = pkgs.writeScript "emacsclient-or-start" ''
#!${pkgs.bash}/bin/bash
emacsclient --create-frame --alternate-editor=""
@@ -46,10 +41,17 @@ in {
export editcmd=${launch_emacs}
export menucmd=${pkgs.fuzzel}/bin/fuzzel
export barcmd=${pkgs.waybar}/bin/waybar
export playcmd=${pkgs.writeScript "playerctl-play-pause" ''
#!${pkgs.bash}/bin/bash
${pkgs.playerctl}/bin/playerctl play-pause
''}
export scrncmd=${pkgs.writeScript "screenshot-region" ''
#!${pkgs.bash}/bin/bash
${pkgs.slurp}/bin/slurp | ${pkgs.grim}/bin/grim -g - - | ${pkgs.wl-clipboard}/bin/wl-copy
''}
substituteAll ${./dwl/config.def.h} ./config.def.h
'';
postInstall = ''
sed -i "s#Exec=dwl#Exec=dwl -s ${dwl-startup}#" $out/share/wayland-sessions/dwl.desktop
chmod ugo+x $out/share/wayland-sessions/dwl.desktop
'';
passthru.providedSessions = ["dwl"];
@@ -68,11 +70,13 @@ in {
# Causes firefox & thunderbird to crash
# https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21646/diffs?commit_id=ee5d2250fd159689aae3f7d632a6226971bea85c
MOZ_ENABLE_WAYLAND=0;
GTK_THEME="Adwaita-dark";
};
environment.systemPackages = with pkgs; [
dwl
waybar
foot
pwvucontrol
];
}