Compare commits

...

3 commits

Author SHA1 Message Date
9df249c52d
Improve firefox
Some checks failed
/ test (push) Failing after 23m35s
2024-09-26 22:19:16 +02:00
243f5b5607
Improve shell 2024-09-26 22:19:05 +02:00
ad844d9266
Add fzf-pass custom util 2024-09-26 22:18:45 +02:00
5 changed files with 440 additions and 22 deletions

View file

@ -0,0 +1,187 @@
:root { /* Catppuccin Colors */
--bg: #1e1e2e;
--currentline: #302D41;
--fg: #d9e0ee;
--comment: #575268;
--flamingo: #f2cdcd;
--mauve: #ddb6f2;
--pink: #f5c2e7;
--maroon: #e8a2af;
--red: #f28fad;
--peach: #f8bd96;
--yellow: #fae3b0;
--green: #abe9b3;
--teal: #b5e8e0;
--blue: #96cdfb;
--sky: #89dceb;
--lavender: #c9cbff;
--rosewater: #f5e0dc;
--font: monospace; /*"FiraCode Nerd Font Mono";*/
/* vimium theme uses colors: flamingo, peach, rosewater, green, blue, lavender */
--tridactyl-fg: var(--fg);
--tridactyl-bg: var(--bg);
--tridactyl-url-fg: var(--rosewater);
--tridactyl-url-bg: var(--bg);
--tridactyl-highlight-box-bg: var(--currentline);
--tridactyl-highlight-box-fg: var(--fg);
--tridactyl-of-fg: var(--fg);
--tridactyl-of-bg: var(--currentline);
--tridactyl-cmdl-fg: var(--bg);
--tridactyl-cmdl-font-family: var(--font);
--tridactyl-cmplt-font-family: var(--font);
--tridactyl-hintspan-font-family: var(--font);
/* Hint character tags */
--tridactyl-hintspan-fg: var(--bg) !important;
--tridactyl-hintspan-bg: var(--green) !important;
/* Element Highlights */
--tridactyl-hint-active-fg: none;
--tridactyl-hint-active-bg: none;
--tridactyl-hint-active-outline: none;
--tridactyl-hint-bg: none;
--tridactyl-hint-outline: none;
}
#command-line-holder {
order: 1;
border: 2px solid var(--lavender);
background: var(--tridactyl-bg);
}
#tridactyl-input {
padding: 1rem;
color: var(--tridactyl-fg);
width: 90%;
font-size: 1.5rem;
line-height: 1.5;
background: var(--tridactyl-bg);
padding-left: unset;
padding: 1rem;
}
#completions table {
font-size: 0.8rem;
font-weight: 200;
border-spacing: 0;
table-layout: fixed;
padding: 1rem 0;
/* padding-top: 1rem; */
/* padding-bottom: 1rem; */
}
#completions > div {
max-height: calc(20 * var(--option-height));
min-height: calc(10 * var(--option-height));
}
/* COMPLETIONS */
#completions {
--option-height: 1.4em;
color: var(--tridactyl-fg);
background: var(--tridactyl-bg);
display: inline-block;
font-size: unset;
font-weight: 200;
overflow: hidden;
width: 100%;
border-top: unset;
order: 2;
}
/* Olie doesn't know how CSS inheritance works */
#completions .HistoryCompletionSource {
max-height: unset;
min-height: unset;
}
#completions .HistoryCompletionSource table {
width: 100%;
font-size: 9pt;
border-spacing: 0;
table-layout: fixed;
}
/* redundancy 2: redundancy 2: more redundancy */
#completions .BmarkCompletionSource {
max-height: unset;
min-height: unset;
}
#completions table tr td.prefix,#completions table tr td.privatewindow,#completions table tr td.container,#completions table tr td.icon {
display: none;
}
#completions .BufferCompletionSource table {
width: unset;
font-size: unset;
border-spacing: unset;
table-layout: unset;
}
#completions table tr .title, #completions table tr td.excmd {
width: 50%;
padding-left: 1rem;
color: var(--blue);
}
#completions table tr .content, #completions table tr td.documentation {
padding-right: 1rem;
}
#completions table tr {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
#completions table tr td {
padding: .5rem 0;
}
#completions .sectionHeader {
background: unset;
font-weight: bold;
border-bottom: unset;
padding: 1rem 1rem 0 !important;
padding-left: unset;
padding-bottom: 0.2rem;
color: var(--peach);
}
#cmdline_iframe {
position: fixed !important;
bottom: unset;
top: 25% !important;
left: 10% !important;
z-index: 2147483647 !important;
width: 80% !important;
box-shadow: rgba(0, 0, 0, 0.5) 0px 0px 20px !important;
}
.TridactylStatusIndicator {
position: fixed !important;
bottom: 0 !important;
background: var(--tridactyl-bg) !important;
border: unset !important;
border: 1px var(--purple) solid !important;
font-size: 12pt !important;
/*font-weight: 200 !important;*/
padding: 0.8ex !important;
}
#completions .focused {
background: var(--currentline);
/* color: var(--blue); */
font-weight: bold;
}
#completions .focused td.title {
color: var(--pink);
}
#completions .focused .url {
background: var(--currentline);
color: var(--green);
}

