(desktop) Gen 484: Improved keyring formatting

This commit is contained in:
pagedMov
2024-10-14 05:47:25 -04:00
parent 32ae27ac0a
commit 694e373b94
4 changed files with 117 additions and 7 deletions

6
flake.lock generated
View File

@@ -825,11 +825,11 @@
},
"nur": {
"locked": {
"lastModified": 1728889933,
"narHash": "sha256-ZqCutCb0MxSfLm5VyVq5p029kJ+++5j+E5e9qS8W+/8=",
"lastModified": 1728897080,
"narHash": "sha256-aTXVDADO4CflvvnHNYmmcfmQNnJeOfOwqWoKwXKsWWQ=",
"owner": "nix-community",
"repo": "NUR",
"rev": "5572baaaacd0ff97783859f35eb20de9a5cf6000",
"rev": "9fe98265f7f8beed5ab2a55263317fa492bd908c",
"type": "github"
},
"original": {

View File

@@ -0,0 +1,92 @@
{ nur, username }:
{
programs.firefox = {
enable = true;
policies = {
DisableTelemetry = true;
DisableFirefoxStudies = true;
EnableTrackingProtection = {
Value= true;
Locked = true;
Cryptomining = true;
Fingerprinting = true;
};
DisablePocket = true;
DisableFirefoxAccounts = true;
DisableAccounts = true;
DisableFirefoxScreenshots = true;
OverrideFirstRunPage = "";
OverridePostUpdatePage = "";
DontCheckDefaultBrowser = true;
DisplayBookmarksToolbar = "always"; # alternatives: "always" or "newtab"
DisplayMenuBar = "default-off"; # alternatives: "always", "never" or "default-on"
SearchBar = "unified"; # alternative: "separate" isDefault = true;
};
profiles.${username} = {
name = "${username}";
bookmarks = [
{ name = "NixOS Options";
url = "https://search.nixos.org/options";
}
{ name = "Home Manager Options";
url = "https://home-manager-options.extranix.com/";
}
{ name = "Nixvim Docs";
url = "https://nix-community.github.io/nixvim/";
}
{ name = "Rust Manual";
url = "https://doc.rust-lang.org/book/ch01-03-hello-cargo.html";
}
{ name = "ChatGPT";
url = "https://chatgpt.com/";
}
{ name = "DataAnnotation";
url = "https://app.dataannotation.tech/users/sign_in";
}
{ name = "Nerd Fonts Cheatsheet";
url = "https://www.nerdfonts.com/cheat-sheet";
}
];
extensions = with nur.repos.rycee.firefox-addons; [
darkreader
adnauseam
cookie-autodelete
disconnect
firefox-color
vimium
firenvim
privacy-badger
new-tab-override
tampermonkey
];
extraConfig = ''
"browser.startup.homepage" = "${self}/glasshouse-desktop/home/firefox/homepage.html";
"browser.active_color" = "#EE0000";
"browser.active_color.dark" = "#FF6666";
"browser.anchor_color" = "#0000EE";
"browser.anchor_color.dark" = "#8C8CFF";
"browser.display.background_color" = "#FFFFFF";
"browser.display.background_color.dark" = "#1C1B22";
"browser.display.document_color_use" = "1";
"browser.display.foreground_color" = "#000000";
"browser.display.foreground_color.dark" = "#FBFBFE";
"browser.display.suppress_canvas_background_image_on_forced_colors" = "true";
"browser.display.use_system_colors" = "false";
"browser.newtabpage.activity-stream.newNewtabExperience.colors" = "#0090ED,#FF4F5F,#2AC3A2,#FF7139,#A172FF,#FFA437,#FF2A8A";
"browser.theme.colorway-closet" = "true";
"browser.theme.colorway-migration" = "true";
"browser.theme.windows.accent-color-in-tabs.enabled" = "false";
"browser.visited_color" = "#551A8B";
"browser.visited_color.dark" = "#FFADFF";
"browser.newtabpage.pinned" = [{
title = "Homepage";
url = "${self}/glasshouse-desktop/home/firefox/homepage.html";
}];
"devtools.defaultColorUnit" = "authored";
"editor.background_color" = "#FFFFFF";
"editor.use_custom_colors" = "false";
'';
};
};
}

View File

@@ -3,17 +3,18 @@
pkgs.writeShellScriptBin "passhelper" (''
#!/run/current-system/sw/bin/bash
# prevent multiple instances, conditional check happens in the hyprland bind
# prevent multiple instances, conditional check happens in the hyprland bind
touch /tmp/passhelperfile
trap "[ -f /tmp/passhelperfile ] && /run/current-system/sw/bin/rm /tmp/passhelperfile" EXIT SIGHUP SIGINT
# get passwords from password store, remove .password store/ prefix and .gpg suffix, exlude .gpg-id file, open results in fzf
# get passwords from password store, remove .password store/ prefix and .gpg suffix, exlude .gpg-id file, open results in fzf
pass_string=$(find $HOME/.password-store -type f | sed 's|.*/.password-store/||; s|\.gpg$||' | sed 's|^\([^/]*\)|\x1b[32m\1\x1b[0m|' | rg -v "\.git|.gpg-id" | sort -r | fzf --border --border-label="$(whoami)'s keyring" --ansi --layout=reverse)
[ $? = 0 ] || { [ -f /tmp/passhelperfile ] && /run/current-system/sw/bin/rm /tmp/passhelperfile; exit 1; }
pass -c "$pass_string"
sleep 1.5
# pass it through fmt for soft word wrapping
pass -c "$pass_string" | fmt -w 45
/run/current-system/sw/bin/rm /tmp/passhelperfile
sleep 1.5
exit 0
'')

View File

@@ -0,0 +1,17 @@
#!/run/current-system/sw/bin/bash
# prevent multiple instances, conditional check happens in the hyprland bind
touch /tmp/passhelperfile
trap "[ -f /tmp/passhelperfile ] && /run/current-system/sw/bin/rm /tmp/passhelperfile" EXIT SIGHUP SIGINT
# get passwords from password store, remove .password store/ prefix and .gpg suffix, exlude .gpg-id file, open results in fzf
pass_string=$(find $HOME/.password-store -type f | sed 's|.*/.password-store/||; s|\.gpg$||' | sed 's|^\([^/]*\)|\x1b[32m\1\x1b[0m|' | rg -v "\.git|.gpg-id" | sort -r | fzf --border --border-label="$(whoami)'s keyring" --ansi --layout=reverse)
[ $? = 0 ] || { [ -f /tmp/passhelperfile ] && /run/current-system/sw/bin/rm /tmp/passhelperfile; exit 1; }
# pass it through fmt for soft word wrapping
pass -c "$pass_string" | fmt -w 45
/run/current-system/sw/bin/rm /tmp/passhelperfile
sleep 10
exit 0