modularise dwm
This commit is contained in:
parent
1d61c343d1
commit
75cdf136e3
148
flake.lock
148
flake.lock
|
@ -147,25 +147,7 @@
|
|||
},
|
||||
"flake-utils_3": {
|
||||
"inputs": {
|
||||
"systems": "systems_4"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1710146030,
|
||||
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils_4": {
|
||||
"inputs": {
|
||||
"systems": "systems_5"
|
||||
"systems": "systems_3"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1710146030,
|
||||
|
@ -327,27 +309,6 @@
|
|||
}
|
||||
},
|
||||
"nix-github-actions": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"poetry2nix",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1703863825,
|
||||
"narHash": "sha256-rXwqjtwiGKJheXB43ybM8NwWB8rO2dSRrEqes0S7F5Y=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nix-github-actions",
|
||||
"rev": "5163432afc817cf8bd1f031418d1869e4c9d5547",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "nix-github-actions",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nix-github-actions_2": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"sqlfmt",
|
||||
|
@ -445,22 +406,6 @@
|
|||
}
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1717926692,
|
||||
"narHash": "sha256-THcv8qDqobZefHHluPjx/8n+MtVVb8ag/oJbKMqKNRo=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "7d916e720af6b2ca355e4d0cfb8e4f742c172239",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-unstable-small",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_3": {
|
||||
"locked": {
|
||||
"lastModified": 1718376599,
|
||||
"narHash": "sha256-cTFGqLYTrIxORc673fUUCecQVXiXHDj6Z8vFQ5K4SDg=",
|
||||
|
@ -520,36 +465,14 @@
|
|||
},
|
||||
"poetry2nix": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils_2",
|
||||
"flake-utils": "flake-utils_3",
|
||||
"nix-github-actions": "nix-github-actions",
|
||||
"nixpkgs": "nixpkgs_2",
|
||||
"systems": "systems_3",
|
||||
"treefmt-nix": "treefmt-nix_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1718285706,
|
||||
"narHash": "sha256-DScsBM+kZvxOva7QegfdtleebMXh30XPxDQr/1IGKYo=",
|
||||
"owner": "nix-community",
|
||||
"repo": "poetry2nix",
|
||||
"rev": "a5be1bbbe0af0266147a88e0ec43b18c722f2bb9",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "poetry2nix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"poetry2nix_2": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils_4",
|
||||
"nix-github-actions": "nix-github-actions_2",
|
||||
"nixpkgs": [
|
||||
"sqlfmt",
|
||||
"nixpkgs"
|
||||
],
|
||||
"systems": "systems_6",
|
||||
"treefmt-nix": "treefmt-nix_3"
|
||||
"systems": "systems_4",
|
||||
"treefmt-nix": "treefmt-nix_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1718285706,
|
||||
|
@ -576,7 +499,6 @@
|
|||
"nixpkgs-unstable": "nixpkgs-unstable",
|
||||
"nixvim": "nixvim",
|
||||
"nur": "nur",
|
||||
"poetry2nix": "poetry2nix",
|
||||
"sops-nix": "sops-nix",
|
||||
"sqlfmt": "sqlfmt"
|
||||
}
|
||||
|
@ -604,9 +526,9 @@
|
|||
},
|
||||
"sqlfmt": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils_3",
|
||||
"nixpkgs": "nixpkgs_3",
|
||||
"poetry2nix": "poetry2nix_2"
|
||||
"flake-utils": "flake-utils_2",
|
||||
"nixpkgs": "nixpkgs_2",
|
||||
"poetry2nix": "poetry2nix"
|
||||
},
|
||||
"locked": {
|
||||
"dir": "sqlfmt",
|
||||
|
@ -664,41 +586,12 @@
|
|||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"id": "systems",
|
||||
"type": "indirect"
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"systems_4": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"systems_5": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"systems_6": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
|
@ -734,27 +627,6 @@
|
|||
}
|
||||
},
|
||||
"treefmt-nix_2": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"poetry2nix",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1717850719,
|
||||
"narHash": "sha256-npYqVg+Wk4oxnWrnVG7416fpfrlRhp/lQ6wQ4DHI8YE=",
|
||||
"owner": "numtide",
|
||||
"repo": "treefmt-nix",
|
||||
"rev": "4fc1c45a5f50169f9f29f6a98a438fb910b834ed",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "treefmt-nix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"treefmt-nix_3": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"sqlfmt",
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
{
|
||||
imports = [
|
||||
../common
|
||||
../common/x11
|
||||
./autostart.nix
|
||||
# This doesn't seem to work in Cinnamon
|
||||
#./cinnamon-monitors.nix
|
||||
];
|
||||
|
|
|
@ -1,62 +1,14 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
imports = [
|
||||
./feh-wallpaper-changer.nix
|
||||
./scripts/dunstify-volume-notification.nix
|
||||
./scripts/feh-wallpaper-changer.nix
|
||||
];
|
||||
|
||||
home.packages = [
|
||||
pkgs.dunst
|
||||
pkgs.flameshot
|
||||
pkgs.st
|
||||
pkgs.dmenu
|
||||
pkgs.picom
|
||||
pkgs.xclip
|
||||
|
||||
pkgs.feh
|
||||
];
|
||||
|
||||
home.file.".Xresources" = {
|
||||
recursive = true;
|
||||
text = ''
|
||||
!st terminal
|
||||
st.alpha: 0.8
|
||||
*.font: monospace:pixelsize=21:antialias=true:autohint=true;
|
||||
*.font2: NotoColorEmoji:pixelsize=19:antialias=true:autohint=true;
|
||||
|
||||
! dwm
|
||||
dwm.borderpx: 3
|
||||
'';
|
||||
};
|
||||
|
||||
home.file.".config/picom/picom.conf" = {
|
||||
recursive = true;
|
||||
text = ''
|
||||
vsync = true;
|
||||
backend = "xrender";
|
||||
shadow = true;
|
||||
shadow-radius = 10;
|
||||
shadow-offset-x = -5;
|
||||
shadow-offset-y = -5;
|
||||
fading = true;
|
||||
fade-in-step = 0.2;
|
||||
fade-out-step = 0.2;
|
||||
fade-delta = 50;
|
||||
'';
|
||||
};
|
||||
|
||||
home.file.".config/sxhkd/sxhkdrc" = {
|
||||
recursive = true;
|
||||
text = ''
|
||||
vsync = true;
|
||||
backend = "xrender";
|
||||
shadow = true;
|
||||
shadow-radius = 10;
|
||||
shadow-offset-x = -5;
|
||||
shadow-offset-y = -5;
|
||||
fading = true;
|
||||
fade-in-step = 0.2;
|
||||
fade-out-step = 0.2;
|
||||
fade-delta = 50;
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
|
@ -4,6 +4,10 @@
|
|||
imports = [
|
||||
../common
|
||||
../common/x11
|
||||
./xinitrc.nix
|
||||
./sxhkdrc.nix
|
||||
./picom.nix
|
||||
./xresources.nix
|
||||
|
||||
# Status bar scripts
|
||||
./scripts/sb-cpu-pct.nix
|
||||
|
@ -11,42 +15,16 @@
|
|||
./scripts/sb-volume.nix
|
||||
./scripts/sb-network-status.nix
|
||||
./scripts/sb-updates.nix
|
||||
|
||||
# Notification scripts
|
||||
./scripts/dunstify-volume-notification.nix
|
||||
];
|
||||
|
||||
home.packages = [
|
||||
pkgs.dwmblocks
|
||||
pkgs.dmenu
|
||||
pkgs.dunst
|
||||
pkgs.picom
|
||||
pkgs.sxhkd
|
||||
];
|
||||
|
||||
# TODO configure x11 to look in .config/x11
|
||||
#home.file."${config.xdg.configHome}/x11/xinitrc" = {
|
||||
home.file.".xinitrc" = {
|
||||
recursive = true;
|
||||
text = ''
|
||||
|
||||
picom -b --config ~/.config/picom/picom.conf
|
||||
xrdb ~/.Xresources
|
||||
|
||||
autostart="dwmblocks feh-wallpaper-changer"
|
||||
|
||||
for program in $autostart; do
|
||||
pidof -sx "$program" || "$program" &
|
||||
done >/dev/null 2>&1
|
||||
|
||||
|
||||
if test -z "$DBUS_SESSION_BUS_ADDRESS"; then
|
||||
eval $(dbus-launch --exit-with-session --sh-syntax)
|
||||
fi
|
||||
systemctl --user import-environment DISPLAY XAUTHORITY
|
||||
|
||||
if command -v dbus-update-activation-environment >/dev/null 2>&1; then
|
||||
dbus-update-activation-environment DISPLAY XAUTHORITY
|
||||
fi
|
||||
|
||||
export XSESSION_PID="$$"
|
||||
exec dwm
|
||||
|
||||
'';
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
{
|
||||
home.file.".config/picom/picom.conf" = {
|
||||
recursive = true;
|
||||
text = ''
|
||||
vsync = true;
|
||||
backend = "xrender";
|
||||
shadow = true;
|
||||
shadow-radius = 10;
|
||||
shadow-offset-x = -5;
|
||||
shadow-offset-y = -5;
|
||||
fading = true;
|
||||
fade-in-step = 0.2;
|
||||
fade-out-step = 0.2;
|
||||
fade-delta = 50;
|
||||
'';
|
||||
};
|
||||
}
|
|
@ -0,0 +1,48 @@
|
|||
{
|
||||
home.file.".config/sxhkd/sxhkdrc" = {
|
||||
recursive = true;
|
||||
text = ''
|
||||
XF86AudioRaiseVolume
|
||||
pamixer --set-limit 150 --allow-boost -i 5 && dunstify-volume-notification && pkill -RTMIN+10 dwmblocks && exit 1
|
||||
|
||||
XF86AudioLowerVolume
|
||||
pamixer --set-limit 150 --allow-boost -d 5 && dunstify-volume-notification && pkill -RTMIN+10 dwmblocks && exit 1
|
||||
|
||||
XF86AudioMute
|
||||
pamixer --toggle-mute && dunstify-volume-notification && pkill -RTMIN+10 dwmblocks && exit 1
|
||||
|
||||
XF86AudioMicMute
|
||||
pamixer --default-source --toggle-mute && dunstify-volume-notification && pkill -RTMIN+10 dwmblocks && exit 1
|
||||
|
||||
XF86MonBrightnessUp
|
||||
light -A 5 && dunstify-brightness-notification
|
||||
|
||||
XF86MonBrightnessDown
|
||||
light -U 5 && dunstify-brightness-notification
|
||||
|
||||
XF86Messenger
|
||||
dunstify-battery-notification
|
||||
|
||||
control + Home
|
||||
bookmark-add
|
||||
|
||||
control + Insert
|
||||
bookmark-insert
|
||||
|
||||
control + F12
|
||||
nsxiv-clipboard-copy /tmp/clipboard/images/
|
||||
|
||||
Print
|
||||
flameshot gui
|
||||
|
||||
control + F11
|
||||
dmenu-clipper
|
||||
|
||||
control + F8
|
||||
dmenu-dict
|
||||
|
||||
control + F7
|
||||
emoji-picker
|
||||
'';
|
||||
};
|
||||
}
|
|
@ -0,0 +1,32 @@
|
|||
{
|
||||
# TODO configure x11 to look in .config/x11
|
||||
#home.file."${config.xdg.configHome}/x11/xinitrc" = {
|
||||
home.file.".xinitrc" = {
|
||||
recursive = true;
|
||||
text = ''
|
||||
|
||||
picom -b --config ~/.config/picom/picom.conf
|
||||
xrdb ~/.Xresources
|
||||
|
||||
autostart="dwmblocks feh-wallpaper-changer"
|
||||
|
||||
for program in $autostart; do
|
||||
pidof -sx "$program" || "$program" &
|
||||
done >/dev/null 2>&1
|
||||
|
||||
|
||||
if test -z "$DBUS_SESSION_BUS_ADDRESS"; then
|
||||
eval $(dbus-launch --exit-with-session --sh-syntax)
|
||||
fi
|
||||
systemctl --user import-environment DISPLAY XAUTHORITY
|
||||
|
||||
if command -v dbus-update-activation-environment >/dev/null 2>&1; then
|
||||
dbus-update-activation-environment DISPLAY XAUTHORITY
|
||||
fi
|
||||
|
||||
export XSESSION_PID="$$"
|
||||
exec dwm
|
||||
|
||||
'';
|
||||
};
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
home.file.".Xresources" = {
|
||||
recursive = true;
|
||||
text = ''
|
||||
!st terminal
|
||||
st.alpha: 0.8
|
||||
*.font: monospace:pixelsize=21:antialias=true:autohint=true;
|
||||
*.font2: NotoColorEmoji:pixelsize=19:antialias=true:autohint=true;
|
||||
|
||||
! dwm
|
||||
dwm.borderpx: 3
|
||||
'';
|
||||
};
|
||||
}
|
|
@ -1,20 +1,20 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
sound.enable = true;
|
||||
hardware.pulseaudio.enable = true;
|
||||
#hardware.pulseaudio.enable = true;
|
||||
security.rtkit.enable = true;
|
||||
hardware.pulseaudio.package = pkgs.pulseaudioFull;
|
||||
# services.pipewire = {
|
||||
# enable = true;
|
||||
# alsa.enable = true;
|
||||
# alsa.support32Bit = true;
|
||||
# pulse.enable = true;
|
||||
# wireplumber.enable = true;
|
||||
# jack.enable = true;
|
||||
#
|
||||
# };
|
||||
#hardware.pulseaudio.package = pkgs.pulseaudioFull;
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
wireplumber.enable = true;
|
||||
jack.enable = true;
|
||||
|
||||
environment.systemPackages = [
|
||||
};
|
||||
|
||||
environment.systemPackages = [
|
||||
pkgs.pamixer
|
||||
pkgs.pavucontrol
|
||||
];
|
||||
|
|
Loading…
Reference in New Issue