View file

@ -1,30 +1,69 @@
{
pkgs,
username,
...
}:
let
mkExtension = shortId: uuid: {
name = uuid;
value = {
install_url = "https://addons.mozilla.org/en-US/firefox/downloads/latest/${shortId}/latest.xpi";
installation_mode = "normal_installed";
};
};
in
{
programs.firefox = {
enable = true;
package = pkgs.wrapFirefox pkgs.firefox-unwrapped {
extraPolicies = {
ExtensionSettings = { };
nativeMessagingHosts = [ pkgs.tridactyl-native ];
policies = {
DisableTelemetry = true;
DisableFirefoxStudies = true;
EnableTrackingProtection = {
Value = true;
Locked = true;
Cryptomining = true;
Fingerprinting = true;
EmailTracking = true;
};
nativeMessagingHosts = [ pkgs.tridactyl-native ];
HardwareAcceleration = true;
FirefoxHome = {
TopSites = false;
SponsoredTopSites = false;
Highlights = false;
Pocket = false;
SponsoredPocket = false;
Snippets = false;
Locked = false;
};
FirefoxSuggest = {
WebSuggestions = true;
SponsoredSuggestions = false;
ImproveSuggest = false;
Locked = true;
};
OverrideFirstRunPage = "";
OverridePostUpdatePage = "";
DontCheckDefaultBrowser = true;
DisplayMenuBar = "default-off"; # alternatives: "always", "never" or "default-on"
SearchBar = "unified"; # alternative: "separate"
HttpsOnlyMode = "force_enabled";
NoDefaultBookmarks = true;
OfferToSaveLogins = false;
OfferToSaveLoginsDefault = false;
PasswordManagerEnabled = true;
DefaultDownloadDirectory = "\${home}/Downloads";
PromptForDownloadLocation = false;
RequestedLocales = "en-US";
ExtensionSettings = builtins.listToAttrs [
(mkExtension "ublock-origin" "uBlock0@raymondhill.net")
(mkExtension "tridactyl-vim" "tridactyl.vim@cmcaine.co.uk")
(mkExtension "styl-us" "7a7a4a92-a2a0-41d1-9fd7-1e92480d612d")
];
};
profiles.${username} = {
settings = {
"browser.startup.homepage" = "https://google.it";
"browser.search.region" = "IT";
"browser.search.isUS" = false;
"distribution.searchplugins.defaultLocale" = "it-IT";
"general.useragent.locale" = "it-IT";
"browser.bookmarks.showMobileBookmarks" = true;
"browser.download.folderList" = 2;
"browser.download.lastDir" = "/home/${username}/Downloads/";
"browser.shell.checkDefaultBrowser" = false;
};
search.force = true;
profiles.default = {
search.default = "DuckDuckGo";
search.engines = {
"Searx" = {
urls = [
@ -40,10 +79,19 @@
];
};
};
bookmarks = [ ];
extensions = [ ];
userChrome = builtins.readFile ./userchrome.css;
};
};
home.sessionVariables = {
MOZ_ENABLE_WAYLAND = 1;
NIXOS_OZONE_WL = 1;
xdg.configFile."tridactyl/tridactylrc".text = ''
set editorcmd footclient -e hx %f
colors catppuccin
'';
xdg.configFile."tridactyl/themes/catppuccin.css" = {
source = ./catppuccin.css;
};
}

View file

@ -0,0 +1,67 @@
/* * Do not remove the @namespace line -- it's required for correct functioning */
/* set default namespace to XUL */
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
/* Remove Back button when there's nothing to go Back to */
#back-button[disabled="true"] { display: none; }
/* Remove Forward button when there's nothing to go Forward to */
#forward-button[disabled="true"] { display: none; }
/* Remove Home button (never use it) */
#home-button { display: none; }
.titlebar-spacer {
display: none !important;
}
/* Remove import bookmarks button */
#import-button {
display: none;
}
/* Remove bookmark toolbar */
toolbarbutton.bookmark-item:not(.subviewbutton) {
display: none;
}
/* Remove whitespace in toolbar */
#nav-bar toolbarpaletteitem[id^="wrapper-customizableui-special-spring"], #nav-bar toolbarspring {
display: none;
}
/* Hide dumb Firefox View button */
#firefox-view-button {
visibility: hidden;
}
/* Hide Firefox tab icon */
.tab-icon-image {
display: none;
}
/* Linux stuff to keep GNOME system theme */
.titlebar-min {
appearance: auto !important;
-moz-default-appearance: -moz-window-button-minimize !important;
}
.titlebar-max {
appearance: auto !important;
-moz-default-appearance: -moz-window-button-maximize !important;
}
.titlebar-restore {
appearance: auto !important;
-moz-default-appearance: -moz-window-button-restore !important;
}
.titlebar-close {
appearance: auto !important;
-moz-default-appearance: -moz-window-button-close !important;
}
.titlebar-button {
list-style-image: none !important;
}

View file

@ -3,6 +3,14 @@
username,
...
}:
let
fzfpass = pkgs.writeShellApplication {
name = "fzfpass";
text = ''
find "$PASSWORD_STORE_DIR" -name "*.gpg" | sed "s|$PASSWORD_STORE_DIR/||; s|\.gpg||" | fzf --border --info=inline | xargs pass "$@"
'';
};
in
{
programs.password-store = {
enable = true;
@ -11,4 +19,5 @@
};
package = pkgs.pass.withExtensions (e: [ e.pass-otp ]);
};
home.packages = [ fzfpass ];
}

