dotfiles
My PC Dotfiles & Websitegit clone https://github.com/maydayv7/dotfiles
commit d87357407ba5e72851e6c3bd8d7eb00e23ad3a32 parent 394d9bb908721874160534b737790265c555d3c0 Author: maydayv7 <maydayv7@gmail.com> Date: Tue, 7 May 2024 19:33:29 +0530 feat(Hyprland): Update Clipboard and Locking Also install Virtio FS Drivers for VM
Diffstat:
| M | devices/vortex.nix | | | 2 | +- |
| M | files/flake.nix | | | 6 | +++++- |
| A | files/hyprland/clipse/config.json | | | 6 | ++++++ |
| R | files/hyprland/clipse.json -> files/hyprland/clipse/theme.json | | | 0 | |
| M | files/hyprland/pypr.toml | | | 2 | +- |
| M | flake.lock | | | 12 | ++++++------ |
| M | modules/gui/desktop/hyprland/apps/default.nix | | | 5 | +++-- |
| M | modules/gui/desktop/hyprland/apps/security.nix | | | 19 | +++++++++++++++---- |
| M | modules/gui/desktop/hyprland/settings/plugins.nix | | | 1 | + |
| M | modules/hardware/virtualisation/default.nix | | | 2 | +- |
10 files changed, 39 insertions(+), 16 deletions(-)
diff --git a/devices/vortex.nix b/devices/vortex.nix @@ -7,7 +7,7 @@ timezone = "Asia/Kolkata"; locale = "IN"; - kernel = "xanmod_latest"; + kernel = "xanmod"; kernelModules = ["nvme" "thunderbolt"]; imports = [{services.fwupd.enable = true;}]; diff --git a/files/flake.nix b/files/flake.nix @@ -77,7 +77,11 @@ binds = ./hyprland/binds.pango; # Clipboard Manager - clipse = readFile ./hyprland/clipse.json; + clipse = map.files { + directory = ./hyprland/clipse; + apply = readFile; + extension = ".json"; + }; # Greeter Configuration greeter = readFile ./hyprland/greeter.conf; diff --git a/files/hyprland/clipse/config.json b/files/hyprland/clipse/config.json @@ -0,0 +1,6 @@ +{ + "historyFile": "$XDG_DATA_HOME/clipboard/history.json", + "maxHistory": 150, + "themeFile": "theme.json", + "tempDir": "$XDG_DATA_HOME/clipboard/temp" +} diff --git a/files/hyprland/clipse.json b/files/hyprland/clipse/theme.json diff --git a/files/hyprland/pypr.toml b/files/hyprland/pypr.toml @@ -12,7 +12,7 @@ size = "75% 60%" [scratchpads.clip] animation = "fromBottom" -command = "kitty --class clipse sh -c 'clipse $PPID'" +command = "kitty --class clipse sh -c 'clipse -fc $PPID'" class = "clipse" lazy = true size = "75% 65%" diff --git a/flake.lock b/flake.lock @@ -889,11 +889,11 @@ }, "stable": { "locked": { - "lastModified": 1712939125, - "narHash": "sha256-G3wznglfDwSYF8obg+zVqJqA/fPmJnzgaELq4kTCopI=", + "lastModified": 1715083650, + "narHash": "sha256-jdSlHNL+5Bl8WkXs0vCSQoEQFwdHXTPlWe1ER6QgQPI=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "ec877443d62ed5268c741656657d1319554a55f4", + "rev": "8a28540ae210be5bfeb098b4442d42115d045fdd", "type": "github" }, "original": { @@ -971,11 +971,11 @@ }, "unstable": { "locked": { - "lastModified": 1712791164, - "narHash": "sha256-3sbWO1mbpWsLepZGbWaMovSO7ndZeFqDSdX0hZ9nVyw=", + "lastModified": 1714906307, + "narHash": "sha256-UlRZtrCnhPFSJlDQE7M0eyhgvuuHBTe1eJ9N9AQlJQ0=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "1042fd8b148a9105f3c0aca3a6177fd1d9360ba5", + "rev": "25865a40d14b3f9cf19f19b924e2ab4069b09588", "type": "github" }, "original": { diff --git a/modules/gui/desktop/hyprland/apps/default.nix b/modules/gui/desktop/hyprland/apps/default.nix @@ -70,12 +70,12 @@ in { user = { # Persisted Files persist.directories = [ - ".config/clipse" ".config/geany" ".config/mpv" ".config/nwg-displays" ".config/shotwell" ".config/Thunar" + ".local/share/clipboard" ".local/share/lollypop" ".local/share/shotwell" ".cache/shotwell" @@ -282,7 +282,8 @@ in { ''; # Clipboard Manager - ".config/clipse/custom_theme.json".text = util.build.color colors hyprland.clipse; + ".config/clipse/config.json".text = hyprland.clipse.config; + ".config/clipse/theme.json".text = util.build.color colors hyprland.clipse.theme; # Wallpaper ".config/hypr/hyprpaper.conf".text = '' diff --git a/modules/gui/desktop/hyprland/apps/security.nix b/modules/gui/desktop/hyprland/apps/security.nix @@ -47,16 +47,27 @@ in { ]; timeouts = [ { - timeout = 330; + timeout = 500; command = "${pkgs.writeShellApplication { - name = "suspend"; # Only suspend if no audio is playing + name = "suspend"; # Suspend if no audio is playing runtimeInputs = with pkgs; [pipewire gnugrep systemd]; text = '' - pw-cli i all | grep running - if [ $? == 1 ]; then ${pkgs.systemd}/bin/systemctl suspend; fi + pw-cli info all | grep running + if [ $? == 1 ]; then systemctl suspend; fi ''; }}/bin/suspend"; } + (let + script = text: "${pkgs.writeShellApplication { + name = "dpms"; + runtimeInputs = [sys.programs.hyprland.package pkgs.procps]; + inherit text; + }}/bin/dpms"; + in { + timeout = 30; # Turn off display after locking + command = script "if pgrep -x swaylock; then hyprctl dispatch dpms off; fi"; + resumeCommand = script "hyprctl dispatch dpms on"; + }) ]; }; diff --git a/modules/gui/desktop/hyprland/settings/plugins.nix b/modules/gui/desktop/hyprland/settings/plugins.nix @@ -47,6 +47,7 @@ enable_alt_release_exit = 1 alt_replace_key = Alt_L alt_toggle_auto_next = 1 + enable_click_action = 1 } # Workspace Overview diff --git a/modules/hardware/virtualisation/default.nix b/modules/hardware/virtualisation/default.nix @@ -34,7 +34,7 @@ in { }; # VM Packages - environment.systemPackages = [pkgs.libguestfs]; + environment.systemPackages = with pkgs; [libguestfs virtiofsd]; programs.virt-manager.enable = true; # VM Utilities