mirror of
https://github.com/tomasriveral/nixos.git
synced 2026-08-12 02:28:37 +02:00
dendritic: rewrote entire config
This commit is contained in:
@@ -0,0 +1 @@
|
||||
NixOS modules and home-manager modules with their scripts for most of my Applications
|
||||
@@ -0,0 +1,67 @@
|
||||
{ inputs, ... }: {
|
||||
flake.nixosModules.anki = { pkgs, ... }: {
|
||||
environment.systemPackages = [
|
||||
(pkgs.anki.withAddons [
|
||||
(pkgs.ankiAddons.recolor.withConfig {
|
||||
config = {
|
||||
# we must specify all the colors or it crashes as this overwrite the whole colors set
|
||||
colors = {
|
||||
# ===== Foregrounds =====
|
||||
FG = ["Foreground" "#ebdbb2" "#ebdbb2" ""];
|
||||
FG_SUBTLE = ["Subtle FG" "#d5c4a1" "#d5c4a1" ""];
|
||||
FG_FAINT = ["Faint FG" "#a89984" "#a89984" ""];
|
||||
FG_DISABLED = ["Disabled FG" "#928374" "#928374" ""];
|
||||
|
||||
# ===== Main Background Layers =====
|
||||
BG = ["Background" "#1d2021" "#1d2021" ""];
|
||||
MAIN_BG = ["Main Background" "#1d2021" "#1d2021" ""];
|
||||
VIEW_BG = ["View Background" "#282828" "#282828" ""];
|
||||
EDITOR_BG = ["Editor Background" "#282828" "#282828" ""];
|
||||
CANVAS = ["Canvas" "#282828" "#282828" ""];
|
||||
CANVAS_ELEVATED = ["Elevated Canvas" "#32302f" "#32302f" ""];
|
||||
|
||||
# ===== Tables & Lists =====
|
||||
TABLE_BG = ["Table Background" "#282828" "#282828" ""];
|
||||
TABLE_ALT_BG = ["Table Alt Background" "#32302f" "#32302f" ""];
|
||||
HEADER_BG = ["Header Background" "#3c3836" "#3c3836" ""];
|
||||
SELECTED_BG = ["Selected Background" "#504945" "#504945" ""];
|
||||
|
||||
# ===== Borders =====
|
||||
BORDER = ["Border" "#504945" "#504945" ""];
|
||||
FAINT_BORDER = ["Faint Border" "#3c3836" "#3c3836" ""];
|
||||
|
||||
# ===== Buttons =====
|
||||
BUTTON_GRADIENT_START = ["Button Start" "#3c3836" "#3c3836" ""];
|
||||
BUTTON_GRADIENT_END = ["Button End" "#3c3836" "#3c3836" ""];
|
||||
BUTTON_HOVER = ["Button Hover" "#665c54" "#665c54" ""];
|
||||
|
||||
# ===== Accent & Links =====
|
||||
ACCENT = ["Accent" "#458588" "#458588" ""];
|
||||
LINK = ["Link" "#83a598" "#83a598" ""];
|
||||
LINK_HOVER = ["Link Hover" "#8ec07c" "#8ec07c" ""];
|
||||
|
||||
# ===== Status =====
|
||||
WARNING = ["Warning" "#fe8019" "#fe8019" ""];
|
||||
ERROR = ["Error" "#fb4934" "#fb4934" ""];
|
||||
SUCCESS = ["Success" "#8ec07c" "#8ec07c" ""];
|
||||
};
|
||||
};
|
||||
# version = { major = 3; minor = 1; };
|
||||
# let nixpkgs handle the version
|
||||
})
|
||||
])
|
||||
];
|
||||
};
|
||||
flake.homeModules.anki = { ... }: {
|
||||
programs.anki = {
|
||||
# we enable system wide with nixpkgs because it offers some addon configuration. We just use this for some config
|
||||
#enable = true;
|
||||
theme = "dark";
|
||||
sync = {
|
||||
autoSync = true;
|
||||
autoSyncMediaMinutes = 10;
|
||||
syncMedia = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{ ... }: {
|
||||
# unused at the moment see ../hardware/battery.nix
|
||||
flake.homeModules.batsignal = { ... }: {
|
||||
services.batsignal.enable = true;
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,679 @@
|
||||
{ inputs, self, ...}: {
|
||||
flake.nixosModules.browsers = { pkgs, pkgs-unstable, ...}: {
|
||||
environment.systemPackages = with pkgs; [
|
||||
chromium # used only to flash the firmware on my framework laptop 16 (keyboard.frame.work) as only chromium based browser support webHID.
|
||||
pkgs-unstable.tor-browser
|
||||
self.packages.custom-librewolfprofiles
|
||||
(pkgs.callPackage ../../modules/scripts/librewolfprofiles.nix {}) # fzf librewolf profile selector
|
||||
];
|
||||
};
|
||||
flake.homeModules.librewolf = { ... }: {
|
||||
# adapted from https://github.com/contre95/dotfiles/blob/main/dotfiles/nixos/programs/librewolf.nix
|
||||
home.sessionVariables = {
|
||||
MOZ_ENABLE_WAYLAND = 1;
|
||||
MOZ_USE_XINPUT2 = 1;
|
||||
MOZ_DBUS_REMOTE = 1;
|
||||
};
|
||||
programs.librewolf = {
|
||||
enable = true;
|
||||
settings = {
|
||||
"browser.profiles.enabled" = true;
|
||||
# disabled until i find something that uses it.
|
||||
"webgl.disabled" = true;
|
||||
# settings = lib.mapAttrs' (n: lib.nameValuePair "pref.${n}") {
|
||||
"app.update.auto" = true; # disable auto update
|
||||
#"dom.security.https_only_mode" = true; # force https
|
||||
"extensions.pocket.enabled" = false; # disable pocket
|
||||
#"browser.quitShortcut.disabled" = true; # disable ctrl+q
|
||||
"browser.download.panel.shown" = true; # show download panel
|
||||
"signon.rememberSignons" = false; # disable saving passwords
|
||||
"identity.fxaccounts.enabled" = false; # disable librewolf accounts
|
||||
"app.shield.optoutstudies.enabled" = false; # disable shield studies
|
||||
"browser.shell.checkDefaultBrowser" = false; # don't check if default browser
|
||||
#"browser.bookmarks.restore_default_bookmarks" = false; # don't restore default bookmarks
|
||||
# Download handling
|
||||
#"browser.download.dir" = "/home/meain/down"; # default download dir
|
||||
"browser.startup.page" = 3; # restore previous session
|
||||
# UI changes
|
||||
# "browser.uidensity" = 1; # enable dense UI
|
||||
#"general.autoScroll" = true; # enable autoscroll
|
||||
# "browser.compactmode.show" = true; # enable compact mode
|
||||
# "browser.tabs.firefox-view" = false; # enable librewolf view
|
||||
#"startup.homepage_welcome_url" =
|
||||
# "https://metrics.internal.contre.io/d/cUITC74Vksd/podman-revamped?orgId=1&from=2026-02-23T19:29:26.304Z&to=2026-02-23T19:59:26.304Z&timezone=browser&var-Filters=&var-namespace=alloy&var-level=error&var-level=debug&var-level=info&var-level=warn&refresh=5s&kiosk=true"; # disable welcome page
|
||||
"browser.newtabpage.enabled" = true; # disable new tab page
|
||||
"full-screen-api.ignore-widgets" = true; # fullscreen within window
|
||||
"browser.toolbars.bookmarks.visibility" = "newtab"; # hide bookmarks toolbar; always, never, newtab
|
||||
"browser.aboutConfig.showWarning" = false; # disable warning about about:config
|
||||
"media.videocontrols.picture-in-picture.video-toggle.enabled" = false; # disable picture in picture button
|
||||
|
||||
# Privacy
|
||||
"privacy.resistFingerprinting" = true;
|
||||
# "privacy.clearOnShutdown.cache" = false;
|
||||
"privacy.clearOnShutdown.history" = false;
|
||||
"privacy.clearHistory.cookiesAndStorage" = false;
|
||||
"privacy.clearHistory.historyFormDataAndDownloads" = false;
|
||||
"privacy.clearHistory.cache" = false;
|
||||
"privacy.clearOnShutdown_v2.siteSettings" = false;
|
||||
"privacy.clearOnShutdown_v2.cookiesAndStorage" = false;
|
||||
"services.sync.prefs.sync.privacy.clearOnShutdown_v2.history" = false;
|
||||
"services.sync.prefs.sync.privacy.clearOnShutdown_v2.siteSettings" = false;
|
||||
"services.sync.prefs.sync.privacy.clearOnShutdown_v2.sessions" = false;
|
||||
"services.sync.prefs.sync.privacy.clearOnShutdown_v2.cookies" = false;
|
||||
"services.sync.prefs.sync.privacy.clearOnShutdown.history" = false;
|
||||
"services.sync.prefs.sync.privacy.clearOnShutdown.siteSettings" = false;
|
||||
"services.sync.prefs.sync.privacy.clearOnShutdown.sessions" = false;
|
||||
"services.sync.prefs.sync.privacy.clearOnShutdown.cookies" = false;
|
||||
"privacy.clearOnShutdown.cookies" = false;
|
||||
"browser.discovery.enabled" = false; # disable discovery
|
||||
"browser.search.suggest.enabled" = true; # disable search suggestions
|
||||
"browser.contentblocking.category" = "standart"; # set tracking protection to standart to not interfer with adnauseam
|
||||
"dom.private-attribution.submission.enabled" = false; # stop doing dumb stuff mozilla
|
||||
"browser.protections_panel.infoMessage.seen" = true; # disable tracking protection info
|
||||
|
||||
# Theme
|
||||
"toolkit.legacyUserProfileCustomizations.stylesheets" = true;
|
||||
"svg.context-properties.content.enabled" = true;
|
||||
"layout.css.color-mix.enabled" = true;
|
||||
|
||||
# Disable telemetry
|
||||
"toolkit.telemetry.enabled" = false;
|
||||
"toolkit.telemetry.unified" = false;
|
||||
"browser.ping-centre.telemetry" = false;
|
||||
"toolkit.telemetry.archive.enabled" = false;
|
||||
"toolkit.telemetry.bhrPing.enabled" = false;
|
||||
"toolkit.telemetry.updatePing.enabled" = false;
|
||||
"browser.translations.automaticallyPopup" = false;
|
||||
"toolkit.telemetry.hybridContent.enabled" = false;
|
||||
"toolkit.telemetry.newProfilePing.enabled" = false;
|
||||
"toolkit.telemetry.reportingpolicy.firstRun" = false;
|
||||
"toolkit.telemetry.firstShutdownPing.enabled" = false;
|
||||
"browser.newtabpage.activity-stream.telemetry" = false;
|
||||
"toolkit.telemetry.shutdownPingSender.enabled" = false;
|
||||
"browser.newtabpage.activity-stream.feeds.telemetry" = false;
|
||||
|
||||
"browser.tabs.loadInBackground" = true; # open new tab in background
|
||||
"browser.tabs.loadBookmarksInTabs" = true; # open bookmarks in new tab
|
||||
"browser.tabs.warnOnOpen" = false; # don't warn when opening multiple tabs
|
||||
"browser.tabs.warnOnQuit" = false; # don't warn when closing multiple tabs
|
||||
"browser.tabs.warnOnClose" = false; # don't warn when closing multiple tabs
|
||||
"browser.tabs.loadDivertedInBackground" = false; # open new tab in background
|
||||
"browser.tabs.warnOnCloseOtherTabs" = false; # don't warn when closing multiple tabs
|
||||
"browser.tabs.closeWindowWithLastTab" = false; # don't close window when last tab is closed
|
||||
|
||||
# other
|
||||
"media.autoplay.default" = 0; # enable autoplay on open
|
||||
"devtools.toolbox.host" = "right"; # move devtools to right
|
||||
"devtools.theme" = "dark";
|
||||
# "browser.ssb.enabled" = true; # enable site specific browser
|
||||
"media.rdd-vpx.enabled" = true; # enable hardware acceleration
|
||||
"devtools.cache.disabled" = true; # disable caching in devtools
|
||||
"media.ffmpeg.vaapi.enabled" = true; # enable hardware acceleration
|
||||
|
||||
# Fonts
|
||||
"font.size.fixed.x-western" = 15;
|
||||
"font.minimum-size.x-western" = 13;
|
||||
"font.size.variable.x-western" = 15;
|
||||
"font.size.monospace.x-western" = 15;
|
||||
"browser.display.use_document_fonts" = 1;
|
||||
"browser.link.open_newwindow.restriction" = 0;
|
||||
#
|
||||
# "browser.fixup.domainsuffixwhitelist.home" = true;
|
||||
# "browser.fixup.domainwhitelist.internal.contre.io" = true;
|
||||
"extensions.activeThemeID" = "firefox-compact-dark@mozilla.org";
|
||||
# "keyword.enable" = false; # Disable search when typing unexistent TLD
|
||||
};
|
||||
policies = {
|
||||
ExtensionSettings = {
|
||||
# the extension id should be from the manifesto and not a random name.
|
||||
# if you dont know it. Put a random name. It will fail. Go to about:polices#error and the error will give you the correct id.
|
||||
"enhancerforyoutube@maximerf.addons.mozilla.org" = {
|
||||
installation_mode = "normal_installed";
|
||||
install_url = "https://addons.mozilla.org/firefox/downloads/latest/enhancer-for-youtube/latest.xpi";
|
||||
};
|
||||
|
||||
"sponsorBlocker@ajay.app" = {
|
||||
install_url = "https://addons.mozilla.org/firefox/downloads/latest/sponsorblock/latest.xpi";
|
||||
installation_mode = "force_installed";
|
||||
};
|
||||
|
||||
"adnauseam@rednoise.org" = {
|
||||
install_url = "https://addons.mozilla.org/firefox/downloads/latest/adnauseam/latest.xpi";
|
||||
installation_mode = "force_installed";
|
||||
};
|
||||
"uBlock0@raymondhill.net" = {
|
||||
install_url = "https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/latest.xpi";
|
||||
installation_mode = "force_installed";
|
||||
};
|
||||
"{08d5243b-4236-4a27-984b-1ded22ce01c3}" = {
|
||||
install_url = "https://addons.mozilla.org/firefox/downloads/file/3729287/gruvboxgruvboxgruvboxgruvboxgr-1.0.xpi";
|
||||
installation_mode = "force_installed";
|
||||
};
|
||||
"trackmenot@mrl.nyu.edu" = {
|
||||
install_url = "https://addons.mozilla.org/firefox/downloads/latest/trackmenot/latest.xpi";
|
||||
installation_mode = "force_installed";
|
||||
};
|
||||
"{446900e4-71c2-419f-a6a7-df9c091e268b}" = {
|
||||
install_url = "https://addons.mozilla.org/firefox/downloads/file/4749958/bitwarden_password_manager-latest.xpi";
|
||||
installation_mode = "force_installed";
|
||||
};
|
||||
};
|
||||
DisableTelemetry = true;
|
||||
DisableFirefoxStudies = true;
|
||||
EnableTrackingProtection = {
|
||||
Value = true;
|
||||
Locked = true;
|
||||
Cryptomining = true;
|
||||
Fingerprinting = true;
|
||||
};
|
||||
DisablePocket = true;
|
||||
DisableAccounts = true;
|
||||
DisableFirefoxScreenshots = true;
|
||||
# OverrideFirstRunPage = "";
|
||||
# OverridePostUpdatePage = "";
|
||||
DontCheckDefaultBrowser = true;
|
||||
DisplayBookmarksToolbar = "always"; # alternatives: "always" or "newtab"
|
||||
DisplayMenuBar = "never"; # alternatives: "always", "never" or "default-on"
|
||||
SearchBar = "unified"; # alternative: "separate"
|
||||
};
|
||||
profiles.work = {
|
||||
id = 0;
|
||||
# userChrome = builtins.readFile ./userChrome.css;
|
||||
# userContent = builtins.readFile ./userChrome.css;
|
||||
extensions = {
|
||||
#force = true;
|
||||
#settings = {
|
||||
# "adnauseam@rednoise.org".settings = {
|
||||
# # Core behavior
|
||||
# filteringEnabled = true;
|
||||
#
|
||||
# hidingAds = true;
|
||||
# blockingMalware = true;
|
||||
# clickingAds = true;
|
||||
#
|
||||
# # Privacy
|
||||
# disableClickingForDNT = true;
|
||||
# blockSocialMediaWidgets = false;
|
||||
#
|
||||
# # Filter lists
|
||||
# selectedFilterLists = [
|
||||
# "adnauseam-filters"
|
||||
# "easylist"
|
||||
# "easyprivacy"
|
||||
# "ublock-badware"
|
||||
# "ublock-privacy"
|
||||
# "ublock-unbreak"
|
||||
# ];
|
||||
#
|
||||
# # Advanced
|
||||
# advancedUserEnabled = false;
|
||||
# dynamicFilteringEnabled = false;
|
||||
#
|
||||
# # UI
|
||||
# showIconBadge = true;
|
||||
# parseTextAds = true;
|
||||
# eventLogging = false;
|
||||
# };
|
||||
# "trackmenot@mrl.nyu.edu".settings = {
|
||||
# enabled = true;
|
||||
|
||||
# # Query behavior
|
||||
# runAtStartup = true;
|
||||
# useTab = false; # don't open visible tab
|
||||
# showQueries = false; # don't display fake queries
|
||||
|
||||
# # Frequency (seconds between bursts)
|
||||
# timeout = 600; # 10 minutes
|
||||
# burstEnabled = true;
|
||||
# burstTimeout = 20; # burst interval
|
||||
# burstCount = 5;
|
||||
|
||||
# # Query source
|
||||
# useRssFeeds = true; # use dynamic trending feeds
|
||||
# useUserQueries = false; # don't mix your real queries
|
||||
# useBlackList = true;
|
||||
|
||||
# # Search engines to generate noise for
|
||||
# searchEngines = {
|
||||
# google = true;
|
||||
# bing = false;
|
||||
# yahoo = false;
|
||||
# baidu = false;
|
||||
# duckduckgo = false;
|
||||
# };
|
||||
|
||||
# # Logging
|
||||
# enableLogging = false;
|
||||
# };
|
||||
# "sponsorBlocker@ajay.app".settings = {
|
||||
|
||||
# # Core behavior
|
||||
# isEnabled = true;
|
||||
# autoSkip = false;
|
||||
# showSkipNotice = true;
|
||||
# # this does not work
|
||||
# # Segment categories (auto-skip behavior)
|
||||
# categoryChooser = {
|
||||
# Sponsor = {
|
||||
# enabled = true;
|
||||
# skipOption = "manualSkip";
|
||||
# };
|
||||
# intro = {
|
||||
# enabled = true;
|
||||
# actionType = 2;
|
||||
# };
|
||||
# outro = {
|
||||
# enabled = true;
|
||||
# actionType = 2;
|
||||
# };
|
||||
# selfpromo = {
|
||||
# enabled = true;
|
||||
# actionType = 2;
|
||||
# };
|
||||
# interaction = {
|
||||
# enabled = true;
|
||||
# actionType = 1; # 1 = manual skip
|
||||
# };
|
||||
# music_offtopic = {
|
||||
# enabled = false;
|
||||
# actionType = 0;
|
||||
# };
|
||||
# preview = {
|
||||
# enabled = false;
|
||||
# actionType = 0;
|
||||
# };
|
||||
# };
|
||||
|
||||
# # Privacy
|
||||
# disableTelemetry = true;
|
||||
# showDonationLink = false;
|
||||
|
||||
# # UX
|
||||
# showUpsells = false;
|
||||
# hideSkipButtonPlayerControls = false;
|
||||
|
||||
# # Advanced
|
||||
# useLocalCache = true;
|
||||
# trackViewCount = false;
|
||||
# };
|
||||
#};
|
||||
};
|
||||
bookmarks = {
|
||||
force = true;
|
||||
settings = [
|
||||
{
|
||||
name = "Nixos Config";
|
||||
tags = ["github"];
|
||||
keyword = "github";
|
||||
url = "https://github.com/tomasriveral/nixos";
|
||||
}
|
||||
{
|
||||
name = "Public AI";
|
||||
tags = ["ai" "chatgpt" "apertus"];
|
||||
keyword = "apertus";
|
||||
url = "https://chat.publicai.co/";
|
||||
}
|
||||
{
|
||||
name = "Signs of AI writing";
|
||||
tags = ["ai" "write"];
|
||||
keyword = "AI writing";
|
||||
url = "https://en.wikipedia.org/wiki/Wikipedia:Signs_of_AI_writing";
|
||||
}
|
||||
{
|
||||
name = "nixpkgs-review-gha";
|
||||
tags = ["nixpkgs-review" "gha"];
|
||||
keyword = "nixpkgs-review";
|
||||
url = "https://github.com/tomasriveral/nixpkgs-review-gha/actions/workflows/review.yml";
|
||||
}
|
||||
{
|
||||
name = "nixpkgs tracker";
|
||||
tags = ["nixpkgs" "tracker"];
|
||||
keyword = "nixpkgs tracker";
|
||||
url = "https://nixpk.gs/pr-tracker.html";
|
||||
}
|
||||
{
|
||||
name = "fahrlehrer";
|
||||
tags = ["theorie" "fahrlehrer" "conduite"];
|
||||
keyword = "fahrlehrer24";
|
||||
url = "https://app.fahrlehrer24.ch/";
|
||||
}
|
||||
{
|
||||
name = "cogito";
|
||||
tags = ["cogito" "esprit" "critique"];
|
||||
keyword = "Cogito l'Esprit critique";
|
||||
url = "https://app.cogito.fr";
|
||||
}
|
||||
];
|
||||
};
|
||||
search = {
|
||||
force = true;
|
||||
default = "quant";
|
||||
privateDefault = "qant";
|
||||
order = [
|
||||
"q"
|
||||
"map"
|
||||
"np"
|
||||
"nw"
|
||||
"bookmarks"
|
||||
"tabs"
|
||||
"history"
|
||||
];
|
||||
engines = {
|
||||
# don't need these default ones
|
||||
"amazondotcom-es".metaData.hidden = true;
|
||||
"bing".metaData.hidden = true;
|
||||
"ebay".metaData.hidden = true;
|
||||
"metager".metaData.hidden = true; # dont work
|
||||
"mojeek".metaData.hidden = true; # dont work
|
||||
"seerx".metaData.hidden = true;
|
||||
"perplexity".metaData.hidden = true;
|
||||
"google".metaData.hidden = true;
|
||||
"startpage".metaData.hidden = true;
|
||||
"duckduckgo".metaData.hidden = true;
|
||||
"Wikitionary" = {
|
||||
urls = [
|
||||
{
|
||||
template = "https://fr.wiktionary.org/w/index.php?search={searchTerms}";
|
||||
}
|
||||
];
|
||||
definedAliases = ["dict"];
|
||||
};
|
||||
"quant" = {
|
||||
urls = [
|
||||
{
|
||||
template = "https://www.qwant.com/";
|
||||
params = [
|
||||
{
|
||||
name = "q";
|
||||
value = "{searchTerms}";
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
definedAliases = ["q"];
|
||||
};
|
||||
"OpenStreeetMap" = {
|
||||
urls = [
|
||||
{
|
||||
template = "https://www.openstreetmap";
|
||||
params = [
|
||||
{
|
||||
name = "q";
|
||||
value = "{searchTerms}";
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
definedAliases = ["map"];
|
||||
};
|
||||
"Home Manager Options" = {
|
||||
urls = [
|
||||
{
|
||||
template = "https://home-manager-options.extranix.com/";
|
||||
params = [
|
||||
{
|
||||
name = "query";
|
||||
value = "{searchTerms}";
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
definedAliases = ["hm"];
|
||||
};
|
||||
"Nix Packages" = {
|
||||
urls = [
|
||||
{
|
||||
template = "https://search.nixos.org/packages";
|
||||
params = [
|
||||
{
|
||||
name = "type";
|
||||
value = "packages";
|
||||
}
|
||||
{
|
||||
name = "query";
|
||||
value = "{searchTerms}";
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
definedAliases = ["np"];
|
||||
};
|
||||
"Nix Wiki" = {
|
||||
urls = [
|
||||
{
|
||||
template = "https://wiki.nixos.org/w/index.php?search={searchTerms}";
|
||||
}
|
||||
];
|
||||
definedAliases = ["nw"];
|
||||
};
|
||||
"Repology" = {
|
||||
urls = [
|
||||
{
|
||||
template = "https://repology.org/projects/?search={searchTerms}";
|
||||
}
|
||||
];
|
||||
definedAliases = ["rp"];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
profiles.other = {
|
||||
id = 1;
|
||||
# userChrome = builtins.readFile ./userChrome.css;
|
||||
# userContent = builtins.readFile ./userChrome.css;
|
||||
extensions = {
|
||||
#force = false;
|
||||
#settings = {
|
||||
# "adnauseam@rednoise.org".settings = {
|
||||
# # Core behavior
|
||||
# filteringEnabled = true;
|
||||
#
|
||||
# hidingAds = true;
|
||||
# blockingMalware = true;
|
||||
# clickingAds = true;
|
||||
#
|
||||
# # Privacy
|
||||
# disableClickingForDNT = true;
|
||||
# blockSocialMediaWidgets = false;
|
||||
#
|
||||
# # Filter lists
|
||||
# selectedFilterLists = [
|
||||
# "adnauseam-filters"
|
||||
# "easylist"
|
||||
# "easyprivacy"
|
||||
# "ublock-badware"
|
||||
# "ublock-privacy"
|
||||
# "ublock-unbreak"
|
||||
# ];
|
||||
#
|
||||
# # Advanced
|
||||
# advancedUserEnabled = false;
|
||||
# dynamicFilteringEnabled = false;
|
||||
#
|
||||
# # UI
|
||||
# showIconBadge = true;
|
||||
# parseTextAds = true;
|
||||
# eventLogging = false;
|
||||
# };
|
||||
# "trackmenot@mrl.nyu.edu".settings = {
|
||||
# enabled = true;
|
||||
|
||||
# # Query behavior
|
||||
# runAtStartup = true;
|
||||
# useTab = false; # don't open visible tab
|
||||
# showQueries = false; # don't display fake queries
|
||||
|
||||
# # Frequency (seconds between bursts)
|
||||
# timeout = 600; # 10 minutes
|
||||
# burstEnabled = true;
|
||||
# burstTimeout = 20; # burst interval
|
||||
# burstCount = 5;
|
||||
|
||||
# # Query source
|
||||
# useRssFeeds = true; # use dynamic trending feeds
|
||||
# useUserQueries = false; # don't mix your real queries
|
||||
# useBlackList = true;
|
||||
|
||||
# # Search engines to generate noise for
|
||||
# searchEngines = {
|
||||
# google = true;
|
||||
# bing = false;
|
||||
# yahoo = false;
|
||||
# baidu = false;
|
||||
# duckduckgo = false;
|
||||
# };
|
||||
|
||||
# # Logging
|
||||
# enableLogging = false;
|
||||
# };
|
||||
# "sponsorBlocker@ajay.app".settings = {
|
||||
|
||||
# # Core behavior
|
||||
# isEnabled = true;
|
||||
# autoSkip = false;
|
||||
# showSkipNotice = true;
|
||||
# # this does not work
|
||||
# # Segment categories (auto-skip behavior)
|
||||
# categoryChooser = {
|
||||
# Sponsor = {
|
||||
# enabled = true;
|
||||
# skipOption = "manualSkip";
|
||||
# };
|
||||
# intro = {
|
||||
# enabled = true;
|
||||
# actionType = 2;
|
||||
# };
|
||||
# outro = {
|
||||
# enabled = true;
|
||||
# actionType = 2;
|
||||
# };
|
||||
# selfpromo = {
|
||||
# enabled = true;
|
||||
# actionType = 2;
|
||||
# };
|
||||
# interaction = {
|
||||
# enabled = true;
|
||||
# actionType = 1; # 1 = manual skip
|
||||
# };
|
||||
# music_offtopic = {
|
||||
# enabled = false;
|
||||
# actionType = 0;
|
||||
# };
|
||||
# preview = {
|
||||
# enabled = false;
|
||||
# actionType = 0;
|
||||
# };
|
||||
# };
|
||||
|
||||
# # Privacy
|
||||
# disableTelemetry = true;
|
||||
# showDonationLink = false;
|
||||
|
||||
# # UX
|
||||
# showUpsells = false;
|
||||
# hideSkipButtonPlayerControls = false;
|
||||
|
||||
# # Advanced
|
||||
# useLocalCache = true;
|
||||
# trackViewCount = false;
|
||||
# };
|
||||
#};
|
||||
};
|
||||
search = {
|
||||
force = true;
|
||||
default = "quant";
|
||||
privateDefault = "qant";
|
||||
order = [
|
||||
"q"
|
||||
"map"
|
||||
"np"
|
||||
"nw"
|
||||
"bookmarks"
|
||||
"tabs"
|
||||
"history"
|
||||
];
|
||||
engines = {
|
||||
# don't need these default ones
|
||||
"amazondotcom-es".metaData.hidden = true;
|
||||
"bing".metaData.hidden = true;
|
||||
"ebay".metaData.hidden = true;
|
||||
"metager".metaData.hidden = true; # dont work
|
||||
"mojeek".metaData.hidden = true; # dont work
|
||||
"seerx".metaData.hidden = true;
|
||||
"perplexity".metaData.hidden = true;
|
||||
"google".metaData.hidden = true;
|
||||
"startpage".metaData.hidden = true;
|
||||
"duckduckgo".metaData.hidden = true;
|
||||
"quant" = {
|
||||
urls = [
|
||||
{
|
||||
template = "https://www.qwant.com/";
|
||||
params = [
|
||||
{
|
||||
name = "q";
|
||||
value = "{searchTerms}";
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
definedAliases = ["q"];
|
||||
};
|
||||
"OpenStreeetMap" = {
|
||||
urls = [
|
||||
{
|
||||
template = "https://www.openstreetmap";
|
||||
params = [
|
||||
{
|
||||
name = "q";
|
||||
value = "{searchTerms}";
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
definedAliases = ["map"];
|
||||
};
|
||||
"Onche.org" = {
|
||||
urls = [
|
||||
{
|
||||
template = "https://onche.org/forum/1/blabla-general/search?by=topic&q={searchTerms}";
|
||||
}
|
||||
];
|
||||
definedAliases = ["on"];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
flake.packages.custom-librewolfprofiles = { pkgs, ... }:
|
||||
# fzf librewolf profile selector
|
||||
pkgs.writeShellApplication {
|
||||
name = "custom-librewolfprofiles";
|
||||
runtimeInputs = with pkgs; [
|
||||
zsh
|
||||
fzf
|
||||
];
|
||||
text = ''
|
||||
# List of profiles
|
||||
profiles=("work" "other" "private window")
|
||||
|
||||
# Use fzf to select
|
||||
selected=$(printf "%s\n" "''${profiles[@]}" | fzf --height 6 --reverse --prompt="Select LibreWolf profile:")
|
||||
|
||||
# If user cancels, exit
|
||||
[[ -z "$selected" ]] && exit 0
|
||||
|
||||
# Launch LibreWolf detached, keeping environment
|
||||
if [[ "$selected" == "private window" ]]; then
|
||||
setsid librewolf --private-window --no-remote >/dev/null 2>&1 &
|
||||
pkill -f "kitty.*Select LibreWolf profile"
|
||||
else
|
||||
setsid librewolf -P "$selected" --no-remote >/dev/null 2>&1 &
|
||||
pkill -f "kitty.*Select LibreWolf profile"
|
||||
fi
|
||||
|
||||
# Exit the kitty terminal after selection
|
||||
exit
|
||||
'';
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,611 @@
|
||||
{ self, ... }: {
|
||||
flake.nixosModules.caelestia = { pkgs, ... }: {
|
||||
qt.enable = true;
|
||||
# to resolve this https://wiki.nixos.org/wiki/Home_Manager#I_cannot_set_GNOME_or_Gtk_themes_via_Home_Manager
|
||||
programs.dconf.enable = true;
|
||||
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
self.packages.${pkgs.system}.qtbatticon
|
||||
kdePackages.qtdeclarative # provides qmlls and other things
|
||||
quickshell # we have it but adding it there solves "WARN qt.qpa.services: Failed to register with host portal QDBusError("org.freedesktop.portal.Error.Failed", "Could not register app ID: App info not found for 'org.quickshell'")"
|
||||
];
|
||||
};
|
||||
flake.homeModules.caelestia = { ... }: let
|
||||
sisyphe = ../../assets/sisyphe.gif;
|
||||
pepe-music = ../../assets/pepe-music.gif;
|
||||
in {
|
||||
home.file.".local/state/caelestia/wallpaper/path.txt" = {
|
||||
# dummy file. Does nothing. Prevent an error
|
||||
enable = true;
|
||||
text = "${sisyphe}";
|
||||
};
|
||||
home.file.".face" = {
|
||||
# this is were caelestia will search for profiles pictures
|
||||
source = ../../assets/sisyphePFP.png;
|
||||
};
|
||||
# set profile picture in ~/.face
|
||||
programs.caelestia = {
|
||||
enable = true;
|
||||
systemd = {
|
||||
enable = false; # if we launch it form here, the keybinds don't work
|
||||
target = "graphical-session.target";
|
||||
environment = [];
|
||||
};
|
||||
settings = {
|
||||
# default config https://github.com/caelestia-dots/shell?tab=readme-ov-file#example-configuration
|
||||
appearance = {
|
||||
mediaGifSpeedAdjustment = 500;
|
||||
sessionGifSpeed = 0.7;
|
||||
anim = {
|
||||
duration = {
|
||||
scale = 1;
|
||||
};
|
||||
};
|
||||
/*
|
||||
font = {
|
||||
family = {
|
||||
clock = "Rubik"; # (TODO figure out those fonts)
|
||||
material = "Material Symboles Rounded";
|
||||
mono = "CaskaydiaCove NF";
|
||||
sans = "Rubik";
|
||||
};
|
||||
size = {
|
||||
scale = 1;
|
||||
};
|
||||
};
|
||||
*/
|
||||
padding = {
|
||||
scale = 1;
|
||||
};
|
||||
rounding = {
|
||||
scale = 1;
|
||||
};
|
||||
spacing = {
|
||||
scale = 1;
|
||||
};
|
||||
transparency = {
|
||||
enabled = false;
|
||||
base = 0.85;
|
||||
layeres = 0.4;
|
||||
};
|
||||
};
|
||||
general = {
|
||||
logo = "caelestia";
|
||||
apps = {
|
||||
terminal = ["kitty"]; # default foot
|
||||
audio = ["pavucontrol"];
|
||||
playback = ["vlc"]; # what's that?
|
||||
explorer = ["dolphin"]; # default thunar
|
||||
};
|
||||
battery = {
|
||||
wanLevels = [
|
||||
{
|
||||
level = 20;
|
||||
title = "Low battery";
|
||||
message = "You might want to plug in a charger";
|
||||
icon = "battery_android_frame_2";
|
||||
}
|
||||
{
|
||||
level = 10;
|
||||
title = "Did you see the previous message?";
|
||||
message = "You should probably plug in a charger <b>now</b>";
|
||||
icon = "battery_android_frame_1";
|
||||
}
|
||||
{
|
||||
level = 5;
|
||||
title = "Critical battery level";
|
||||
message = "PLUG THE CHARGER RIGHT NOW!!";
|
||||
icon = "battery_android_alert";
|
||||
critical = true;
|
||||
}
|
||||
];
|
||||
criticalLevel = 3;
|
||||
};
|
||||
idle = {
|
||||
lockBeforeSleep = true;
|
||||
inhibitWhenAudio = true;
|
||||
timeouts = [
|
||||
{
|
||||
timeout = 180;
|
||||
idleAction = "lock";
|
||||
}
|
||||
{
|
||||
timeout = 300;
|
||||
idleAction = "dpms off"; # what's that?
|
||||
returnAction = "dpms on";
|
||||
}
|
||||
{
|
||||
timeout = 600;
|
||||
idleAction = ["systemctl" "suspend-then-hibernate"];
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
background = {
|
||||
desktopClock = {
|
||||
enabled = false;
|
||||
scale = 1.0;
|
||||
position = "bottom-right";
|
||||
shadow = {
|
||||
enabled = true;
|
||||
opacity = 0.7;
|
||||
blur = 0.4;
|
||||
};
|
||||
background = {
|
||||
enabled = false;
|
||||
opacity = 0.7;
|
||||
blur = true;
|
||||
};
|
||||
invertColors = false;
|
||||
};
|
||||
enabled = false; #default true
|
||||
visualiser = {
|
||||
blur = false;
|
||||
enabled = false;
|
||||
autohide = true;
|
||||
rounding = 1;
|
||||
spacing = 1;
|
||||
};
|
||||
};
|
||||
bar = {
|
||||
activeWindow = {
|
||||
compact = false;
|
||||
inverted = false;
|
||||
showOnHover = true;
|
||||
};
|
||||
clock = {
|
||||
background = true;
|
||||
showDate = true;
|
||||
showIcon = true;
|
||||
};
|
||||
dragThreshold = 20;
|
||||
entries = [
|
||||
{
|
||||
id = "logo";
|
||||
enabled = true;
|
||||
}
|
||||
{
|
||||
id = "workspaces";
|
||||
enabled = true;
|
||||
}
|
||||
{
|
||||
id = "spacer";
|
||||
enabled = true;
|
||||
}
|
||||
{
|
||||
id = "activeWindow";
|
||||
enabled = true;
|
||||
}
|
||||
{
|
||||
id = "spacer";
|
||||
enabled = true;
|
||||
}
|
||||
{
|
||||
id = "tray";
|
||||
enabled = true;
|
||||
}
|
||||
{
|
||||
id = "clock";
|
||||
enabled = true;
|
||||
}
|
||||
{
|
||||
id = "statusIcon";
|
||||
enabled = true;
|
||||
}
|
||||
{
|
||||
id = "power";
|
||||
enabled = true;
|
||||
}
|
||||
];
|
||||
persistent = true;
|
||||
popouts = {
|
||||
activeWindow = true;
|
||||
statusIcon = true;
|
||||
tray = true;
|
||||
};
|
||||
scrollActions = {
|
||||
brightness = true;
|
||||
workspaces = true;
|
||||
volume = true;
|
||||
};
|
||||
showOnHover = true;
|
||||
status = {
|
||||
showAudio = false;
|
||||
showBattery = false; # use powerprofile daemon
|
||||
showBluetooth = false;
|
||||
showKbLayout = false;
|
||||
showMicrophone = false;
|
||||
showNetwork = false;
|
||||
showWifi = true;
|
||||
showLockStatus = false;
|
||||
};
|
||||
tray = {
|
||||
background = true; # default true
|
||||
compact = false;
|
||||
iconSubs = [];
|
||||
recolour = true;
|
||||
};
|
||||
workspaces = {
|
||||
activeIndicator = true;
|
||||
activeLabel = "";
|
||||
activeTrail = false;
|
||||
label = " ";
|
||||
occupiedBg = false;
|
||||
occpiedLabel = "";
|
||||
perMonitorWorkspaces = true;
|
||||
showWindows = true;
|
||||
shown = 5;
|
||||
specialWorkspaceIcons = [
|
||||
{
|
||||
name = "steam";
|
||||
icon = "sports_esports";
|
||||
}
|
||||
];
|
||||
windowIcons = [
|
||||
{
|
||||
regex = "steam(_app_(default|[0-9]+))?";
|
||||
icon = "sports_esports";
|
||||
}
|
||||
];
|
||||
};
|
||||
excludedScreens = [""]; # default says "" those this work?
|
||||
};
|
||||
border = {
|
||||
rounding = 25;
|
||||
thickness = 10;
|
||||
};
|
||||
dashboard = {
|
||||
enabled = true;
|
||||
dragThreshold = 50;
|
||||
mediaUpdateInterval = 500;
|
||||
showOnHover = true;
|
||||
};
|
||||
launcher = {
|
||||
actionsPrefix = ">";
|
||||
actions = [
|
||||
{
|
||||
name = "Calculator";
|
||||
icon = "calculate";
|
||||
description = "Do simple math equations (powered by Qalc)";
|
||||
command = ["autocomplete" "calc"];
|
||||
enabled = false; # default true
|
||||
dangerous = false;
|
||||
}
|
||||
{
|
||||
name = "Scheme";
|
||||
icon = "palette";
|
||||
description = "Change the current colour scheme";
|
||||
command = ["autocomplete" "scheme"];
|
||||
enabled = false; # default true
|
||||
dangerous = false;
|
||||
}
|
||||
{
|
||||
name = "Wallpaper";
|
||||
icon = "image";
|
||||
description = "Change the current wallpaper";
|
||||
command = ["autocomplete" "wallpaper"];
|
||||
enabled = false; # default true
|
||||
dangerous = false;
|
||||
}
|
||||
{
|
||||
name = "Variant"; # to remove
|
||||
icon = "colors";
|
||||
description = "Change the current scheme variant";
|
||||
command = ["autocomplete" "variant"];
|
||||
enabled = true;
|
||||
dangerous = false;
|
||||
}
|
||||
{
|
||||
name = "Transparency";
|
||||
icon = "opacity";
|
||||
description = "Change shell transparency";
|
||||
command = ["autocomplete" "transparency"];
|
||||
enabled = false;
|
||||
dangerous = false;
|
||||
}
|
||||
{
|
||||
name = "Random";
|
||||
icon = "casino";
|
||||
description = "Switch to a random wallpaper";
|
||||
command = ["caelestia" "wallpaper" "-r"];
|
||||
enabled = false; # default true
|
||||
dangerous = false;
|
||||
}
|
||||
{
|
||||
name = "Light";
|
||||
icon = "light_mode";
|
||||
description = "Change the scheme to light mode";
|
||||
command = ["setMode" "light"];
|
||||
enabled = false; # default true
|
||||
dangerous = false;
|
||||
}
|
||||
{
|
||||
name = "Dark";
|
||||
icon = "dark_mode";
|
||||
description = "Change the scheme to dark mode";
|
||||
command = ["setMode" "dark"];
|
||||
enabled = false; # default true
|
||||
dangerous = false;
|
||||
}
|
||||
{
|
||||
name = "Shutdown";
|
||||
icon = "power_settings_new";
|
||||
description = "Shutdown the system";
|
||||
command = ["systemctl" "poweroff"];
|
||||
enabled = true;
|
||||
dangerous = true;
|
||||
}
|
||||
{
|
||||
name = "Reboot";
|
||||
icon = "cached";
|
||||
description = "Reboot the system";
|
||||
command = ["systemctl" "reboot"];
|
||||
enabled = true;
|
||||
dangerous = true;
|
||||
}
|
||||
{
|
||||
name = "Lock"; # does this work with ly?
|
||||
icon = "lock";
|
||||
description = "Log out of the current session";
|
||||
command = ["loginctl" "terminate-user" ""];
|
||||
enabled = true;
|
||||
dangerous = true;
|
||||
}
|
||||
{
|
||||
name = "Sleep";
|
||||
icon = "bedtime";
|
||||
description = "Suspend then hibernate";
|
||||
command = ["systemctl" "suspend-then-hibernate"];
|
||||
enabled = true;
|
||||
dangerous = false;
|
||||
}
|
||||
{
|
||||
name = "Settings";
|
||||
icon = "settings";
|
||||
description = "Configure the shell";
|
||||
command = ["caelestia" "shell" "controlCenter" "open"];
|
||||
enabled = false; # default true
|
||||
dangerous = false;
|
||||
}
|
||||
];
|
||||
dragThreshold = 50;
|
||||
vimKeybinds = false; # intersting to put to true
|
||||
enableDangerousActions = false; # set to true
|
||||
maxShown = 7;
|
||||
maxWallpapers = 9;
|
||||
specialPrefix = "@";
|
||||
useFuzzy = {
|
||||
# should try
|
||||
apps = false;
|
||||
actions = false;
|
||||
schemes = false;
|
||||
variants = false;
|
||||
wallpapers = false;
|
||||
};
|
||||
showOnHover = false;
|
||||
favouriteApps = [];
|
||||
hiddenApps = [];
|
||||
};
|
||||
lock = {
|
||||
recolourLogo = false; # what's that
|
||||
hideNotifs = false;
|
||||
};
|
||||
notifs = {
|
||||
actionOnClick = false;
|
||||
clearThreshold = 0.3;
|
||||
defaultExpireTimeout = 5000;
|
||||
expantThreshold = 20;
|
||||
openeExpanded = false;
|
||||
expire = true;
|
||||
};
|
||||
osd = {
|
||||
# thats the slider for brightness and sound
|
||||
enabled = true;
|
||||
enableBrightness = true;
|
||||
enableMicrophone = false;
|
||||
hideDelay = 2000;
|
||||
};
|
||||
paths = {
|
||||
mediaGif = pepe-music; # default "root:/assets/bongocat.gif"
|
||||
sessionGif = sisyphe; # default "root:/assets/kurukuru.gif"
|
||||
noNotifsPic = "root:/assets/dino.png";
|
||||
lockNoNotifsPic = "root:/assets/dino.png";
|
||||
wallpaperDir = "~/Pictures/Wallpapers";
|
||||
lyricsDir = "~/Music/lyrics";
|
||||
};
|
||||
services = {
|
||||
audioIncrement = 0.1;
|
||||
brightnessIncrement = 0.1;
|
||||
maxVolume = 1.0;
|
||||
defaultPlayer = "Spotify";
|
||||
gpuType = "";
|
||||
#playerAliases: [ { "from": "com.github.th_ch.youtube_music", "to": "YT Music" } ]; # how to put this into nix language?
|
||||
weatherLocation = "Lausanne";
|
||||
useFahrenheit = false;
|
||||
useFahrenheitPerformance = false;
|
||||
useTwelveHourClock = false;
|
||||
smartScheme = false; # default true
|
||||
visualisersBars = 45;
|
||||
};
|
||||
session = {
|
||||
dragThreshold = 30; # what does dragThreshold do?
|
||||
enabled = true;
|
||||
vimKeybinds = false; # maybe set to true?
|
||||
icons = {
|
||||
logout = "logout";
|
||||
shutdown = "power_settings_new";
|
||||
hibernate = "downloading"; # find a better icon
|
||||
reboot = "cached";
|
||||
};
|
||||
commands = {
|
||||
logout = ["hyprctl" "dispatch exit"];
|
||||
shutdown = ["systemctl" "poweroff"];
|
||||
hibernate = ["systemctl" "hibernate"];
|
||||
reboot = ["systemctl" "reboot"];
|
||||
};
|
||||
};
|
||||
sidebar = {
|
||||
dragThreshold = 80;
|
||||
enabled = true;
|
||||
};
|
||||
# is there a way to get some system info?
|
||||
utilities = {
|
||||
enabled = true;
|
||||
maxToasts = 4; # toats are like notification but on the botto left
|
||||
toasts = {
|
||||
audioInputChanged = true;
|
||||
audioOutputChanged = true;
|
||||
capsLockChanged = true;
|
||||
chargingChanged = true;
|
||||
configLoaded = true;
|
||||
dndChanged = true;
|
||||
gameModeChanged = true;
|
||||
kbLayoutChanged = true;
|
||||
kbLimit = true;
|
||||
numLockChanged = true;
|
||||
vpnChanged = true;
|
||||
nowPlaying = false;
|
||||
};
|
||||
};
|
||||
vpn = {
|
||||
enabled = false; # default true
|
||||
provider = [
|
||||
{
|
||||
# default example-configuration
|
||||
name = "wireguard";
|
||||
interface = "your-connection-name";
|
||||
displayName = "wireguard (Your VPN)";
|
||||
enabled = false;
|
||||
}
|
||||
];
|
||||
};
|
||||
quickToggles = [
|
||||
{
|
||||
id = "wifi";
|
||||
enabled = true;
|
||||
}
|
||||
{
|
||||
id = "bluetooth";
|
||||
enabled = true;
|
||||
}
|
||||
{
|
||||
id = "mic";
|
||||
enabled = true;
|
||||
}
|
||||
{
|
||||
id = "settings";
|
||||
enabled = true; # should desactivate
|
||||
}
|
||||
{
|
||||
id = "gameMode";
|
||||
enabled = true; # should remap my performance mode
|
||||
}
|
||||
{
|
||||
id = "dnd"; #do not disturb
|
||||
enabled = true;
|
||||
}
|
||||
{
|
||||
id = "vpn";
|
||||
enabled = false; # default true;
|
||||
}
|
||||
];
|
||||
};
|
||||
cli = {
|
||||
# default config https://github.com/caelestia-dots/cli?tab=readme-ov-file#configuring
|
||||
enable = true; # Also add caelestia-cli to path
|
||||
settings = {
|
||||
record = {
|
||||
extraArgs = [];
|
||||
};
|
||||
wallpaper = {
|
||||
postHook = "caelestia scheme set -n gruvbox -f soft -m dark"; # sets the theme
|
||||
};
|
||||
theme = {
|
||||
enableTerm = false; # we do it manually by adapting our kitty config
|
||||
enableHypr = false; # this seems to add the splash
|
||||
enableDiscord = true;
|
||||
enableSpicetify = true;
|
||||
enableFuzzel = true; #what's that?
|
||||
enablleBtop = false; # default true
|
||||
enableQt = true;
|
||||
};
|
||||
toggles = {
|
||||
communication = {
|
||||
discord = {
|
||||
enable = false; # default true
|
||||
match = [
|
||||
{
|
||||
class = "discord";
|
||||
}
|
||||
];
|
||||
whatsapp = {
|
||||
enable = true;
|
||||
match = [
|
||||
{
|
||||
class = "whatsapp";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
music = {
|
||||
spotify = {
|
||||
enable = false; # default true
|
||||
match = [
|
||||
{
|
||||
class = "Spotify";
|
||||
}
|
||||
{
|
||||
initialTitle = "Spotify";
|
||||
}
|
||||
{
|
||||
initialTitle = "Spotify Free";
|
||||
}
|
||||
];
|
||||
command = ["spicetify" "watch" "-s"];
|
||||
move = true;
|
||||
};
|
||||
feishin = {
|
||||
enable = true;
|
||||
match = [
|
||||
{
|
||||
class = "feishin";
|
||||
}
|
||||
];
|
||||
move = true;
|
||||
};
|
||||
};
|
||||
sysmon = {
|
||||
btop = {
|
||||
enable = true;
|
||||
match = [
|
||||
{
|
||||
class = "btop";
|
||||
title = "btop";
|
||||
workspace = {
|
||||
name = "special:sysmon";
|
||||
};
|
||||
}
|
||||
];
|
||||
command = ["foot" "-a" "btop" "-T" "btop" "fish" "-C" "exec btop"]; # maybe switch to btm and kitty?
|
||||
};
|
||||
};
|
||||
todo = {
|
||||
todoist = {
|
||||
enable = false; # default true
|
||||
match = [
|
||||
{
|
||||
class = "Todoist";
|
||||
}
|
||||
];
|
||||
command = ["todoist"];
|
||||
move = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,115 @@
|
||||
{ ... }: {
|
||||
flake.homeModules.eza = { ... }: {
|
||||
# ls replacement
|
||||
# see ./zsh.nix for the alias (usefull to se default flags)
|
||||
programs.eza = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
theme = {
|
||||
# from https://github.com/eza-community/eza-themes/blob/main/themes/gruvbox-dark.yml
|
||||
colourful = true;
|
||||
|
||||
filekinds = {
|
||||
normal = {foreground = "#ebdbb2";};
|
||||
directory = {foreground = "#83a598";};
|
||||
symlink = {foreground = "#8ec07c";};
|
||||
pipe = {foreground = "#928374";};
|
||||
block_device = {foreground = "#fb4934";};
|
||||
char_device = {foreground = "#fb4934";};
|
||||
socket = {foreground = "#665c54";};
|
||||
special = {foreground = "#d3869b";};
|
||||
executable = {foreground = "#b8bb26";};
|
||||
mount_point = {foreground = "#fe8019";};
|
||||
};
|
||||
perms = {
|
||||
user_read = {foreground = "#ebdbb2";};
|
||||
user_write = {foreground = "#fabd2f";};
|
||||
user_execute_file = {foreground = "#b8bb26";};
|
||||
user_execute_other = {foreground = "#b8bb26";};
|
||||
group_read = {foreground = "#ebdbb2";};
|
||||
group_write = {foreground = "#fabd2f";};
|
||||
group_execute = {foreground = "#b8bb26";};
|
||||
other_read = {foreground = "#bdae93";};
|
||||
other_write = {foreground = "#fabd2f";};
|
||||
other_execute = {foreground = "#b8bb26";};
|
||||
special_user_file = {foreground = "#d3869b";};
|
||||
special_other = {foreground = "#928374";};
|
||||
attribute = {foreground = "#bdae93";};
|
||||
};
|
||||
size = {
|
||||
major = {foreground = "#bdae93";};
|
||||
minor = {foreground = "#8ec07c";};
|
||||
number_byte = {foreground = "#ebdbb2";};
|
||||
number_kilo = {foreground = "#ebdbb2";};
|
||||
number_mega = {foreground = "#83a598";};
|
||||
number_giga = {foreground = "#d3869b";};
|
||||
number_huge = {foreground = "#d3869b";};
|
||||
unit_byte = {foreground = "#bdae93";};
|
||||
unit_kilo = {foreground = "#83a598";};
|
||||
unit_mega = {foreground = "#d3869b";};
|
||||
unit_giga = {foreground = "#d3869b";};
|
||||
unit_huge = {foreground = "#fe8019";};
|
||||
};
|
||||
users = {
|
||||
user_you = {foreground = "#ebdbb2";};
|
||||
user_root = {foreground = "#fb4934";};
|
||||
user_other = {foreground = "#d3869b";};
|
||||
group_yours = {foreground = "#ebdbb2";};
|
||||
group_other = {foreground = "#928374";};
|
||||
group_root = {foreground = "#fb4934";};
|
||||
};
|
||||
links = {
|
||||
normal = {foreground = "#8ec07c";};
|
||||
multi_link_file = {foreground = "#fe8019";};
|
||||
};
|
||||
git = {
|
||||
new = {foreground = "#b8bb26";};
|
||||
modified = {foreground = "#fabd2f";};
|
||||
deleted = {foreground = "#fb4934";};
|
||||
renamed = {foreground = "#8ec07c";};
|
||||
typechange = {foreground = "#d3869b";};
|
||||
ignored = {foreground = "#928374";};
|
||||
conflicted = {foreground = "#cc241d";};
|
||||
};
|
||||
git_repo = {
|
||||
branch_main = {foreground = "#ebdbb2";};
|
||||
branch_other = {foreground = "#d3869b";};
|
||||
git_clean = {foreground = "#b8bb26";};
|
||||
git_dirty = {foreground = "#fb4934";};
|
||||
};
|
||||
security_context = {
|
||||
colon = {foreground = "#928374";};
|
||||
user = {foreground = "#ebdbb2";};
|
||||
role = {foreground = "#d3869b";};
|
||||
typ = {foreground = "#665c54";};
|
||||
range = {foreground = "#d3869b";};
|
||||
};
|
||||
file_type = {
|
||||
image = {foreground = "#fabd2f";};
|
||||
video = {foreground = "#fb4934";};
|
||||
music = {foreground = "#b8bb26";};
|
||||
lossless = {foreground = "#8ec07c";};
|
||||
crypto = {foreground = "#928374";};
|
||||
document = {foreground = "#ebdbb2";};
|
||||
compressed = {foreground = "#d3869b";};
|
||||
temp = {foreground = "#cc241d";};
|
||||
compiled = {foreground = "#83a598";};
|
||||
build = {foreground = "#928374";};
|
||||
source = {foreground = "#83a598";};
|
||||
punctuation = {foreground = "#928374";};
|
||||
date = {foreground = "#fabd2f";};
|
||||
inode = {foreground = "#bdae93";};
|
||||
blocks = {foreground = "#a89984";};
|
||||
header = {foreground = "#ebdbb2";};
|
||||
octal = {foreground = "#8ec07c";};
|
||||
flags = {foreground = "#d3869b";};
|
||||
|
||||
symlink_path = {foreground = "#8ec07c";};
|
||||
control_char = {foreground = "#83a598";};
|
||||
broken_symlink = {foreground = "#fb4934";};
|
||||
broken_path_overlay = {foreground = "#928374";};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,176 @@
|
||||
{ ... }: {
|
||||
flake.homeModules.fastfetch = { ... }: {
|
||||
# Adapted from https://github.com/dacrab/fastfetch-config/blob/main/config.jsonc
|
||||
programs.fastfetch = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
logo = {
|
||||
type = "none";
|
||||
#source = "nixos";
|
||||
};
|
||||
|
||||
modules = [
|
||||
# ───────────── Hardware ─────────────
|
||||
|
||||
{
|
||||
type = "custom";
|
||||
format = "╭───────────────────────── Hardware ──────────────────────────╮";
|
||||
outputColor = "blue";
|
||||
}
|
||||
|
||||
{
|
||||
type = "title";
|
||||
key = " PC";
|
||||
keyColor = "green";
|
||||
}
|
||||
|
||||
{
|
||||
type = "host";
|
||||
key = "│ ├ Laptop";
|
||||
keyColor = "green";
|
||||
}
|
||||
|
||||
{
|
||||
type = "display";
|
||||
key = "│ ├ Display";
|
||||
keyColor = "green";
|
||||
}
|
||||
|
||||
{
|
||||
type = "cpu";
|
||||
key = "│ ├ CPU";
|
||||
showPeCoreCount = true;
|
||||
format = "{1}";
|
||||
keyColor = "green";
|
||||
}
|
||||
|
||||
{
|
||||
type = "gpu";
|
||||
key = "│ ├ GPU";
|
||||
keyColor = "green";
|
||||
}
|
||||
|
||||
{
|
||||
type = "memory";
|
||||
key = "└ └ Memory";
|
||||
keyColor = "green";
|
||||
}
|
||||
|
||||
{
|
||||
type = "custom";
|
||||
format = "╰─────────────────────────────────────────────────────────────╯";
|
||||
outputColor = "blue";
|
||||
}
|
||||
|
||||
# ───────────── Software ─────────────
|
||||
|
||||
{
|
||||
type = "custom";
|
||||
format = "╭───────────────────────── Software ──────────────────────────╮";
|
||||
outputColor = "blue";
|
||||
}
|
||||
|
||||
{
|
||||
type = "os";
|
||||
key = " OS";
|
||||
keyColor = "cyan";
|
||||
}
|
||||
|
||||
{
|
||||
type = "kernel";
|
||||
key = "│ ├ Kernel";
|
||||
keyColor = "cyan";
|
||||
}
|
||||
|
||||
{
|
||||
type = "packages";
|
||||
key = "│ ├ Packages";
|
||||
keyColor = "cyan";
|
||||
}
|
||||
|
||||
{
|
||||
type = "shell";
|
||||
key = "│ ├ Shell";
|
||||
keyColor = "cyan";
|
||||
}
|
||||
|
||||
{
|
||||
type = "terminal";
|
||||
key = "│ ├ Terminal";
|
||||
keyColor = "cyan";
|
||||
}
|
||||
|
||||
{
|
||||
type = "command";
|
||||
key = "│ ├ OS Age";
|
||||
keyColor = "cyan";
|
||||
text = ''
|
||||
birth_install=$(stat -c %W /)
|
||||
current=$(date +%s)
|
||||
time_progression=$((current - birth_install))
|
||||
days_difference=$((time_progression / 86400))
|
||||
echo $days_difference days
|
||||
'';
|
||||
}
|
||||
|
||||
{
|
||||
type = "uptime";
|
||||
key = "└ └ Uptime";
|
||||
keyColor = "cyan";
|
||||
}
|
||||
|
||||
{
|
||||
type = "de";
|
||||
key = " DE";
|
||||
keyColor = "blue";
|
||||
}
|
||||
|
||||
{
|
||||
type = "wm";
|
||||
key = " WM";
|
||||
keyColor = "magenta";
|
||||
}
|
||||
|
||||
{
|
||||
type = "gpu";
|
||||
key = "│ ├ GPU Driver";
|
||||
format = "{3}";
|
||||
keyColor = "magenta";
|
||||
}
|
||||
|
||||
{
|
||||
type = "brightness";
|
||||
key = "│ ├ Brightness";
|
||||
keyColor = "magenta";
|
||||
}
|
||||
|
||||
{
|
||||
type = "version";
|
||||
key = "└ └ FastFetch";
|
||||
keyColor = "magenta";
|
||||
}
|
||||
|
||||
{
|
||||
type = "custom";
|
||||
format = "╰────────────────────────────────────────────────────────────╯";
|
||||
outputColor = "blue";
|
||||
}
|
||||
|
||||
#{
|
||||
# type = "custom";
|
||||
# format = ''
|
||||
# {#0} {#1} {#2} {#3} {#4} {#5} {#6} {#7}
|
||||
# '';
|
||||
#} #for some reason dont work
|
||||
{
|
||||
type = "colors";
|
||||
symbol = "diamond";
|
||||
}
|
||||
|
||||
"break"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{ ... }: {
|
||||
flake.nixosModules.games = {pkgs, ...}: {
|
||||
environment.systemPackages = with pkgs; [
|
||||
supertux # fuck mario
|
||||
supertuxkart # fuck mariokart
|
||||
# my favorite italian plumber is free software
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
{ ... }: {
|
||||
flake.homeModules.git = { ... }: {
|
||||
programs.git = {
|
||||
enable = true;
|
||||
settings = {
|
||||
init.defaultBranch = "main";
|
||||
};
|
||||
};
|
||||
programs.gh = {
|
||||
enable = true;
|
||||
gitCredentialHelper.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
{ ... }: {
|
||||
flake.homeModules.gtk = {pkgs, ...}: {
|
||||
# gtk config
|
||||
gtk.theme = {
|
||||
enable = true;
|
||||
Gruvbox-GTK-Theme-BL-MB = {
|
||||
enable = true;
|
||||
name = "Gruvbox-GTK-Theme-BL-MB";
|
||||
package = pkgs.gruvbox-gtk-theme;
|
||||
};
|
||||
};
|
||||
# to resolve this https://wiki.nixos.org/wiki/Home_Manager#I_cannot_set_GNOME_or_Gtk_themes_via_Home_Manager
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{ ... }: {
|
||||
# this was in my home-manager config, but looks like more
|
||||
flake.nixosModules.hypridle = { ... }: {
|
||||
services.hypridle = {
|
||||
enable = true;
|
||||
settings = {
|
||||
general = {
|
||||
lock_cmd = "notify-send 'lock!'"; # dbus/sysd lock command (loginctl lock-session)
|
||||
unlock_cmd = "notify-send 'unlock!'"; # same as above, but unlock
|
||||
before_sleep_cmd = "notify-send 'Zzz'"; # command ran before sleep
|
||||
after_sleep_cmd = "notify-send 'Awake!"; # command ran after sleep
|
||||
ignore_dbus_inhibit = false; # whether to ignore dbus-sent idle-inhibit requests (used by e.g. firefox or steam)
|
||||
ignore_systemd_inhibit = false; # whether to ignore systemd-inhibit --what=idle inhibitors
|
||||
};
|
||||
listener = {
|
||||
timeout = 500; # in seconds
|
||||
on-timeout = "notify-send 'You are idle!'"; # command to run when timeout has passed
|
||||
on-resume = "notify-send 'Welcome back!'"; # command to run when activity is detected after timeout has fired.
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,498 @@
|
||||
{ self, ... }: {
|
||||
flake.nixosModules.hyprland = { pkgs, pkgs-unstable, ... }: {
|
||||
environment.systemPackages = with pkgs; [
|
||||
swww #wallpaper daemon
|
||||
gruvbox-gtk-theme
|
||||
hyprcursor
|
||||
capitaine-cursors-themed # cursor theme
|
||||
papirus-icon-theme
|
||||
papirus-folders
|
||||
self.packages.${pkgs.system}.custom-wallpaper
|
||||
self.packages.${pkgs.system}.custom-dontkillsteam # kill app (if not steam or tomato-c
|
||||
self.packages.${pkgs.system}.custom-killall # kill all windows except focused window
|
||||
xdg-utils
|
||||
];
|
||||
# enable hyprland WM
|
||||
programs.hyprland = {
|
||||
enable = true;
|
||||
package = pkgs-unstable.hyprland; # we use the unstable branch to get the latest features
|
||||
withUWSM = true;
|
||||
xwayland.enable = true;
|
||||
};
|
||||
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
extraPortals = [
|
||||
pkgs.xdg-desktop-portal-wlr
|
||||
pkgs.xdg-desktop-portal-gtk
|
||||
];
|
||||
};
|
||||
# removes uxterm
|
||||
services.xserver.excludePackages = [pkgs.xterm];
|
||||
|
||||
# Enable the X11 windowing system.
|
||||
services.xserver.enable = true;
|
||||
};
|
||||
flake.homeModules.hyprland-laptop = { ... }: {
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
exec-once = [
|
||||
"qtbatticon" # custom battery tray
|
||||
];
|
||||
monitor = [
|
||||
"eDP-1, highres@highrr, 0x0, 1"
|
||||
];
|
||||
};
|
||||
};
|
||||
flake.homeModules.hyprland = {pkgs-unstable, ...}: let
|
||||
wallpaper = ../../assets/wallpaper1.jpg;
|
||||
in {
|
||||
#refer to https://wiki.hypr.land/Nix/Hyprland-on-Home-Manager/
|
||||
wayland.windowManager.hyprland.enable = true;
|
||||
wayland.windowManager.hyprland.package = pkgs-unstable.hyprland;
|
||||
#hint Electron apps to use on wayland;
|
||||
home.sessionVariables.NIXOS_OZONE_WL = "1";
|
||||
wayland.windowManager.hyprland.plugins = [
|
||||
#pkgs-unstable.hyprlandPlugins.hyprspace # currently broken
|
||||
#pkgs-unstable.hyprlandPlugins.hypr-dynamic-cursors # currently broken
|
||||
];
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
"$mod" = "SUPER";
|
||||
"$term" = "kitty";
|
||||
"$editor" = "nvim";
|
||||
"$notes" = "kitty --class \"custom-obsidianvaults\" --name \"Select Obsidian vault\" --hold custom-obsidianvaults";
|
||||
"$file" = "dolphin";
|
||||
"$browser" = "kitty --class \"custom-librewolfprofiles\" --name \"Select LibreWolf profile\" --hold custom-librewolfprofiles";
|
||||
# ▄▀█ █▄░█ █ █▀▄▀█ ▄▀█ ▀█▀ █ █▀█ █▄░█
|
||||
# █▀█ █░▀█ █ █░▀░█ █▀█ ░█░ █ █▄█ █░▀█
|
||||
animations = {
|
||||
enabled = true;
|
||||
bezier = [
|
||||
"wind, 0.05, 0.9, 0.1, 1.05"
|
||||
"winIn, 0.1, 1.1, 0.1, 1.1"
|
||||
"winOut, 0.3, -0.3, 0, 1"
|
||||
"liner, 1, 1, 1, 1"
|
||||
];
|
||||
animation = [
|
||||
"windows, 1, 6, wind, slide"
|
||||
"windowsIn, 1, 6, winIn, slide"
|
||||
"windowsOut, 1, 5, winOut, slide"
|
||||
"windowsMove, 1, 5, wind, slide"
|
||||
"border, 1, 1, liner"
|
||||
"borderangle, 1, 30, liner, loop"
|
||||
"fade, 1, 10, default"
|
||||
"workspaces, 1, 5, wind"
|
||||
];
|
||||
};
|
||||
|
||||
# █▀▀ █▄░█ █░█
|
||||
# ██▄ █░▀█ ▀▄▀
|
||||
|
||||
# See https://wiki.hyprland.org/Configuring/Environment-variables/
|
||||
env = [
|
||||
"PATH, $PATH:$scrPath"
|
||||
"XDG_CURRENT_DESKTOP,Hyprland"
|
||||
"XDG_SESSION_TYPE,wayland"
|
||||
"XDG_SESSION_DESKTOP,Hyprland"
|
||||
"QT_QPA_PLATFORM,wayland;xcb"
|
||||
"QT_QPAPLATFORMTHEME,qt6ct"
|
||||
"QT_WAYLAND_DISABLE_WINDOWDECORATION,1"
|
||||
"MOZ_ENABLE_WAYLAND,1"
|
||||
"GDK_SCALE,1"
|
||||
];
|
||||
|
||||
# █ █▄░█ █▀█ █░█ ▀█▀
|
||||
# █ █░▀█ █▀▀ █▄█ ░█░
|
||||
|
||||
input = {
|
||||
kb_layout = ["ch"];
|
||||
follow_mouse = 1;
|
||||
sensitivity = 0;
|
||||
force_no_accel = 1;
|
||||
};
|
||||
|
||||
# █▄▀ █▀▀ █▄█ █▄▄ █ █▄░█ █▀▄ █ █▄░█ █▀▀ █▀
|
||||
# █░█ ██▄ ░█░ █▄█ █ █░▀█ █▄▀ █ █░▀█ █▄█ ▄█
|
||||
# caelestia shell drawers toggle dashboard
|
||||
# caelestia shell drawers toggle utilities
|
||||
|
||||
bind = [
|
||||
#hyprland/utility keybindings
|
||||
"$mod, W, togglefloating"
|
||||
"$mod, G, togglegroup"
|
||||
"Alt, Return, fullscreen"
|
||||
"$mod, Left, movefocus, l"
|
||||
"$mod, Right, movefocus, r"
|
||||
"$mod, Up, movefocus, u"
|
||||
"$mod, Down, movefocus, d"
|
||||
"Alt, Tab, movefocus, d"
|
||||
"$mod, 1, workspace, 1"
|
||||
"$mod, 2, workspace, 2"
|
||||
"$mod, 3, workspace, 3"
|
||||
"$mod, 4, workspace, 4"
|
||||
"$mod, 5, workspace, 5"
|
||||
"$mod, 6, workspace, 6"
|
||||
"$mod, 7, workspace, 7"
|
||||
"$mod, 8, workspace, 8"
|
||||
"$mod, 9, workspace, 9"
|
||||
"$mod, 0, workspace, 10"
|
||||
"$mod+Ctrl, Right, workspace, r+1"
|
||||
"$mod+Ctrl, Left, workspace, r-1"
|
||||
"$mod+Ctrl, Doown, workspace, empty"
|
||||
"$mod+Shift, 1, movetoworkspace, 1"
|
||||
"$mod+Shift, 2, movetoworkspace, 2"
|
||||
"$mod+Shift, 3, movetoworkspace, 3"
|
||||
"$mod+Shift, 4, movetoworkspace, 4"
|
||||
"$mod+Shift, 5, movetoworkspace, 5"
|
||||
"$mod+Shift, 6, movetoworkspace, 6"
|
||||
"$mod+Shift, 7, movetoworkspace, 7"
|
||||
"$mod+Shift, 8, movetoworkspace, 8"
|
||||
"$mod+Shift, 9, movetoworkspace, 9"
|
||||
"$mod+Shift, 0, movetoworkspace, 10"
|
||||
"$mod+Ctrl+Alt, Right, movetoworkspace, r+1"
|
||||
"$mod+Ctrl+Alt, Left, movetoworkspace, r-1"
|
||||
#"$mod, Backspace, exec, wlogout -b 4 -T 600 -B 600"
|
||||
"$mod, Backspace, exec, caelestia shell drawers toggle session"
|
||||
"$mod+Shift+Ctrl, Left, movewindow, l"
|
||||
"$mod+Shift+Ctrl, Right, movewindow, r"
|
||||
"$mod+Shift+Ctrl, Up, movewindow, u"
|
||||
"$mod+Shift+Ctrl, Down, movewindow, d"
|
||||
"$mod, mouse_down, workspace, e+1"
|
||||
"$mod, mouse_up, workspace, e-1"
|
||||
"$mod, V, exec, cliphist list | rofi -dmenu| cliphist decode | wl-copy" # copy paste
|
||||
"$mod, B, exec, hyprkeys -bkr | rofi -dmenu"
|
||||
#"$mod, A, tagwindow, noborder" # used to not apply image border
|
||||
"$mod, S, togglespecialworkspace,"
|
||||
"Alt+$mod, S, movetoworkspace, special"
|
||||
# for the scrolling layout
|
||||
"$mod, A, layoutmsg, move -col"
|
||||
"$mod, D, layoutmsg, move +col"
|
||||
#apps keybindings
|
||||
"$mod, T, exec, $term"
|
||||
"$mod, E, exec, $file"
|
||||
"$mod, F, exec, $browser"
|
||||
"$mod, N, exec, $notes"
|
||||
#"$mod+Shift, A, exec, rofi -show drun"
|
||||
"$mod+Shift, A, exec, caelestia shell drawers toggle launcher"
|
||||
"$mod, Q, exec, custom-dontkillsteam"
|
||||
#"Ctrl+Alt, W, exec, pkill waybar || waybar"
|
||||
"Ctrl+Alt, W, exec, caelestia shell drawers toggle sidebar"
|
||||
#"$mod, L, exec, swaylock -eFLK -i ${wallpaper}"
|
||||
"$mod, L, exec, caelestia shell lock lock"
|
||||
#"$mod, F11, exec, hyprshot -m window"
|
||||
", F11, exec, caelestia screenshot"
|
||||
#"$mod_SHIFT, S, exec, hyprshot -m region --clipboard only"
|
||||
# "$mod_SHIFT, S, exec, qs ipc call screenshot toggle"
|
||||
"$mod_SHIFT, S, exec, caelestia shell picker open"
|
||||
# framework 16 rgb macropad
|
||||
"Ctrl+$mod, 6, exec, custom-killall" # pos 1 1 killall apps except focused one
|
||||
#"Ctrl+Alt, 7, exec, custom-performance" # pos 2 1 start performance mode
|
||||
"Ctrl+Alt, 7, exec, caelestia shell gameMode toggle"
|
||||
# reloads the autostart programs # pos 3 1
|
||||
# we passed to caelestia-shell and stoped using that
|
||||
/*
|
||||
"Ctrl+$mod, 4, exec, sleep 1 && kitty -o font_size=16 -e sh -c 'custom-weather'"
|
||||
"Ctrl+$mod, 4, exec, sleep 1 && kitty -o font_size=11 -e sh -c 'custom-cowsay'"
|
||||
"Ctrl+$mod, 4, exec, kitty -e 'custom-launch'"
|
||||
"Ctrl+$mod, 4, exec, sleep 1 && kitty -o font_size=5 -e btm --theme gruvbox --disable-click --disable_advanced_kill --enable_cache_memory -g -R -T "
|
||||
"Ctrl+$mod, 4, exec, sleep 1 && kitty -o font_size=1 -e sh -c 'cmatrix -br'"
|
||||
#"Ctrl+Alt, 1, exec, swaync-client -t" # pos 4 1 notification center
|
||||
"Ctrl+Alt, 1, exec, qs ipc call notifications toggle"
|
||||
*/
|
||||
"Ctrl+Alt, 1, exec, caelestia shell drawers toggle sidebar"
|
||||
"Ctrl+$mod, 4, exec, caelestia shell notifs toggleDnd"
|
||||
"Ctrl+$mod, 3, exec, pavucontrol" # pos 1 2 audiocontrol
|
||||
"Ctrl+Shift+Alt, 0, exec, kitty --hold --class \"custom-changeAudioOutput\" --name \"Select audio output\" zsh -c \"custom-changeAudioOutput\"" # pos 2 2 change audio output fzf
|
||||
"Ctrl+$mod, 5, exec, gnome-characters" # pos 3 2 special chars
|
||||
"Ctrl+Alt, 8, exec, hyprpicker | tee >(wl-copy) | cliphist store" # pos 4 2 colorpicker
|
||||
"Ctrl+Alt, 0, exec, custom-tomato" # pos 1 3 pomodoro app
|
||||
"Ctrl+Alt, 2, exec, custom-bottom" # pos 2 3 btm (like htop but cleaner)
|
||||
"Ctrl+Alt, 9, exec, anki"
|
||||
# if hyprexpo plugin enabled bind = $mainMod, Space, hyprexpo:expo, toggle
|
||||
# maybe exec sudo framework-tools-tui
|
||||
|
||||
#plugins keybindings
|
||||
#"$mod, SPACE, overview:toggle, "
|
||||
];
|
||||
binde = [
|
||||
"$mod+Shift, Right, resizeactive, 30 0"
|
||||
"$mod+Shift, Left, resizeactive, -30, 0"
|
||||
"$mod+Shift, Up, resizeactive, 0 -30"
|
||||
"$mod+Shift, Down, resizeactive,m 0 30"
|
||||
];
|
||||
bindl = [
|
||||
", F1, exec, pactl set-sink-mute @DEFAULT_SINK@ toggle" #toggle audio mute
|
||||
", F5, exec, playerctl play-pause" # media F4-F6
|
||||
", F4, exec, playerctl previous"
|
||||
", F6, exec, playerctl next"
|
||||
];
|
||||
bindel = [
|
||||
", F2, exec, pactl set-sink-volume @DEFAULT_SINK@ -10%" # decrease volume
|
||||
", F3, exec, pactl set-sink-volume @DEFAULT_SINK@ +10%" # increase volume
|
||||
", F7, exec, brightnessctl s 10%-" # decrease brightness
|
||||
", F8, exec, brightnessctl s +10%" # increase brightness
|
||||
];
|
||||
bindm = [
|
||||
"$mod, mouse:272, movewindow"
|
||||
"$mod, mouse:273, resizewindow"
|
||||
"$mod, Z, movewindow"
|
||||
"$mod, X, resizewindow"
|
||||
];
|
||||
# █░░ ▄▀█ █░█ █▄░█ █▀▀ █░█
|
||||
# █▄▄ █▀█ █▄█ █░▀█ █▄▄ █▀█
|
||||
exec-once = [
|
||||
"dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP" # for XDPH
|
||||
"dbus-update-activation-environment --systemd --all" # for XDPH
|
||||
"systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP" # for XDPH
|
||||
"systemctl --user start xdg-desktop-portal-wlr.service"
|
||||
"blueman-applet" # systray app for Bluetooth
|
||||
"udiskie --no-automount --smart-tray" # front-end that allows to manage removable media
|
||||
"nm-applet --indicator" # systray app for Network/wifi
|
||||
#setups clipboard
|
||||
"rm -rf ~/.cache/cliphist/ && wl-paste --type text --watch cliphist store & wl-paste --type image --watch cliphist store"
|
||||
#"wl-paste --type text --watch cliphist store" # clipboard store text data
|
||||
#"wl-paste --type image --watch cliphist store" # clipboard store image data
|
||||
"custom-batterynotify"
|
||||
"custom-batterywarning"
|
||||
#"birdtray" # thunderbird tray app # curently broken
|
||||
#wallpapers/b
|
||||
"swww img ${wallpaper}"
|
||||
"swww-daemon"
|
||||
"sleep 1 && custom-wallpaper"
|
||||
"custom-checkKdrive && custom-mountkdrive" # checks if the remote works and mount it
|
||||
#"waybar"
|
||||
"custom-gitnotify"
|
||||
"custom-checkMatrix" # checks if matrix-commander-rs is connected which is important for other stuff
|
||||
#"custom-obsidianbackup" # backups the obsidian notes to kdrive and to a timed hidden dir (~/.Notes.backup/)
|
||||
#"QS-notifycache" # builds the cache that will be used for the notification history
|
||||
"sleep 4 & caelestia-shell" #works better if it sleeps a bit before
|
||||
/*
|
||||
We stopped using that ######################### maybe we should desactivate those scripts
|
||||
# login autostart
|
||||
#######################
|
||||
"[workspace 1 silent] sleep 1 && kitty -o font_size=16 -e sh -c 'custom-weather'"
|
||||
"[workspace 1 silent] sleep 1 && kitty -o font_size=11 -e sh -c 'custom-cowsay'"
|
||||
"[workspace 1 silent] kitty -e 'custom-launch'"
|
||||
"[workspace 1 silent] sleep 1 && kitty -o font_size=5 -e btm --theme gruvbox --disable-click --disable_advanced_kill --enable_cache_memory -g -R -T "
|
||||
"[workspace 1 silent] sleep 1 && kitty -o font_size=1 -e sh -c 'cmatrix -br'"
|
||||
######################
|
||||
######################
|
||||
*/
|
||||
];
|
||||
splash = true; # remove default background on startup
|
||||
# gestures (also keybindings)
|
||||
gesture = [
|
||||
"3, right, move, +col"
|
||||
"3, left, move, -col"
|
||||
];
|
||||
|
||||
# █░░ ▄▀█ █▄█ █▀█ █░█ ▀█▀ █▀
|
||||
# █▄▄ █▀█ ░█░ █▄█ █▄█ ░█░ ▄█
|
||||
|
||||
dwindle = {
|
||||
preserve_split = true;
|
||||
};
|
||||
scrolling = {
|
||||
column_width = 0.45;
|
||||
};
|
||||
|
||||
# █▀▄▀█ █ █▀ █▀▀
|
||||
# █░▀░█ █ ▄█ █▄▄
|
||||
|
||||
misc = {
|
||||
vrr = 0;
|
||||
force_default_wallpaper = 0;
|
||||
};
|
||||
xwayland = {
|
||||
force_zero_scaling = true;
|
||||
};
|
||||
|
||||
# █▀▄▀█ █▀█ █▄░█ █ ▀█▀ █▀█ █▀█
|
||||
# █░▀░█ █▄█ █#░▀█ █ ░█░ █▄█ █▀▄
|
||||
monitor = [
|
||||
#",preferred, auto, auto"
|
||||
"HDMI-A-1, highres2highrr, auto-left, 1"
|
||||
];
|
||||
# _______ ___ __ __ _______ ___ __ _ _______
|
||||
#| || | | | | || || | | | | || |
|
||||
#| _ || | | | | || ___|| | | |_| || _____|
|
||||
#| |_| || | | |_| || | __ | | | || |_____
|
||||
#| ___|| |___ | || || || | | _ ||_____ |
|
||||
#| | | || || |_| || | | | | | _____| |
|
||||
#|___| |_______||_______||_______||___| |_| |__||_______|
|
||||
#
|
||||
"plugin:dynamic-cursors" = {
|
||||
enabled = true;
|
||||
threshold = 2;
|
||||
mode = "rotate";
|
||||
rotate = {
|
||||
# length in px of the simulated stick used to rotate the cursor
|
||||
# most realistic if this is your actual cursor size
|
||||
length = 20;
|
||||
offset = 0;
|
||||
};
|
||||
shake = {
|
||||
enabled = true;
|
||||
# use nearest-neighbour (pixelated) scaling when shaking
|
||||
# may look weird when effects are enabled
|
||||
nearest = true;
|
||||
threshold = 4;
|
||||
# magnification level immediately after shake start
|
||||
base = 4.0;
|
||||
# magnification increase per second when continuing to shake
|
||||
speed = 4.0;
|
||||
# how much the speed is influenced by the current shake intensitiy
|
||||
influence = 0.0;
|
||||
|
||||
# maximal magnification the cursor can reach
|
||||
# values below 1 disable the limit (e.g. 0)
|
||||
limit = 0.0;
|
||||
|
||||
# time in millseconds the cursor will stay magnified after a shake has ended
|
||||
timeout = 2000;
|
||||
|
||||
# show cursor behaviour `tilt`, `rotate`, etc. while shaking
|
||||
effects = true;
|
||||
|
||||
# enable ipc events for shake
|
||||
ipc = false;
|
||||
};
|
||||
};
|
||||
"plugin:overview" = {
|
||||
disableGestures = true;
|
||||
showEmptyWorkspace = true;
|
||||
workspaceActiveBorder = "rgb(ab7746)";
|
||||
disableBlur = true;
|
||||
};
|
||||
|
||||
#####################################################
|
||||
#####################################################
|
||||
# theme
|
||||
decoration = {
|
||||
dim_special = 0.3;
|
||||
rounding = 18;
|
||||
blur = {
|
||||
special = true;
|
||||
enabled = true;
|
||||
size = 4;
|
||||
passes = 2;
|
||||
new_optimizations = true;
|
||||
ignore_opacity = true;
|
||||
};
|
||||
};
|
||||
general = {
|
||||
gaps_in = 5;
|
||||
gaps_out = 15;
|
||||
border_size = 4;
|
||||
"col.active_border" = "rgba(ca6702ff) rgba(ecd3a0ff) 45deg";
|
||||
"col.inactive_border" = "rgba(f1dca7d9) rgba(ffe1a8d9) 45deg";
|
||||
layout = "dwindle";
|
||||
resize_on_border = true;
|
||||
};
|
||||
group = {
|
||||
"col.border_active" = "rgba(ca6702ff) rgba(ecd3a0ff) 45deg";
|
||||
"col.border_inactive" = "rgba(f1dca7d9) rgba(ffe1a8d9) 45deg";
|
||||
"col.border_locked_active" = "rgba(ca6702ff) rgba(ecd3a0ff) 45deg";
|
||||
"col.border_locked_inactive" = "rgba(f1dca7d9) rgba(ffe1a8d9) 45deg";
|
||||
};
|
||||
####################################################
|
||||
##################################################
|
||||
|
||||
# /$$ /$$ /$$
|
||||
#| $$ /$ | $$ | $$
|
||||
#| $$ /$$$| $$ /$$$$$$ /$$$$$$ | $$ /$$ /$$$$$$$ /$$$$$$ /$$$$$$ /$$$$$$$ /$$$$$$
|
||||
#| $$/$$ $$ $$ /$$__ $$ /$$__ $$| $$ /$$/ /$$_____/ /$$__ $$ |____ $$ /$$_____/ /$$__ $$
|
||||
#| $$$$_ $$$$| $$ \ $$| $$ \__/| $$$$$$/ | $$$$$$ | $$ \ $$ /$$$$$$$| $$ | $$$$$$$$
|
||||
#| $$$/ \ $$$| $$ | $$| $$ | $$_ $$ \____ $$| $$ | $$ /$$__ $$| $$ | $$_____/
|
||||
#| $$/ \ $$| $$$$$$/| $$ | $$ \ $$ /$$$$$$$/| $$$$$$$/| $$$$$$$| $$$$$$$| $$$$$$$
|
||||
#|__/ \__/ \______/ |__/ |__/ \__/|_______/ | $$____/ \_______/ \_______/ \_______/
|
||||
# | $$
|
||||
# | $$
|
||||
# |__/
|
||||
# see https://wiki.hypr.land/Configuring/Workspace-Rules/
|
||||
workspace = [
|
||||
"1, layout:master"
|
||||
"2, layout:scrolling, layoutopt:direction:right"
|
||||
"name:special, layout:scrolling"
|
||||
# used for smart gaps along some windowrules
|
||||
#"w[tv1], gapsout:1, gapsin:1"
|
||||
#"f[1], gapsout:1, gapsin:1"
|
||||
];
|
||||
|
||||
# █░█░█ █ █▄░█ █▀▄ █▀█ █░█░█ █▀█ █░█ █░░ █▀▀ █▀
|
||||
# ▀▄▀▄▀ █ █░▀█ █▄▀ █▄█ ▀▄▀▄▀ █▀▄ █▄█ █▄▄ ██▄ ▄█
|
||||
windowrule = [
|
||||
"opacity 0.90 0.90, match:class ^(firefox)$"
|
||||
"opacity 0.90 0.90, match:class ^(Brave-browser)$"
|
||||
"opacity 0.80 0.80, match:class ^(code-oss)$"
|
||||
"opacity 0.80 0.80, match:class ^(Code)$"
|
||||
"opacity 0.80 0.80, match:class ^(code-url-handler)$"
|
||||
"opacity 0.80 0.80, match:class ^(code-insiders-url-handler)$"
|
||||
"opacity 0.75 0.75, match:class ^(kitty)$"
|
||||
"opacity 0.80 0.80, match:class ^(org.kde.dolphin)$"
|
||||
"opacity 0.80 0.80, float on, match:class ^(org.kde.ark)$"
|
||||
"opacity 0.80 0.80, float on, match:class ^(nwg-look)$"
|
||||
"opacity 0.80 0.80, float on, match:class ^(qt5ct)$"
|
||||
"opacity 0.80 0.80, float on, match:class ^(qt6ct)$"
|
||||
"opacity 0.80 0.80, float on, match:class ^(kvantummanager)$"
|
||||
"opacity 0.80 0.70, float on, match:class ^(org.pulseaudio.pavucontrol)$"
|
||||
"opacity 0.80 0.70, float on, match:class ^(blueman-manager)$"
|
||||
"opacity 0.80 0.70, float on, match:class ^(nm-applet)$"
|
||||
"opacity 0.80 0.70, float on, match:class ^(nm-connection-editor)$"
|
||||
"opacity 0.80 0.70, float on, match:class ^(org.kde.polkit-kde-authentication-agent-1)$"
|
||||
"opacity 0.80 0.70, match:class ^(polkit-gnome-authentication-agent-1)$"
|
||||
"opacity 0.80 0.70, match:class ^(org.freedesktop.impl.portal.desktop.gtk)$"
|
||||
"opacity 0.80 0.70, match:class ^(org.freedesktop.impl.portal.desktop.hyprland)$"
|
||||
"opacity 0.70 0.70, match:class ^([Ss]team)$"
|
||||
"opacity 0.70 0.70, match:class ^(steamwebhelper)$"
|
||||
"opacity 0.70 0.70, match:class ^(Spotify)$"
|
||||
"opacity 0.70 0.70, match:initial_title ^(Spotify Free)$"
|
||||
"opacity 0.90 0.90, float on, match:class ^(com.github.rafostar.Clapper)$"
|
||||
"opacity 0.80 0.80, match:class ^(com.github.tchx84.Flatseal)$"
|
||||
"opacity 0.80 0.80, match:class ^(hu.kramo.Cartridges)$"
|
||||
"opacity 0.80 0.80, match:class ^(com.obsproject.Studio)$"
|
||||
"opacity 0.80 0.80, match:class ^(gnome-boxes)$"
|
||||
"opacity 0.80 0.80, match:class ^(discord)$"
|
||||
"opacity 0.80 0.80, match:class ^(WebCord)$"
|
||||
"opacity 0.80 0.80, match:class ^(ArmCord)$"
|
||||
"opacity 0.80 0.80, float on, match:class ^(app.drey.Warp)$"
|
||||
"opacity 0.80 0.80, float on, match:class ^(net.davidotek.pupgui2)$"
|
||||
"opacity 0.80 0.80, float on, match:class ^(yad)$"
|
||||
"opacity 0.80 0.80, float on, match:class ^(Signal)$"
|
||||
"opacity 0.80 0.80, float on, match:class ^(io.github.alainm23.planify)$"
|
||||
"opacity 0.80 0.80, float on, match:class ^(io.gitlab.theevilskeleton.Upscaler)$"
|
||||
"opacity 0.80 0.80, float on, match:class ^(com.github.unrud.VideoDownloader)$"
|
||||
"opacity 0.80 0.80, float on, match:class ^(io.gitlab.adhami3310.Impression)$"
|
||||
"opacity 0.80 0.80, float on, match:class ^(io.missioncenter.MissionCenter)$"
|
||||
"opacity 0.80 0.80, match:class ^(io.github.flattool.Warehouse)$"
|
||||
"float on, match:class ^(org.kde.dolphin)$, match:title ^(Progress Dialog — Dolphin)$"
|
||||
"float on, match:class ^(org.kde.dolphin)$, match:title ^(Copying — Dolphin)$"
|
||||
"float on, match:class ^(firefox)$, match:title ^(Picture-in-Picture)$"
|
||||
"float on, match:class ^(firefox)$, match:title ^(Library)$"
|
||||
"float on, match:class ^(kitty)$, match:title ^(top)$"
|
||||
"float on, match:class ^(kitty)$, match:title ^(btop)$"
|
||||
"float on, match:class ^(kitty)$, match:title ^(htop)$"
|
||||
"float on, match:class ^(vlc)$"
|
||||
"float on, match:class ^(eog)$"
|
||||
"float on, size 400 225, match:class ^(custom-librewolfprofiles)$"
|
||||
"float on, size 1050 200, match:class ^(custom-changeAudioOutput)$"
|
||||
"float on, size 400 175, match:class ^(custom-obsidianvaults)$"
|
||||
"float on, size 600 600, match:initial_class ^(custom-pomodoro)$"
|
||||
"float on, size 1500 800, match:initial_class ^(custom-bottom)$"
|
||||
# smart gaps/border is ugly with caelestia-shell
|
||||
#"border_size 2, match:float 0, match:workspace w[tv1]"
|
||||
#"rounding 1, match:float 0, match:workspace w[tv1]"
|
||||
#"border_size 2, match:float 0, match:workspace f[1]"
|
||||
#"rounding 1, match:float 0, match:workspace f[1]"
|
||||
];
|
||||
# add a float for tomato when in kitty
|
||||
#"plugin:imgborders:noimgborders, tag:noborder"
|
||||
layerrule = [
|
||||
"blur on, ignore_alpha 0, match:namespace rofi"
|
||||
"blur on, ignore_alpha 0, match:namespace notifications"
|
||||
"blur on, ignore_alpha 0, match:namespace swaync-notification-window"
|
||||
"blur on, ignore_alpha 0, match:namespace swaync-control-center"
|
||||
"blur on, match:namespace logout_dialog"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,101 @@
|
||||
{ self, ...}: {
|
||||
# -----------------------------------------------------
|
||||
# Here are a bunch of scripts that interact with hyprland
|
||||
# Some are still used. Some are broken. Some are deprecated. But I do still keep them in case I want to go back to old tools
|
||||
# -----------------------------------------------------
|
||||
# kills the app, but when it's steam or custom-pomodoro
|
||||
flake.packages.custom-dontkillsteam = { pkgs, ... }:
|
||||
pkgs.writeShellApplication {
|
||||
name = "custom-dontkillsteam";
|
||||
runtimeInputs = with pkgs; [
|
||||
hyprland
|
||||
jq
|
||||
];
|
||||
text = ''
|
||||
class=$(hyprctl activewindow -j | jq -r ".class")
|
||||
if [[ "$class" == "Steam" || "$class" == "custom-pomodoro" ]]; then
|
||||
hyprctl dispatch movetoworkspacesilent special
|
||||
else
|
||||
hyprctl dispatch killactive ""
|
||||
fi
|
||||
|
||||
'';
|
||||
};
|
||||
flake.packages.custom-killall = { pkgs, pkgs-unstable, ...}:
|
||||
pkgs.writeShellApplication {
|
||||
name = "custom-killall";
|
||||
runtimeInputs = with pkgs; [
|
||||
pkgs-unstable.hyprland
|
||||
jq
|
||||
];
|
||||
text = ''
|
||||
active_workspace_id=$(hyprctl activeworkspace -j | jq -r '.id')
|
||||
|
||||
hyprctl clients -j |
|
||||
jq -r ".[]
|
||||
| select(.workspace.id==''${active_workspace_id})
|
||||
| select(.focusHistoryID!=0)
|
||||
| .pid" |
|
||||
xargs -r kill
|
||||
'';
|
||||
};
|
||||
flake.packages.custom-wallpaper = { pkgs, ... }:
|
||||
let
|
||||
wallpaper1 = ../../assets/wallpaper1.jpg;
|
||||
wallpaper2 = ../../assets/wallpaper2.jpg;
|
||||
wallpaper3 = ../../assets/wallpaper3.jpg;
|
||||
wallpaper4 = ../../assets/wallpaper4.jpg;
|
||||
wallpaper5 = ../../assets/wallpaper5.jpg;
|
||||
in
|
||||
pkgs.writeShellApplication {
|
||||
name = "custom-wallpaper";
|
||||
runtimeInputs = with pkgs; [
|
||||
socat
|
||||
swww
|
||||
];
|
||||
text = ''
|
||||
handle() {
|
||||
case $1 in
|
||||
workspace*)
|
||||
str=$1
|
||||
i=$((''${#str}-1))
|
||||
workspace="''${str:$i:1}"
|
||||
case $workspace in
|
||||
1 | 6)
|
||||
swww img -t none ${wallpaper1}
|
||||
;;
|
||||
2 | 7)
|
||||
swww img -t none ${wallpaper2}
|
||||
;;
|
||||
3 | 8)
|
||||
swww img -t none ${wallpaper3}
|
||||
;;
|
||||
4 | 9)
|
||||
swww img -t none ${wallpaper4}
|
||||
;;
|
||||
5 | 10 | 0)
|
||||
swww img -t none ${wallpaper5}
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
socat -U - UNIX-CONNECT:"$XDG_RUNTIME_DIR"/hypr/"$HYPRLAND_INSTANCE_SIGNATURE"/.socket2.sock | while read -r line; do handle "$line"; done
|
||||
'';
|
||||
};
|
||||
flake.packages.custom-launch = { pkgs, ... }:
|
||||
pkgs.writeShellApplication {
|
||||
# used for the terminal autostart. Needs to get cleared and recall fastfetch so that the bar from oh-my-zsh get resized
|
||||
# unused
|
||||
name = "custom-launch";
|
||||
runtimeInputs = with pkgs; [
|
||||
zsh
|
||||
];
|
||||
text = ''
|
||||
sleep 2
|
||||
clear
|
||||
zsh
|
||||
'';
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
{ self, ... }: {
|
||||
flake.nixosModules.kdrive = { pkgs-unstable, ... }: {
|
||||
environment.systemPackages = with pkgs-unstable; [
|
||||
rclone
|
||||
self.packages.${pkgs.system}.custom-checkKdrive
|
||||
self.packages.${pkgs.system}.custom-mountkdrive
|
||||
];
|
||||
# removes rclone error
|
||||
programs.fuse = {
|
||||
userAllowOther = true;
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
flake.packages.custom-checkKdrive = { pkgs, ... }:
|
||||
pkgs.writeShellApplication {
|
||||
name = "custom-checkKdrive";
|
||||
runtimeInputs = with pkgs; [
|
||||
rclone
|
||||
matrix-commander-rs
|
||||
libnotify
|
||||
];
|
||||
text = ''
|
||||
|
||||
# waits for an internet connection. It pings both Google DNS and Cloudfare dns in case one of them is down
|
||||
until ping -c1 -W1 1.1.1.1 >/dev/null 2>&1 || \
|
||||
ping -c1 -W1 8.8.8.8 >/dev/null 2>&1
|
||||
do
|
||||
sleep 1
|
||||
done
|
||||
|
||||
set +e
|
||||
|
||||
output=$(rclone lsd kdrive: 2>&1)
|
||||
status=$?
|
||||
|
||||
set -e
|
||||
|
||||
if [ $status -eq 0 ]; then
|
||||
echo "kdrive OK"
|
||||
else
|
||||
echo "kdrive rclone failed with error: $output"
|
||||
notify-send "rclone kdrive failed" "$output"
|
||||
matrix-commander-rs --verbose -m "rclone kdrive failed.<br>Error: <pre>$output</pre><br><a href=\"https://matrix.to/#/@notificationbot_0000:matrix.org\">@notificationbot_0000</a>" \
|
||||
--html \
|
||||
-r "\!7j-78_02dHROeLj4Ns8F12eo4IiZGv4zNsQ_1-WlyIU"
|
||||
fi
|
||||
'';
|
||||
};
|
||||
flake.packages.custom-mountkdrive = { pkgs, ... }:
|
||||
pkgs.writeShellApplication {
|
||||
name = "custom-mountkdrive";
|
||||
runtimeInputs = with pkgs; [
|
||||
rclone
|
||||
libnotify
|
||||
];
|
||||
text = ''
|
||||
REMOTE_NAME="kdrive"
|
||||
MOUNT_POINT="$HOME/kdrive"
|
||||
|
||||
if rclone listremotes | rg "^''${REMOTE_NAME}:"; then
|
||||
echo "Mounting ''${REMOTE_NAME}..."
|
||||
rclone mount "''${REMOTE_NAME}:" "$MOUNT_POINT" --vfs-cache-mode writes --allow-non-empty &
|
||||
else
|
||||
notify-send "rclone mount failed" \
|
||||
"Remote ''${REMOTE_NAME} not found.\nConfigure rclone and create the dir ~/kdrive/ or comment out the exec line in hyprland.nix."
|
||||
echo "Remote ''${REMOTE_NAME} not found. Configure rclone or comment out the exec line in hyprland.nix."
|
||||
fi
|
||||
'';
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,123 @@
|
||||
{ ... }: {
|
||||
flake.homeModules.kitty = { ... }: {
|
||||
programs.kitty = {
|
||||
enable = true;
|
||||
#font.name = nerd-fonts._0xproto;
|
||||
#font.size = "10";
|
||||
## new config (matches with caelestia
|
||||
## old condfig
|
||||
extraConfig = ''
|
||||
font_size 14
|
||||
bold_font auto
|
||||
italic_font auto
|
||||
bold_italic_font auto
|
||||
|
||||
window_padding_width 25
|
||||
|
||||
# --- Core ---
|
||||
foreground #ece0d9
|
||||
background #18120e
|
||||
|
||||
selection_foreground #18120e
|
||||
selection_background #ece0d9
|
||||
|
||||
cursor #ffb878
|
||||
cursor_text_color #18120e
|
||||
|
||||
# --- Tabs ---
|
||||
active_tab_foreground #18120e
|
||||
active_tab_background #5c412a
|
||||
inactive_tab_foreground #d6c3b5
|
||||
inactive_tab_background #241e1a
|
||||
|
||||
# --- Black / Gray ---
|
||||
color0 #353433
|
||||
color8 #b29f91
|
||||
|
||||
# --- Red ---
|
||||
color1 #e17300
|
||||
color9 #ff8a20
|
||||
|
||||
# --- Green ---
|
||||
color2 #ffc071
|
||||
color10 #ffd6a8
|
||||
|
||||
# --- Yellow ---
|
||||
color3 #ffe0c6
|
||||
color11 #fff2e8
|
||||
|
||||
# --- Blue ---
|
||||
color4 #b9ab66
|
||||
color12 #d7be91
|
||||
|
||||
# --- Magenta ---
|
||||
color5 #ed9562
|
||||
color13 #fcad7e
|
||||
|
||||
# --- Cyan ---
|
||||
color6 #f4c16d
|
||||
color14 #ffd497
|
||||
|
||||
# --- White ---
|
||||
color7 #ebd4c1
|
||||
color15 #FFFFFF
|
||||
'';
|
||||
/*
|
||||
extraConfig = ''
|
||||
# font nerd-fonts._0xproto # this key dont work and causes errors
|
||||
font_size 14
|
||||
bold_font auto
|
||||
italic_font auto
|
||||
bold_italic_font auto
|
||||
window_padding_width 25
|
||||
foreground #FFFFFF
|
||||
background #1B1D1C
|
||||
selection_foreground #1B1D1C
|
||||
selection_background #FFFFFF
|
||||
cursor #C3AC76
|
||||
cursor_text_color #0F1010
|
||||
|
||||
active_tab_foreground #1B1D1C
|
||||
active_tab_background #6B5540
|
||||
inactive_tab_foreground #6B5540
|
||||
inactive_tab_background #1B1D1C
|
||||
|
||||
# black
|
||||
color0 #29523D
|
||||
color8 #578F73
|
||||
|
||||
# red
|
||||
#color1 #FFF0CC
|
||||
#color9 #F0DBAA
|
||||
# we need actual red colors
|
||||
color1 #CC241D
|
||||
color9 #9D0006
|
||||
|
||||
# green
|
||||
color2 #FFEECC
|
||||
color10 #F0D9AA
|
||||
|
||||
# yellow
|
||||
color3 #FFE5CC
|
||||
color11 #F0CCAA
|
||||
|
||||
# blue
|
||||
color4 #9AE6C0
|
||||
color12 #9AE6C0
|
||||
|
||||
# magenta
|
||||
color5 #E6CC9A
|
||||
color13 #E6CC9A
|
||||
|
||||
# cyan
|
||||
color6 #E6BF9A
|
||||
color14 #E6BF9A
|
||||
|
||||
# white
|
||||
color7 #FFF0CC
|
||||
color15 #F0DBAA
|
||||
'';
|
||||
*/
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,96 @@
|
||||
{ ... }: {
|
||||
flake.nixosModules.ly = { ... }: {
|
||||
# a minimal ly config as the big config (ly.nix) didnt worked
|
||||
services.displayManager.ly = {
|
||||
enable = true;
|
||||
settings = {
|
||||
# Core animation
|
||||
animation = "none"; # none or doom or matrix or gameoflife or a dur file
|
||||
# Ly supports 24-bit true color with styling, which means each color is a 32-bit value.
|
||||
# The format is 0xSSRRGGBB, where SS is the styling, RR is red, GG is green, and BB is blue.
|
||||
# Here are the possible styling options:
|
||||
# TB_BOLD 0x01000000
|
||||
# TB_UNDERLINE 0x02000000
|
||||
# TB_REVERSE 0x04000000
|
||||
# TB_ITALIC 0x08000000
|
||||
# TB_BLINK 0x10000000
|
||||
# TB_HI_BLACK 0x20000000
|
||||
# TB_BRIGHT 0x40000000
|
||||
# TB_DIM 0x80000000
|
||||
# Programmatically, you'd apply them using the bitwise OR operator (|), but because Ly's
|
||||
# configuration doesn't support using it, you have to manually compute the color value.
|
||||
# Note that, if you want to use the default color value of the terminal, you can use the
|
||||
# special value 0x00000000. This means that, if you want to use black, you *must* use
|
||||
# the styling option TB_HI_BLACK (the RGB values are ignored when using this option).
|
||||
# Basic TUI settings
|
||||
clear_password = true;
|
||||
default_input = "password";
|
||||
fg = "0x01cd6400";
|
||||
full_color = true;
|
||||
hide_borders = false;
|
||||
hide_key_hints = false;
|
||||
hide_keyboard_locks = true;
|
||||
hide_version_string = false;
|
||||
input_len = 34;
|
||||
lang = "en";
|
||||
numlock = false;
|
||||
save = true;
|
||||
service_name = "ly";
|
||||
|
||||
bigclock = "en";
|
||||
clock = "%H:%M";
|
||||
|
||||
colormix_col1 = "0x08E85D04";
|
||||
colormix_col2 = "0x08FABD2F";
|
||||
colormix_col3 = "0x08FE8019";
|
||||
|
||||
# Box appearance
|
||||
#border_fg = "0x00FFFFFF";
|
||||
blank_box = true;
|
||||
box_title = "tomasr@nixos";
|
||||
#margin_box_h = 2;
|
||||
#margin_box_v = 1;
|
||||
#text_in_center = false;
|
||||
|
||||
# Animation: Conway’s Game of Life (optional, comment out for minimal setup)
|
||||
gameoflife_fg = "0x40FFFFFF";
|
||||
|
||||
gameoflife_frame_delay = 3;
|
||||
gameoflife_entropy_interval = 10;
|
||||
gameoflife_initial_density = 0.666;
|
||||
|
||||
# Optional commands (leave null or comment if unused)
|
||||
hibernate_cmd = null;
|
||||
inactivity_cmd = null;
|
||||
login_cmd = "start-hyprland";
|
||||
#logout_cmd = null;
|
||||
sleep_cmd = null;
|
||||
|
||||
# System commands keys
|
||||
shutdown_cmd = "/sbin/shutdown $PLATFORM_SHUTDOWN_ARG now";
|
||||
shutdown_key = "F1";
|
||||
restart_key = "F2";
|
||||
sleep_key = "F3";
|
||||
hibernate_key = "F4";
|
||||
|
||||
# top bar
|
||||
session_log = null;
|
||||
initial_info_text = null; #
|
||||
# Custom sessions
|
||||
#custom_sessions = "$CONFIG_DIRECTORY/ly/custom-sessions";
|
||||
#waylandsessions = "$PREFIX_DIRECTORY/share/wayland-sessions";
|
||||
#xsessions = "$PREFIX_DIRECTORY/share/xsessions";
|
||||
|
||||
# Xorg settings (only needed if using X)
|
||||
#x_cmd = "$PREFIX_DIRECTORY/bin/X";
|
||||
#x_vt = null;
|
||||
#xauth_cmd = "$PREFIX_DIRECTORY/bin/xauth";
|
||||
#xinitrc = "~/.xinitrc";
|
||||
|
||||
# Setup / startup scripts
|
||||
#setup_cmd = "$CONFIG_DIRECTORY/ly/setup.sh";
|
||||
#start_cmd = "$CONFIG_DIRECTORY/ly/startup.sh";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
{ inputs, ... }: {
|
||||
flake.hostModules.micro = { pkgs-unstable, ... }: {
|
||||
programs.micro = {
|
||||
enable = true;
|
||||
package = pkgs-unstable.micro-full;
|
||||
settings = {
|
||||
};
|
||||
};
|
||||
home.file.".config/micro/plug/vivify" = {
|
||||
enable = true;
|
||||
source = inputs.microPlugins-vivify;
|
||||
recursive = true;
|
||||
force = true;
|
||||
};
|
||||
home.file.".config/micro/init.lua" = {
|
||||
enable = true;
|
||||
force = true;
|
||||
text = ''
|
||||
local buffer = import("micro/buffer")
|
||||
local shell = import("micro/shell")
|
||||
|
||||
function vivifyOpen(buf)
|
||||
local cursor = buf:GetActiveCursor()
|
||||
local line = cursor.Loc.Y + 1
|
||||
|
||||
shell.ExecCommand("viv", string.format("%s:%d", buf.AbsPath, line))
|
||||
end
|
||||
|
||||
function onBufferOpen(buf)
|
||||
if os.getenv("MICRO_VIVIFY") ~= "1" then
|
||||
return
|
||||
end
|
||||
|
||||
-- only run for real files (not help/log/etc)
|
||||
if buf.Type.Kind == buffer.BTDefault then
|
||||
vivifyOpen(buf)
|
||||
end
|
||||
end
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
{ ... }: {
|
||||
flake.nixosModules.mullvad = {pkgs-unstable, ...}: {
|
||||
services.mullvad-vpn = {
|
||||
enable = true;
|
||||
package = pkgs-unstable.mullvad-vpn;
|
||||
};
|
||||
};
|
||||
flake.homeModules.mullvad = {pkgs-unstable, ...}: {
|
||||
programs.mullvad-vpn = {
|
||||
# gui
|
||||
enable = true;
|
||||
package = pkgs-unstable.mullvad-vpn;
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,501 @@
|
||||
{ ... }: {
|
||||
flake.homeModules.neovim = {pkgs-unstable, ...}: {
|
||||
programs.neovim = {
|
||||
enable = true;
|
||||
vimAlias = false;
|
||||
viAlias = false;
|
||||
package = pkgs-unstable.neovim-unwrapped; # required for unwrapped version
|
||||
plugins = [
|
||||
pkgs-unstable.vimPlugins.vivify-vim
|
||||
pkgs-unstable.vimPlugins.vimtex
|
||||
pkgs-unstable.vimPlugins.zoxide-vim
|
||||
#pkgs-unstable.vimPlugins.gruvbox
|
||||
pkgs-unstable.vimPlugins.gruvbox-nvim
|
||||
pkgs-unstable.vimPlugins.neovim-sensible
|
||||
pkgs-unstable.vimPlugins.nvim-web-devicons
|
||||
pkgs-unstable.vimPlugins.nvim-tree-lua
|
||||
pkgs-unstable.vimPlugins.nvim-surround
|
||||
pkgs-unstable.vimPlugins.floaterm
|
||||
pkgs-unstable.vimPlugins.nvim-lspconfig
|
||||
pkgs-unstable.vimPlugins.cmp-nvim-lsp
|
||||
pkgs-unstable.vimPlugins.cmp-nvim-lsp-signature-help
|
||||
pkgs-unstable.vimPlugins.cmp-under-comparator
|
||||
pkgs-unstable.vimPlugins.cmp-buffer
|
||||
pkgs-unstable.vimPlugins.cmp-path
|
||||
pkgs-unstable.vimPlugins.cmp-cmdline
|
||||
pkgs-unstable.vimPlugins.nvim-cmp
|
||||
pkgs-unstable.vimPlugins.cmp-vsnip
|
||||
pkgs-unstable.vimPlugins.vim-vsnip
|
||||
pkgs-unstable.vimPlugins.dashboard-nvim
|
||||
pkgs-unstable.vimPlugins.lualine-nvim
|
||||
pkgs-unstable.vimPlugins.vim-nix
|
||||
pkgs-unstable.vimPlugins.plenary-nvim
|
||||
pkgs-unstable.vimPlugins.blink-ripgrep-nvim
|
||||
pkgs-unstable.vimPlugins.nvim-treesitter
|
||||
pkgs-unstable.vimPlugins.nvim-treesitter-parsers.rasi
|
||||
pkgs-unstable.vimPlugins.nvim-treesitter-parsers.regex
|
||||
pkgs-unstable.vimPlugins.nvim-treesitter-parsers.udev
|
||||
pkgs-unstable.vimPlugins.nvim-treesitter-parsers.zsh
|
||||
pkgs-unstable.vimPlugins.nvim-treesitter-parsers.c
|
||||
pkgs-unstable.vimPlugins.nvim-treesitter-parsers.bibtex
|
||||
pkgs-unstable.vimPlugins.nvim-treesitter-parsers.bash
|
||||
pkgs-unstable.vimPlugins.nvim-treesitter-parsers.gitignore
|
||||
pkgs-unstable.vimPlugins.nvim-treesitter-parsers.comment
|
||||
pkgs-unstable.vimPlugins.nvim-treesitter-parsers.json
|
||||
pkgs-unstable.vimPlugins.nvim-treesitter-parsers.hyprlang
|
||||
pkgs-unstable.vimPlugins.nvim-treesitter-parsers.lua
|
||||
pkgs-unstable.vimPlugins.nvim-treesitter-parsers.latex
|
||||
pkgs-unstable.vimPlugins.nvim-treesitter-parsers.kitty
|
||||
pkgs-unstable.vimPlugins.nvim-treesitter-parsers.markdown
|
||||
pkgs-unstable.vimPlugins.nvim-treesitter-parsers.nix
|
||||
pkgs-unstable.vimPlugins.nvim-treesitter-parsers.printf
|
||||
pkgs-unstable.vimPlugins.nvim-treesitter-parsers.python
|
||||
pkgs-unstable.vimPlugins.telescope-nvim
|
||||
pkgs-unstable.vimPlugins.nvim-scrollbar
|
||||
pkgs-unstable.vimPlugins.promise-async
|
||||
pkgs-unstable.vimPlugins.nvim-ufo
|
||||
pkgs-unstable.vimPlugins.cheatsheet-nvim
|
||||
pkgs-unstable.vimPlugins.popup-nvim
|
||||
pkgs-unstable.vimPlugins.vim-visual-multi
|
||||
pkgs-unstable.vimPlugins.fugit2-nvim
|
||||
pkgs-unstable.vimPlugins.nvim-lastplace
|
||||
pkgs-unstable.vimPlugins.runner-nvim # terminal
|
||||
pkgs-unstable.vimPlugins.better-diagnostic-virtual-text
|
||||
pkgs-unstable.vimPlugins.garbage-day-nvim
|
||||
];
|
||||
extraLuaConfig = ''
|
||||
|
||||
local vim = vim
|
||||
|
||||
-- =========================
|
||||
-- LEADER & KEY DISABLE
|
||||
-- =========================
|
||||
vim.g.mapleader = ' '
|
||||
vim.g.maplocalleader = ' '
|
||||
vim.keymap.set({'n', 'v'}, '<Space>', '<Nop>', { desc = 'Leader key, disable default behavior' })
|
||||
vim.keymap.set('n', 'q', '<Nop>', { desc = 'Disable macro recording' })
|
||||
vim.keymap.set('n', 'gg', '<Nop>', { desc = 'Disable g motion' })
|
||||
vim.keymap.set('n', 'gG', '<Nop>', { desc = 'Disable g motion' })
|
||||
vim.keymap.set('n', 'g0', '<Nop>', { desc = 'Disable g motion' })
|
||||
vim.keymap.set('n', 'g^', '<Nop>', { desc = 'Disable g motion' })
|
||||
vim.keymap.set('n', 'g$', '<Nop>', { desc = 'Disable g motion' })
|
||||
vim.keymap.set('n', 'gj', '<Nop>', { desc = 'Disable g motion' })
|
||||
vim.keymap.set('n', 'gk', '<Nop>', { desc = 'Disable g motion' })
|
||||
vim.keymap.set('n', 'g~', '<Nop>', { desc = 'Disable g motion' })
|
||||
vim.keymap.set('n', 'gu', '<Nop>', { desc = 'Disable g motion' })
|
||||
vim.keymap.set('n', 'gU', '<Nop>', { desc = 'Disable g motion' })
|
||||
vim.keymap.set('n', 'g=', '<Nop>', { desc = 'Disable g motion' })
|
||||
vim.keymap.set('n', 'gq', '<Nop>', { desc = 'Disable g motion' })
|
||||
vim.keymap.set('n', 'g@', '<Nop>', { desc = 'Disable g motion' })
|
||||
vim.keymap.set('n', 'g?', '<Nop>', { desc = 'Disable g motion' })
|
||||
vim.keymap.set('n', 'gC', '<Nop>', { desc = 'Disable g motion' })
|
||||
vim.keymap.set('n', 'gD', '<Nop>', { desc = 'Disable g motion' })
|
||||
vim.keymap.set('n', 'gx', '<Nop>', { desc = 'Disable g motion' })
|
||||
vim.keymap.set('n', 'gr', '<Nop>', { desc = 'Disable g motion' })
|
||||
vim.keymap.set('n', 'g[', '<Nop>', { desc = 'Disable g motion' })
|
||||
vim.keymap.set('n', 'g]', '<Nop>', { desc = 'Disable g motion' })
|
||||
vim.keymap.set('n', 'g;', '<Nop>', { desc = 'Disable g motion' })
|
||||
vim.keymap.set('n', 'g,', '<Nop>', { desc = 'Disable g motion' })
|
||||
-- =========================
|
||||
-- GENERAL OPTIONS
|
||||
-- =========================
|
||||
vim.g.have_nerd_font = true
|
||||
vim.opt.relativenumber = false
|
||||
vim.opt.number = true
|
||||
vim.opt.mouse = 'a'
|
||||
vim.opt.showmode = false
|
||||
vim.schedule(function()
|
||||
vim.opt.clipboard = 'unnamedplus'
|
||||
end)
|
||||
vim.opt.breakindent = true
|
||||
vim.opt.undofile = true
|
||||
vim.opt.ignorecase = true
|
||||
vim.opt.smartcase = true
|
||||
vim.opt.signcolumn = 'yes'
|
||||
vim.opt.updatetime = 250
|
||||
vim.opt.timeoutlen = 300
|
||||
vim.opt.splitright = true
|
||||
vim.opt.splitbelow = true
|
||||
vim.opt.list = true
|
||||
vim.opt.listchars = { tab = '» ', trail = '·', nbsp = '␣' }
|
||||
vim.opt.expandtab = true
|
||||
vim.opt.smartindent = true
|
||||
vim.opt.tabstop = 4
|
||||
vim.opt.shiftwidth = 4
|
||||
vim.opt.inccommand = 'split'
|
||||
vim.opt.cursorline = true
|
||||
vim.opt.scrolloff = 10
|
||||
|
||||
|
||||
-- =========================
|
||||
-- BASIC KEYMAPS
|
||||
-- =========================
|
||||
vim.keymap.set('n', '<Esc>', '<cmd>nohlsearch<CR>')
|
||||
vim.keymap.set('t', '<Esc><Esc>', '<C-\\><C-n>', { desc = 'Exit terminal mode' })
|
||||
|
||||
-- Disable arrow keys in normal mode
|
||||
vim.keymap.set('n', '<left>', '<cmd>echo "Use h to move!!"<CR>')
|
||||
vim.keymap.set('n', '<right>', '<cmd>echo "Use l to move!!"<CR>')
|
||||
vim.keymap.set('n', '<up>', '<cmd>echo "Use k to move!!"<CR>')
|
||||
vim.keymap.set('n', '<down>', '<cmd>echo "Use j to move!!"<CR>')
|
||||
|
||||
-- Window navigation
|
||||
vim.keymap.set('n', '<C-Left>', '<C-w><C-h>', { desc = 'Move focus to the left window' })
|
||||
vim.keymap.set('n', '<C-Right>', '<C-w><C-l>', { desc = 'Move focus to the right window' })
|
||||
vim.keymap.set('n', '<C-Down>', '<C-w><C-j>', { desc = 'Move focus to the lower window' })
|
||||
vim.keymap.set('n', '<C-Up>', '<C-w><C-k>', { desc = 'Move focus to the upper window' })
|
||||
|
||||
-- Cheatsheet
|
||||
vim.keymap.set("n","§", "<cmd>Cheatsheet<CR>")
|
||||
require("cheatsheet").setup({
|
||||
bundled_cheatsheets = { enabled = { "default" } },
|
||||
bundled_plugin_cheatsheets = { disabled = { "gitsigns.nvim" } }
|
||||
})
|
||||
|
||||
-- Highlight yanked text
|
||||
vim.api.nvim_create_autocmd('TextYankPost', {
|
||||
desc = 'Highlight on yank',
|
||||
group = vim.api.nvim_create_augroup('kickstart-highlight-yank', { clear = true }),
|
||||
callback = function() vim.highlight.on_yank() end,
|
||||
})
|
||||
|
||||
-- ========================
|
||||
-- terminal
|
||||
-- =======================
|
||||
require("runner-nvim").setup({
|
||||
position = 'right', -- position of the terminal window when using the shell_handler
|
||||
-- can be: top, left, right, bottom
|
||||
-- will be overwritten when using the telescope mapping to open horizontally or vertically
|
||||
|
||||
width = 80, -- width of window when position is left or right
|
||||
height = 10, -- height of window when position is top or bottom
|
||||
|
||||
handlers = {
|
||||
lua = function(bufnr)
|
||||
vim.print('Running lua file in buffer ' .. bufnr)
|
||||
-- Run the file here
|
||||
end
|
||||
}
|
||||
})
|
||||
|
||||
vim.keymap.set("n", "<leader><leader>", function() require("runner-nvim").run() end)
|
||||
-- =========================
|
||||
-- SCROLLBAR
|
||||
-- =========================
|
||||
require("scrollbar").setup()
|
||||
|
||||
-- =========================
|
||||
-- UFO FOLDING
|
||||
-- =========================
|
||||
vim.o.foldcolumn = '1'
|
||||
vim.o.foldlevel = 99
|
||||
vim.o.foldlevelstart = 99
|
||||
vim.o.foldenable = true
|
||||
vim.keymap.set('n', '<leader>1', "<cmd>foldopen<CR>")
|
||||
vim.keymap.set('n', '<leader>2', "<cmd>foldclose<CR>")
|
||||
require('ufo').setup({
|
||||
provider_selector = function() return {'treesitter', 'indent'} end
|
||||
})
|
||||
|
||||
-- =========================
|
||||
-- treesitter
|
||||
-- ========================
|
||||
require('nvim-treesitter').setup({
|
||||
ensure_installed = {},
|
||||
highlight = {
|
||||
enable = true,
|
||||
additional_vim_regex_highlighting = false,
|
||||
},
|
||||
indent = { enable = true },
|
||||
})
|
||||
-- =========================
|
||||
-- NVIM-TREE
|
||||
-- =========================
|
||||
vim.g.loaded_netrw = 1
|
||||
vim.g.loaded_netrwPlugin = 1
|
||||
require("nvim-tree").setup({
|
||||
sort = { sorter = "case_sensitive" },
|
||||
view = { width = 30 },
|
||||
renderer = { group_empty = true },
|
||||
filters = { dotfiles = true },
|
||||
})
|
||||
|
||||
-- =========================
|
||||
-- CMP CONFIGURATION
|
||||
-- =========================
|
||||
local cmp = require'cmp'
|
||||
cmp.setup({
|
||||
snippet = { expand = function(args) vim.fn["vsnip#anonymous"](args.body) end },
|
||||
mapping = cmp.mapping.preset.insert({
|
||||
['<C-b>'] = cmp.mapping.scroll_docs(-4),
|
||||
['<C-f>'] = cmp.mapping.scroll_docs(4),
|
||||
['<C-Space>'] = cmp.mapping.complete(),
|
||||
['<C-e>'] = cmp.mapping.abort(),
|
||||
['<CR>'] = cmp.mapping.confirm({ select = true }),
|
||||
}),
|
||||
sources = cmp.config.sources({ { name = 'nvim_lsp' }, { name = 'vsnip' } }, { { name = 'buffer' } }),
|
||||
})
|
||||
|
||||
cmp.setup.cmdline({ '/', '?' }, { mapping = cmp.mapping.preset.cmdline(), sources = { { name = 'buffer' } } })
|
||||
cmp.setup.cmdline(':', { mapping = cmp.mapping.preset.cmdline(), sources = cmp.config.sources({ { name = 'path' } }, { { name = 'cmdline' } }), matching = { disallow_symbol_nonprefix_matching = false } })
|
||||
|
||||
-- =========================
|
||||
-- LSP CONFIGURATION
|
||||
-- =========================
|
||||
local capabilities = require('cmp_nvim_lsp').default_capabilities()
|
||||
|
||||
-- Diagnostics
|
||||
vim.keymap.set("n", "<leader>e4", function() vim.diagnostic.jump({ prev=true, count = 1 }) end, { desc = "Previous diagnostic" })
|
||||
vim.keymap.set("n", "<leader>e5", function() vim.diagnostic.jump({ prev=false, count = 1 }) end, { desc = "Next diagnostic" })
|
||||
vim.keymap.set("n", "<leader>e1", vim.diagnostic.open_float, { desc = "Show diagnostic" })
|
||||
vim.keymap.set("n", "<leader>e3", vim.diagnostic.setloclist, { desc = "Diagnostic list" })
|
||||
vim.keymap.set("n", "<leader>e2", vim.lsp.buf.code_action, { desc = "Show correction" })
|
||||
|
||||
vim.keymap.set("n", "<leader>e<Tab>", function()
|
||||
local clients = vim.lsp.get_clients({ name = "ltex" })
|
||||
|
||||
if #clients > 0 then
|
||||
-- Stop LTeX
|
||||
for _, client in ipairs(clients) do
|
||||
client.stop()
|
||||
end
|
||||
print("LTeX OFF")
|
||||
else
|
||||
-- Start LTeX
|
||||
vim.cmd("LspStart ltex")
|
||||
print("LTeX ON")
|
||||
end
|
||||
end, { desc = "Toggle LTeX" })
|
||||
|
||||
vim.diagnostic.config({
|
||||
update_in_insert = false, -- i don't get any new error when in insert
|
||||
})
|
||||
require("better-diagnostic-virtual-text").setup({
|
||||
ui = {
|
||||
wrap_line_after = false, -- wrap the line after this length to avoid the virtual text is too long
|
||||
left_kept_space = 3, --- the number of spaces kept on the left side of the virtual text, make sure it enough to custom for each line
|
||||
right_kept_space = 3, --- the number of spaces kept on the right side of the virtual text, make sure it enough to custom for each line
|
||||
arrow = " ",
|
||||
up_arrow = " ",
|
||||
down_arrow = " ",
|
||||
above = false, -- the virtual text will be displayed above the line
|
||||
},
|
||||
priority = 2003, -- the priority of virtual text
|
||||
inline = false,
|
||||
|
||||
})
|
||||
|
||||
|
||||
-- LSP functionality
|
||||
vim.keymap.set("n", "<leader>g1", vim.lsp.buf.hover, { desc = "Hover documentation" })
|
||||
vim.keymap.set("n", "<leader>g2", vim.lsp.buf.definition, { desc = "Go to definition" })
|
||||
vim.keymap.set("n", "<leader>g3", vim.lsp.buf.declaration, { desc = "Go to declaration" })
|
||||
vim.keymap.set("n", "<leader>g4", vim.lsp.buf.implementation, { desc = "Go to implementation" })
|
||||
vim.keymap.set("n", "<leader>g5", vim.lsp.buf.references, { desc = "Show references" })
|
||||
|
||||
-- LSP server setup
|
||||
vim.lsp.config("lua_ls", { cmd = { "lua-language-server" }, filetypes = { "lua" }, root_dir = vim.fs.dirname, on_attach = on_attach })
|
||||
vim.lsp.config("clangd", {
|
||||
cmd = { "clangd", "--header-insertion=never" },
|
||||
filetypes = { "c","cpp","objc","objcpp" },
|
||||
on_attach = on_attach ,
|
||||
init_options = {
|
||||
|
||||
clangdFileStatus = true,
|
||||
usePlaceholders = true,
|
||||
completeUnimported = false, -- this adds a bunch of #include even thought they are #included in another header file
|
||||
headerInsertion = false,
|
||||
headerInsertionDecorators = false,
|
||||
addDependencyHeaders = false,
|
||||
semanticHighlighting = true}
|
||||
})
|
||||
vim.lsp.config("nixd", {
|
||||
cmd = { "nixd" },
|
||||
filetypes = { "nix" },
|
||||
on_attach = on_attach,
|
||||
})
|
||||
vim.lsp.config("pylsp", {
|
||||
cmd = { "pylsp" },
|
||||
filetypes = { "python" },
|
||||
on_attach = on_attach,
|
||||
settings = {
|
||||
pylsp = {
|
||||
plugins = {
|
||||
pylsp_mypy = { enabled = true },
|
||||
jedi_completion = { fuzzy = true }
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
vim.lsp.config("texlab", { cmd = { "texlab" }, filetypes = { "tex" }, on_attach = on_attach })
|
||||
vim.lsp.config("ltex", {
|
||||
cmd = { "ltex-ls-plus" },
|
||||
filetypes = { "markdown", "text", "tex", "plaintex" },
|
||||
on_attach = on_attach,
|
||||
|
||||
settings = {
|
||||
ltex = {
|
||||
language = "fr",
|
||||
|
||||
enabled = {
|
||||
"markdown",
|
||||
"text",
|
||||
"tex",
|
||||
"plaintex",
|
||||
},
|
||||
|
||||
completionEnabled = true,
|
||||
diagnosticSeverity = "information",
|
||||
|
||||
additionalRules = {
|
||||
enablePickyRules = false,
|
||||
motherTongue = "fr",
|
||||
},
|
||||
|
||||
dictionary = {
|
||||
["fr"] = {
|
||||
"icelle",
|
||||
"icelui",
|
||||
"iceux",
|
||||
"maldoror",
|
||||
"evariste",
|
||||
"galois",
|
||||
"arno",
|
||||
"dessacrer",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
vim.lsp.enable({ "lua_ls", "clangd", "pylsp", "texlab", "nixd", "ltex"})
|
||||
-- =========================
|
||||
-- DASHBOARD
|
||||
-- =========================
|
||||
require('dashboard').setup {
|
||||
theme = 'hyper',
|
||||
config = {
|
||||
header = {
|
||||
" ... ... . ",
|
||||
" .=*8888n..\"%888: @88> ",
|
||||
" X ?8888f '8888 u. ... .. %8P .. . : ",
|
||||
" 88x. '8888X 8888> .u ...ue888b :~\"\"888h.:^\"888: . .888: x888 x888. ",
|
||||
"'8888k 8888X '\"*8h. ud8888. 888R Y888r 8X `8888X 8888> .@88u ~`8888~'888X`?888f` ",
|
||||
" \"8888 X888X .xH8 :888'8888. 888R I888> X888n. 8888X ?888> '\"888E` X888 888X '888> ",
|
||||
" `8\" X888!:888X d888 '88%\" 888R I888> '88888 8888X ?**h. 888E X888 888X '888> ",
|
||||
" =~` X888 X888X 8888.+\" 888R I888> `*88 8888~ x88x. 888E X888 888X '888> ",
|
||||
" :h. X8*` !888X 8888L u8888cJ888 ..<\" 88*` 88888X 888E X888 888X '888> ",
|
||||
" X888xX\" '8888..: '8888c. .+ \"*888*P\" ..XC. `*8888k 888& \"*88%\"\"*88\" '888!` ",
|
||||
":~`888f '*888*\" \"88888% 'Y\" :888888H. `%88> R888\" `~ \" `\"` ",
|
||||
" \"\" `\"` \"YP' < `\"888888: X\" \"\" ",
|
||||
" %888888x.-` ",
|
||||
" \"\"**\"\" ",
|
||||
"",
|
||||
""
|
||||
},
|
||||
shortcut = { { desc = " Open File Tree", group = "", key = 't', action = 'NvimTreeOpen' } },
|
||||
packages = { enable = false },
|
||||
project = { enable = true, limit = 8, icon = ' New file', action = 'Telescope find_files cwd=' },
|
||||
mru = { limit = 10, icon = ' History' },
|
||||
footer = {},
|
||||
}
|
||||
}
|
||||
|
||||
-- jumps cursor when was last cursor last time
|
||||
require("nvim-lastplace").setup({
|
||||
-- Filetypes to ignore
|
||||
ignore_filetypes = {
|
||||
"gitcommit", "gitrebase", "svn", "hgcommit", "xxd", "COMMIT_EDITMSG"
|
||||
},
|
||||
|
||||
-- Buffer types to ignore
|
||||
ignore_buftypes = {
|
||||
"quickfix", "nofile", "help", "terminal"
|
||||
},
|
||||
|
||||
-- Center cursor after jumping
|
||||
center_on_jump = true,
|
||||
|
||||
-- Only jump if target line is not visible
|
||||
jump_only_if_not_visible = false,
|
||||
|
||||
-- Minimum lines required to enable jumping
|
||||
min_lines = 10,
|
||||
|
||||
-- Maximum line to jump to (0 = no limit)
|
||||
max_line = 0,
|
||||
|
||||
-- Open folds after jumping
|
||||
open_folds = true,
|
||||
|
||||
-- Enable debug messages
|
||||
debug = false,
|
||||
})
|
||||
-- ======================
|
||||
-- gruvbox
|
||||
-- ======================
|
||||
|
||||
require("gruvbox").setup({
|
||||
terminal_colors = false, -- add neovim terminal colors
|
||||
undercurl = true,
|
||||
underline = true,
|
||||
bold = true,
|
||||
italic = {
|
||||
strings = false,
|
||||
emphasis = true,
|
||||
comments = true,
|
||||
operators = false,
|
||||
folds = true,
|
||||
},
|
||||
strikethrough = true,
|
||||
invert_selection = false,
|
||||
invert_signs = false,
|
||||
invert_tabline = false,
|
||||
inverse = true, -- invert background for search, diffs, statuslines and errors
|
||||
contrast = "hard", -- can be "hard", "soft" or empty string
|
||||
palette_overrides = { -- for overrides see https://github.com/ellisonleao/gruvbox.nvim/blob/main/lua/gruvbox.lua
|
||||
dark0_hard = "#241F17"
|
||||
},
|
||||
overrides = {
|
||||
String = {fg = "#FFB878", italic = false},
|
||||
FoldColumn = {fg = faded_orange, bg = dark0_hard}
|
||||
},
|
||||
dim_inactive = false,
|
||||
transparent_mode = false,
|
||||
})
|
||||
vim.opt.termguicolors = false
|
||||
vim.o.background = "dark"
|
||||
vim.cmd("colorscheme gruvbox")
|
||||
-- =========================
|
||||
-- LUALINE
|
||||
-- =========================
|
||||
require('lualine').setup { options = { theme = "gruvbox_dark" } }
|
||||
|
||||
|
||||
--==================0
|
||||
-- Some utils
|
||||
--==================
|
||||
vim.keymap.set('n', '<leader>r1', '<cmd>Fugit2<CR>', { desc = 'Open git helper' })
|
||||
|
||||
vim.keymap.set("n", "t", function()
|
||||
local line = vim.api.nvim_get_current_line()
|
||||
|
||||
local result = vim.fn.system({ "custom-syllabes" }, line)
|
||||
|
||||
print(vim.trim(result))
|
||||
end, { desc = "Count syllables (current line)" })
|
||||
-- =========================
|
||||
-- telescope
|
||||
-- =======================
|
||||
local builtin = require('telescope.builtin')
|
||||
vim.keymap.set('n', '<leader>f1', builtin.find_files, { desc = 'Telescope find files' })
|
||||
vim.keymap.set('n', '<leader>f2', builtin.live_grep, { desc = 'Telescope live grep' })
|
||||
vim.keymap.set('n', '<leader>f3', builtin.buffers, { desc = 'Telescope buffers' })
|
||||
vim.keymap.set('n', '<leader>f4', builtin.help_tags, { desc = 'Telescope help tags' })
|
||||
|
||||
-- Disable relative numbers even if plugins override
|
||||
vim.api.nvim_create_autocmd("VimEnter", { callback = function() vim.opt.colorcolumn = ""; vim.opt.relativenumber = false end })
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,126 @@
|
||||
{ ... }: {
|
||||
# obsidian is unused -> see my project https://github.com/tomasriveral/NoteWrapper
|
||||
flake.homeModules.obsidian = { ... }: {
|
||||
programs.obsidian = {
|
||||
enable = true;
|
||||
|
||||
vaults = {
|
||||
miscellanious = {
|
||||
enable = true;
|
||||
target = "/Documents/Notes/miscellanious";
|
||||
};
|
||||
work = {
|
||||
enable = true;
|
||||
target = "/Documents/Notes/work";
|
||||
};
|
||||
};
|
||||
|
||||
defaultSettings = {
|
||||
appearance.theme = "gruvbox";
|
||||
|
||||
extraFiles = {
|
||||
".obsidian/themes/gruvbox/manifest.json" = ../../other/obsidian-theme/manifest.json;
|
||||
".obsidian/themes/gruvbox/obsidian.css" = ../../other/obsidian-theme/obsidian.css;
|
||||
".obsidian/themes/gruvbox/theme.css" = ../../other/obsidian-theme/theme.css;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
flake.packages.custom-obsidianbackup = {pkgs, ...}:
|
||||
pkgs.writeShellApplication {
|
||||
name = "custom-obsidianbackup";
|
||||
runtimeInputs = with pkgs; [
|
||||
rclone
|
||||
libnotify
|
||||
rsync
|
||||
];
|
||||
text = ''
|
||||
#!/usr/bin/env bash
|
||||
|
||||
SOURCE_DIR="$HOME/Documents/Notes"
|
||||
DEST_DIR="$HOME/kdrive/Notes"
|
||||
BACKUP_DIR="$HOME/.Notes.backup"
|
||||
|
||||
mkdir -p "$DEST_DIR"
|
||||
mkdir -p "$BACKUP_DIR"
|
||||
|
||||
while true; do
|
||||
# Timestamp for this run
|
||||
TIMESTAMP=$(date +%Y-%m-%d_%H-%M)
|
||||
TIMESTAMPED_BACKUP="$BACKUP_DIR/$TIMESTAMP"
|
||||
mkdir -p "$TIMESTAMPED_BACKUP"
|
||||
|
||||
echo "[$(date)] Starting Obsidian backup..."
|
||||
|
||||
# Check rclone mount
|
||||
status=$(rclone about kdrive: 2>&1 || true)
|
||||
if [[ "$status" =~ .*CRITICAL.* ]]; then
|
||||
echo "[$(date)] rclone failed:"
|
||||
echo "$status"
|
||||
notify-send -u critical "rclone failed" \
|
||||
"rclone might be broken or you need to deactivate this script in HomeManager."
|
||||
else
|
||||
# Run rsync with verbose debugging
|
||||
echo "[$(date)] Running rsync..."
|
||||
rsync -Lavh --progress --update --backup --backup-dir="$TIMESTAMPED_BACKUP" \
|
||||
--exclude='.obsidian/cache/**' \
|
||||
"$SOURCE_DIR/" "$DEST_DIR/"
|
||||
|
||||
echo "[$(date)] Backup completed for this run."
|
||||
fi
|
||||
|
||||
# Safely remove backups older than 30 days
|
||||
if [[ -d "$BACKUP_DIR" && "$BACKUP_DIR" == "$HOME/.Notes.backup" ]]; then
|
||||
echo "[$(date)] Cleaning old backups..."
|
||||
find "$BACKUP_DIR/" -mindepth 1 -maxdepth 1 -type d -mtime +30 -exec rm -rf {} \;
|
||||
else
|
||||
echo "[$(date)] Backup directory not safe. Skipping cleanup."
|
||||
fi
|
||||
|
||||
# Wait 1 hour
|
||||
echo "[$(date)] Sleeping for 1 hour..."
|
||||
sleep 3600
|
||||
done
|
||||
'';
|
||||
};
|
||||
# this might be broken after dendritic nix. As it searched for the obsidian.nix to get list of vaults
|
||||
flake.packages.custom-obsidianvaults = {pkgs, ...}:
|
||||
pkgs.writeShellApplication {
|
||||
name = "custom-obsidianvaults";
|
||||
runtimeInputs = with pkgs; [
|
||||
zsh
|
||||
fzf
|
||||
ripgrep
|
||||
];
|
||||
text = ''
|
||||
# Path to your obsidian.nix
|
||||
obsidian_nix="$HOME/nixos/modules/home-manager/obsidian.nix"
|
||||
|
||||
# Extract vault names without line numbers and colors
|
||||
mapfile -t vaults < <(rg -N --color=never -Po 'vaults\.\K[[:alnum:]_]+' "$obsidian_nix")
|
||||
|
||||
# Let user select a vault with fzf
|
||||
selected=$(printf "%s\n" "''${vaults[@]}" \
|
||||
| fzf --height 6 --reverse --prompt="Select Obsidian vault:")
|
||||
|
||||
# Exit if user cancels
|
||||
[[ -z "$selected" ]] && exit 0
|
||||
|
||||
# Remove any stray ANSI codes (optional)
|
||||
selected=$(echo "$selected" | sed -r 's/\x1B\[[0-9;]*[mK]//g')
|
||||
|
||||
# Find the target path of the selected vault
|
||||
vault_path=$(rg -N --color=never -A2 "vaults.$selected" "$obsidian_nix" \
|
||||
| rg 'target =' | sed -E 's/.*"([^"]+)".*/\1/')
|
||||
|
||||
# Expand ~ if present
|
||||
vault_path="''${vault_path/#\~/$HOME}"
|
||||
|
||||
# Launch Obsidian with the selected vault using URI
|
||||
[[ -n "$vault_path" ]] && setsid xdg-open "obsidian://open?vault=$selected" >/dev/null 2>&1 &
|
||||
# Exit the kitty terminal after selection
|
||||
pkill -f "kitty.*Select Obsidian vault"
|
||||
exit
|
||||
'';
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{ ... }: {
|
||||
flake.homeModules.oh-my-posh = { ... }: {
|
||||
programs.oh-my-posh = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
useTheme = "gruvbox";
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,125 @@
|
||||
{ ... }:
|
||||
{
|
||||
flake.homeModules.quickshell = { ... }: {
|
||||
# pulled from https://codeberg.org/zacoons/rivendell-hyprdots
|
||||
# replaced by caelestia-shell
|
||||
qt.enable = true;
|
||||
programs.quickshell = {
|
||||
systemd.enable = true;
|
||||
enable = true;
|
||||
};
|
||||
home.file.".config/quickshell" = {
|
||||
source = ../../other/quickshell;
|
||||
recursive = true;
|
||||
};
|
||||
};
|
||||
flake.packages.QS-notifycache = {writeShellApplication, ...}:
|
||||
# creates and maintains cache file for the notification history
|
||||
writeShellApplication {
|
||||
name = "QS-notifycache";
|
||||
text = ''
|
||||
CACHE="$HOME/.cache/notify_history"
|
||||
# Create or erase existing cache
|
||||
mkdir -p "$(dirname "$CACHE")"
|
||||
: > "$CACHE" # truncate file
|
||||
echo "Notification history initialized at $(date)" >> "$CACHE"
|
||||
'';
|
||||
};
|
||||
flake.packages.QS-notifyhistory = {writeShellApplication, ...}:
|
||||
writeShellApplication {
|
||||
name = "QS-notifyhistory";
|
||||
text = ''
|
||||
app="$1"
|
||||
title="$2"
|
||||
body="$3"
|
||||
date="$(date +%T)"
|
||||
urgency="$4"
|
||||
|
||||
case "$urgency" in
|
||||
0) urgency_text="low";;
|
||||
1) urgency_text="normal";;
|
||||
2) urgency_text="critical";;
|
||||
*) urgency_text="unknown";;
|
||||
esac
|
||||
{
|
||||
echo "$app"
|
||||
echo "$title"
|
||||
echo "$body"
|
||||
echo "$date"
|
||||
echo "$urgency_text"
|
||||
|
||||
} >> "$HOME/.cache/notify_history"
|
||||
'';
|
||||
};
|
||||
flake.packages.QS-sysinfo = { pkgs, ... }:
|
||||
pkgs.writeShellApplication {
|
||||
name = "QS-sysinfo";
|
||||
runtimeInputs = with pkgs; [
|
||||
ripgrep
|
||||
gawkInteractive
|
||||
iproute2
|
||||
coreutils
|
||||
procps
|
||||
upower
|
||||
];
|
||||
text = ''
|
||||
# Pad CPU, MEM, DISK to 2 chars (right-aligned)
|
||||
|
||||
cpu=$(awk '/^cpu /{printf("%.0f", ($2+$4)*100/($2+$4+$5))}' /proc/stat)
|
||||
cpu=$(printf "%2s" "$cpu")
|
||||
|
||||
sum=0
|
||||
count=0
|
||||
|
||||
for f in /sys/class/hwmon/hwmon*/temp*_input; do
|
||||
if [ -r "$f" ]; then
|
||||
val=$(cat "$f" 2>/dev/null) || continue
|
||||
sum=$((sum + val))
|
||||
count=$((count + 1))
|
||||
fi
|
||||
done
|
||||
|
||||
temp=$(( sum / count / 1000 ))
|
||||
|
||||
sum=0
|
||||
count=0
|
||||
|
||||
for f in /sys/class/hwmon/hwmon*/fan*_input; do
|
||||
if [ -r "$f" ]; then
|
||||
val=$(cat "$f" 2>/dev/null) || continue
|
||||
sum=$((sum + val))
|
||||
count=$((count + 1))
|
||||
fi
|
||||
done
|
||||
fan=$(( sum / count ))
|
||||
fan=$(printf "%4s" "$fan")
|
||||
|
||||
mem=$(free | awk '/Mem:/ {printf("%.0f",$3/$2*100)}')
|
||||
mem=$(printf "%2s" "$mem")
|
||||
|
||||
disk=$(df / | awk 'NR==2 {gsub("%",""); print $5}')
|
||||
disk=$(printf "%2s" "$disk")
|
||||
|
||||
# Pad POWER to 5 chars (XX.XX)
|
||||
power=$(upower -b | awk -F: '/energy-rate/ {gsub(/^[ \t]+/, "", $2); split($2,a," "); printf("%.2f", a[1])}')
|
||||
power=$(printf "%5s" "$power")
|
||||
|
||||
# network calculations
|
||||
iface=$(ip route get 1.1.1.1 | awk '{print $5; exit}')
|
||||
|
||||
rx1=$(cat "/sys/class/net/$iface/statistics/rx_bytes")
|
||||
tx1=$(cat "/sys/class/net/$iface/statistics/tx_bytes")
|
||||
|
||||
sleep 1
|
||||
|
||||
rx2=$(cat "/sys/class/net/$iface/statistics/rx_bytes")
|
||||
tx2=$(cat "/sys/class/net/$iface/statistics/tx_bytes")
|
||||
|
||||
down_speed=$(( (rx2 - rx1) / 1024 ))
|
||||
up_speed=$(( (tx2 - tx1) / 1024 ))
|
||||
|
||||
# Output JSON
|
||||
echo "{\"cpu\":\"$cpu\",\"temp\":\"$temp\",\"fan\":\"$fan\",\"mem\":\"$mem\",\"disk\":\"$disk\",\"power\":\"$power\",\"down\":\"$down_speed\",\"up\":\"$up_speed\"}"
|
||||
'';
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
{ ... }: {
|
||||
flake.homeModules.ripgrep = { ... }: {
|
||||
programs.ripgrep = {
|
||||
enable = true;
|
||||
arguments = [
|
||||
"-S"
|
||||
"-."
|
||||
"-p"
|
||||
"-n"
|
||||
];
|
||||
};
|
||||
programs.ripgrep-all = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{ ... }: {
|
||||
flake.homeModules.rofi = { ... }: {
|
||||
programs.rofi = {
|
||||
enable = true;
|
||||
theme = "gruvbox-dark-hard";
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
{ ... }: {
|
||||
flake.homeModules.sbb-tui = { pkgs-unstable, ... }: {
|
||||
home.packages = [
|
||||
pkgs-unstable.sbb-tui
|
||||
];
|
||||
home.file.".config/sbb-tui/config.yaml" = {
|
||||
enable = true;
|
||||
# Gruvbox (from https://github.com/Necrom4/sbb-tui/blob/master/docs/themes.md)
|
||||
text = ''
|
||||
ui:
|
||||
nerdfont: true
|
||||
theme:
|
||||
text: "#EBDBB2"
|
||||
textMuted: "#928374"
|
||||
error: "#FB4934"
|
||||
warning: "#FB4934"
|
||||
borderFocused: "#FABD2F"
|
||||
borderUnfocused: "#504945"
|
||||
badgeKeyFg: "#282828"
|
||||
badgeKeyBg: "#FABD2F"
|
||||
badgeVehicleFg: "#EBDBB2"
|
||||
badgeVehicleBg: "#458588"
|
||||
badgeModelFg: "#282828"
|
||||
badgeModelBg: "#FB4934"
|
||||
badgeCompanyFg: "#282828"
|
||||
badgeCompanyBg: "#EBDBB2"
|
||||
logo: "#EBDBB2"
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
{ ... }: {
|
||||
flake.homeModules.ssh = { ... }: {
|
||||
programs.ssh = {
|
||||
enable = true;
|
||||
enableDefaultConfig = false; # will be removed in the futur. Removes evaluation warning
|
||||
matchBlocks."*" = {
|
||||
# equivalent to the default config
|
||||
forwardAgent = false;
|
||||
addKeysToAgent = "no";
|
||||
compression = false;
|
||||
serverAliveInterval = 0;
|
||||
serverAliveCountMax = 3;
|
||||
hashKnownHosts = false;
|
||||
userKnownHostsFile = "~/.ssh/known_hosts";
|
||||
controlMaster = "no";
|
||||
controlPath = "~/.ssh/master-%r@%n:%p";
|
||||
controlPersist = "no";
|
||||
};
|
||||
};
|
||||
services.ssh-agent.enable = true;
|
||||
home.file.".ssh/config".text = ''
|
||||
Host *
|
||||
AddKeysToAgent yes
|
||||
IdentityFile ~/.ssh/id_ed25519
|
||||
'';
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
{ ... }: {
|
||||
# replaced by caelestia
|
||||
flake.homeModules.swaync = { ... }: {
|
||||
services.swaync = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
flake.homeModules.swaylock = { ... }: {
|
||||
programs.swaylock = {
|
||||
enable = true;
|
||||
settings = {
|
||||
color = "1e1e2e";
|
||||
bs-hl-color = "f5e0dc";
|
||||
caps-lock-bs-hl-color = "f5e0dc";
|
||||
caps-lock-key-hl-color = "a6e3a1";
|
||||
inside-color = "00000000";
|
||||
inside-clear-color = "00000000";
|
||||
inside-caps-lock-color = "00000000";
|
||||
inside-ver-color = "00000000";
|
||||
inside-wrong-color = "00000000";
|
||||
key-hl-color = "a6e3a1";
|
||||
layout-bg-color = "00000000";
|
||||
layout-border-color = "00000000";
|
||||
layout-text-color = "cdd6f4";
|
||||
line-color = "00000000";
|
||||
line-clear-color = "00000000";
|
||||
line-caps-lock-color = "00000000";
|
||||
line-ver-color = "00000000";
|
||||
line-wrong-color = "00000000";
|
||||
ring-color = "b4befe";
|
||||
ring-clear-color = "f5e0dc";
|
||||
ring-caps-lock-color = "fab387";
|
||||
ring-ver-color = "89b4fa";
|
||||
ring-wrong-color = "eba0ac";
|
||||
separator-color = "00000000";
|
||||
text-color = "cdd6f4";
|
||||
text-clear-color = "f5e0dc";
|
||||
text-caps-lock-color = "fab387";
|
||||
text-ver-color = "89b4fa";
|
||||
text-wrong-color = "eba0ac";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{ ... }: {
|
||||
flake.homeModules.thunderbird = { ... }: {
|
||||
programs.thunderbird = {
|
||||
enable = true;
|
||||
profiles.tomasr = {
|
||||
isDefault = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
{ ... }: {
|
||||
flake.homeModules.vivify = {pkgs-unstable, ...}: {
|
||||
home.file.".config/vivify/config.json" = {
|
||||
enable = true;
|
||||
text = ''
|
||||
{
|
||||
"browserOptions": {
|
||||
"name": "qutebrowser",
|
||||
"arguments": ["-T"]
|
||||
}
|
||||
}'';
|
||||
};
|
||||
home.packages = [
|
||||
pkgs-unstable.vivify
|
||||
];
|
||||
programs.qutebrowser = {
|
||||
enable = true;
|
||||
settings = {
|
||||
auto_save.session = false;
|
||||
changelog_after_upgrade = "never";
|
||||
content.cookies.accept = "never";
|
||||
};
|
||||
extraConfig = ''
|
||||
config.bind('<Ctrl-L>', 'yank url ;; message-info "URL copied"')
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,716 @@
|
||||
{ ... }:
|
||||
{
|
||||
flake.homeModules.waybar = { ... }: {
|
||||
# replaced by caelestia
|
||||
programs.waybar = {
|
||||
enable = true;
|
||||
settings = [
|
||||
{
|
||||
layer = "top";
|
||||
position = "left";
|
||||
margin = "5 2 5 0";
|
||||
reload_style_on_change = true;
|
||||
modules-left = [
|
||||
"hyprland/workspaces"
|
||||
"group/info"
|
||||
"group/power"
|
||||
];
|
||||
modules-center = [
|
||||
];
|
||||
modules-right = [
|
||||
"hyprland/window"
|
||||
"group/brightness"
|
||||
"group/sound"
|
||||
"group/connection"
|
||||
"group/together"
|
||||
"tray"
|
||||
"battery"
|
||||
];
|
||||
# groups settings are organized by alphabetical order
|
||||
"group/audio" = {
|
||||
orientation = "inherit";
|
||||
drawer = {
|
||||
transition-duration = 500;
|
||||
transition-left-to-right = false;
|
||||
};
|
||||
modules = [
|
||||
"pulseaudio"
|
||||
"pulseaudio#mic"
|
||||
"pulseaudio/slider"
|
||||
];
|
||||
};
|
||||
"group/bluetooth" = {
|
||||
orientation = "inherit";
|
||||
drawer = {
|
||||
transition-duration = 500;
|
||||
transition-left-to-right = true;
|
||||
};
|
||||
modules = [
|
||||
"bluetooth"
|
||||
"bluetooth#status"
|
||||
];
|
||||
};
|
||||
"group/brightness" = {
|
||||
orientation = "inherit";
|
||||
drawer = {
|
||||
transition-duration = 500;
|
||||
transition-left-to-right = false;
|
||||
};
|
||||
modules = [
|
||||
"backlight"
|
||||
"backlight/slider"
|
||||
];
|
||||
};
|
||||
"group/connection" = {
|
||||
orientation = "inherit";
|
||||
modules = ["group/network"];
|
||||
};
|
||||
"group/gcpu" = {
|
||||
orientation = "inherit";
|
||||
modules = [
|
||||
"custom/cpu-icon"
|
||||
"temperature"
|
||||
"cpu"
|
||||
];
|
||||
};
|
||||
"group/info" = {
|
||||
orientation = "inherit";
|
||||
modules = [
|
||||
"group/gcpu"
|
||||
"memory"
|
||||
"disk"
|
||||
];
|
||||
};
|
||||
"group/network" = {
|
||||
orientation = "inherit";
|
||||
drawer = {
|
||||
transition-duration = 500;
|
||||
transition-left-to-right = true;
|
||||
};
|
||||
modules = [
|
||||
"network"
|
||||
"network#speed"
|
||||
];
|
||||
};
|
||||
"group/power" = {
|
||||
orientation = "inherit";
|
||||
modules = [
|
||||
"battery#w"
|
||||
"battery#powerdraw"
|
||||
];
|
||||
};
|
||||
"group/sound" = {
|
||||
orientation = "inherit";
|
||||
modules = [
|
||||
"group/audio"
|
||||
"custom/notification"
|
||||
];
|
||||
};
|
||||
"group/together" = {
|
||||
orientation = "inherit";
|
||||
modules = [
|
||||
"group/utils"
|
||||
"clock"
|
||||
];
|
||||
};
|
||||
"group/utils" = {
|
||||
orientation = "inherit";
|
||||
drawer = {
|
||||
transition-duration = 500;
|
||||
transition-left-to-right = true;
|
||||
};
|
||||
modules = [
|
||||
"custom/weather"
|
||||
"custom/colorpicker"
|
||||
];
|
||||
};
|
||||
# modules settings are organized by alphabetical order
|
||||
backlight = {
|
||||
device = "intel_backlight"; # my laptop is amd and it works
|
||||
format = "{icon}";
|
||||
format-icons = [
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
];
|
||||
on-scroll-down = "brightnessctl s 5%-";
|
||||
on-scroll-up = "brightness s +5%";
|
||||
tooltip = true;
|
||||
tooltip-format = "Brightness: {percent}%";
|
||||
smooth-scrolling-threshold = 1;
|
||||
};
|
||||
"backlight/slider" = {
|
||||
min = 5;
|
||||
max = 100;
|
||||
orientation = "vertical";
|
||||
device = "intel_backlight";
|
||||
};
|
||||
battery = {
|
||||
#rotate = 90;
|
||||
interval = 30;
|
||||
states = {
|
||||
good = 95;
|
||||
warning = 20;
|
||||
critical = 15;
|
||||
};
|
||||
format = "{icon} {capacity}";
|
||||
format-charging = "<b>{icon} {capacity}% </b>";
|
||||
format-full = "<span color='#82A55F'><b>{icon}</b></span>";
|
||||
format-icons = [
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
];
|
||||
tooltip-format = "{timeTo} {capacity} %";
|
||||
};
|
||||
"battery#powerdraw" = {
|
||||
rotate = 90;
|
||||
interval = 10;
|
||||
format = "{power:.0001f}";
|
||||
};
|
||||
"battery#w" = {
|
||||
rotate = 90;
|
||||
interval = 100000;
|
||||
format = "W";
|
||||
};
|
||||
bluetooth = {
|
||||
format-on = "";
|
||||
format-off = "";
|
||||
format-disabled = "";
|
||||
format-connected = "<b></b>";
|
||||
tooltip-format = "{controller_alias}\t{controller_address}\n\n{num_connections} connected";
|
||||
tooltip-format-connected = "{controller_alias}\t{controller_address}\n\n{num_connections} connected\n\n{device_enumerate}";
|
||||
tooltip-format-enumerate-connected = "{device_alias}\t{device_address}";
|
||||
tooltip-format-enumerate-connected-battery = "{device_alias}\t{device_address}\t{device_battery_percentage}%";
|
||||
};
|
||||
"bluetooth#status" = {
|
||||
format-on = "";
|
||||
format-off = "";
|
||||
format-disabled = "";
|
||||
format-connected = "<b>{num_connections}</b>";
|
||||
format-connected-battery = "<small><b>{device_battery_percentage}%</b></small>";
|
||||
tooltip-format = "{controller_alias}\t{controller_address}\n\n{num_connections} connected";
|
||||
tooltip-format-connected = "{controller_alias}\t{controller_address}\n\n{num_connections} connected\n\n{device_enumerate}";
|
||||
tooltip-format-enumerate-connected = "{device_alias}\t{device_address}";
|
||||
tooltip-format-enumerate-connected-battery = "{device_alias}\t{device_address}\t{device_battery_percentage}%";
|
||||
};
|
||||
clock = {
|
||||
format = "{:%H\n%M}";
|
||||
tooltip-format = "<tt><small>{calendar}</small></tt>";
|
||||
calendar = {
|
||||
mode = "month";
|
||||
mode-mon-col = 3;
|
||||
weeks-pos = "right";
|
||||
on-scroll = 1;
|
||||
on-click-right = "mode";
|
||||
format = {
|
||||
today = "<span color='#d65d0e'><b><u>{}</u></b></span>";
|
||||
};
|
||||
};
|
||||
};
|
||||
cpu = {
|
||||
format = "<b>{usage}%</b>";
|
||||
};
|
||||
"custom/colorpicker" = {
|
||||
format = "";
|
||||
on-click = "hyprpicker | tee >(wl-copy) | cliphist store";
|
||||
};
|
||||
"custom/cpu-icon" = {
|
||||
format = "";
|
||||
tooltip = false;
|
||||
};
|
||||
"custom/mark" = {
|
||||
format = "";
|
||||
tooltip = false;
|
||||
};
|
||||
"custom/weather" = {
|
||||
format = "{}";
|
||||
interval = 3600;
|
||||
exec = "custom-weatherwaybar";
|
||||
return-type = "json";
|
||||
};
|
||||
disk = {
|
||||
interval = 600;
|
||||
format = "<b> \n{percentage_used}</b>";
|
||||
path = "/"; #maybe we should subtract ~/kdrive if it is counted
|
||||
};
|
||||
"hyprland/window" = {
|
||||
format = "{class}";
|
||||
rotate = 90;
|
||||
};
|
||||
"hyprland/workspaces" = {
|
||||
format = "{icon}";
|
||||
format-icons = {
|
||||
"1" = "";
|
||||
"2" = "";
|
||||
"3" = "";
|
||||
"4" = "";
|
||||
"5" = "";
|
||||
"6" = "";
|
||||
"7" = "";
|
||||
"8" = "";
|
||||
"9" = "";
|
||||
"10" = "";
|
||||
"active" = "";
|
||||
"default" = "";
|
||||
};
|
||||
persistent-workspaces = {
|
||||
"*" = [1 2 3 4 5 6 7 8 9 10];
|
||||
};
|
||||
};
|
||||
idle_inhibitor = {
|
||||
format = "{icon}";
|
||||
tooltip-format-activated = "Idle Inhibitor is active";
|
||||
tooltip-format-deactivated = "Idle Inhibitor is not active";
|
||||
format-icons = {
|
||||
activated = "";
|
||||
deactivated = "";
|
||||
};
|
||||
};
|
||||
memory = {
|
||||
format = "<b> \n{:2}</b>";
|
||||
};
|
||||
network = {
|
||||
format = "{icon}";
|
||||
format-icons = {
|
||||
wifi = [""];
|
||||
ethernet = [""];
|
||||
disconnected = [""];
|
||||
};
|
||||
format-wifi = "";
|
||||
format-ethernet = "";
|
||||
format-disconnected = "";
|
||||
format-linked = "";
|
||||
tooltip = false;
|
||||
};
|
||||
"network#speed" = {
|
||||
format = " {bandwidthDownBits} ";
|
||||
rotate = 90;
|
||||
interval = 5;
|
||||
tooltip-format = "{ipaddr}";
|
||||
tooltip-format-wifi = "{essid} ({signalStrength}%) \n{ipaddr} | {frequency} MHz{icon} ";
|
||||
tooltip-format-ethernet = "{ifname} \n{ipaddr} | {frequency} MHz{icon} ";
|
||||
tooltip-format-disconnected = "Not Connected to any type of Network";
|
||||
tooltip = true;
|
||||
};
|
||||
power-profiles-daemon = {
|
||||
format = "{icon}";
|
||||
tooltip-format = "Power profile: {profile}\nDriver: {driver}";
|
||||
tooltip = true;
|
||||
format-icons = {
|
||||
default = "";
|
||||
performance = "<span color='#B37F34'><small></small></span>";
|
||||
balanced = "<span><small> </small></span>";
|
||||
power-saver = "<span color='#a6e3a1'><small></small></span>";
|
||||
};
|
||||
};
|
||||
pulseaudio = {
|
||||
format = "{icon}";
|
||||
format-bluetooth = "{icon}";
|
||||
tooltip-format = "{volume}% {icon} | {desc}";
|
||||
format-muted = "";
|
||||
format-icons = {
|
||||
headphones = "";
|
||||
handsfree = "";
|
||||
headset = "";
|
||||
phone = "";
|
||||
portable = "";
|
||||
car = " ";
|
||||
default = [
|
||||
""
|
||||
""
|
||||
""
|
||||
];
|
||||
};
|
||||
on-click = "volume mute";
|
||||
on-click-middle = "pavucontrol";
|
||||
on-scroll-up = "pactl set-sink-volume @DEFAULT_SINK@ +5%";
|
||||
on-scroll-down = "pactl set-sink-volume @DEFAULT_SINK@ -5%";
|
||||
smooth-scrolling-threshold = 1;
|
||||
};
|
||||
"pulseaudio#mic" = {
|
||||
format = "{format_source}";
|
||||
format-source = "";
|
||||
format-source-muted = "";
|
||||
tooltip-format = "{volume}% {format_source}";
|
||||
on-click = "pactl set-source-mute 0 toggle";
|
||||
on-scroll-down = "pactl set-source-volume 0 -1%";
|
||||
on-scroll-up = "pactl set-source-volume 0 +1%";
|
||||
};
|
||||
"pulseaudio/slider" = {
|
||||
min = 0;
|
||||
max = 140;
|
||||
orientation = "vertical";
|
||||
};
|
||||
temperature = {
|
||||
format = "{temperatureC}°C";
|
||||
format-critical = "{temperatureC}°C";
|
||||
interval = 10;
|
||||
};
|
||||
tray = {
|
||||
icon-size = 18;
|
||||
spacing = 10;
|
||||
};
|
||||
}
|
||||
]; # home-manager wants the whole config as a list of bars
|
||||
style = ''
|
||||
@define-color foreground #c5c5c5;
|
||||
@define-color background #191919;
|
||||
@define-color cursor #c5c5c5;
|
||||
|
||||
@define-color color0 #191919;
|
||||
@define-color color1 #3a3632;
|
||||
@define-color color2 #582c1e;
|
||||
@define-color color3 #423f39;
|
||||
@define-color color4 #50473c;
|
||||
@define-color color5 #634723;
|
||||
@define-color color6 #BAA470;
|
||||
@define-color color7 #8c8c8c;
|
||||
@define-color color8 #525252;
|
||||
@define-color color9 #4e4843;
|
||||
@define-color color10 #763b28;
|
||||
@define-color color11 #59554c;
|
||||
@define-color color12 #6b5f51;
|
||||
@define-color color13 #855f2f;
|
||||
@define-color color14 #796d62;
|
||||
@define-color color15 #c5c5c5;
|
||||
|
||||
@define-color active @color6;
|
||||
|
||||
* {
|
||||
font-size: 23px;
|
||||
font-family: "0xProto Nerd Font";
|
||||
min-width: 8px;
|
||||
min-height: 0px;
|
||||
border: none;
|
||||
border-radius: 0;
|
||||
box-shadow: none;
|
||||
text-shadow: none;
|
||||
padding: 0px;
|
||||
margin: 0px;
|
||||
|
||||
}
|
||||
|
||||
window#waybar {
|
||||
transition-property: background-color;
|
||||
transition-duration: 0.5s;
|
||||
border-radius: 8px;
|
||||
border: 2px solid @active;
|
||||
background: @background;
|
||||
background: alpha(@background, 0.7);
|
||||
color: lighter(@active);
|
||||
}
|
||||
|
||||
menu,
|
||||
tooltip {
|
||||
border-radius: 8px;
|
||||
padding: 2px;
|
||||
border: 1px solid lighter(@active);
|
||||
background: alpha(@background, 0.6);
|
||||
|
||||
color: lighter(@active);
|
||||
}
|
||||
|
||||
menu label,
|
||||
tooltip label {
|
||||
font-size: 20px;
|
||||
color: lighter(@active);
|
||||
}
|
||||
|
||||
#submap,
|
||||
#tray>.needs-attention {
|
||||
animation-name: blink-active;
|
||||
animation-duration: 1s;
|
||||
animation-timing-function: linear;
|
||||
animation-iteration-count: infinite;
|
||||
animation-direction: alternate;
|
||||
}
|
||||
|
||||
.modules-right {
|
||||
margin: 0px 6px 6px 6px;
|
||||
border-radius: 4px;
|
||||
background: alpha(@background, 0.4);
|
||||
color: lighter(@active);
|
||||
}
|
||||
|
||||
.modules-left {
|
||||
transition-property: background-color;
|
||||
transition-duration: 0.5s;
|
||||
margin: 6px 6px 6px 6px;
|
||||
border-radius: 4px;
|
||||
background: alpha(@background, 0.4);
|
||||
color: lighter(@active);
|
||||
}
|
||||
|
||||
#gcpu,
|
||||
#custom-github,
|
||||
#memory,
|
||||
#disk,
|
||||
#together,
|
||||
#submap,
|
||||
#custom-weather {
|
||||
font-size: 17px;
|
||||
}
|
||||
|
||||
#custom-recorder,
|
||||
#connection,
|
||||
#cnoti,
|
||||
#brightness,
|
||||
#power,
|
||||
#custom-updates,
|
||||
#tray,
|
||||
#audio,
|
||||
#privacy,
|
||||
#sound {
|
||||
border-radius: 4px;
|
||||
margin: 2px 2px 4px 2px;
|
||||
background: alpha(darker(@active), 0.3);
|
||||
}
|
||||
|
||||
#custom-notifications {
|
||||
padding-left: 4px;
|
||||
}
|
||||
|
||||
#custom-hotspot,
|
||||
#custom-github,
|
||||
#custom-notifications {
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
#custom-hotspot {
|
||||
padding-right: 2px;
|
||||
}
|
||||
|
||||
#custom-vpn,
|
||||
#custom-hotspot {
|
||||
background: alpha(darker(@active), 0.3);
|
||||
}
|
||||
|
||||
#privacy-item {
|
||||
padding: 6px 0px 6px 6px;
|
||||
}
|
||||
|
||||
#gcpu {
|
||||
padding: 8px 0px 8px 0px;
|
||||
}
|
||||
|
||||
#custom-cpu-icon {
|
||||
font-size: 36px;
|
||||
}
|
||||
|
||||
#custom-cputemp,
|
||||
#temperature {
|
||||
font-size: 17px;
|
||||
}
|
||||
#disk,
|
||||
#memory,
|
||||
#cpu {
|
||||
font-size: 20px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
#custom-github {
|
||||
padding-top: 2px;
|
||||
padding-right: 4px;
|
||||
}
|
||||
|
||||
#custom-dmark {
|
||||
color: alpha(@foreground, 0.3);
|
||||
}
|
||||
|
||||
#submap {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
#hyprland.window {
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
||||
#workspaces {
|
||||
margin: 0px 2px;
|
||||
padding: 4px 0px 0px 0px;
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
#workspaces button {
|
||||
transition-property: background-color;
|
||||
transition-duration: 0.5s;
|
||||
color: @foreground;
|
||||
background: transparent;
|
||||
border-radius: 4px;
|
||||
color: alpha(@foreground, 0.3);
|
||||
}
|
||||
|
||||
#workspaces button.urgent {
|
||||
font-weight: bold;
|
||||
color: @foreground;
|
||||
}
|
||||
|
||||
#workspaces button.active {
|
||||
padding: 4px 2px;
|
||||
background: alpha(@active, 0.4);
|
||||
color: lighter(@active);
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
#network.wifi {
|
||||
padding-right: 4px;
|
||||
}
|
||||
|
||||
#submap {
|
||||
min-width: 0px;
|
||||
margin: 4px 6px 4px 6px;
|
||||
}
|
||||
|
||||
#tray {
|
||||
padding: 0px 0px 0px 0px;
|
||||
}
|
||||
|
||||
#bluetooth {
|
||||
padding-top: 2px;
|
||||
}
|
||||
|
||||
#window {
|
||||
border-radius: 8px;
|
||||
padding: 4px 14px;
|
||||
margin: 4px 2px 4px 2px;
|
||||
}
|
||||
|
||||
#battery {
|
||||
font-size: 17px;
|
||||
border-radius: 8px;
|
||||
padding: 4px 0px;
|
||||
margin: 4px 2px 4px 2px;
|
||||
}
|
||||
|
||||
#battery.discharging.warning {
|
||||
animation-name: blink-yellow;
|
||||
animation-duration: 1s;
|
||||
animation-timing-function: linear;
|
||||
animation-iteration-count: infinite;
|
||||
animation-direction: alternate;
|
||||
}
|
||||
|
||||
#battery.discharging.critical {
|
||||
animation-name: blink-red;
|
||||
animation-duration: 1s;
|
||||
animation-timing-function: linear;
|
||||
animation-iteration-count: infinite;
|
||||
animation-direction: alternate;
|
||||
}
|
||||
|
||||
#battery.powerdraw {
|
||||
font-size: 17px;
|
||||
padding: 0;
|
||||
margin-right: -20px;
|
||||
margin-left: -20px;
|
||||
}
|
||||
#battery.w {
|
||||
font-size: 17px;
|
||||
padding: 0;
|
||||
margin-left: -20px;
|
||||
margin-right: -20px;
|
||||
}
|
||||
|
||||
#clock {
|
||||
font-weight: bold;
|
||||
padding: 4px 2px 2px 2px;
|
||||
}
|
||||
|
||||
#pulseaudio.mic {
|
||||
border-radius: 4px;
|
||||
color: @background;
|
||||
background: alpha(darker(@foreground), 0.6);
|
||||
padding-left: 4px;
|
||||
}
|
||||
|
||||
#backlight-slider slider,
|
||||
#pulseaudio-slider slider {
|
||||
background-color: transparent;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
#backlight-slider trough,
|
||||
#pulseaudio-slider trough {
|
||||
margin-top: 4px;
|
||||
min-width: 6px;
|
||||
min-height: 60px;
|
||||
border-radius: 8px;
|
||||
background-color: alpha(@background, 0.6);
|
||||
}
|
||||
|
||||
#backlight-slider highlight,
|
||||
#pulseaudio-slider highlight {
|
||||
border-radius: 8px;
|
||||
background-color: lighter(@active);
|
||||
}
|
||||
|
||||
#bluetooth.discoverable,
|
||||
#bluetooth.discovering,
|
||||
#bluetooth.pairable {
|
||||
border-radius: 8px;
|
||||
animation-name: blink-active;
|
||||
animation-duration: 1s;
|
||||
animation-timing-function: linear;
|
||||
animation-iteration-count: infinite;
|
||||
animation-direction: alternate;
|
||||
}
|
||||
|
||||
@keyframes blink-active {
|
||||
to {
|
||||
background-color: @active;
|
||||
color: @foreground;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes blink-red {
|
||||
to {
|
||||
background-color: #c64d4f;
|
||||
color: @foreground;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes blink-yellow {
|
||||
to {
|
||||
background-color: #cf9022;
|
||||
color: @foreground;
|
||||
}
|
||||
}
|
||||
'';
|
||||
};
|
||||
};
|
||||
flake.packages.custom-weatherwaybar = { pkgs, ... }:
|
||||
pkgs.writeShellApplication {
|
||||
name = "custom-weatherwaybar";
|
||||
runtimeInputs = with pkgs; [
|
||||
curl
|
||||
];
|
||||
text = ''
|
||||
PATTERN="C"
|
||||
PATTERN2=" "
|
||||
TEXT1="''$(curl -s "https://wttr.in/?format=%c")"
|
||||
TEXT1=''${TEXT1/$PATTERN2/}
|
||||
TEXT2="''$(curl -s "https://wttr.in/?format=%t")"
|
||||
TEXT2=''${TEXT2/$PATTERN/}
|
||||
TEXT3="''$(curl -s "https://wttr.in/?format=%f")"
|
||||
TEXT3=''${TEXT3/$PATTERN/}
|
||||
printf '{"text":" %s\\n %s\\n %s", "tooltip": false, "class": "weather"}\\n' \
|
||||
"$TEXT1" "$TEXT2" "$TEXT3"
|
||||
'';
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,118 @@
|
||||
{ ... }: {
|
||||
# replaced by wlogout
|
||||
flake.homeModules.wlogout = { ... }: let
|
||||
wallpaper = ../../assets/wallpaper1.jpg;
|
||||
lock = ../../assets/lock.png;
|
||||
lock-hover = ../../assets/lock-hover.png;
|
||||
shutdown = ../../assets/power.png;
|
||||
shutdown-hover = ../../assets/power-hover.png;
|
||||
logout = ../../assets/logout.png;
|
||||
logout-hover = ../../assets/logout-hover.png;
|
||||
reboot = ../../assets/restart.png;
|
||||
reboot-hover = ../../assets/restart-hover.png;
|
||||
in {
|
||||
programs.wlogout = {
|
||||
enable = true;
|
||||
layout = [
|
||||
{
|
||||
label = "lock";
|
||||
action = "swaylock -eFLfk -i ${wallpaper}";
|
||||
text = " Lock (L) ";
|
||||
keybind = "l";
|
||||
}
|
||||
{
|
||||
label = "reboot";
|
||||
action = "systemctl reboot";
|
||||
text = " Reboot (R) ";
|
||||
keybind = "r";
|
||||
}
|
||||
{
|
||||
label = "shutdown";
|
||||
action = "systemctl poweroff";
|
||||
text = "Shutdown (S)";
|
||||
keybind = "s";
|
||||
}
|
||||
{
|
||||
label = "logout";
|
||||
action = "loginctl terminate-session $(loginctl show-session $(loginctl | grep $USER | awk '{print $1}') -p Id --value)";
|
||||
text = " Logout (E) ";
|
||||
keybind = "e";
|
||||
}
|
||||
];
|
||||
style = ''
|
||||
window {
|
||||
font-family: OxProto Nerd Font;
|
||||
font-size: 14pt;
|
||||
color: #000000; /* text */
|
||||
background-color: rgba(40, 40, 40, 0.76);
|
||||
}
|
||||
|
||||
button {
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
background-size: 50%;
|
||||
border-style: solid;
|
||||
border-radius: 4px;
|
||||
border-width: 2px;
|
||||
border-color: #ebdbb2;
|
||||
background-color: rgba(40, 40, 40, 0.76);
|
||||
margin: 10px;
|
||||
transition:
|
||||
box-shadow 0.3s ease-in-out,
|
||||
background-color 0.3s ease-in-out;
|
||||
}
|
||||
|
||||
button:hover {
|
||||
background-color: rgba(250, 137, 26, 0.3);
|
||||
color: #282828;
|
||||
}
|
||||
|
||||
button:focus {
|
||||
background-color: #ebdbb2;
|
||||
color: #282828;
|
||||
}
|
||||
|
||||
#lock {
|
||||
background-image: image(url("${lock}"));
|
||||
}
|
||||
#lock:focus {
|
||||
background-image: image(url("${lock-hover}"));
|
||||
}
|
||||
#lock:hover {
|
||||
background-image: image(url("${lock-hover}"));
|
||||
}
|
||||
|
||||
#logout {
|
||||
background-image: image(url("${logout}"));
|
||||
}
|
||||
#logout:focus {
|
||||
background-image: image(url("${logout-hover}"));
|
||||
}
|
||||
#logout:hover {
|
||||
background-image: image(url("${logout-hover}"));
|
||||
}
|
||||
|
||||
|
||||
#shutdown {
|
||||
background-image: image(url("${shutdown}"));
|
||||
}
|
||||
#shutdown:focus {
|
||||
background-image: image(url("${shutdown-hover}"));
|
||||
}
|
||||
#shutdown:hover {
|
||||
background-image: image(url("${shutdown-hover}"));
|
||||
}
|
||||
|
||||
#reboot {
|
||||
background-image: image(url("${reboot}"));
|
||||
}
|
||||
#reboot:focus {
|
||||
background-image: image(url("${reboot-hover}"));
|
||||
}
|
||||
#reboot:hover {
|
||||
background-image: image(url("${reboot-hover}"));
|
||||
}
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{ ... }: {
|
||||
flake.homeModules.zoxide = { ... }: {
|
||||
programs.zoxide = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,88 @@
|
||||
{ self, ... }: {
|
||||
flake.homeModules.zsh-laptop = { ... }: {
|
||||
programs.zsh = {
|
||||
shellAliases = {
|
||||
snrt = "git -C ~/nixos add -A && time sudo nixos-rebuild test --flake ~/nixos/#laptop && pkill shell || true && pkill caelestia-shell || true && caelestia-shell -n > /dev/null 2>&1 & disown";
|
||||
snrs = "git -C ~/nixos add -A && time sudo nixos-rebuild switch --flake ~/nixos/#laptop && pkill shell || true && pkill caelestia-shell || true && caelestia-shell -n > /dev/null 2>&1 & disown";
|
||||
};
|
||||
};
|
||||
};
|
||||
flake.homeModules.zsh = {pkgs, ...}: {
|
||||
home.packages = [
|
||||
self.packages.${pkgs.system}.dejaManuallyDerived
|
||||
];
|
||||
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
autosuggestion.enable = false; # zsh-autocomplete is replaced by deja
|
||||
initContent = ''
|
||||
# Safe cat that uses colorize plugin ccat
|
||||
custom-cat() {
|
||||
if [[ -t 1 ]]; then
|
||||
ccat "$@"
|
||||
else
|
||||
command cat "$@"
|
||||
fi
|
||||
}
|
||||
|
||||
custom-eza() { # behaves differently if we just call it or if we pipe initContent
|
||||
if [[ -t 1 ]]; then
|
||||
eza -hlF -aa --color=always --hyperlink --group-directories-first --show-symlinks --icons=always --git --no-permissions "$@"
|
||||
else
|
||||
command eza "$@"
|
||||
fi
|
||||
}
|
||||
eval "$(direnv hook zsh)"
|
||||
eval "$(deja init zsh)"
|
||||
export PATH="$PATH:$HOME/NoteWrapper" # some project im coding
|
||||
fastfetch''\n'';
|
||||
shellAliases = {
|
||||
".." = "z ..";
|
||||
grep = "rg";
|
||||
ll = "custom-eza"; # if there is a special ls just use the big eza
|
||||
la = "custom-eza";
|
||||
l = "custom-eza";
|
||||
eza = "custom-eza";
|
||||
ls = "\\eza -a"; # ls -> normal ls. eza gives more info
|
||||
tree = "\\eza -hlTF --color=always --hyperlink --group-directories-first --show-symlinks --icons=always --git --no-permissions";
|
||||
cat = "custom-cat";
|
||||
pomodoro = "custom-tomato";
|
||||
librewolf = "kitty --class \"custom-librewolfprofiles\" --name \"Select LibreWolf profile\" --hold custom-librewolfprofiles";
|
||||
manix = "custom-manix";
|
||||
man = "custom-man";
|
||||
mplayer = "mplayer -volume 5";
|
||||
# these are to create the developpement shell
|
||||
cenv = "nix-shell -p zsh gcc raylib libx11 libGL";
|
||||
# i always write nvim wrong :(
|
||||
nbim = "nvim";
|
||||
nivm = "nvim";
|
||||
bivm = "nvim";
|
||||
nibm = "nvim";
|
||||
vikm = "nvim";
|
||||
nvimm = "nvim";
|
||||
nnvim = "nvim";
|
||||
nvvim = "nvim";
|
||||
nviim = "nvim";
|
||||
};
|
||||
};
|
||||
};
|
||||
flake.homeModules.oh-my-zsh = { ... }: {
|
||||
programs.zsh.oh-my-zsh = {
|
||||
enable = true;
|
||||
theme = "jonathan";
|
||||
plugins = [
|
||||
"aliases"
|
||||
"alias-finder"
|
||||
"colored-man-pages"
|
||||
"colorize"
|
||||
"command-not-found"
|
||||
"dirhistory"
|
||||
"fzf"
|
||||
"git"
|
||||
"rclone"
|
||||
"safe-paste"
|
||||
"sudo"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user