View file

@ -20,6 +20,97 @@
programs.ripgrep.enable = true;
programs.fd.enable = true;
programs.zellij =
let
zjstatus = pkgs.fetchurl {
url = "https://github.com/dj95/zjstatus/releases/download/v0.17.0/zjstatus.wasm";
hash = "sha256-IgTfSl24Eap+0zhfiwTvmdVy/dryPxfEF7LhVNVXe+U=";
};
layout = pkgs.writeText "layout.kdl" ''
layout {
default_tab_template {
pane size=1 borderless=true {
plugin location="file:${zjstatus}" {
// Nord theme
color_fg "#cdd6f4"
color_bg "#1e1e2e"
color_black "#45475a"
color_red "#f38ba8"
color_green "#a6e3a1"
color_yellow "#f9e2af"
color_blue "#89b4fa"
color_magenta "#f5c2e7"
color_cyan "#94e2d5"
color_white "#bac2de"
format_left "{mode}#[bg=$bg] {tabs}"
format_center "#[bg=$bg,fg=$fg] Zellij: #[bg=$bg,fg=$fg]{session}"
format_right "{datetime}"
format_space "#[bg=$bg]"
format_hide_on_overlength "true"
format_precedence "crl"
border_enabled "false"
border_char ""
border_format "#[fg=#6C7086]{char}"
border_position "top"
hide_frame_for_single_pane "true"
mode_normal "#[bg=$green,fg=$bg,bold] NORMAL #[bg=$bg,fg=$green]"
mode_locked "#[bg=$red,fg=$bg,bold] LOCKED #[bg=$bg,fg=$red]"
mode_resize "#[bg=$blue,fg=$bg,bold] RESIZE #[bg=$bg,fg=$blue]"
mode_pane "#[bg=$blue,fg=$bg,bold] PANE #[bg=$bg,fg=$blue]"
mode_tab "#[bg=$yellow,fg=$bg,bold] TAB #[bg=$bg,fg=$yellow]"
mode_scroll "#[bg=$blue,fg=$bg,bold] SCROLL #[bg=$bg,fg=$blue]"
mode_enter_search "#[bg=$yellow,fg=$bg,bold] ENT-SEARCH #[bg=$bg,fg=$yellow]"
mode_search "#[bg=$yellow,fg=$bg,bold] SEARCHARCH #[bg=$bg,fg=$yellow]"
mode_rename_tab "#[bg=$yellow,fg=$bg,bold] RENAME-TAB #[bg=$bg,fg=$yellow]"
mode_rename_pane "#[bg=$blue,fg=$bg,bold] RENAME-PANE #[bg=$bg,fg=$blue]"
mode_session "#[bg=$blue,fg=$bg,bold] SESSION #[bg=$bg,fg=$blue]"
mode_move "#[bg=$blue,fg=$bg,bold] MOVE #[bg=$bg,fg=$blue]"
mode_prompt "#[bg=$blue,fg=$bg,bold] PROMPT #[bg=$bg,fg=$blue]"
mode_tmux "#[bg=$magenta,fg=$bg,bold] TMUX #[bg=$bg,fg=$magenta]"
// formatting for inactive tabs
tab_normal "#[bg=$bg,fg=$cyan]#[bg=$cyan,fg=$bg,bold]{index} #[bg=$bg,fg=$cyan,bold] {name}{floating_indicator}#[bg=$bg,fg=$bg,bold]"
tab_normal_fullscreen "#[bg=$bg,fg=$cyan]#[bg=$cyan,fg=$bg,bold]{index} #[bg=$bg,fg=$cyan,bold] {name}{fullscreen_indicator}#[bg=$bg,fg=$bg,bold]"
tab_normal_sync "#[bg=$bg,fg=$cyan]#[bg=$cyan,fg=$bg,bold]{index} #[bg=$bg,fg=$cyan,bold] {name}{sync_indicator}#[bg=$bg,fg=$bg,bold]"
// formatting for the current active tab
tab_active "#[bg=$bg,fg=$yellow]#[bg=$yellow,fg=$bg,bold]{index} #[bg=$bg,fg=$yellow,bold] {name}{floating_indicator}#[bg=$bg,fg=$bg,bold]"
tab_active_fullscreen "#[bg=$bg,fg=$yellow]#[bg=$yellow,fg=$bg,bold]{index} #[bg=$bg,fg=$yellow,bold] {name}{fullscreen_indicator}#[bg=$bg,fg=$bg,bold]"
tab_active_sync "#[bg=$bg,fg=$yellow]#[bg=$yellow,fg=$bg,bold]{index} #[bg=$bg,fg=$yellow,bold] {name}{sync_indicator}#[bg=$bg,fg=$bg,bold]"
// separator between the tabs
tab_separator "#[bg=$bg] "
// indicators
tab_sync_indicator " "
tab_fullscreen_indicator " 󰊓"
tab_floating_indicator " 󰹙"
datetime "#[fg=$fg] {format} "
datetime_format "%Y-%m-%d %H:%M"
datetime_timezone "Europe/Rome"
}
}
children
}
}
'';
in
{
enable = true;
enableFishIntegration = true;
settings = {
default_layout = "${layout}";
pane_frames = false;
};
};
programs.direnv = {
enable = true;
config = {
@ -29,7 +120,7 @@
};
programs.lsd = {
enable = false;
enable = true;
enableAliases = true;
};
@ -62,6 +153,16 @@
programs.fish = {
enable = true;
plugins = [
{
name = "fifc";
src = pkgs.fishPlugins.fifc.src;
}
{
name = "z";
src = pkgs.fishPlugins.fifc.src;
}
];
shellInit =
''
fish_vi_key_bindings
@ -84,8 +185,14 @@
ffmpeg-headless
jless
nix-melt
nurl
jq
yq-go
procs
chafa
hexyl
broot
file
]
++ (lib.optionals
(builtins.elem hostname [