default.nix 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. { config, pkgs, lib, inputs, ... }:
  2. {
  3. home.packages = [
  4. inputs.caelestia-shell.packages.${pkgs.system}.default
  5. inputs.caelestia-cli.packages.${pkgs.system}.default
  6. ];
  7. home.file.".config/caelestia/shell.json".source = ./shell.json;
  8. home.file.".config/caelestia/shell-tokens.json".source = ./shell-tokens.json;
  9. custom.hyprExtras = {
  10. shell = ''
  11. mainMod = "ALT"
  12. secMod = "SUPER"
  13. hl.on("hyprland.start", function ()
  14. hl.exec_cmd("caelestia shell")
  15. hl.exec_cmd("caelestia shell wallpaper set ~/.config/caelestia/img/bg.png")
  16. hl.exec_cmd("caelestia scheme set --name dynamic --mode dark")
  17. hl.exec_cmd("wl-paste --watch cliphist store")
  18. end)
  19. hl.bind(mainMod .. " + E", hl.dsp.exec_cmd("caelestia shell drawers toggle sidebar"))
  20. hl.bind(mainMod .. " + SHIFT + E", hl.dsp.exec_cmd("caelestia shell drawers toggle session"))
  21. hl.bind("CONTROL + ALT + DELETE", hl.dsp.exec_cmd("caelestia shell drawers toggle session"))
  22. hl.bind(secMod .. " + V", hl.dsp.exec_cmd("caelestia clipboard"))
  23. hl.bind(secMod .. " + L", hl.dsp.exec_cmd("caelestia shell lock lock"))
  24. hl.bind(secMod .. " + SHIFT + S", hl.dsp.exec_cmd([[
  25. #!/bin/bash
  26. OLD=$(wl-paste)
  27. caelestia shell picker openFreezeClip
  28. for i in {1..20}; do
  29. NEW=$(wl-paste)
  30. if [ "$NEW" != "$OLD" ]; then
  31. wl-paste --type image/png > ~/Pictures/Screenshots/$(date +%Y-%m-%d_%H-%M-%S).png
  32. exit 0
  33. fi
  34. sleep 0.1
  35. done
  36. exit 1
  37. ]]))
  38. '';
  39. };
  40. }