diff --git a/README.md b/README.md index 7bfc138..c0fb4ca 100755 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ If you are on NixOS and have flakes enabled, you can just clone the repo and run ![desktop-neofetch](./assets/screens/desktop-neofetch.png) ![busy-desktop](./assets/screens/desktop-busy.png) -![toolbelt](./assets/screens/toolbelt_hq.gif) +Screenshots up to date as of [this commit](https://github.com/pagedMov/nixos-config/commit/cf20f8ef68783d8313c21e8811304f1ac6634699) ## Programs diff --git a/assets/screens/desktop-busy.png b/assets/screens/desktop-busy.png index 1b21198..7782a9a 100755 Binary files a/assets/screens/desktop-busy.png and b/assets/screens/desktop-busy.png differ diff --git a/assets/screens/desktop-neofetch.png b/assets/screens/desktop-neofetch.png index bbffa83..8096bce 100755 Binary files a/assets/screens/desktop-neofetch.png and b/assets/screens/desktop-neofetch.png differ diff --git a/modules/home/environment/hyprland.nix b/modules/home/environment/hyprland.nix index 4623df9..07caaff 100755 --- a/modules/home/environment/hyprland.nix +++ b/modules/home/environment/hyprland.nix @@ -136,9 +136,6 @@ in { decoration = { rounding = 10; - # active_opacity = 0.90; - inactive_opacity = 0.90; - fullscreen_opacity = 1.0; blur = { enabled = true; diff --git a/modules/home/scripts/default.nix b/modules/home/scripts/default.nix index aae86eb..d7db7d6 100755 --- a/modules/home/scripts/default.nix +++ b/modules/home/scripts/default.nix @@ -11,7 +11,7 @@ splash = import ./commands/splash.nix { inherit self pkgs; }; runbg = import ./commands/runbg.nix { inherit self pkgs; }; mkbackup = import ./commands/mkbackup.nix { inherit pkgs; }; - icanhazip = import ./commands/icanhazip.nix { inherit pkgs; }; + icanhazip = import ./commands/icanhazip.nix { inherit pkgs; }; garbage-collect = import ./nix/garbage-collect.nix { inherit self pkgs; }; nsp = import ./nix/nsp.nix { inherit self pkgs; }; scheck = import ./wm-controls/s_check.nix { inherit self pkgs; }; @@ -22,6 +22,7 @@ viconf = import ./commands/viconf.nix { inherit pkgs; }; chscheme = import ./wm-controls/chscheme.nix { inherit pkgs; }; chpaper = import ./wm-controls/chpaper.nix { inherit pkgs; }; + mkscreenshots = import ./wm-controls/mkscreenshots.nix { inherit pkgs; }; scriptOverride = doc: group: @@ -70,6 +71,9 @@ in { scriptOverride "Ensures floating windows remain on screen" "hyprlandControls" "moveonscreen"; movScripts.hyprlandControls.switchmon.enable = scriptOverride "Moves cursor to the center of the second monitor" "hyprlandControls" "switchmon"; + movScripts.hyprlandControls.mkscreenshots.enable = + scriptOverride "Generates screenshots, and updates the README.md with the current rev hash" "hyprlandControls" "switchmon"; + movScripts.nixShortcuts.garbage-collect.enable = scriptOverride "Enables the garbage-collect script" "nixShortcuts" "garbage-collect"; @@ -94,6 +98,7 @@ in { ++ lib.optionals config.movScripts.hyprlandControls.keyring.enable [ keyring ] ++ lib.optionals config.movScripts.hyprlandControls.moveonscreen.enable [ moveonscreen ] ++ lib.optionals config.movScripts.hyprlandControls.switchmon.enable [ switchmon ] + ++ lib.optionals config.movScripts.hyprlandControls.mkscreenshots.enable [ mkscreenshots ] ++ lib.optionals config.movScripts.nixShortcuts.garbage-collect.enable [ garbage-collect ] ++ lib.optionals config.movScripts.nixShortcuts.nsp.enable [ nsp ] diff --git a/modules/home/scripts/wm-controls/mkscreenshots.nix b/modules/home/scripts/wm-controls/mkscreenshots.nix new file mode 100644 index 0000000..aa21636 --- /dev/null +++ b/modules/home/scripts/wm-controls/mkscreenshots.nix @@ -0,0 +1,60 @@ +{ pkgs }: + +pkgs.writeShellScriptBin "mkscreenshots" '' + if [ -n "$(hyprctl clients -j | jq -r '.[] | select(.workspace.name == "4")')" ]; then + echo "There are windows in workspace 4. This script uses workspace 4, so move those windows and run it again." + exit 1 + fi + + prev_workspace=$(hyprctl activeworkspace -j | jq '.id') + + hyprctl dispatch focusmonitor 0 + + screenshotfetch() { + neofetch + + kitty @ scroll-window 20- + + exec sleep infinity + } + + closewindows() { + hyprctl clients -j | jq -r '.[] | select(.workspace.name == "4") | .address' | while read -r addr; do + hyprctl dispatch closewindow address:"$addr" + done + } + + temp_script=$(mktemp) + screenshotfetch_var=$(declare -f screenshotfetch) + echo "$screenshotfetch_var" > "$temp_script" + echo "screenshotfetch" >> "$temp_script" + chmod +x "$temp_script" + + hyprctl dispatch workspace 4 + hyprctl dispatch exec "[float;size 40% 25%;move 1% 66%] kitty bash -c '$temp_script'" + hyprctl dispatch exec "[float;size 40% 50%;move 57% 5%] nemo" + + sleep 0.5 + grimblast save output "$FLAKEPATH"/assets/screens/desktop-neofetch.png + sleep 0.5 + + closewindows + + hyprctl dispatch exec 'kitty nvim' + hyprctl dispatch exec 'kitty yazi' + hyprctl dispatch exec 'kitty' + + sleep 0.5 + grimblast save output "$FLAKEPATH"/assets/screens/desktop-busy.png + sleep 0.5 + + ( + cd "$FLAKEPATH" + latest_hash=$(git rev-parse HEAD) + sed -i "s|\(https://github.com/pagedMov/nixos-config/commit/\)[a-f0-9]\{40\}|\1$latest_hash|" "$FLAKEPATH"/README.md + ) + + closewindows + + hyprctl dispatch workspace "$prev_workspace" +''