Skip to content

Instantly share code, notes, and snippets.

@DrSensor
Last active December 25, 2023 19:52
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DrSensor/4e0187813a9511b6e879570a1dd31aca to your computer and use it in GitHub Desktop.
Save DrSensor/4e0187813a9511b6e879570a1dd31aca to your computer and use it in GitHub Desktop.
My plan for full migration into NixOS and Wayland
{ pkgs ? import <nixpkgs>
, lib ? pkgs.lib
, desktopEnvironment
}: with pkgs;
desktopEnvironment {
session-manager = emptty;
window-manager = [ sway labwc ];
screen-display = {
use = kanshi; # autorandr
gui = wlay;
};
screen-brightness = wlsunset;
screen-lock.timer = swayidle;
screen-lock.use = mkShell {
packages = [ swaylock grim sox ];
shellHook = ''
# 1. screencapture using grim
# 2. databender/mosaic using sox
# 3. set swaylock --image from sox
'';
};
wallpaper = {
static = swaybg;
animated.gif = oguri;
animated.video = mpvpaper;
gui = wallutils;
};
notification = fnott;
systray = yambar;
launcher = fuzzel; # or rofi-wlc
terminal = mkShell {
packages = [ foot zellij ];
shellHook = ''
# run zellij multiplexer inside foot terminal
'';
};
screen-captures = mkShell {
packages = [ grim wf-recorder slurp ];
shellHook = ''
# 1. ask if you want to capture whole desktop, specific monitor, or just a region
# 2. slurp to get the region
# 3. grim to screenshots the region
# 3. or wf-record to screencasts the region
'';
};
system-gui = [ gtk4 lxappearance-gtk4 ];
}
{
general = [
auto-cpufreq # https://github.com/AdnanHodzic/auto-cpufreq
];
laptop = general ++ [
tlp # https://linrunner.de/tlp/
];
handheld = general ++ [
xsuspender # https://kernc.github.io/xsuspender
];
}
#!/bin/sh
case $context in
nvidia)
prime-run $@
;;
windows)
proton-call -r $@
;;
*)
$@
;;
esac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment