blob: fc943ef90a0547b7f22fad43a7f3976fd77a754b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
{
homeManager,
inputs,
moduleNameSpace,
settings-persist,
...
}:
{
config,
lib,
pkgs,
...
}:
let
cfg = config.${moduleNameSpace}.x11.dwm;
in
{
options.${moduleNameSpace}.x11.dwm = {
enable = lib.mkEnableOption "dwm setup";
};
config = lib.mkIf cfg.enable (
if !homeManager then
{
services.xserver = {
windowManager.dwm = {
enable = true;
package = inputs.mydwm.packages.${pkgs.stdenv.hostPlatform.system}.default;
};
};
}
else
{
xdg.dataFile."dwm/autostart.sh" = {
executable = true;
text = ''
#!${pkgs.bash}/bin/bash
gnome-keyring-daemon --start --components=secrets,ssh,pkcs11 &
${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1 &
feh --no-fehbg --bg-fill "$(rg wallpaper ~/.config/beeSettings | cut -d"=" -f2)"
[ -f ~/.Xresources ] && xrdb -merge ~/.Xresources
dunst &
clipcatd &
slstatus &
${lib.optionalString (!config.beeMods.x11.picom.enable) ''
xrandr --output eDP --set TearFree on
''}
${lib.optionalString (config.beeMods.x11.picom.enable) ''
systemctl --user restart picom.service
''}
systemctl --user restart xidlehook.service xautolock-session.service xss-lock.service clipcat.service
${lib.optionalString (config.beeMods.mango.waybar) ''
systemctl --user stop waybar.service
''}
${lib.optionalString (config.beeMods.mango.enable) ''
systemctl --user stop swayidle.service
''}
${settings-persist}
'';
};
}
);
}
|