dotfiles
My PC Dotfiles & Websitegit clone https://github.com/maydayv7/dotfiles
commit ea5e5584397d67f2b98f7f900ed5a8555e882730 parent 9528320dbc20eece0379db80ed5535324993bbdc Author: maydayv7 <maydayv7@gmail.com> Date: Sun, 19 May 2024 22:24:44 +0530 fix: Nits
Diffstat:
| M | files/hyprland/waybar.css | | | 6 | ++++++ |
| M | modules/apps/office.nix | | | 8 | ++++++-- |
| M | modules/gui/desktop/hyprland/apps/bar.nix | | | 16 | +++++++++++++++- |
| M | modules/gui/desktop/hyprland/settings/keybindings.nix | | | 6 | +++--- |
| M | modules/shell/bash.nix | | | 2 | +- |
| M | modules/shell/zsh.nix | | | 2 | +- |
| M | packages/nwg-dock/default.nix | | | 14 | +++++++------- |
| A | packages/nwg-dock/metadata.nix | | | 8 | ++++++++ |
| M | scripts/packages.sh | | | 49 | +++++++++++++++++++++++++------------------------ |
| M | secrets/cachix-token.secret | | | 8 | ++++---- |
10 files changed, 76 insertions(+), 43 deletions(-)
diff --git a/files/hyprland/waybar.css b/files/hyprland/waybar.css @@ -43,6 +43,11 @@ window#waybar { background-color: transparent; } +#submap { + color: @base00; + background-color: @base08; +} + #taskbar button.active { background: @base03; } @@ -128,6 +133,7 @@ window#waybar { #mpris, #network, #power-profiles-daemon, +#submap, #taskbar, #user, #window, diff --git a/modules/apps/office.nix b/modules/apps/office.nix @@ -20,12 +20,15 @@ in { environment.systemPackages = with pkgs; [ # Productivity calibre - gimp gnome.simple-scan gscan2pdf - handbrake libreoffice obs-studio + + # Graphics + gimp + handbrake + inkscape pitivi xournalpp @@ -58,6 +61,7 @@ in { ".config/calibre" ".config/GIMP" ".config/google-chrome" + ".config/inkscape" ".config/libreoffice" ".config/obs-studio" ".config/onlyoffice" diff --git a/modules/gui/desktop/hyprland/apps/bar.nix b/modules/gui/desktop/hyprland/apps/bar.nix @@ -50,7 +50,14 @@ margin-bottom = 5; margin-left = 5; - modules-left = ["custom/logo" "group/users" "hyprland/workspaces" "hyprland/window"]; + modules-left = [ + "custom/logo" + "group/users" + "hyprland/workspaces" + "hyprland/submap" + "hyprland/window" + ]; + modules-right = [ "group/menu" "bluetooth" @@ -113,6 +120,13 @@ }; }; + "hyprland/submap" = { + always-on = false; + tooltip = false; + format = " {}"; + on-click = "hyprctl dispatch submap reset"; + }; + "hyprland/window" = { format = "{initialTitle}"; max-length = 40; diff --git a/modules/gui/desktop/hyprland/settings/keybindings.nix b/modules/gui/desktop/hyprland/settings/keybindings.nix @@ -67,9 +67,9 @@ "$mod, L, exec, loginctl lock-session" # Screenshot - ", Print, exec, grimblast --notify copysave area" - "CTRL, Print, exec, grimblast --notify --cursor copysave output" - "SHIFT, Print, exec, grimblast --notify --cursor copysave screen" + ", Print, exec, grimblast --notify --freeze copysave area" + "CTRL, Print, exec, grimblast --notify --cursor copysave active" + "SHIFT, Print, exec, grimblast --notify --cursor copysave output" ] ++ # Workspaces diff --git a/modules/shell/bash.nix b/modules/shell/bash.nix @@ -52,7 +52,7 @@ in { # Command History historySize = 100000; - historyIgnore = ["rm" "pkill"]; + historyIgnore = ["rm" "killall"]; historyControl = ["erasedups" "ignoredups" "ignorespace"]; }; }) diff --git a/modules/shell/zsh.nix b/modules/shell/zsh.nix @@ -61,7 +61,7 @@ in { extended = true; ignoreDups = true; expireDuplicatesFirst = true; - ignorePatterns = ["rm *" "pkill *"]; + ignorePatterns = ["rm *" "killall *"]; }; # Additional Plugins diff --git a/packages/nwg-dock/default.nix b/packages/nwg-dock/default.nix @@ -3,22 +3,22 @@ pkgs, ... }: -with pkgs; +with pkgs; let + metadata = import ./metadata.nix; +in unstable.buildGoModule rec { pname = "nwg-dock-hyprland"; - version = "v" + src.rev; + version = metadata.rev; + inherit (metadata) vendorHash; src = fetchFromGitHub { owner = "nwg-piotr"; repo = pname; - rev = "f81fcd6c1564583d31aede2bf63b018d94cc562e"; - sha256 = "sha256-Af6ug7XdveJdX4wvN1KCWVJTZtOfhWYWdo+OPn2Ypvk="; + inherit (metadata) rev sha256; }; - patches = [./minimize.patch]; - vendorHash = "sha256-bK3SpydIO943e7zti6yWQ+JqmdF4NkAAtelNBt4Q/+s="; - ldflags = ["-s" "-w"]; + patches = [./minimize.patch]; buildInputs = [gtk-layer-shell]; nativeBuildInputs = [pkg-config wrapGAppsHook]; diff --git a/packages/nwg-dock/metadata.nix b/packages/nwg-dock/metadata.nix @@ -0,0 +1,8 @@ +{ + repo = "https://github.com/nwg-piotr/nwg-dock-hyprland"; + branch = "master"; + release = true; + rev = "v0.1.9"; + sha256 = "sha256-pzOdWv98tHZg6Xn58z5DlM1H0IOQ+ohfXEZRLZr8mz0="; + vendorHash = "sha256-bK3SpydIO943e7zti6yWQ+JqmdF4NkAAtelNBt4Q/+s="; +} diff --git a/scripts/packages.sh b/scripts/packages.sh @@ -4,6 +4,8 @@ unset NIX_PATH set -euo pipefail +COMMIT_PREFIX="chore(packages): Update" + # Script to Automatically Update Packages # # Logic update() { @@ -28,8 +30,8 @@ update() { repo="$(cat "${t1}" | jq -r .repo)" branch="$(cat "${t1}" | jq -r .branch)" # Optional release="$(cat "${t1}" | jq -r .release)" # Optional - cargoSha256="$(cat "${t1}" | jq -r .cargoSha256)" # Optional - vendorSha256="$(cat "${t1}" | jq -r .vendorSha256)" # Optional + cargoHash="$(cat "${t1}" | jq -r .cargoHash)" # Optional + vendorHash="$(cat "${t1}" | jq -r .vendorHash)" # Optional skip="$(cat "${t1}" | jq -r .skip)" # Optional upattr="$(cat "${t1}" | jq -r .upattr)"; # Optional if [[ "${upattr}" == "null" ]] @@ -69,51 +71,50 @@ update() { echo "Bumping '${rev}' ---> '${newrev}'" # SHA - fakeHash="0000000000000000000000000000000000000000000000000000000000000000" + fakeHash="sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=" sed -i "s|${rev}|${newrev}|" "${metadata}" sed -i "s|${sha256}|${fakeHash}|" "${metadata}" nix build --no-link "..#${upattr}" &> "${t2}" || true - newsha256="$(cat "${t2}" | grep 'got:' | cut -d':' -f2 | tr -d ' ' || true)" - if [[ "${newsha256}" == "sha256" ]] + newHash="$(cat "${t2}" | grep 'got:' | cut -d':' -f2 | tr -d ' ' || true)" + if [[ "${newHash}" == "sha256" ]] then - newsha256="$(cat "${t2}" | grep 'got:' | cut -d':' -f3 | tr -d ' ' || true)" + newHash="$(cat "${t2}" | grep 'got:' | cut -d':' -f3 | tr -d ' ' || true)" fi - newsha256="$(nix hash to-sri --type sha256 "${newsha256}")" - sed -i "s|${fakeHash}|${newsha256}|" "${metadata}" + newHash="$(nix hash convert --hash-algo sha256 "${newHash}")" + sed -i "s|${fakeHash}|${newHash}|" "${metadata}" # Cargo SHA - if [[ "${cargoSha256}" != "null" ]] + if [[ "${cargoHash}" != "null" ]] then - sed -i "s|${cargoSha256}|${fakeHash}|" "${metadata}" + sed -i "s|${cargoHash}|${fakeHash}|" "${metadata}" nix build --no-link "..#${upattr}" &> "${t2}" || true - newcargoSha256="$(cat "${t2}" | grep 'got:' | cut -d':' -f2 | tr -d ' ' || true)" - if [[ "${newcargoSha256}" == "sha256" ]] + newcargoHash="$(cat "${t2}" | grep 'got:' | cut -d':' -f2 | tr -d ' ' || true)" + if [[ "${newcargoHash}" == "sha256" ]] then - newcargoSha256="$(cat "${t2}" | grep 'got:' | cut -d':' -f3 | tr -d ' ' || true)" + newcargoHash="$(cat "${t2}" | grep 'got:' | cut -d':' -f3 | tr -d ' ' || true)" fi - newcargoSha256="$(nix hash to-sri --type sha256 "${newcargoSha256}")" - sed -i "s|${fakeHash}|${newcargoSha256}|" "${metadata}" + newcargoHash="$(nix hash convert --hash-algo sha256 "${newcargoHash}")" + sed -i "s|${fakeHash}|${newcargoHash}|" "${metadata}" fi # Vendor SHA - if [[ "${vendorSha256}" != "null" ]] + if [[ "${vendorHash}" != "null" ]] then - sed -i "s|${vendorSha256}|${fakeHash}|" "${metadata}" + sed -i "s|${vendorHash}|${fakeHash}|" "${metadata}" nix build --no-link "..#${upattr}" &> "${t2}" || true - newvendorSha256="$(cat "${t2}" | grep 'got:' | cut -d':' -f2 | tr -d ' ' || true)" - if [[ "${newvendorSha256}" == "sha256" ]] + newvendorHash="$(cat "${t2}" | grep 'got:' | cut -d':' -f2 | tr -d ' ' || true)" + if [[ "${newvendorHash}" == "sha256" ]] then - newvendorSha256="$(cat "${t2}" | grep 'got:' | cut -d':' -f3 | tr -d ' ' || true)" + newvendorHash="$(cat "${t2}" | grep 'got:' | cut -d':' -f3 | tr -d ' ' || true)" fi - newvendorSha256="$(nix hash to-sri --type sha256 "${newvendorSha256}")" - sed -i "s|${fakeHash}|${newvendorSha256}|" "${metadata}" + newvendorHash="$(nix hash convert --hash-algo sha256 "${newvendorHash}")" + sed -i "s|${fakeHash}|${newvendorHash}|" "${metadata}" fi # Commit - prefix="chore(packages): Update" git diff-index --quiet HEAD "${pkg}" || \ - git commit -q -n "${pkg}" -m "${prefix} \`${pkgname}\`" -m "${rev} ---> ${newrev}" + git commit -q -n "${pkg}" -m "${COMMIT_PREFIX} \`${pkgname}\`" -m "${rev} ---> ${newrev}" echo -e "Finished Updating '${pkgname}' ('${rev}' ---> '${newrev}')\n" exit 0 fi diff --git a/secrets/cachix-token.secret b/secrets/cachix-token.secret @@ -1,13 +1,13 @@ { - "data": "ENC[AES256_GCM,data:hdeoh9xKNZtrSf3y6PxxY5FdrRaPOmOMBwsEQDxjh781uEXV5dxtJCe3TPL4ArVQnnA0d27VlfMICjPLpZBd3OVUEUbOayFieIl2Xvp5P0GnQPaGkoN3aVkPlMfTOBPtTSekbQaeHq1oqVDpN0IDT3lWlo5wVlx9MTpsvEz1b50+1SW6f+ePqHOWMS35evx+IvTlv+uDXjb82FK93QEsK0Debqb3blo=,iv:Fiq5eY+ysKFR2AIhvh9PTO+4qpBmM4d1DfmCruIrMcA=,tag:GLFQzSLAoVoVahNRFM7E1Q==,type:str]", + "data": "ENC[AES256_GCM,data:sG1HCFqWNeVldAp0bkkLF1ReICJMXmcYTgTDg8chMk/oPNqc3PIswPxs18qSP7TKPKi6rR/yxjIsDqgBn119L+XarMud7iEkUlGMKtzIce/ccbUxvXPfKs2MtFpCtL2uRIbEo8sPKKqm+qRltwTjUIHQAiqYvaGzdcOhtr0Sa7MFG8KdZXPoeaPxYFYqP4vh2xzJUkM=,iv:shIM/+gb0u6mM7bUAGwQaXtAc/O6LDbdyM7WD9Ncu2g=,tag:8SMiXWOtyUbdYVe2xfUirw==,type:str]", "sops": { "kms": null, "gcp_kms": null, "azure_kv": null, "hc_vault": null, "age": null, - "lastmodified": "2021-12-01T08:27:22Z", - "mac": "ENC[AES256_GCM,data:7PgLUR58Jmx2GapoEs/dJ/L09ppvNTQEQWnkYQ+KLB/tO6feYD3jR97XK4f9i1wj3D+YvFba6qpJ+3ggctv1PfBHaED+2K7wDd7uXfJ+RcBAuPAVJQrmfADMMZculZBeY3/VO8c5mWldU5kh7aN7qUocMeu2gDWR/IYcvp5FaX8=,iv:IUZy2/Mrk5kwClymgSZSCGxNo07R+455amwFkW8UB68=,tag:PqJdUaYJ4nrCYujreVleBg==,type:str]", + "lastmodified": "2024-05-19T08:55:36Z", + "mac": "ENC[AES256_GCM,data:3dsu3tGof1V9YFqIhUbDcZ2EM5wwzyPjtBSnmCgB05VaCqYd/w0vCF9+4Vf6m1FWo/XW5tdFqewuW1by7cqUP7VmcktZKsA0H2LgXGKLaw9+PT+ASzWIwXkpGp7LcGkn4Yd7HaFeg8j5ilNvIlCuujuNZCxerGz8G6PjYfoElBs=,iv:dF51sNyjits5sF19EAJJSkHVntJhgNDryJg0cjaP4s8=,tag:SzfP6uhKBkruwaaaMX6sCg==,type:str]", "pgp": [ { "created_at": "2021-12-01T07:02:42Z", @@ -16,6 +16,6 @@ } ], "unencrypted_suffix": "_unencrypted", - "version": "3.7.1" + "version": "3.8.1" } } \ No newline at end of file