diff --git a/flake.lock b/flake.lock index a9600cb..35d3ecb 100644 --- a/flake.lock +++ b/flake.lock @@ -6,11 +6,11 @@ "systems": "systems_2" }, "locked": { - "lastModified": 1727303518, - "narHash": "sha256-lO5JMynTxNZxg/+E4/Y9reeLGIz/M8cEue+Re4cP6qo=", + "lastModified": 1728326430, + "narHash": "sha256-tV1ABHuA1HItMdCTuNdA8fMB+qw7LpjvI945VwMSABI=", "owner": "Aylur", "repo": "ags", - "rev": "cd543afec4d9ed708990e5ba52184716809bf248", + "rev": "60180a184cfb32b61a1d871c058b31a3b9b0743d", "type": "github" }, "original": { @@ -118,6 +118,28 @@ "type": "github" } }, + "devshell": { + "inputs": { + "nixpkgs": [ + "nixvim", + "nixvim", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1728330715, + "narHash": "sha256-xRJ2nPOXb//u1jaBnDP56M7v5ldavjbtR6lfGqSvcKg=", + "owner": "numtide", + "repo": "devshell", + "rev": "dd6b80932022cea34a019e2bb32f6fa9e494dfef", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "devshell", + "type": "github" + } + }, "flake-compat": { "flake": false, "locked": { @@ -135,6 +157,36 @@ } }, "flake-compat_2": { + "locked": { + "lastModified": 1696426674, + "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", + "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", + "revCount": 57, + "type": "tarball", + "url": "https://api.flakehub.com/f/pinned/edolstra/flake-compat/1.0.1/018afb31-abd1-7bff-a5e4-cff7e18efb7a/source.tar.gz" + }, + "original": { + "type": "tarball", + "url": "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz" + } + }, + "flake-compat_3": { + "flake": false, + "locked": { + "lastModified": 1696426674, + "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, + "flake-compat_4": { "flake": false, "locked": { "lastModified": 1673956053, @@ -150,7 +202,65 @@ "type": "github" } }, + "flake-parts": { + "inputs": { + "nixpkgs-lib": "nixpkgs-lib" + }, + "locked": { + "lastModified": 1727826117, + "narHash": "sha256-K5ZLCyfO/Zj9mPFldf3iwS6oZStJcU4tSpiXTMYaaL0=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "3d04084d54bedc3d6b8b736c70ef449225c361b1", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "flake-parts_2": { + "inputs": { + "nixpkgs-lib": [ + "nixvim", + "nixvim", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1727826117, + "narHash": "sha256-K5ZLCyfO/Zj9mPFldf3iwS6oZStJcU4tSpiXTMYaaL0=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "3d04084d54bedc3d6b8b736c70ef449225c361b1", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, "flake-utils": { + "inputs": { + "systems": "systems_3" + }, + "locked": { + "lastModified": 1726560853, + "narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_2": { "inputs": { "systems": [ "stylix", @@ -187,6 +297,39 @@ "type": "github" } }, + "git-hooks": { + "inputs": { + "flake-compat": [ + "nixvim", + "nixvim", + "flake-compat" + ], + "gitignore": "gitignore_2", + "nixpkgs": [ + "nixvim", + "nixvim", + "nixpkgs" + ], + "nixpkgs-stable": [ + "nixvim", + "nixvim", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1729104314, + "narHash": "sha256-pZRZsq5oCdJt3upZIU4aslS9XwFJ+/nVtALHIciX/BI=", + "owner": "cachix", + "repo": "git-hooks.nix", + "rev": "3c3e88f0f544d6bb54329832616af7eb971b6be6", + "type": "github" + }, + "original": { + "owner": "cachix", + "repo": "git-hooks.nix", + "type": "github" + } + }, "gitignore": { "inputs": { "nixpkgs": [ @@ -209,6 +352,51 @@ "type": "github" } }, + "gitignore_2": { + "inputs": { + "nixpkgs": [ + "nixvim", + "nixvim", + "git-hooks", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1709087332, + "narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=", + "owner": "hercules-ci", + "repo": "gitignore.nix", + "rev": "637db329424fd7e46cf4185293b9cc8c88c95394", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "gitignore.nix", + "type": "github" + } + }, + "gitignore_3": { + "inputs": { + "nixpkgs": [ + "nixvim", + "pre-commit-hooks", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1709087332, + "narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=", + "owner": "hercules-ci", + "repo": "gitignore.nix", + "rev": "637db329424fd7e46cf4185293b9cc8c88c95394", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "gitignore.nix", + "type": "github" + } + }, "gnome-shell": { "flake": false, "locked": { @@ -248,6 +436,28 @@ } }, "home-manager_2": { + "inputs": { + "nixpkgs": [ + "nixvim", + "nixvim", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1729894599, + "narHash": "sha256-nL9nzNE5/re/P+zOv7NX6bRm5e+DeS1HIufQUJ01w20=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "93435d27d250fa986bfec6b2ff263161ff8288cb", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "home-manager", + "type": "github" + } + }, + "home-manager_3": { "inputs": { "nixpkgs": [ "stylix", @@ -311,19 +521,17 @@ "xdph": "xdph" }, "locked": { - "lastModified": 1730072482, - "narHash": "sha256-3Aotvc0dFS9J2iDnrSVjjngdZcaD9ghfroVU3jl84Gk=", - "ref": "refs/heads/main", - "rev": "6cf193e1662f6f750e964a3e174ae017246b4d48", - "revCount": 5385, - "submodules": true, - "type": "git", - "url": "https://github.com/hyprwm/Hyprland" + "lastModified": 1730282458, + "narHash": "sha256-F3Kjxk0jpX2RQSXmNo2h+RpkUajOaTfTp68jIKnq8PI=", + "owner": "hyprwm", + "repo": "Hyprland", + "rev": "5f721dce36651232ae245d872c17dfa3aae5cc6c", + "type": "github" }, "original": { - "submodules": true, - "type": "git", - "url": "https://github.com/hyprwm/Hyprland" + "owner": "hyprwm", + "repo": "Hyprland", + "type": "github" } }, "hyprland-protocols": { @@ -388,11 +596,11 @@ ] }, "locked": { - "lastModified": 1730085102, - "narHash": "sha256-MmKvCX0v7hrh3W9FSC284ScD6rnuDg3fDnNoIXUMgI0=", + "lastModified": 1730289426, + "narHash": "sha256-FnDZYGv1uyylDzJt3e7wrCAB96lOH0ZUAFctuz5aoks=", "owner": "Jas-SinghFSU", "repo": "HyprPanel", - "rev": "4e2a774c7e67e57df07f59c5bd85b805a22be5b9", + "rev": "aaad7c73b536363cf7d1f17c7a74696fa8e50b8e", "type": "github" }, "original": { @@ -451,6 +659,58 @@ "type": "github" } }, + "ixx": { + "inputs": { + "flake-utils": [ + "nixvim", + "nixvim", + "nuschtosSearch", + "flake-utils" + ], + "nixpkgs": [ + "nixvim", + "nixvim", + "nuschtosSearch", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1729544999, + "narHash": "sha256-YcyJLvTmN6uLEBGCvYoMLwsinblXMkoYkNLEO4WnKus=", + "owner": "NuschtOS", + "repo": "ixx", + "rev": "65c207c92befec93e22086da9456d3906a4e999c", + "type": "github" + }, + "original": { + "owner": "NuschtOS", + "ref": "v0.0.5", + "repo": "ixx", + "type": "github" + } + }, + "nix-darwin": { + "inputs": { + "nixpkgs": [ + "nixvim", + "nixvim", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1729826725, + "narHash": "sha256-w3WNlYxqWYsuzm/jgFPyhncduoDNjot28aC8j39TW0U=", + "owner": "lnl7", + "repo": "nix-darwin", + "rev": "7840909b00fbd5a183008a6eb251ea307fe4a76e", + "type": "github" + }, + "original": { + "owner": "lnl7", + "repo": "nix-darwin", + "type": "github" + } + }, "nixpkgs": { "locked": { "lastModified": 1729413321, @@ -467,6 +727,18 @@ "type": "github" } }, + "nixpkgs-lib": { + "locked": { + "lastModified": 1727825735, + "narHash": "sha256-0xHYkMkeLVQAMa7gvkddbPqpxph+hDzdu1XdGPJR+Os=", + "type": "tarball", + "url": "https://github.com/NixOS/nixpkgs/archive/fb192fec7cc7a4c26d51779e9bab07ce6fa5597a.tar.gz" + }, + "original": { + "type": "tarball", + "url": "https://github.com/NixOS/nixpkgs/archive/fb192fec7cc7a4c26d51779e9bab07ce6fa5597a.tar.gz" + } + }, "nixpkgs-stable": { "locked": { "lastModified": 1720386169, @@ -483,6 +755,22 @@ "type": "github" } }, + "nixpkgs-stable_2": { + "locked": { + "lastModified": 1720386169, + "narHash": "sha256-NGKVY4PjzwAa4upkGtAMz1npHGoRzWotlSnVlqI40mo=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "194846768975b7ad2c4988bdb82572c00222c0d7", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-24.05", + "repo": "nixpkgs", + "type": "github" + } + }, "nixpkgs_2": { "locked": { "lastModified": 1725634671, @@ -515,6 +803,96 @@ "type": "github" } }, + "nixpkgs_4": { + "locked": { + "lastModified": 1729665710, + "narHash": "sha256-AlcmCXJZPIlO5dmFzV3V2XF6x/OpNWUV8Y/FMPGd8Z4=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "2768c7d042a37de65bb1b5b3268fc987e534c49d", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixvim": { + "inputs": { + "flake-parts": "flake-parts", + "nixpkgs": "nixpkgs_4", + "nixvim": "nixvim_2", + "pre-commit-hooks": "pre-commit-hooks_2" + }, + "locked": { + "lastModified": 1729991428, + "narHash": "sha256-joahh2JFMawfLA7En28TPRZvQLlASmmK1oKcK67N4cU=", + "owner": "orangci", + "repo": "nixvim", + "rev": "84f9150598823d5e40ff02831064afb8fe1ce279", + "type": "github" + }, + "original": { + "owner": "orangci", + "repo": "nixvim", + "type": "github" + } + }, + "nixvim_2": { + "inputs": { + "devshell": "devshell", + "flake-compat": "flake-compat_2", + "flake-parts": "flake-parts_2", + "git-hooks": "git-hooks", + "home-manager": "home-manager_2", + "nix-darwin": "nix-darwin", + "nixpkgs": [ + "nixvim", + "nixpkgs" + ], + "nuschtosSearch": "nuschtosSearch", + "treefmt-nix": "treefmt-nix" + }, + "locked": { + "lastModified": 1729945956, + "narHash": "sha256-nWRynowHjpRsDK6uf+VE6fz7/Wk80uRiAV2NQssGBH8=", + "owner": "nix-community", + "repo": "nixvim", + "rev": "2ef948ed8ccf3c93f8caafa93cddca85df5783e9", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nixvim", + "type": "github" + } + }, + "nuschtosSearch": { + "inputs": { + "flake-utils": "flake-utils", + "ixx": "ixx", + "nixpkgs": [ + "nixvim", + "nixvim", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1729809697, + "narHash": "sha256-r3jMdRyG1ozydtmaze2Ah4OL81Y7567kbWvvME8Js/Q=", + "owner": "NuschtOS", + "repo": "search", + "rev": "b35c0b1cbbcc42161c07c77419c2801d461f1401", + "type": "github" + }, + "original": { + "owner": "NuschtOS", + "repo": "search", + "type": "github" + } + }, "pre-commit-hooks": { "inputs": { "flake-compat": "flake-compat", @@ -539,12 +917,37 @@ "type": "github" } }, + "pre-commit-hooks_2": { + "inputs": { + "flake-compat": "flake-compat_3", + "gitignore": "gitignore_3", + "nixpkgs": [ + "nixvim", + "nixpkgs" + ], + "nixpkgs-stable": "nixpkgs-stable_2" + }, + "locked": { + "lastModified": 1729104314, + "narHash": "sha256-pZRZsq5oCdJt3upZIU4aslS9XwFJ+/nVtALHIciX/BI=", + "owner": "cachix", + "repo": "pre-commit-hooks.nix", + "rev": "3c3e88f0f544d6bb54329832616af7eb971b6be6", + "type": "github" + }, + "original": { + "owner": "cachix", + "repo": "pre-commit-hooks.nix", + "type": "github" + } + }, "root": { "inputs": { "home-manager": "home-manager", "hyprland": "hyprland", "hyprpanel": "hyprpanel", "nixpkgs": "nixpkgs_3", + "nixvim": "nixvim", "stylix": "stylix" } }, @@ -554,14 +957,14 @@ "base16-fish": "base16-fish", "base16-helix": "base16-helix", "base16-vim": "base16-vim", - "flake-compat": "flake-compat_2", - "flake-utils": "flake-utils", + "flake-compat": "flake-compat_4", + "flake-utils": "flake-utils_2", "gnome-shell": "gnome-shell", - "home-manager": "home-manager_2", + "home-manager": "home-manager_3", "nixpkgs": [ "nixpkgs" ], - "systems": "systems_3", + "systems": "systems_4", "tinted-foot": "tinted-foot", "tinted-kitty": "tinted-kitty", "tinted-tmux": "tinted-tmux" @@ -625,6 +1028,21 @@ "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" + } + }, "tinted-foot": { "flake": false, "locked": { @@ -674,6 +1092,28 @@ "type": "github" } }, + "treefmt-nix": { + "inputs": { + "nixpkgs": [ + "nixvim", + "nixvim", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1729613947, + "narHash": "sha256-XGOvuIPW1XRfPgHtGYXd5MAmJzZtOuwlfKDgxX5KT3s=", + "owner": "numtide", + "repo": "treefmt-nix", + "rev": "aac86347fb5063960eccb19493e0cadcdb4205ca", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "treefmt-nix", + "type": "github" + } + }, "xdph": { "inputs": { "hyprland-protocols": [ diff --git a/flake.nix b/flake.nix index 9e686c4..38b5db9 100644 --- a/flake.nix +++ b/flake.nix @@ -6,11 +6,8 @@ url = "github:nix-community/home-manager/master"; inputs.nixpkgs.follows = "nixpkgs"; }; - hyprland.url = "git+https://github.com/hyprwm/Hyprland?submodules=1"; - # nixvim = { - # url = "github:orangci/nixvim"; - # inputs.nixpkgs.follows = "nixpkgs"; - # }; + hyprland.url = "github:hyprwm/Hyprland"; + nixvim.url = "github:orangci/nixvim"; stylix = { url = "github:danth/stylix"; inputs.nixpkgs.follows = "nixpkgs"; @@ -24,7 +21,6 @@ outputs = inputs @ { nixpkgs, home-manager, - hyprpanel, ... }: let system = "x86_64-linux"; @@ -35,7 +31,7 @@ inherit system; config.allowUnfree = true; overlays = [ - hyprpanel.overlay + inputs.hyprpanel.overlay ]; }; in { diff --git a/hm-modules/core/bash.nix b/hm-modules/core/bash.nix index 6b1c676..023035f 100644 --- a/hm-modules/core/bash.nix +++ b/hm-modules/core/bash.nix @@ -32,8 +32,10 @@ in { fi ''; shellAliases = { - sv = "sudio nix run github:orangci/nixvim"; - v = "nix run github:orangci/nixvim"; + # sv = "sudio nix run github:orangci/nixvim"; + # v = "nix run github:orangci/nixvim"; + sv = "sudo nvim"; + v = "nvim"; mc = "micro"; fr = "sudo echo Shikanoko Nokonoko Koshitantan;nh os switch --hostname ${host} /home/${username}/dots"; frfr = "sudo echo Shikanoko Nokonoko Koshitantan;nh os switch --hostname ${host} /home/${username}/dots;notify-send Rebuilt;nix-collect-garbage --delete-old && sudo nix-collect-garbage -d && sudo /run/current-system/bin/switch-to-configuration boot;notify-send Cleaned;exit"; diff --git a/hm-modules/core/boilerplate.nix b/hm-modules/core/boilerplate.nix index 1e2e1eb..6d52c48 100644 --- a/hm-modules/core/boilerplate.nix +++ b/hm-modules/core/boilerplate.nix @@ -2,7 +2,7 @@ pkgs, username, host, - # inputs, + inputs, ... }: let gitUsername = "orangci"; @@ -11,7 +11,7 @@ in { home = { username = "${username}"; homeDirectory = "/home/${username}"; - packages = [pkgs.hyprpanel]; # inputs.nixvim.packages.${pkgs.system}.default + packages = [pkgs.hyprpanel inputs.nixvim.packages.${pkgs.system}.default]; stateVersion = "24.11"; file = { ".local/share/fonts" = { diff --git a/hm-modules/programs/hyprland/hyprland.conf b/hm-modules/programs/hyprland/hyprland.conf index 3c78fa8..e6db980 100644 --- a/hm-modules/programs/hyprland/hyprland.conf +++ b/hm-modules/programs/hyprland/hyprland.conf @@ -80,6 +80,7 @@ bind = SUPER,D,exec,discord bind = SUPER,G,exec,chromium bind = SUPER,E,exec,thunar bind = SUPER,O,exec,screenrec +bind = SUPERALT,O,exec, screenrec mic bind = SUPERSHIFT,O,exec,pkill wl-screenrec bind = SUPER,K,exec,rofi -show drun # application launcher rofi bind = SUPER,R,exec,rofi -show run -theme run.rasi # run individual commands with rofi diff --git a/modules/programs/core.nix b/modules/programs/core.nix index fb92c88..35cf4ae 100644 --- a/modules/programs/core.nix +++ b/modules/programs/core.nix @@ -12,7 +12,7 @@ yad grim slurp - wayfreeze + # wayfreeze nh brightnessctl btop diff --git a/scripts/rofi/wall-select.nix b/scripts/rofi/wall-select.nix index f77deb4..86606da 100755 --- a/scripts/rofi/wall-select.nix +++ b/scripts/rofi/wall-select.nix @@ -5,6 +5,7 @@ pkgs.writeShellScriptBin "wall-select" '' "$HOME/media/walls" "$HOME/media/walls-catppuccin-mocha" "anibg" + "anibg2" ) # Default folder for the --fast option @@ -49,6 +50,49 @@ pkgs.writeShellScriptBin "wall-select" '' exit 0 fi + # Special case: when 'anibg2' is selected + if [ "$selected_folder" == "anibg2" ]; then + # API URLs for wallpaper sources + api_url1="https://api.github.com/repos/dharmx/walls/contents/animated" + api_url2="https://api.github.com/repos/dharmx/walls/contents/anime" + + # Temporary download directory + download_dir="/tmp/anibg2_walls" + mkdir -p "$download_dir" + + # Randomly select one of the API URLs + selected_api_url=$(shuf -e "$api_url1" "$api_url2" -n 1) + + # Fetch the list of images from the selected folder + image_urls=$(curl -s "$selected_api_url" | jq -r '.[] | select(.type == "file") | select(.name | test("\\.(jpg|jpeg|png|bmp|gif)$")) | .download_url') + + # Check if there are any images in the folder + if [ -z "$image_urls" ]; then + echo "No images found in the selected folder." + exit 1 + fi + + # Randomly select an image URL from the list + random_image_url=$(echo "$image_urls" | shuf -n 1) + + # Define the temporary image path + temp_image="$download_dir/$(basename "$random_image_url")" + + # Download the selected image + if ! curl -s -f "$random_image_url" -o "$temp_image"; then + echo "Failed to download wallpaper from $random_image_url" + exit 1 + fi + + # Set the wallpaper and record path + swww img "$temp_image" --transition-type random --transition-fps 60 + echo "Anime wallpaper set from $random_image_url" + echo "\$WALLPAPER=$temp_image" > /tmp/.current_wallpaper_path_hyprlock + echo "$temp_image" > /tmp/.current_wallpaper_path + exit 0 + fi + + # Get image files in the selected folder images=($(ls "$selected_folder" | grep -E '\.(jpg|jpeg|png|bmp|gif)$' | sort)) diff --git a/scripts/screenrec.nix b/scripts/screenrec.nix index 2495e3f..99b5999 100755 --- a/scripts/screenrec.nix +++ b/scripts/screenrec.nix @@ -6,8 +6,15 @@ pkgs.writeShellScriptBin "screenrec" '' # Define the audio sink (adjust this to match your system's default audio sink) audio_sink="alsa_output.pci-0000_00_1b.0.analog-stereo.monitor" - # Start fullscreen recording with system audio - wl-screenrec -f "$output_file" --audio --audio-device "$audio_sink" & + # Check if "mic" argument is passed + if [ "$1" = "mic" ]; then + audio_option="" + else + audio_option="--audio-device $audio_sink" + fi + + # Start fullscreen recording with system audio if "mic" isn't specified + wl-screenrec -f "$output_file" --audio $audio_option & recorder_pid=$! # Send a notification that recording is starting