init
30
modules/home/alacritty.nix
Normal file
@@ -0,0 +1,30 @@
|
||||
{ lib, ... }: {
|
||||
programs.alacritty =
|
||||
let
|
||||
font_family = lib.mkForce "Maple Mono NF";
|
||||
in
|
||||
{
|
||||
enable = true;
|
||||
settings = {
|
||||
font = {
|
||||
normal = {
|
||||
family = font_family;
|
||||
style = "Regular";
|
||||
};
|
||||
bold = {
|
||||
family = font_family;
|
||||
style = "Bold";
|
||||
};
|
||||
italic = {
|
||||
family = font_family;
|
||||
style = "Italic";
|
||||
};
|
||||
bold_italic = {
|
||||
family = font_family;
|
||||
style = "Bold Italic";
|
||||
};
|
||||
size = 15;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
107
modules/home/amfora.nix
Normal file
@@ -0,0 +1,107 @@
|
||||
_: {
|
||||
home.file = {
|
||||
".config/amfora/config.toml".text = ''
|
||||
[a-general]
|
||||
home = "gemini://gem.zaney.org"
|
||||
color = true
|
||||
ansi = true
|
||||
bullets = true
|
||||
show_link = false
|
||||
scrollbar = "never"
|
||||
auto_redirect = false
|
||||
http = 'brave'
|
||||
search = "gemini://gus.guru/search"
|
||||
max_width = 140
|
||||
page_max_size = 2097152 # 2 MiB
|
||||
page_max_time = 10
|
||||
highlight_code = true
|
||||
highlight_style = "dracula"
|
||||
downloads = '~/Downloads/'
|
||||
underline = true
|
||||
[auth]
|
||||
[auth.certs]
|
||||
[auth.keys]
|
||||
[commands]
|
||||
[keybindings]
|
||||
bind_bottom = ":"
|
||||
bind_quit = "Q"
|
||||
bind_reload = "R"
|
||||
bind_back = "h"
|
||||
bind_forward = "l"
|
||||
bind_moveup = "k"
|
||||
bind_movedown = "j"
|
||||
bind_moveleft = "H"
|
||||
bind_moveright = "L"
|
||||
bind_next_tab = "J"
|
||||
bind_prev_tab = "K"
|
||||
bind_edit = "o"
|
||||
bind_new_tab = "O"
|
||||
bind_close_tab = "q"
|
||||
bind_save = "S"
|
||||
bind_home = "Ctrl-h"
|
||||
bind_bookmarks = "b"
|
||||
bind_add_bookmark = "B"
|
||||
bind_copy_page_url = "c"
|
||||
bind_copy_target_url = "C"
|
||||
bind_search = "/"
|
||||
bind_next_match = "n"
|
||||
bind_prev_match = "N"
|
||||
[url-handlers]
|
||||
[url-prompts]
|
||||
[cache]
|
||||
max_size = 0 # Size in bytes
|
||||
max_pages = 30 # The maximum number of pages the cache will store
|
||||
timeout = 1800 # 30 mins
|
||||
[proxies]
|
||||
[subscriptions]
|
||||
popup = true
|
||||
update_interval = 1800 # 30 mins
|
||||
workers = 3
|
||||
entries_per_page = 20
|
||||
header = true
|
||||
[theme]
|
||||
bg = "#282a36"
|
||||
tab_num = "#bd93f9"
|
||||
tab_divider = "#f8f8f2"
|
||||
bottombar_label = "#bd93f9"
|
||||
bottombar_text = "#8be9fd"
|
||||
bottombar_bg = "#44475a"
|
||||
scrollbar = "#44475a"
|
||||
hdg_1 = "#bd93f9"
|
||||
hdg_2 = "#7cafc2"
|
||||
hdg_3 = "#a16946"
|
||||
amfora_link = "#ff79c6"
|
||||
foreign_link = "#ffb86c"
|
||||
link_number = "#8be9fd"
|
||||
regular_text = "#f8f8f2"
|
||||
quote_text = "#f1fa8c"
|
||||
preformatted_text = "#ffb86c"
|
||||
list_text = "#f8f8f2"
|
||||
btn_bg = "#44475a"
|
||||
btn_text = "#f8f8f2"
|
||||
dl_choice_modal_bg = "#6272a4"
|
||||
dl_choice_modal_text = "#f8f8f2"
|
||||
dl_modal_bg = "#6272a4"
|
||||
dl_modal_text = "#f8f8f2"
|
||||
info_modal_bg = "#6272a4"
|
||||
info_modal_text = "#f8f8f2"
|
||||
error_modal_bg = "#ff5555"
|
||||
error_modal_text = "#f8f8f2"
|
||||
yesno_modal_bg = "#6272a4"
|
||||
yesno_modal_text = "#f8f8f2"
|
||||
tofu_modal_bg = "#6272a4"
|
||||
tofu_modal_text = "#f8f8f2"
|
||||
subscription_modal_bg = "#6272a4"
|
||||
subscription_modal_text = "#f8f8f2"
|
||||
input_modal_bg = "#6272a4"
|
||||
input_modal_text = "#f8f8f2"
|
||||
input_modal_field_bg = "#44475a"
|
||||
input_modal_field_text = "#f8f8f2"
|
||||
bkmk_modal_bg = "#6272a4"
|
||||
bkmk_modal_text = "#f8f8f2"
|
||||
bkmk_modal_label = "#f8f8f2"
|
||||
bkmk_modal_field_bg = "#44475a"
|
||||
bkmk_modal_field_text = "#f8f8f2"
|
||||
'';
|
||||
};
|
||||
}
|
||||
22
modules/home/bash.nix
Normal file
@@ -0,0 +1,22 @@
|
||||
{ profile, ... }: {
|
||||
programs.bash = {
|
||||
enable = false;
|
||||
enableCompletion = true;
|
||||
initExtra = ''
|
||||
fastfetch
|
||||
if [ -f $HOME/.bashrc-personal ]; then
|
||||
source $HOME/.bashrc-personal
|
||||
fi
|
||||
'';
|
||||
shellAliases = {
|
||||
sv = "sudo nvim";
|
||||
fr = "nh os switch --hostname ${profile}";
|
||||
fu = "nh os switch --hostname ${profile} --update";
|
||||
zu = "sh <(curl -L https://gitlab.com/Zaney/zaneyos/-/releases/latest/download/install-zaneyos.sh)";
|
||||
ncg = "nix-collect-garbage --delete-old && sudo nix-collect-garbage -d && sudo /run/current-system/bin/switch-to-configuration boot";
|
||||
v = "nvim";
|
||||
cat = "bat";
|
||||
".." = "cd ..";
|
||||
};
|
||||
};
|
||||
}
|
||||
20
modules/home/bashrc-personal.nix
Normal file
@@ -0,0 +1,20 @@
|
||||
{ pkgs, ... }: {
|
||||
home.packages = with pkgs; [ bash ];
|
||||
|
||||
home.file."./.bashrc-personal".text = ''
|
||||
|
||||
# This file allows you to define your own aliases, functions, etc
|
||||
# below are just some examples of what you can use this file for
|
||||
|
||||
#!/usr/bin/env bash
|
||||
# Set defaults
|
||||
#
|
||||
#export EDITOR="nvim"
|
||||
#export VISUAL="nvim"
|
||||
|
||||
#alias c="clear"
|
||||
#eval "$(zoxide init bash)"
|
||||
#eval "$(oh-my-posh init bash --config $HOME/.config/powerlevel10k_rainbow.omp.json)"
|
||||
|
||||
'';
|
||||
}
|
||||
26
modules/home/bat.nix
Normal file
@@ -0,0 +1,26 @@
|
||||
{ pkgs
|
||||
, lib
|
||||
, ...
|
||||
}: {
|
||||
programs.bat = {
|
||||
enable = true;
|
||||
config = {
|
||||
pager = "less -FR";
|
||||
# other styles available and cane be combined
|
||||
# style = "numbers,changes,headers,rule,grid";
|
||||
style = "full";
|
||||
# Bat has other thems as well
|
||||
# ansi,Catppuccin,base16,base16-256,GitHub,Nord,etc
|
||||
theme = lib.mkForce "Dracula";
|
||||
};
|
||||
extraPackages = with pkgs.bat-extras; [
|
||||
batman
|
||||
batpipe
|
||||
batgrep
|
||||
];
|
||||
};
|
||||
home.sessionVariables = {
|
||||
MANPAGER = "sh -c 'col -bx | bat -l man -p'";
|
||||
MANROFFOPT = "-c";
|
||||
};
|
||||
}
|
||||
35
modules/home/bottom.nix
Normal file
@@ -0,0 +1,35 @@
|
||||
{ ... }: {
|
||||
programs.bottom = {
|
||||
enable = true;
|
||||
settings = {
|
||||
enable_gpu = true;
|
||||
theme = "nord";
|
||||
flags.group_processes = true;
|
||||
row = [
|
||||
{
|
||||
ratio = 2;
|
||||
child = [
|
||||
{ type = "cpu"; }
|
||||
{ type = "temp"; }
|
||||
];
|
||||
}
|
||||
{
|
||||
ratio = 2;
|
||||
child = [
|
||||
{ type = "network"; }
|
||||
];
|
||||
}
|
||||
{
|
||||
ratio = 3;
|
||||
child = [
|
||||
{
|
||||
type = "proc";
|
||||
ratio = 1;
|
||||
default = true;
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
22
modules/home/btop.nix
Normal file
@@ -0,0 +1,22 @@
|
||||
{ pkgs, ... }: {
|
||||
programs.btop = {
|
||||
enable = true;
|
||||
package = pkgs.btop.override {
|
||||
rocmSupport = true;
|
||||
cudaSupport = true;
|
||||
};
|
||||
settings = {
|
||||
vim_keys = true;
|
||||
rounded_corners = true;
|
||||
proc_tree = true;
|
||||
show_gpu_info = "on";
|
||||
show_uptime = true;
|
||||
show_coretemp = true;
|
||||
cpu_sensor = "auto";
|
||||
show_disks = true;
|
||||
only_physical = true;
|
||||
io_mode = true;
|
||||
io_graph_combined = false;
|
||||
};
|
||||
};
|
||||
}
|
||||
43
modules/home/cava.nix
Normal file
@@ -0,0 +1,43 @@
|
||||
{ config, ... }: {
|
||||
programs.cava = {
|
||||
enable = true;
|
||||
settings = {
|
||||
general = {
|
||||
bar_spacing = 1;
|
||||
bar_width = 2;
|
||||
frame_rate = 60;
|
||||
};
|
||||
color = {
|
||||
#gradient = 1;
|
||||
#gradient_color_1 = "'#011f30'";
|
||||
#gradient_color_2 = "'#09465b'";
|
||||
#gradient_color_3 = "'#045a93'";
|
||||
#gradient_color_4 = "'#00aa00'";
|
||||
#gradient_color_5 = "'#ffff00'";
|
||||
#gradient_color_6 = "'#cc8033'";
|
||||
#gradient_color_7 = "'#aa0000'";
|
||||
#gradient_color_8 = "'#ff00ff'";
|
||||
# Old config
|
||||
#gradient = 1;
|
||||
#gradient_color_1 = "'#8bd5ca'";
|
||||
#gradient_color_2 = "'#91d7e3'";
|
||||
#gradient_color_3 = "'#7dc4e4'";
|
||||
#gradient_color_4 = "'#8aadf4'";
|
||||
#gradient_color_5 = "'#c6a0f6'";
|
||||
#gradient_color_6 = "'#f5bde6'";
|
||||
#gradient_color_7 = "'#ee99a0'";
|
||||
#gradient_color_8 = "'#ed8796'";
|
||||
# Dracula
|
||||
gradient = 1;
|
||||
gradient_color_1 = "'#8BE9FD'";
|
||||
gradient_color_2 = "'#9AEDFE'";
|
||||
gradient_color_3 = "'#CAA9FA'";
|
||||
gradient_color_4 = "'#BD93F9'";
|
||||
gradient_color_5 = "'#FF92D0'";
|
||||
gradient_color_6 = "'#FF79C6'";
|
||||
gradient_color_7 = "'#FF6E67'";
|
||||
gradient_color_8 = "'#FF5555'";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
70
modules/home/default.nix
Normal file
@@ -0,0 +1,70 @@
|
||||
{ host, ... }:
|
||||
let
|
||||
inherit (import ../../hosts/${host}/variables.nix)
|
||||
alacrittyEnable
|
||||
ghosttyEnable
|
||||
tmuxEnable
|
||||
waybarChoice
|
||||
weztermEnable
|
||||
vscodeEnable
|
||||
helixEnable
|
||||
doomEmacsEnable
|
||||
;
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
./amfora.nix
|
||||
./bash.nix
|
||||
./bashrc-personal.nix
|
||||
./bat.nix
|
||||
./btop.nix
|
||||
./bottom.nix
|
||||
./cava.nix
|
||||
./emoji.nix
|
||||
./eza.nix
|
||||
./fastfetch
|
||||
./fzf.nix
|
||||
./gh.nix
|
||||
./git.nix
|
||||
./gtk.nix
|
||||
./htop.nix
|
||||
./hyprland
|
||||
./kitty.nix
|
||||
./lazygit.nix
|
||||
./obs-studio.nix
|
||||
./nvf.nix
|
||||
./obs-studio.nix
|
||||
./rofi
|
||||
./qt.nix
|
||||
./scripts
|
||||
./scripts/gemini-cli.nix
|
||||
#./starship.nix
|
||||
#./starship-ddubs-1.nix
|
||||
./stylix.nix
|
||||
./swappy.nix
|
||||
./swaync.nix
|
||||
./tealdeer.nix
|
||||
./virtmanager.nix
|
||||
waybarChoice
|
||||
./wlogout
|
||||
./xdg.nix
|
||||
./yazi
|
||||
./zoxide.nix
|
||||
./zsh
|
||||
]
|
||||
++ (if helixEnable then [ ./evil-helix.nix ] else [ ])
|
||||
++ (if vscodeEnable then [ ./vscode.nix ] else [ ])
|
||||
++ (
|
||||
if doomEmacsEnable then
|
||||
[
|
||||
./editors/doom-emacs-install.nix
|
||||
./editors/doom-emacs.nix
|
||||
]
|
||||
else
|
||||
[ ]
|
||||
)
|
||||
++ (if weztermEnable then [ ./wezterm.nix ] else [ ])
|
||||
++ (if ghosttyEnable then [ ./ghostty.nix ] else [ ])
|
||||
++ (if tmuxEnable then [ ./tmux.nix ] else [ ])
|
||||
++ (if alacrittyEnable then [ ./alacritty.nix ] else [ ]);
|
||||
}
|
||||
78
modules/home/editors/doom-emacs-install.nix
Normal file
@@ -0,0 +1,78 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
let
|
||||
doom-icon = pkgs.fetchurl {
|
||||
url = "https://raw.githubusercontent.com/jeetelongname/doom-banners/master/splashes/doom/doom-emacs-color2.svg";
|
||||
sha256 = "1xxi5ra1z8njsqaqiaq96wyn1sc967l42kvjzbji1zrjj8za6bgq";
|
||||
};
|
||||
in
|
||||
{
|
||||
# 1. Create a script to install Doom Emacs
|
||||
home.packages = [
|
||||
(pkgs.writeShellScriptBin "get-doom" ''
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
# --- Icons ---
|
||||
ICON_CHECK="✔"
|
||||
ICON_INFO="ℹ"
|
||||
ICON_ROCKET="🚀"
|
||||
|
||||
# --- Helper Functions ---
|
||||
print_status() {
|
||||
echo
|
||||
echo "--- $ICON_INFO $1 ---"
|
||||
}
|
||||
|
||||
print_success() {
|
||||
echo "--- $ICON_CHECK $1 ---"
|
||||
}
|
||||
|
||||
print_banner() {
|
||||
echo "==============================="
|
||||
echo " Doom Emacs Installer $ICON_ROCKET"
|
||||
echo "==============================="
|
||||
}
|
||||
|
||||
# --- Main Script ---
|
||||
print_banner
|
||||
EMACSDIR="$HOME/.emacs.d"
|
||||
|
||||
if [ -d "$EMACSDIR" ]; then
|
||||
print_success "Doom Emacs is already installed."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
print_status "Cloning Doom Emacs..."
|
||||
git clone --depth 1 https://github.com/doomemacs/doomemacs "$EMACSDIR"
|
||||
print_success "Doom Emacs cloned."
|
||||
|
||||
print_status "Running Doom install..."
|
||||
"$EMACSDIR/bin/doom" install
|
||||
print_success "Doom install complete."
|
||||
|
||||
print_status "Running doom sync..."
|
||||
"$EMACSDIR/bin/doom" sync
|
||||
print_success "Doom sync complete."
|
||||
|
||||
echo
|
||||
print_success "All done! Doom Emacs is ready to use."
|
||||
'')
|
||||
];
|
||||
|
||||
# 2. Add the bin directory to the PATH
|
||||
home.sessionPath = [
|
||||
"$HOME/.emacs.d/bin"
|
||||
];
|
||||
|
||||
# 3. Create a desktop file
|
||||
xdg.desktopEntries.doom-emacs = {
|
||||
name = "Doom Emacs";
|
||||
comment = "A configuration framework for GNU Emacs";
|
||||
exec = "emacs";
|
||||
icon = doom-icon;
|
||||
terminal = false;
|
||||
type = "Application";
|
||||
categories = [ "Development" "TextEditor" ];
|
||||
};
|
||||
}
|
||||
162
modules/home/editors/doom-emacs.nix
Normal file
@@ -0,0 +1,162 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
emacs-gtk
|
||||
git
|
||||
lazygit
|
||||
ripgrep
|
||||
libtool
|
||||
cmake
|
||||
pkg-config
|
||||
# Spell checking
|
||||
hunspell
|
||||
hunspellDicts.en_US
|
||||
hunspellDicts.en_AU
|
||||
hunspellDicts.es_ES
|
||||
# LSP servers
|
||||
clang-tools # C/C++ LSP
|
||||
nil # Nix LSP
|
||||
];
|
||||
|
||||
home.file.".doom.d/init.el".text = ''
|
||||
;;; init.el -*- lexical-binding: t; -*-
|
||||
|
||||
(doom!
|
||||
:completion
|
||||
(company +auto)
|
||||
(vertico +icons)
|
||||
|
||||
:ui
|
||||
doom
|
||||
doom-dashboard
|
||||
doom-quit
|
||||
hl-todo
|
||||
modeline
|
||||
nav-flash
|
||||
ophints
|
||||
(popup +defaults)
|
||||
(ligatures +extra)
|
||||
tabs
|
||||
treemacs
|
||||
vi-tilde-fringe
|
||||
window-select
|
||||
|
||||
:editor
|
||||
(evil +everywhere)
|
||||
file-templates
|
||||
fold
|
||||
multiple-cursors
|
||||
snippets
|
||||
word-wrap
|
||||
|
||||
:emacs
|
||||
(dired +icons)
|
||||
electric
|
||||
(ibuffer +icons)
|
||||
(undo +tree)
|
||||
vc
|
||||
|
||||
:term
|
||||
vterm
|
||||
|
||||
:checkers
|
||||
(syntax +flymake)
|
||||
(spell +flyspell)
|
||||
grammar
|
||||
|
||||
:tools
|
||||
(eval +overlay)
|
||||
(lookup +docsets)
|
||||
lsp
|
||||
(magit +forge)
|
||||
pdf
|
||||
tree-sitter
|
||||
|
||||
:lang
|
||||
bash
|
||||
(c +lsp)
|
||||
css
|
||||
docker
|
||||
html
|
||||
(json +lsp)
|
||||
markdown
|
||||
(nix +tree-sitter +lsp)
|
||||
toml
|
||||
yaml
|
||||
|
||||
:config
|
||||
(default +bindings +smartparens))
|
||||
'';
|
||||
|
||||
home.file.".doom.d/config.el".text = ''
|
||||
;;; config.el -*- lexical-binding: t; -*-
|
||||
|
||||
(setq doom-theme 'doom-one)
|
||||
(setq display-line-numbers-type 'relative)
|
||||
(setq nerd-icons-font-family "JetBrainsMono Nerd Font")
|
||||
|
||||
;; Git configuration
|
||||
(after! magit
|
||||
;; Set default git editor to emacsclient
|
||||
(setq with-editor-emacsclient-executable "emacsclient")
|
||||
;; Show word-granularity differences within diff hunks
|
||||
(setq magit-diff-refine-hunk t)
|
||||
;; Auto-refresh magit buffers
|
||||
(setq magit-refresh-status-buffer t))
|
||||
|
||||
;; Lazygit integration
|
||||
(defun my/lazygit ()
|
||||
"Open lazygit in a terminal."
|
||||
(interactive)
|
||||
(if (fboundp 'vterm)
|
||||
(let ((default-directory (magit-toplevel)))
|
||||
(vterm "*lazygit*")
|
||||
(vterm-send-string "lazygit")
|
||||
(vterm-send-return))
|
||||
(async-shell-command "lazygit" "*lazygit*")))
|
||||
|
||||
;; LSP configuration
|
||||
(after! lsp-mode
|
||||
(setq lsp-signature-auto-activate t
|
||||
lsp-signature-render-documentation t
|
||||
lsp-completion-provider :company-capf
|
||||
lsp-idle-delay 0.1))
|
||||
|
||||
;; Nix LSP (nil) configuration
|
||||
(with-eval-after-load 'lsp-nix-nil
|
||||
(setq lsp-nix-nil-auto-eval-inputs t))
|
||||
|
||||
;; Company completion settings
|
||||
(after! company
|
||||
(setq company-idle-delay 0.2
|
||||
company-minimum-prefix-length 1
|
||||
company-tooltip-align-annotations t
|
||||
company-require-match 'never))
|
||||
|
||||
;; Spell checking configuration
|
||||
(after! ispell
|
||||
(setq ispell-program-name "hunspell")
|
||||
(setq ispell-local-dictionary "en_US")
|
||||
(setq ispell-local-dictionary-alist
|
||||
'(("en_US" "[[:alpha:]]" "[^[:alpha:]]" "[']" nil ("-d" "en_US") nil utf-8))))
|
||||
|
||||
;; Git keybindings
|
||||
(map! :leader
|
||||
(:prefix-map ("g" . "git")
|
||||
:desc "Magit status" "g" #'magit-status
|
||||
:desc "Magit dispatch" "d" #'magit-dispatch
|
||||
:desc "Magit file dispatch" "f" #'magit-file-dispatch
|
||||
:desc "Magit blame" "b" #'magit-blame-addition
|
||||
:desc "Git time machine" "t" #'git-timemachine-toggle
|
||||
:desc "Lazygit" "l" #'my/lazygit
|
||||
:desc "Git stage file" "s" #'magit-stage-file
|
||||
:desc "Git unstage file" "u" #'magit-unstage-file))
|
||||
'';
|
||||
|
||||
home.file.".doom.d/packages.el".text = ''
|
||||
;;; packages.el -*- lexical-binding: t; -*-
|
||||
|
||||
;; Git-related packages
|
||||
(package! git-timemachine)
|
||||
'';
|
||||
}
|
||||
1853
modules/home/emoji.nix
Normal file
89
modules/home/evil-helix.nix
Normal file
@@ -0,0 +1,89 @@
|
||||
{ pkgs, ... }:
|
||||
let
|
||||
enableEvilHelix = true; # Set to true to enable the configuration
|
||||
in
|
||||
{
|
||||
home.packages = with pkgs; (
|
||||
if enableEvilHelix
|
||||
then [
|
||||
evil-helix
|
||||
cmake-language-server
|
||||
jsonnet-language-server
|
||||
luaformatter
|
||||
lua-language-server
|
||||
marksman
|
||||
taplo
|
||||
nil
|
||||
jq-lsp
|
||||
vscode-langservers-extracted
|
||||
bash-language-server
|
||||
awk-language-server
|
||||
vscode-extensions.llvm-vs-code-extensions.vscode-clangd
|
||||
clang-tools
|
||||
docker-compose-language-service
|
||||
docker-compose
|
||||
docker-language-server
|
||||
typescript-language-server
|
||||
]
|
||||
else [ ]
|
||||
);
|
||||
|
||||
home.file.".config/helix/languages.toml".text =
|
||||
if enableEvilHelix
|
||||
then ''
|
||||
[language-server.nil]
|
||||
command = "nil"
|
||||
|
||||
[language-server.lua]
|
||||
command = "lua-language-server"
|
||||
|
||||
[language-server.json]
|
||||
command = "vscode-json-languageserver"
|
||||
|
||||
[language-server.markdown]
|
||||
command = "marksman"
|
||||
''
|
||||
else "";
|
||||
|
||||
home.file.".config/helix/config.toml".text =
|
||||
if enableEvilHelix
|
||||
then ''
|
||||
theme = "catppuccin_mocha"
|
||||
#theme = "ao"
|
||||
|
||||
[editor]
|
||||
evil = true
|
||||
end-of-line-diagnostics = "hint"
|
||||
auto-pairs = true
|
||||
mouse = true
|
||||
middle-click-paste = true
|
||||
shell = ["zsh", "-c"]
|
||||
line-number = "absolute"
|
||||
auto-completion = true
|
||||
path-completion = true
|
||||
auto-info = true
|
||||
color-modes = true
|
||||
popup-border = "all"
|
||||
clipboard-provider = "wayland"
|
||||
indent-heuristic = "hybrid"
|
||||
|
||||
[editor.statusline]
|
||||
left = ["mode", "spinner"]
|
||||
center = ["file-absolute-path", "total-line-numbers", "read-only-indicator", "file-modification-indicator"]
|
||||
right = ["diagnostics", "selections", "position", "file-encoding", "file-line-ending", "file-type"]
|
||||
separator = "│"
|
||||
mode.normal = "NORMAL"
|
||||
mode.insert = "INSERT"
|
||||
mode.select = "SELECT"
|
||||
|
||||
[editor.lsp]
|
||||
enable = true
|
||||
display-messages = true
|
||||
display-progress-messages = true
|
||||
|
||||
[editor.inline-diagnostics]
|
||||
cursor-line = "hint"
|
||||
other-lines = "hint"
|
||||
''
|
||||
else "";
|
||||
}
|
||||
30
modules/home/eza.nix
Normal file
@@ -0,0 +1,30 @@
|
||||
# Eza is a ls replacement
|
||||
{
|
||||
programs.eza = {
|
||||
enable = true;
|
||||
icons = "auto";
|
||||
enableBashIntegration = true;
|
||||
enableZshIntegration = true;
|
||||
enableFishIntegration = true;
|
||||
git = true;
|
||||
|
||||
extraOptions = [
|
||||
"--group-directories-first"
|
||||
"--no-quotes"
|
||||
"--header" # Show header row
|
||||
"--git-ignore"
|
||||
"--icons=always"
|
||||
# "--time-style=long-iso" # ISO 8601 extended format for time
|
||||
"--classify" # append indicator (/, *, =, @, |)
|
||||
"--hyperlink" # make paths clickable in some terminals
|
||||
];
|
||||
};
|
||||
# Aliases to make `ls`, `ll`, `la` use eza
|
||||
home.shellAliases = {
|
||||
ls = "eza";
|
||||
lt = "eza --tree --level=2";
|
||||
ll = "eza -lh --no-user --long";
|
||||
la = "eza -lah ";
|
||||
tree = "eza --tree ";
|
||||
};
|
||||
}
|
||||
136
modules/home/fastfetch/default.nix
Normal file
@@ -0,0 +1,136 @@
|
||||
{
|
||||
programs.fastfetch = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
display = {
|
||||
color = {
|
||||
keys = "35";
|
||||
output = "95";
|
||||
};
|
||||
separator = " ➜ ";
|
||||
};
|
||||
|
||||
logo = {
|
||||
source = ./nixos.png;
|
||||
type = "kitty-direct";
|
||||
height = 10;
|
||||
width = 20;
|
||||
padding = {
|
||||
top = 2;
|
||||
left = 2;
|
||||
};
|
||||
};
|
||||
|
||||
modules = [
|
||||
"break"
|
||||
{
|
||||
type = "os";
|
||||
key = "OS";
|
||||
keyColor = "31";
|
||||
}
|
||||
{
|
||||
type = "command";
|
||||
key = " ├ ZaneyOS ";
|
||||
keyColor = "31";
|
||||
text = "echo v$" + "{ZANEYOS_VERSION}";
|
||||
}
|
||||
{
|
||||
type = "kernel";
|
||||
key = " ├ ";
|
||||
keyColor = "31";
|
||||
}
|
||||
{
|
||||
type = "packages";
|
||||
key = " ├ ";
|
||||
keyColor = "31";
|
||||
}
|
||||
{
|
||||
type = "shell";
|
||||
key = " └ ";
|
||||
keyColor = "31";
|
||||
}
|
||||
"break"
|
||||
{
|
||||
type = "wm";
|
||||
key = "WM ";
|
||||
keyColor = "32";
|
||||
}
|
||||
{
|
||||
type = "wmtheme";
|
||||
key = " ├ ";
|
||||
keyColor = "32";
|
||||
}
|
||||
{
|
||||
type = "icons";
|
||||
key = " ├ ";
|
||||
keyColor = "32";
|
||||
}
|
||||
{
|
||||
type = "cursor";
|
||||
key = " ├ ";
|
||||
keyColor = "32";
|
||||
}
|
||||
{
|
||||
type = "terminal";
|
||||
key = " ├ ";
|
||||
keyColor = "32";
|
||||
}
|
||||
{
|
||||
type = "terminalfont";
|
||||
key = " └ ";
|
||||
keyColor = "32";
|
||||
}
|
||||
"break"
|
||||
{
|
||||
type = "host";
|
||||
format = "{5} {1} Type {2}";
|
||||
key = "PC ";
|
||||
keyColor = "33";
|
||||
}
|
||||
{
|
||||
type = "cpu";
|
||||
format = "{1} ({3}) @ {7} GHz";
|
||||
key = " ├ ";
|
||||
keyColor = "33";
|
||||
}
|
||||
{
|
||||
type = "gpu";
|
||||
format = "{1} {2} @ {12} GHz";
|
||||
key = " ├ ";
|
||||
keyColor = "33";
|
||||
}
|
||||
{
|
||||
type = "memory";
|
||||
key = " ├ ";
|
||||
keyColor = "33";
|
||||
}
|
||||
{
|
||||
type = "disk";
|
||||
key = " ├ ";
|
||||
keyColor = "33";
|
||||
}
|
||||
{
|
||||
type = "monitor";
|
||||
key = " ├ ";
|
||||
keyColor = "33";
|
||||
}
|
||||
{
|
||||
type = "player";
|
||||
key = " ├ ";
|
||||
keyColor = "33";
|
||||
}
|
||||
{
|
||||
type = "media";
|
||||
key = " └ ";
|
||||
keyColor = "33";
|
||||
}
|
||||
"break"
|
||||
{
|
||||
type = "uptime";
|
||||
key = " Uptime ";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
BIN
modules/home/fastfetch/nixos.png
Normal file
|
After Width: | Height: | Size: 78 KiB |
37
modules/home/fzf.nix
Normal file
@@ -0,0 +1,37 @@
|
||||
# Fzf is a general-purpose command-line fuzzy finder.
|
||||
{ config
|
||||
, lib
|
||||
, ...
|
||||
}:
|
||||
let
|
||||
accent = "#" + config.lib.stylix.colors.base0D;
|
||||
foreground = "#" + config.lib.stylix.colors.base05;
|
||||
muted = "#" + config.lib.stylix.colors.base03;
|
||||
in
|
||||
{
|
||||
programs.fzf = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
colors = lib.mkForce {
|
||||
"fg+" = accent;
|
||||
"bg+" = "-1";
|
||||
"fg" = foreground;
|
||||
"bg" = "-1";
|
||||
"prompt" = muted;
|
||||
"pointer" = accent;
|
||||
};
|
||||
defaultOptions = [
|
||||
"--margin=1"
|
||||
"--layout=reverse"
|
||||
"--border=none"
|
||||
"--info='hidden'"
|
||||
"--header=''"
|
||||
"--prompt='/ '"
|
||||
"-i"
|
||||
"--no-bold"
|
||||
"--bind='enter:execute(nvim {})'"
|
||||
"--preview='bat --style=numbers --color=always --line-range :500 {}'"
|
||||
"--preview-window=right:60%:wrap"
|
||||
];
|
||||
};
|
||||
}
|
||||
6
modules/home/gh.nix
Normal file
@@ -0,0 +1,6 @@
|
||||
{ ... }:
|
||||
{
|
||||
programs = {
|
||||
gh.enable = true;
|
||||
};
|
||||
}
|
||||
100
modules/home/ghostty.nix
Normal file
@@ -0,0 +1,100 @@
|
||||
{ pkgs, ... }:
|
||||
let
|
||||
# A recent issue 7/7/2025 w/ghostty causes it to hang or respond slowly
|
||||
# This is a workaround until a fix is released
|
||||
myGhostty = pkgs.ghostty.overrideAttrs (_: {
|
||||
preBuild = ''
|
||||
shopt -s globstar
|
||||
sed -i 's/^const xev = @import("xev");$/const xev = @import("xev").Epoll;/' **/*.zig
|
||||
shopt -u globstar
|
||||
'';
|
||||
});
|
||||
in
|
||||
{
|
||||
programs.ghostty = {
|
||||
enable = true;
|
||||
package = myGhostty; # to fix a but in current builds of ghostty
|
||||
#package = pkgs.ghostty;
|
||||
};
|
||||
home.file."./.config/ghostty/config".text = ''
|
||||
|
||||
#theme = Aura
|
||||
theme = Dracula
|
||||
#theme = Aardvark Blue
|
||||
#theme = GruvboxDarkHard
|
||||
adjust-cell-height = 10%
|
||||
window-theme = dark
|
||||
window-height = 32
|
||||
window-width = 110
|
||||
background-opacity = 0.95
|
||||
background-blur-radius = 60
|
||||
selection-background = #2d3f76
|
||||
selection-foreground = #c8d3f5
|
||||
cursor-style = bar
|
||||
mouse-hide-while-typing = true
|
||||
|
||||
# keybindings
|
||||
# Copy/Paste
|
||||
keybind = ctrl+shift+c=copy_to_clipboard
|
||||
keybind = ctrl+shift+v=paste_from_clipboard
|
||||
|
||||
keybind = alt+s>r=reload_config
|
||||
keybind = alt+s>x=close_surface
|
||||
|
||||
keybind = alt+s>n=new_window
|
||||
|
||||
# tabs
|
||||
keybind = alt+s>c=new_tab
|
||||
keybind = alt+s>shift+l=next_tab
|
||||
keybind = alt+s>shift+h=previous_tab
|
||||
keybind = alt+s>comma=move_tab:-1
|
||||
keybind = alt+s>period=move_tab:1
|
||||
|
||||
# quick tab switch
|
||||
keybind = alt+s>1=goto_tab:1
|
||||
keybind = alt+s>2=goto_tab:2
|
||||
keybind = alt+s>3=goto_tab:3
|
||||
keybind = alt+s>4=goto_tab:4
|
||||
keybind = alt+s>5=goto_tab:5
|
||||
keybind = alt+s>6=goto_tab:6
|
||||
keybind = alt+s>7=goto_tab:7
|
||||
keybind = alt+s>8=goto_tab:8
|
||||
keybind = alt+s>9=goto_tab:9
|
||||
|
||||
# split
|
||||
keybind = alt+s>\=new_split:right
|
||||
keybind = alt+s>-=new_split:down
|
||||
|
||||
keybind = alt+s>j=goto_split:bottom
|
||||
keybind = alt+s>k=goto_split:top
|
||||
keybind = alt+s>h=goto_split:left
|
||||
keybind = alt+s>l=goto_split:right
|
||||
|
||||
keybind = alt+s>z=toggle_split_zoom
|
||||
|
||||
keybind = alt+s>e=equalize_splits
|
||||
|
||||
# other
|
||||
#copy-on-select = clipboard
|
||||
|
||||
font-size = 12
|
||||
#font-family = JetBrainsMono Nerd Font Mono
|
||||
#font-family-bold = JetBrainsMono NFM Bold
|
||||
#font-family-bold-italic = JetBrainsMono NFM Bold Italic
|
||||
#font-family-italic = JetBrainsMono NFM Italic
|
||||
|
||||
font-family = BerkeleyMono Nerd Font
|
||||
#font-family = Iosevka Nerd Font
|
||||
# font-family = SFMono Nerd Font
|
||||
|
||||
title = "GhosTTY"
|
||||
|
||||
wait-after-command = false
|
||||
shell-integration = detect
|
||||
window-save-state = always
|
||||
gtk-single-instance = true
|
||||
unfocused-split-opacity = 0.5
|
||||
quick-terminal-position = center
|
||||
shell-integration-features = cursor,sudo
|
||||
'';
|
||||
}
|
||||
33
modules/home/git.nix
Normal file
@@ -0,0 +1,33 @@
|
||||
{ host, ... }:
|
||||
let
|
||||
inherit (import ../../hosts/${host}/variables.nix) gitUsername gitEmail;
|
||||
in
|
||||
{
|
||||
programs.git = {
|
||||
enable = true;
|
||||
userName = "${gitUsername}";
|
||||
userEmail = "${gitEmail}";
|
||||
|
||||
extraConfig = {
|
||||
# FOSS-friendly settings
|
||||
push.default = "simple"; # Match modern push behavior
|
||||
credential.helper = "cache --timeout=7200";
|
||||
init.defaultBranch = "main"; # Set default new branches to 'main'
|
||||
log.decorate = "full"; # Show branch/tag info in git log
|
||||
log.date = "iso"; # ISO 8601 date format
|
||||
# Conflict resolution style for readable diffs
|
||||
merge.conflictStyle = "diff3";
|
||||
};
|
||||
# Optional: FOSS-friendly Git aliases
|
||||
aliases = {
|
||||
br = "branch --sort=-committerdate";
|
||||
co = "checkout";
|
||||
df = "diff";
|
||||
com = "commit -a";
|
||||
gs = "stash";
|
||||
gp = "pull";
|
||||
lg = "log --graph --pretty=format:'%Cred%h%Creset - %C(yellow)%d%Creset %s %C(green)(%cr)%C(bold blue) <%an>%Creset' --abbrev-commit";
|
||||
st = "status";
|
||||
};
|
||||
};
|
||||
}
|
||||
16
modules/home/gtk.nix
Normal file
@@ -0,0 +1,16 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
gtk = {
|
||||
iconTheme = {
|
||||
name = "Papirus-Dark";
|
||||
package = pkgs.papirus-icon-theme;
|
||||
};
|
||||
gtk3.extraConfig = {
|
||||
gtk-application-prefer-dark-theme = 1;
|
||||
};
|
||||
gtk4.extraConfig = {
|
||||
gtk-application-prefer-dark-theme = 1;
|
||||
};
|
||||
};
|
||||
}
|
||||
42
modules/home/htop.nix
Normal file
@@ -0,0 +1,42 @@
|
||||
{ config, ... }: {
|
||||
programs.htop = {
|
||||
enable = true;
|
||||
settings =
|
||||
{
|
||||
color_scheme = 6;
|
||||
cpu_count_from_one = 0;
|
||||
delay = 15;
|
||||
fields = with config.lib.htop.fields; [
|
||||
PID
|
||||
USER
|
||||
PRIORITY
|
||||
NICE
|
||||
M_SIZE
|
||||
M_RESIDENT
|
||||
M_SHARE
|
||||
STATE
|
||||
PERCENT_CPU
|
||||
PERCENT_MEM
|
||||
TIME
|
||||
COMM
|
||||
];
|
||||
highlight_base_name = 1;
|
||||
highlight_megabytes = 1;
|
||||
highlight_threads = 1;
|
||||
}
|
||||
// (with config.lib.htop;
|
||||
leftMeters [
|
||||
(bar "AllCPUs2")
|
||||
(bar "Memory")
|
||||
(bar "Swap")
|
||||
(text "Zram")
|
||||
])
|
||||
// (with config.lib.htop;
|
||||
rightMeters [
|
||||
(text "Tasks")
|
||||
(text "LoadAverage")
|
||||
(text "Uptime")
|
||||
(text "Systemd")
|
||||
]);
|
||||
};
|
||||
}
|
||||
22
modules/home/hyprland/animations-def.nix
Normal file
@@ -0,0 +1,22 @@
|
||||
{ ... }: {
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
animations = {
|
||||
enabled = true;
|
||||
bezier = [
|
||||
"wind, -1.05, 0.9, 0.1, 1.05"
|
||||
"winIn, -1.1, 1.1, 0.1, 1.1"
|
||||
"winOut, -1.3, -0.3, 0, 1"
|
||||
"liner, 0, 1, 1, 1"
|
||||
];
|
||||
animation = [
|
||||
"windows, 0, 6, wind, slide"
|
||||
"windowsIn, 0, 6, winIn, slide"
|
||||
"windowsOut, 0, 5, winOut, slide"
|
||||
"windowsMove, 0, 5, wind, slide"
|
||||
"border, 0, 1, liner"
|
||||
"fade, 0, 10, default"
|
||||
"workspaces, 0, 5, wind"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
25
modules/home/hyprland/animations-dynamic.nix
Normal file
@@ -0,0 +1,25 @@
|
||||
{ ... }: {
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
# name "Dynamic"
|
||||
# credit https://github.com/mylinuxforwork/dotfiles
|
||||
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"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
37
modules/home/hyprland/animations-end4.nix
Normal file
@@ -0,0 +1,37 @@
|
||||
{ ... }: {
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
# Name: END-4
|
||||
# Credit: END-4 project https://github.com/end-4/dots-hyprland
|
||||
animations = {
|
||||
enabled = true;
|
||||
bezier = [
|
||||
"linear, 0, 0, 1, 1"
|
||||
"md3_standard, 0.2, 0, 0, 1"
|
||||
"md3_decel, 0.05, 0.7, 0.1, 1"
|
||||
"md3_accel, 0.3, 0, 0.8, 0.15"
|
||||
"overshot, 0.05, 0.9, 0.1, 1.1"
|
||||
"crazyshot, 0.1, 1.5, 0.76, 0.92 "
|
||||
"hyprnostretch, 0.05, 0.9, 0.1, 1.0"
|
||||
"menu_decel, 0.1, 1, 0, 1"
|
||||
"menu_accel, 0.38, 0.04, 1, 0.07"
|
||||
"easeInOutCirc, 0.85, 0, 0.15, 1"
|
||||
"easeOutCirc, 0, 0.55, 0.45, 1"
|
||||
"easeOutExpo, 0.16, 1, 0.3, 1"
|
||||
"softAcDecel, 0.26, 0.26, 0.15, 1"
|
||||
"md2, 0.4, 0, 0.2, 1 # use with .2s duration"
|
||||
];
|
||||
animation = [
|
||||
"windows, 1, 3, md3_decel, popin 60%"
|
||||
"windowsIn, 1, 3, md3_decel, popin 60%"
|
||||
"windowsOut, 1, 3, md3_accel, popin 60%"
|
||||
"border, 1, 10, default"
|
||||
"fade, 1, 3, md3_decel"
|
||||
"layersIn, 1, 3, menu_decel, slide"
|
||||
"layersOut, 1, 1.6, menu_accel"
|
||||
"fadeLayersIn, 1, 2, menu_decel"
|
||||
"fadeLayersOut, 1, 4.5, menu_accel"
|
||||
"workspaces, 1, 7, menu_decel, slide"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
24
modules/home/hyprland/animations-moving.nix
Normal file
@@ -0,0 +1,24 @@
|
||||
{ ... }: {
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
# name "moving"
|
||||
# credit https://github.com/mylinuxforwork/dotfiles
|
||||
animations = {
|
||||
enabled = true;
|
||||
bezier = [
|
||||
"overshot, 0.05, 0.9, 0.1, 1.05"
|
||||
"smoothOut, 0.5, 0, 0.99, 0.99"
|
||||
"smoothIn, 0.5, -0.5, 0.68, 1.5"
|
||||
];
|
||||
animation = [
|
||||
"windows, 1, 5, overshot, slide"
|
||||
"windowsOut, 1, 3, smoothOut"
|
||||
"windowsIn, 1, 3, smoothOut"
|
||||
"windowsMove, 1, 4, smoothIn, slide"
|
||||
"border, 1, 5, default"
|
||||
"fade, 1, 5, smoothIn"
|
||||
"fadeDim, 1, 5, smoothIn"
|
||||
"workspaces, 1, 6, default"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
106
modules/home/hyprland/binds.nix
Normal file
@@ -0,0 +1,106 @@
|
||||
{ host, ... }:
|
||||
let
|
||||
inherit
|
||||
(import ../../../hosts/${host}/variables.nix)
|
||||
browser
|
||||
terminal
|
||||
;
|
||||
in
|
||||
{
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
bind = [
|
||||
"$modifier,Return,exec,${terminal}"
|
||||
"$modifier,K,exec,list-keybinds"
|
||||
"$modifier SHIFT,Return,exec,rofi-launcher"
|
||||
"$modifier ,R,exec,rofi-launcher"
|
||||
"$modifier SHIFT,W,exec,web-search"
|
||||
"$modifier ALT,W,exec,wallsetter"
|
||||
"$modifier SHIFT,N,exec,swaync-client -rs"
|
||||
"$modifier,W,exec,${browser}"
|
||||
"$modifier,Y,exec,kitty -e yazi"
|
||||
"$modifier,E,exec,emopicker9000"
|
||||
"$modifier,S,exec,screenshootin"
|
||||
"$modifier,D,exec,discord"
|
||||
"$modifier,O,exec,obs"
|
||||
"$modifier,C,exec,hyprpicker -a"
|
||||
"$modifier,G,exec,gimp"
|
||||
"$modifier shift,T,exec,pypr toggle term"
|
||||
"$modifier,T,exec, thunar"
|
||||
"$modifier,M,exec,pavucontrol"
|
||||
"$modifier,Q,killactive,"
|
||||
"$modifier,P,pseudo,"
|
||||
"$modifier,V,exec, cliphist list | rofi -dmenu | cliphist decode | wl-copy"
|
||||
"$modifier SHIFT,I,togglesplit,"
|
||||
"$modifier,F,fullscreen,"
|
||||
"$modifier SHIFT,F,togglefloating,"
|
||||
"$modifier ALT,F,workspaceopt, allfloat"
|
||||
"$modifier SHIFT,C,exit,"
|
||||
"$modifier SHIFT,left,movewindow,l"
|
||||
"$modifier SHIFT,right,movewindow,r"
|
||||
"$modifier SHIFT,up,movewindow,u"
|
||||
"$modifier SHIFT,down,movewindow,d"
|
||||
"$modifier SHIFT,h,movewindow,l"
|
||||
"$modifier SHIFT,l,movewindow,r"
|
||||
"$modifier SHIFT,k,movewindow,u"
|
||||
"$modifier SHIFT,j,movewindow,d"
|
||||
"$modifier ALT, left, swapwindow,l"
|
||||
"$modifier ALT, right, swapwindow,r"
|
||||
"$modifier ALT, up, swapwindow,u"
|
||||
"$modifier ALT, down, swapwindow,d"
|
||||
"$modifier ALT, 43, swapwindow,l"
|
||||
"$modifier ALT, 46, swapwindow,r"
|
||||
"$modifier ALT, 45, swapwindow,u"
|
||||
"$modifier ALT, 44, swapwindow,d"
|
||||
"$modifier,left,movefocus,l"
|
||||
"$modifier,right,movefocus,r"
|
||||
"$modifier,up,movefocus,u"
|
||||
"$modifier,down,movefocus,d"
|
||||
"$modifier,h,movefocus,l"
|
||||
"$modifier,l,movefocus,r"
|
||||
"$modifier,k,movefocus,u"
|
||||
"$modifier,j,movefocus,d"
|
||||
"$modifier,1,workspace,1"
|
||||
"$modifier,2,workspace,2"
|
||||
"$modifier,3,workspace,3"
|
||||
"$modifier,4,workspace,4"
|
||||
"$modifier,5,workspace,5"
|
||||
"$modifier,6,workspace,6"
|
||||
"$modifier,7,workspace,7"
|
||||
"$modifier,8,workspace,8"
|
||||
"$modifier,9,workspace,9"
|
||||
"$modifier,0,workspace,10"
|
||||
"$modifier SHIFT,SPACE,movetoworkspace,special"
|
||||
"$modifier,SPACE,togglespecialworkspace"
|
||||
"$modifier SHIFT,1,movetoworkspace,1"
|
||||
"$modifier SHIFT,2,movetoworkspace,2"
|
||||
"$modifier SHIFT,3,movetoworkspace,3"
|
||||
"$modifier SHIFT,4,movetoworkspace,4"
|
||||
"$modifier SHIFT,5,movetoworkspace,5"
|
||||
"$modifier SHIFT,6,movetoworkspace,6"
|
||||
"$modifier SHIFT,7,movetoworkspace,7"
|
||||
"$modifier SHIFT,8,movetoworkspace,8"
|
||||
"$modifier SHIFT,9,movetoworkspace,9"
|
||||
"$modifier SHIFT,0,movetoworkspace,10"
|
||||
"$modifier CONTROL,right,workspace,e+1"
|
||||
"$modifier CONTROL,left,workspace,e-1"
|
||||
"$modifier,mouse_down,workspace, e+1"
|
||||
"$modifier,mouse_up,workspace, e-1"
|
||||
"ALT,Tab,cyclenext"
|
||||
"ALT,Tab,bringactivetotop"
|
||||
",XF86AudioRaiseVolume,exec,wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+"
|
||||
",XF86AudioLowerVolume,exec,wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-"
|
||||
" ,XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"
|
||||
",XF86AudioPlay, exec, playerctl play-pause"
|
||||
",XF86AudioPause, exec, playerctl play-pause"
|
||||
",XF86AudioNext, exec, playerctl next"
|
||||
",XF86AudioPrev, exec, playerctl previous"
|
||||
",XF86MonBrightnessDown,exec,brightnessctl set 5%-"
|
||||
",XF86MonBrightnessUp,exec,brightnessctl set +5%"
|
||||
];
|
||||
|
||||
bindm = [
|
||||
"$modifier, mouse:272, movewindow"
|
||||
"$modifier, mouse:273, resizewindow"
|
||||
];
|
||||
};
|
||||
}
|
||||
17
modules/home/hyprland/default.nix
Normal file
@@ -0,0 +1,17 @@
|
||||
{ host, ... }:
|
||||
let
|
||||
inherit (import ../../../hosts/${host}/variables.nix) animChoice;
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
animChoice
|
||||
./binds.nix
|
||||
./env.nix
|
||||
./exec-once.nix
|
||||
./hypridle.nix
|
||||
./hyprland.nix
|
||||
./hyprlock.nix
|
||||
./pyprland.nix
|
||||
./windowrules.nix
|
||||
];
|
||||
}
|
||||
36
modules/home/hyprland/env.nix
Normal file
@@ -0,0 +1,36 @@
|
||||
{ ... }: {
|
||||
wayland.windowManager.hyprland = {
|
||||
settings = {
|
||||
env = [
|
||||
"NIXOS_OZONE_WL, 1"
|
||||
"NIXPKGS_ALLOW_UNFREE, 1"
|
||||
"XDG_CURRENT_DESKTOP, Hyprland"
|
||||
"XDG_SESSION_TYPE, wayland"
|
||||
"XDG_SESSION_DESKTOP, Hyprland"
|
||||
"GDK_BACKEND, wayland, x11"
|
||||
"CLUTTER_BACKEND, wayland"
|
||||
"QT_QPA_PLATFORM=wayland;xcb"
|
||||
"QT_WAYLAND_DISABLE_WINDOWDECORATION, 1"
|
||||
"QT_AUTO_SCREEN_SCALE_FACTOR, 1"
|
||||
"SDL_VIDEODRIVER, x11"
|
||||
"MOZ_ENABLE_WAYLAND, 1"
|
||||
# This is to make electron apps start in wayland
|
||||
"ELECTRON_OZONE_PLATFORM_HINT,wayland"
|
||||
# Disabling this by default as it can result in inop cfg
|
||||
# Added card2 in case this gets enabled. For better coverage
|
||||
# This is mostly needed by Hybrid laptops.
|
||||
# but if you have multiple discrete GPUs this will set order
|
||||
#"AQ_DRM_DEVICES,/dev/dri/card0:/dev/dri/card1:/dev/card2"
|
||||
"GDK_SCALE,1"
|
||||
"QT_SCALE_FACTOR,1"
|
||||
"EDITOR,nvim"
|
||||
# Set terminal and xdg_terminal_emulator to kitty
|
||||
# To provent yazi from starting xterm when run from rofi menu
|
||||
# You can set to your preferred terminal if you you like
|
||||
# ToDo: Pull default terminal from config
|
||||
"TERMINAL,kitty"
|
||||
"XDG_TERMINAL_EMULATOR,kitty"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
27
modules/home/hyprland/exec-once.nix
Normal file
@@ -0,0 +1,27 @@
|
||||
{ host, ... }:
|
||||
let
|
||||
inherit
|
||||
(import ../../../hosts/${host}/variables.nix)
|
||||
stylixImage
|
||||
;
|
||||
in
|
||||
{
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
exec-once = [
|
||||
"wl-paste --type text --watch cliphist store" # Saves text
|
||||
"wl-paste --type image --watch cliphist store" # Saves images
|
||||
"dbus-update-activation-environment --all --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP
|
||||
"
|
||||
"systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP"
|
||||
"systemctl --user start hyprpolkitagent"
|
||||
|
||||
"killall -q swww;sleep .5 && swww-daemon"
|
||||
"killall -q waybar;sleep .5 && waybar"
|
||||
"killall -q swaync;sleep .5 && swaync"
|
||||
"#wallsetter &"
|
||||
"pypr &"
|
||||
"nm-applet --indicator"
|
||||
"sleep 1.0 && swww img ${stylixImage}"
|
||||
];
|
||||
};
|
||||
}
|
||||
BIN
modules/home/hyprland/face.jpg
Normal file
|
After Width: | Height: | Size: 1.1 MiB |
27
modules/home/hyprland/hypridle.nix
Normal file
@@ -0,0 +1,27 @@
|
||||
{ ... }:
|
||||
|
||||
{
|
||||
services = {
|
||||
hypridle = {
|
||||
enable = true;
|
||||
settings = {
|
||||
general = {
|
||||
after_sleep_cmd = "hyprctl dispatch dpms on";
|
||||
ignore_dbus_inhibit = false;
|
||||
lock_cmd = "hyprlock";
|
||||
};
|
||||
listener = [
|
||||
{
|
||||
timeout = 900;
|
||||
on-timeout = "hyprlock";
|
||||
}
|
||||
{
|
||||
timeout = 1200;
|
||||
on-timeout = "hyprctl dispatch dpms off";
|
||||
on-resume = "hyprctl dispatch dpms on";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
171
modules/home/hyprland/hyprland.nix
Normal file
@@ -0,0 +1,171 @@
|
||||
{ host
|
||||
, config
|
||||
, pkgs
|
||||
, ...
|
||||
}:
|
||||
let
|
||||
inherit
|
||||
(import ../../../hosts/${host}/variables.nix)
|
||||
extraMonitorSettings
|
||||
keyboardLayout
|
||||
stylixImage
|
||||
;
|
||||
in
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
swww
|
||||
grim
|
||||
slurp
|
||||
wl-clipboard
|
||||
swappy
|
||||
ydotool
|
||||
hyprpolkitagent
|
||||
hyprland-qtutils # needed for banners and ANR messages
|
||||
];
|
||||
systemd.user.targets.hyprland-session.Unit.Wants = [
|
||||
"xdg-desktop-autostart.target"
|
||||
];
|
||||
# Place Files Inside Home Directory
|
||||
home.file = {
|
||||
"Pictures/Wallpapers" = {
|
||||
source = ../../../wallpapers;
|
||||
recursive = true;
|
||||
};
|
||||
".face.icon".source = ./face.jpg;
|
||||
".config/face.jpg".source = ./face.jpg;
|
||||
};
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
package = pkgs.hyprland;
|
||||
systemd = {
|
||||
enable = true;
|
||||
enableXdgAutostart = true;
|
||||
variables = [ "--all" ];
|
||||
};
|
||||
xwayland = {
|
||||
enable = true;
|
||||
};
|
||||
settings = {
|
||||
input = {
|
||||
kb_layout = "${keyboardLayout}";
|
||||
kb_options = [
|
||||
"grp:alt_caps_toggle"
|
||||
"caps:super"
|
||||
];
|
||||
numlock_by_default = true;
|
||||
repeat_delay = 300;
|
||||
follow_mouse = 1;
|
||||
float_switch_override_focus = 0;
|
||||
sensitivity = 0;
|
||||
touchpad = {
|
||||
natural_scroll = true;
|
||||
disable_while_typing = true;
|
||||
scroll_factor = 0.8;
|
||||
};
|
||||
};
|
||||
|
||||
gestures = {
|
||||
workspace_swipe = 1;
|
||||
workspace_swipe_fingers = 3;
|
||||
workspace_swipe_distance = 500;
|
||||
workspace_swipe_invert = 1;
|
||||
workspace_swipe_min_speed_to_force = 30;
|
||||
workspace_swipe_cancel_ratio = 0.5;
|
||||
workspace_swipe_create_new = 1;
|
||||
workspace_swipe_forever = 1;
|
||||
};
|
||||
|
||||
general = {
|
||||
"$modifier" = "SUPER";
|
||||
layout = "dwindle";
|
||||
gaps_in = 6;
|
||||
gaps_out = 8;
|
||||
border_size = 2;
|
||||
resize_on_border = true;
|
||||
"col.active_border" = "rgb(${config.lib.stylix.colors.base08}) rgb(${config.lib.stylix.colors.base0C}) 45deg";
|
||||
"col.inactive_border" = "rgb(${config.lib.stylix.colors.base01})";
|
||||
};
|
||||
|
||||
misc = {
|
||||
layers_hog_keyboard_focus = true;
|
||||
initial_workspace_tracking = 0;
|
||||
mouse_move_enables_dpms = true;
|
||||
key_press_enables_dpms = false;
|
||||
disable_hyprland_logo = true;
|
||||
disable_splash_rendering = true;
|
||||
enable_swallow = false;
|
||||
vfr = true; # Variable Frame Rate
|
||||
vrr = 2; #Variable Refresh Rate Might need to set to 0 for NVIDIA/AQ_DRM_DEVICES
|
||||
# Screen flashing to black momentarily or going black when app is fullscreen
|
||||
# Try setting vrr to 0
|
||||
|
||||
# Application not responding (ANR) settings
|
||||
enable_anr_dialog = true;
|
||||
anr_missed_pings = 15;
|
||||
};
|
||||
|
||||
dwindle = {
|
||||
pseudotile = true;
|
||||
preserve_split = true;
|
||||
force_split = 2;
|
||||
};
|
||||
|
||||
decoration = {
|
||||
rounding = 10;
|
||||
blur = {
|
||||
enabled = true;
|
||||
size = 5;
|
||||
passes = 3;
|
||||
ignore_opacity = false;
|
||||
new_optimizations = true;
|
||||
};
|
||||
shadow = {
|
||||
enabled = true;
|
||||
range = 4;
|
||||
render_power = 3;
|
||||
color = "rgba(1a1a1aee)";
|
||||
};
|
||||
};
|
||||
|
||||
ecosystem = {
|
||||
no_donation_nag = true;
|
||||
no_update_news = false;
|
||||
};
|
||||
|
||||
cursor = {
|
||||
sync_gsettings_theme = true;
|
||||
no_hardware_cursors = 2; # change to 1 if want to disable
|
||||
enable_hyprcursor = false;
|
||||
warp_on_change_workspace = 2;
|
||||
no_warps = true;
|
||||
};
|
||||
|
||||
render = {
|
||||
# Disabling as no longer supported
|
||||
#explicit_sync = 1; # Change to 1 to disable
|
||||
#explicit_sync_kms = 1;
|
||||
direct_scanout = 0;
|
||||
};
|
||||
|
||||
master = {
|
||||
new_status = "master";
|
||||
new_on_top = 1;
|
||||
mfact = 0.5;
|
||||
};
|
||||
|
||||
# Ensure Xwayland windows render at integer scale; compositor scales them
|
||||
xwayland = {
|
||||
force_zero_scaling = true;
|
||||
};
|
||||
};
|
||||
|
||||
extraConfig = "
|
||||
monitor=,preferred,auto,auto
|
||||
monitor=Virtual-1,1920x1080@60,auto,1
|
||||
${extraMonitorSettings}
|
||||
# To enable blur on waybar uncomment the line below
|
||||
# Thanks to SchotjeChrisman
|
||||
#layerrule = blur,waybar
|
||||
";
|
||||
};
|
||||
}
|
||||
47
modules/home/hyprland/hyprlock.nix
Normal file
@@ -0,0 +1,47 @@
|
||||
{ username, ... }: {
|
||||
programs.hyprlock = {
|
||||
enable = true;
|
||||
settings = {
|
||||
general = {
|
||||
disable_loading_bar = true;
|
||||
grace = 10;
|
||||
hide_cursor = true;
|
||||
no_fade_in = false;
|
||||
};
|
||||
background = [
|
||||
{
|
||||
path = "/home/${username}/Pictures/Wallpapers/beautifulmountainscape.jpg";
|
||||
blur_passes = 3;
|
||||
blur_size = 8;
|
||||
}
|
||||
];
|
||||
image = [
|
||||
{
|
||||
path = "/home/${username}/.config/face.jpg";
|
||||
size = 150;
|
||||
border_size = 4;
|
||||
border_color = "rgb(0C96F9)";
|
||||
rounding = -1; # Negative means circle
|
||||
position = "0, 200";
|
||||
halign = "center";
|
||||
valign = "center";
|
||||
}
|
||||
];
|
||||
input-field = [
|
||||
{
|
||||
size = "200, 50";
|
||||
position = "0, -80";
|
||||
monitor = "";
|
||||
dots_center = true;
|
||||
fade_on_empty = false;
|
||||
font_color = "rgb(CFE6F4)";
|
||||
inner_color = "rgb(657DC2)";
|
||||
outer_color = "rgb(0D0E15)";
|
||||
outline_thickness = 5;
|
||||
placeholder_text = "Password...";
|
||||
shadow_passes = 2;
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
18
modules/home/hyprland/pyprland.nix
Normal file
@@ -0,0 +1,18 @@
|
||||
{ pkgs, ... }: {
|
||||
home.packages = with pkgs; [ pyprland ];
|
||||
|
||||
home.file.".config/hypr/pyprland.toml".text = ''
|
||||
[pyprland]
|
||||
plugins = [
|
||||
"scratchpads",
|
||||
]
|
||||
|
||||
[scratchpads.term]
|
||||
animation = "fromTop"
|
||||
command = "kitty --class kitty-dropterm"
|
||||
class = "kitty-dropterm"
|
||||
size = "70% 70%"
|
||||
max_size = "1920px 100%"
|
||||
position = "150px 150px"
|
||||
'';
|
||||
}
|
||||
82
modules/home/hyprland/windowrules.nix
Normal file
@@ -0,0 +1,82 @@
|
||||
{host, ...}: let
|
||||
inherit
|
||||
(import ../../../hosts/${host}/variables.nix)
|
||||
extraMonitorSettings
|
||||
;
|
||||
in {
|
||||
wayland.windowManager.hyprland = {
|
||||
settings = {
|
||||
windowrule = [
|
||||
#"noblur, xwayland:1" # Helps prevent odd borders/shadows for xwayland apps
|
||||
# downside it can impact other xwayland apps
|
||||
# This rule is a template for a more targeted approach
|
||||
"noblur, class:^(\bresolve\b)$, xwayland:1" # Window rule for just resolve
|
||||
"tag +file-manager, class:^([Tt]hunar|org.gnome.Nautilus|[Pp]cmanfm-qt)$"
|
||||
"tag +terminal, class:^(com.mitchellh.ghostty|org.wezfurlong.wezterm|Alacritty|kitty|kitty-dropterm)$"
|
||||
"tag +browser, class:^(Brave-browser(-beta|-dev|-unstable)?)$"
|
||||
"tag +browser, class:^([Ff]irefox|org.mozilla.firefox|[Ff]irefox-esr)$"
|
||||
"tag +browser, class:^([Gg]oogle-chrome(-beta|-dev|-unstable)?)$"
|
||||
"tag +browser, class:^([Tt]horium-browser|[Cc]achy-browser)$"
|
||||
"tag +projects, class:^(codium|codium-url-handler|VSCodium)$"
|
||||
"tag +projects, class:^(VSCode|code-url-handler)$"
|
||||
"tag +im, class:^([Dd]iscord|[Ww]ebCord|[Vv]esktop)$"
|
||||
"tag +im, class:^([Ff]erdium)$"
|
||||
"tag +im, class:^([Ww]hatsapp-for-linux)$"
|
||||
"tag +im, class:^(org.telegram.desktop|io.github.tdesktop_x64.TDesktop)$"
|
||||
"tag +im, class:^(teams-for-linux)$"
|
||||
"tag +games, class:^(gamescope)$"
|
||||
"tag +games, class:^(steam_app_\d+)$"
|
||||
"tag +gamestore, class:^([Ss]team)$"
|
||||
"tag +gamestore, title:^([Ll]utris)$"
|
||||
"tag +gamestore, class:^(com.heroicgameslauncher.hgl)$"
|
||||
"tag +settings, class:^(gnome-disks|wihotspot(-gui)?)$"
|
||||
"tag +settings, class:^([Rr]ofi)$"
|
||||
"tag +settings, class:^(file-roller|org.gnome.FileRoller)$"
|
||||
"tag +settings, class:^(nm-applet|nm-connection-editor|blueman-manager)$"
|
||||
"tag +settings, class:^(pavucontrol|org.pulseaudio.pavucontrol|com.saivert.pwvucontrol)$"
|
||||
"tag +settings, class:^(nwg-look|qt5ct|qt6ct|[Yy]ad)$"
|
||||
"tag +settings, class:(xdg-desktop-portal-gtk)"
|
||||
"tag +settings, class:(.blueman-manager-wrapped)"
|
||||
"tag +settings, class:(nwg-displays)"
|
||||
"move 72% 7%,title:^(Picture-in-Picture)$"
|
||||
"center, class:^([Ff]erdium)$"
|
||||
"float, class:^([Ww]aypaper)$"
|
||||
"center, class:^(pavucontrol|org.pulseaudio.pavucontrol|com.saivert.pwvucontrol)$"
|
||||
"center, class:([Tt]hunar), title:negative:(.*[Tt]hunar.*)"
|
||||
"center, title:^(Authentication Required)$"
|
||||
"idleinhibit fullscreen, class:^(*)$"
|
||||
"idleinhibit fullscreen, title:^(*)$"
|
||||
"idleinhibit fullscreen, fullscreen:1"
|
||||
"float, tag:settings*"
|
||||
"float, class:^([Ff]erdium)$"
|
||||
"float, title:^(Picture-in-Picture)$"
|
||||
"float, class:^(mpv|com.github.rafostar.Clapper)$"
|
||||
"float, title:^(Authentication Required)$"
|
||||
"float, class:(codium|codium-url-handler|VSCodium), title:negative:(.*codium.*|.*VSCodium.*)"
|
||||
"float, class:^(com.heroicgameslauncher.hgl)$, title:negative:(Heroic Games Launcher)"
|
||||
"float, class:^([Ss]team)$, title:negative:^([Ss]team)$"
|
||||
"float, class:([Tt]hunar), title:negative:(.*[Tt]hunar.*)"
|
||||
"float, initialTitle:(Add Folder to Workspace)"
|
||||
"float, initialTitle:(Open Files)"
|
||||
"float, initialTitle:(wants to save)"
|
||||
"size 70% 60%, initialTitle:(Open Files)"
|
||||
"size 70% 60%, initialTitle:(Add Folder to Workspace)"
|
||||
"size 70% 70%, tag:settings*"
|
||||
"size 60% 70%, class:^([Ff]erdium)$"
|
||||
"opacity 1.0 1.0, tag:browser*"
|
||||
"opacity 0.9 0.8, tag:projects*"
|
||||
"opacity 0.94 0.86, tag:im*"
|
||||
"opacity 0.9 0.8, tag:file-manager*"
|
||||
"opacity 0.8 0.7, tag:terminal*"
|
||||
"opacity 0.8 0.7, tag:settings*"
|
||||
"opacity 0.8 0.7, class:^(gedit|org.gnome.TextEditor|mousepad)$"
|
||||
"opacity 0.9 0.8, class:^(seahorse)$ # gnome-keyring gui"
|
||||
"opacity 0.95 0.75, title:^(Picture-in-Picture)$"
|
||||
"pin, title:^(Picture-in-Picture)$"
|
||||
"keepaspectratio, title:^(Picture-in-Picture)$"
|
||||
"noblur, tag:games*"
|
||||
"fullscreen, tag:games*"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
229
modules/home/install-zaneyos.sh
Executable file
@@ -0,0 +1,229 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
######################################
|
||||
# Install script for zaneyos
|
||||
# Author: Don Williams
|
||||
# Date: June 27, 2005
|
||||
#######################################
|
||||
|
||||
# Define colors
|
||||
RED='\033[0;31m'
|
||||
GREEN='\033[0;32m'
|
||||
NC='\033[0m' # No Color
|
||||
|
||||
# Define log file
|
||||
LOG_DIR="$(dirname "$0")"
|
||||
LOG_FILE="${LOG_DIR}/install_$(date +"%Y-%m-%d_%H-%M-%S").log"
|
||||
|
||||
mkdir -p "$LOG_DIR"
|
||||
exec > >(tee -a "$LOG_FILE") 2>&1
|
||||
|
||||
# Function to print a section header
|
||||
print_header() {
|
||||
echo -e "${GREEN}╔═══════════════════════════════════════════════════════════════════════╗${NC}"
|
||||
echo -e "${GREEN}║ ${1} ${NC}"
|
||||
echo -e "${GREEN}╚═══════════════════════════════════════════════════════════════════════╝${NC}"
|
||||
}
|
||||
|
||||
# Function to print an error message
|
||||
print_error() {
|
||||
echo -e "${RED}Error: ${1}${NC}"
|
||||
}
|
||||
|
||||
# Function to print a success banner
|
||||
print_success_banner() {
|
||||
echo -e "${GREEN}╔═══════════════════════════════════════════════════════════════════════╗${NC}"
|
||||
echo -e "${GREEN}║ zaneyos Installation Successful! ║${NC}"
|
||||
echo -e "${GREEN}║ ║${NC}"
|
||||
echo -e "${GREEN}║ Please reboot your system for changes to take full effect. ║${NC}"
|
||||
echo -e "${GREEN}║ ║${NC}"
|
||||
echo -e "${GREEN}╚═══════════════════════════════════════════════════════════════════════╝${NC}"
|
||||
}
|
||||
|
||||
# Function to print a failure banner
|
||||
print_failure_banner() {
|
||||
echo -e "${RED}╔═══════════════════════════════════════════════════════════════════════╗${NC}"
|
||||
echo -e "${RED}║ zaneyos Installation Failed! ║${NC}"
|
||||
echo -e "${RED}║ ║${NC}"
|
||||
echo -e "${RED}║ Please review the log file for details: ║${NC}"
|
||||
echo -e "${RED}║ ${LOG_FILE} ║${NC}"
|
||||
echo -e "${RED}║ ║${NC}"
|
||||
echo -e "${RED}╚═══════════════════════════════════════════════════════════════════════╝${NC}"
|
||||
}
|
||||
|
||||
print_header "Verifying System Requirements"
|
||||
|
||||
# Check for git
|
||||
if ! command -v git &> /dev/null; then
|
||||
print_error "Git is not installed."
|
||||
echo -e "Please install git and pciutils are installed, then re-run the install script."
|
||||
echo -e "Example: nix-shell -p git pciutils"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Check for lspci (pciutils)
|
||||
if ! command -v lspci &> /dev/null; then
|
||||
print_error "pciutils is not installed."
|
||||
echo -e "Please install git and pciutils, then re-run the install script."
|
||||
echo -e "Example: nix-shell -p git pciutils"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -n "$(grep -i nixos < /etc/os-release)" ]; then
|
||||
echo -e "${GREEN}Verified this is NixOS.${NC}"
|
||||
else
|
||||
print_error "This is not NixOS or the distribution information is not available."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
print_header "Initial Setup"
|
||||
|
||||
echo -e "Default options are in brackets []"
|
||||
echo -e "Just press enter to select the default"
|
||||
sleep 2
|
||||
|
||||
print_header "Ensure In Home Directory"
|
||||
cd "$HOME" || exit 1
|
||||
echo -e "${GREEN}Current directory: $(pwd)${NC}"
|
||||
|
||||
print_header "Hostname Configuration"
|
||||
read -rp "Enter Your New Hostname: [ default ] " hostName
|
||||
if [ -z "$hostName" ]; then
|
||||
hostName="default"
|
||||
fi
|
||||
|
||||
print_header "GPU Profile Detection"
|
||||
|
||||
# Attempt automatic detection
|
||||
DETECTED_PROFILE=""
|
||||
|
||||
has_nvidia=false
|
||||
has_intel=false
|
||||
has_amd=false
|
||||
has_vm=false
|
||||
|
||||
if lspci | grep -qi 'vga\|3d'; then
|
||||
while read -r line; do
|
||||
if echo "$line" | grep -qi 'nvidia'; then
|
||||
has_nvidia=true
|
||||
elif echo "$line" | grep -qi 'amd'; then
|
||||
has_amd=true
|
||||
elif echo "$line" | grep -qi 'intel'; then
|
||||
has_intel=true
|
||||
elif echo "$line" | grep -qi 'virtio\|vmware'; then
|
||||
has_vm=true
|
||||
fi
|
||||
done < <(lspci | grep -i 'vga\|3d')
|
||||
|
||||
if $has_vm; then
|
||||
DETECTED_PROFILE="vm"
|
||||
elif $has_nvidia && $has_intel; then
|
||||
DETECTED_PROFILE="hybrid"
|
||||
elif $has_nvidia; then
|
||||
DETECTED_PROFILE="nvidia"
|
||||
elif $has_amd; then
|
||||
DETECTED_PROFILE="amd"
|
||||
elif $has_intel; then
|
||||
DETECTED_PROFILE="intel"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Handle detected profile or fall back to manual input
|
||||
if [ -n "$DETECTED_PROFILE" ]; then
|
||||
profile="$DETECTED_PROFILE"
|
||||
echo -e "${GREEN}Detected GPU profile: $profile${NC}"
|
||||
read -p "Correct? (Y/N): " -n 1 -r
|
||||
echo
|
||||
if [[ ! $REPLY =~ ^[Yy]$ ]]; then
|
||||
echo -e "${RED}GPU profile not confirmed. Falling back to manual selection.${NC}"
|
||||
profile="" # Clear profile to force manual input
|
||||
fi
|
||||
fi
|
||||
|
||||
# If profile is still empty (either not detected or not confirmed), prompt manually
|
||||
if [ -z "$profile" ]; then
|
||||
echo -e "${RED}Automatic GPU detection failed or no specific profile found.${NC}"
|
||||
read -rp "Enter Your Hardware Profile (GPU)\nOptions:\n[ amd ]\nnvidia\nnvidia-laptop\nintel\nvm\nPlease type out your choice: " profile
|
||||
if [ -z "$profile" ]; then
|
||||
profile="amd"
|
||||
fi
|
||||
echo -e "${GREEN}Selected GPU profile: $profile${NC}"
|
||||
fi
|
||||
|
||||
print_header "Backup Existing zaneyos (if any)"
|
||||
|
||||
backupname=$(date +"%Y-%m-%d-%H-%M-%S")
|
||||
if [ -d "zaneyos" ]; then
|
||||
echo -e "${GREEN}zaneyos exists, backing up to .config/zaneyos-backups folder.${NC}"
|
||||
if [ -d ".config/zaneyos-backups" ]; then
|
||||
echo -e "${GREEN}Moving current version of zaneyos to backups folder.${NC}"
|
||||
mv "$HOME"/zaneyos .config/zaneyos-backups/"$backupname"
|
||||
sleep 1
|
||||
else
|
||||
echo -e "${GREEN}Creating the backups folder & moving zaneyos to it.${NC}"
|
||||
mkdir -p .config/zaneyos-backups
|
||||
mv "$HOME"/zaneyos .config/zaneyos-backups/"$backupname"
|
||||
sleep 1
|
||||
fi
|
||||
else
|
||||
echo -e "${GREEN}Thank you for choosing zaneyos.${NC}"
|
||||
echo -e "${GREEN}I hope you find your time here enjoyable!${NC}"
|
||||
fi
|
||||
|
||||
print_header "Cloning zaneyos Repository"
|
||||
git clone https://gitlab.com/dwilliam62/zaneyos.git --depth=1 ~/zaneyos
|
||||
cd ~/zaneyos || exit 1
|
||||
|
||||
print_header "Configuring Host and Profile"
|
||||
mkdir -p hosts/"$hostName"
|
||||
cp hosts/default/*.nix hosts/"$hostName"
|
||||
|
||||
installusername=$(echo $USER)
|
||||
git config --global user.name "$installusername"
|
||||
git config --global user.email "$installusername@gmail.com"
|
||||
git add .
|
||||
git config --global --unset-all user.name
|
||||
git config --global --unset-all user.email
|
||||
|
||||
sed -i "/^[[:space:]]*host[[:space:]]*=[[:space:]]*\"/ s/\"[^\"]*\"/\"$hostName\"/" ./flake.nix
|
||||
sed -i "/^[[:space:]]*profile[[:space:]]*=[[:space:]]*\"/ s/\"[^\"]*\"/\"$profile\"/" ./flake.nix
|
||||
|
||||
print_header "Keyboard Layout Configuration"
|
||||
read -rp "Enter your keyboard layout: [ us ] " keyboardLayout
|
||||
if [ -z "$keyboardLayout" ]; then
|
||||
keyboardLayout="us"
|
||||
fi
|
||||
sed -i "/^[[:space:]]*keyboardLayout[[:space:]]*=[[:space:]]*\"/ s/\"[^\"]*\"/\"$keyboardLayout\"/" ./hosts/$hostName/variables.nix
|
||||
|
||||
print_header "Console Keymap Configuration"
|
||||
read -rp "Enter your console keymap: [ us ] " consoleKeyMap
|
||||
if [ -z "$consoleKeyMap" ]; then
|
||||
consoleKeyMap="us"
|
||||
fi
|
||||
sed -i "/^[[:space:]]*consoleKeyMap[[:space:]]*=[[:space:]]*\"/ s/\"[^\"]*\"/\"$consoleKeyMap\"/" ./hosts/$hostName/variables.nix
|
||||
|
||||
print_header "Username Configuration"
|
||||
sed -i "/^[[:space:]]*username[[:space:]]*=[[:space:]]*\"/ s/\"[^\"]*\"/\"$installusername\"/" ./flake.nix
|
||||
|
||||
print_header "Generating Hardware Configuration -- Ignore ERROR: cannot access /bin"
|
||||
sudo nixos-generate-config --show-hardware-config > ./hosts/$hostName/hardware.nix
|
||||
|
||||
print_header "Setting Nix Configuration"
|
||||
NIX_CONFIG="experimental-features = nix-command flakes"
|
||||
|
||||
print_header "Initiating NixOS Build"
|
||||
read -p "Ready to run initial build? (Y/N): " -n 1 -r
|
||||
echo
|
||||
if [[ ! $REPLY =~ ^[Yy]$ ]]; then
|
||||
echo -e "${RED}Build cancelled.${NC}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
sudo nixos-rebuild boot --flake ~/zaneyos/#${profile}
|
||||
|
||||
# Check the exit status of the last command (nixos-rebuild)
|
||||
if [ $? -eq 0 ]; then
|
||||
print_success_banner
|
||||
else
|
||||
print_failure_banner
|
||||
fi
|
||||
75
modules/home/kitty.nix
Normal file
@@ -0,0 +1,75 @@
|
||||
{ pkgs, ... }: {
|
||||
programs.kitty = {
|
||||
enable = true;
|
||||
package = pkgs.kitty;
|
||||
settings = {
|
||||
font_size = 12;
|
||||
wheel_scroll_min_lines = 1;
|
||||
window_padding_width = 4;
|
||||
confirm_os_window_close = 0;
|
||||
scrollback_lines = 10000;
|
||||
enable_audio_bell = false;
|
||||
mouse_hide_wait = 60;
|
||||
cursor_trail = 1;
|
||||
tab_fade = 1;
|
||||
active_tab_font_style = "bold";
|
||||
inactive_tab_font_style = "bold";
|
||||
tab_bar_edge = "top";
|
||||
tab_bar_margin_width = 0;
|
||||
tab_bar_style = "powerline";
|
||||
#tab_bar_style = "fade";
|
||||
enabled_layouts = "splits";
|
||||
};
|
||||
extraConfig = ''
|
||||
|
||||
# Clipboard
|
||||
map ctrl+shift+v paste_from_selection
|
||||
map shift+insert paste_from_selection
|
||||
|
||||
# Scrolling
|
||||
map ctrl+shift+up scroll_line_up
|
||||
map ctrl+shift+down scroll_line_down
|
||||
map ctrl+shift+k scroll_line_up
|
||||
map ctrl+shift+j scroll_line_down
|
||||
map ctrl+shift+page_up scroll_page_up
|
||||
map ctrl+shift+page_down scroll_page_down
|
||||
map ctrl+shift+home scroll_home
|
||||
map ctrl+shift+end scroll_end
|
||||
map ctrl+shift+h show_scrollback
|
||||
|
||||
# Window management
|
||||
map alt+n new_window_with_cwd #open in current dir
|
||||
#map alt+n new_os_window #opens term in $HOME
|
||||
map alt+w close_window
|
||||
map ctrl+shift+enter launch --location=hsplit
|
||||
map ctrl+shift+s launch --location=vsplit
|
||||
map ctrl+shift+] next_window
|
||||
map ctrl+shift+[ previous_window
|
||||
map ctrl+shift+f move_window_forward
|
||||
map ctrl+shift+b move_window_backward
|
||||
map ctrl+shift+` move_window_to_top
|
||||
map ctrl+shift+1 first_window
|
||||
map ctrl+shift+2 second_window
|
||||
map ctrl+shift+3 third_window
|
||||
map ctrl+shift+4 fourth_window
|
||||
map ctrl+shift+5 fifth_window
|
||||
map ctrl+shift+6 sixth_window
|
||||
map ctrl+shift+7 seventh_window
|
||||
map ctrl+shift+8 eighth_window
|
||||
map ctrl+shift+9 ninth_window # Tab management
|
||||
map ctrl+shift+0 tenth_window
|
||||
map ctrl+shift+right next_tab
|
||||
map ctrl+shift+left previous_tab
|
||||
map ctrl+shift+t new_tab
|
||||
map ctrl+shift+q close_tab
|
||||
map ctrl+shift+l next_layout
|
||||
map ctrl+shift+. move_tab_forward
|
||||
map ctrl+shift+, move_tab_backward
|
||||
|
||||
# Miscellaneous
|
||||
map ctrl+shift+up increase_font_size
|
||||
map ctrl+shift+down decrease_font_size
|
||||
map ctrl+shift+backspace restore_font_size
|
||||
'';
|
||||
};
|
||||
}
|
||||
32
modules/home/lazygit.nix
Normal file
@@ -0,0 +1,32 @@
|
||||
# Lazygit is a simple terminal UI for git commands.
|
||||
{ config, lib, ... }:
|
||||
let
|
||||
accent = "#${config.lib.stylix.colors.base0D}";
|
||||
muted = "#${config.lib.stylix.colors.base03}";
|
||||
in
|
||||
{
|
||||
programs.lazygit = {
|
||||
enable = true;
|
||||
settings = lib.mkForce {
|
||||
disableStartupPopups = true;
|
||||
notARepository = "skip";
|
||||
promptToReturnFromSubprocess = false;
|
||||
update.method = "never";
|
||||
git = {
|
||||
commit.signOff = true;
|
||||
parseEmoji = true;
|
||||
};
|
||||
gui = {
|
||||
theme = {
|
||||
activeBorderColor = [ accent "bold" ];
|
||||
inactiveBorderColor = [ muted ];
|
||||
};
|
||||
showListFooter = false;
|
||||
showRandomTip = false;
|
||||
showCommandLog = false;
|
||||
showBottomLine = false;
|
||||
nerdFontsVersion = "3";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
268
modules/home/nvf.nix
Normal file
@@ -0,0 +1,268 @@
|
||||
{ inputs
|
||||
, config
|
||||
, ...
|
||||
}: {
|
||||
imports = [ inputs.nvf.homeManagerModules.default ];
|
||||
|
||||
programs.nvf = {
|
||||
enable = true;
|
||||
|
||||
settings.vim = {
|
||||
lsp.enable = true;
|
||||
vimAlias = true;
|
||||
viAlias = true;
|
||||
withNodeJs = true;
|
||||
lineNumberMode = "relNumber";
|
||||
enableLuaLoader = true;
|
||||
preventJunkFiles = true;
|
||||
options = {
|
||||
tabstop = 4;
|
||||
shiftwidth = 2;
|
||||
wrap = false;
|
||||
};
|
||||
|
||||
clipboard = {
|
||||
enable = true;
|
||||
registers = "unnamedplus";
|
||||
providers = {
|
||||
wl-copy.enable = true;
|
||||
xsel.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
maps = {
|
||||
normal = {
|
||||
"<leader>e" = {
|
||||
action = "<CMD>Neotree toggle<CR>";
|
||||
silent = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
diagnostics = {
|
||||
enable = true;
|
||||
config = {
|
||||
virtual_lines.enable = true;
|
||||
underline = true;
|
||||
};
|
||||
};
|
||||
|
||||
keymaps = [
|
||||
{
|
||||
key = "jk";
|
||||
mode = [ "i" ];
|
||||
action = "<ESC>";
|
||||
desc = "Exit insert mode";
|
||||
}
|
||||
{
|
||||
key = "<leader>nh";
|
||||
mode = [ "n" ];
|
||||
action = ":nohl<CR>";
|
||||
desc = "Clear search highlights";
|
||||
}
|
||||
{
|
||||
key = "<leader>ff";
|
||||
mode = [ "n" ];
|
||||
action = "<cmd>Telescope find_files<cr>";
|
||||
desc = "Search files by name";
|
||||
}
|
||||
{
|
||||
key = "<leader>lg";
|
||||
mode = [ "n" ];
|
||||
action = "<cmd>Telescope live_grep<cr>";
|
||||
desc = "Search files by contents";
|
||||
}
|
||||
{
|
||||
key = "<leader>fe";
|
||||
mode = [ "n" ];
|
||||
action = "<cmd>Neotree toggle<cr>";
|
||||
desc = "File browser toggle";
|
||||
}
|
||||
{
|
||||
key = "<C-h>";
|
||||
mode = [ "i" ];
|
||||
action = "<Left>";
|
||||
desc = "Move left in insert mode";
|
||||
}
|
||||
{
|
||||
key = "<C-j>";
|
||||
mode = [ "i" ];
|
||||
action = "<Down>";
|
||||
desc = "Move down in insert mode";
|
||||
}
|
||||
{
|
||||
key = "<C-k>";
|
||||
mode = [ "i" ];
|
||||
action = "<Up>";
|
||||
desc = "Move up in insert mode";
|
||||
}
|
||||
{
|
||||
key = "<C-l>";
|
||||
mode = [ "i" ];
|
||||
action = "<Right>";
|
||||
desc = "Move right in insert mode";
|
||||
}
|
||||
];
|
||||
|
||||
telescope.enable = true;
|
||||
|
||||
spellcheck = {
|
||||
enable = true;
|
||||
languages = [ "en" ];
|
||||
programmingWordlist.enable = true;
|
||||
};
|
||||
|
||||
lsp = {
|
||||
formatOnSave = true;
|
||||
lspkind.enable = false;
|
||||
lightbulb.enable = false;
|
||||
lspsaga.enable = false;
|
||||
trouble.enable = true;
|
||||
lspSignature.enable = true;
|
||||
otter-nvim.enable = false;
|
||||
nvim-docs-view.enable = false;
|
||||
};
|
||||
|
||||
languages = {
|
||||
enableFormat = true;
|
||||
enableTreesitter = true;
|
||||
enableExtraDiagnostics = true;
|
||||
nix.enable = true;
|
||||
clang.enable = true;
|
||||
zig.enable = true;
|
||||
python.enable = true;
|
||||
markdown.enable = true;
|
||||
ts = {
|
||||
enable = true;
|
||||
lsp.enable = true;
|
||||
format.type = "prettierd";
|
||||
extensions.ts-error-translator.enable = true;
|
||||
};
|
||||
html.enable = true;
|
||||
lua.enable = true;
|
||||
css = {
|
||||
enable = true;
|
||||
format.type = "prettierd";
|
||||
};
|
||||
typst.enable = true;
|
||||
rust = {
|
||||
enable = true;
|
||||
crates.enable = true;
|
||||
};
|
||||
};
|
||||
visuals = {
|
||||
nvim-web-devicons.enable = true;
|
||||
nvim-cursorline.enable = true;
|
||||
cinnamon-nvim.enable = true;
|
||||
fidget-nvim.enable = true;
|
||||
highlight-undo.enable = true;
|
||||
indent-blankline.enable = true;
|
||||
rainbow-delimiters.enable = true;
|
||||
};
|
||||
|
||||
statusline.lualine = {
|
||||
enable = true;
|
||||
theme = "base16";
|
||||
};
|
||||
|
||||
autopairs.nvim-autopairs.enable = true;
|
||||
autocomplete.nvim-cmp.enable = true;
|
||||
snippets.luasnip.enable = true;
|
||||
tabline.nvimBufferline.enable = true;
|
||||
treesitter.context.enable = false;
|
||||
binds = {
|
||||
whichKey.enable = true;
|
||||
cheatsheet.enable = true;
|
||||
};
|
||||
git = {
|
||||
enable = true;
|
||||
gitsigns.enable = true;
|
||||
gitsigns.codeActions.enable = false;
|
||||
};
|
||||
projects.project-nvim.enable = true;
|
||||
dashboard.dashboard-nvim.enable = true;
|
||||
filetree.neo-tree.enable = true;
|
||||
notify = {
|
||||
nvim-notify.enable = true;
|
||||
nvim-notify.setupOpts.background_colour = "#${config.lib.stylix.colors.base01}";
|
||||
};
|
||||
utility = {
|
||||
preview.markdownPreview.enable = true;
|
||||
ccc.enable = false;
|
||||
vim-wakatime.enable = false;
|
||||
icon-picker.enable = true;
|
||||
surround.enable = true;
|
||||
diffview-nvim.enable = true;
|
||||
motion = {
|
||||
hop.enable = true;
|
||||
leap.enable = true;
|
||||
precognition.enable = false;
|
||||
};
|
||||
images = {
|
||||
image-nvim.enable = false;
|
||||
};
|
||||
};
|
||||
ui = {
|
||||
borders.enable = true;
|
||||
noice.enable = true;
|
||||
colorizer.enable = true;
|
||||
illuminate.enable = true;
|
||||
breadcrumbs = {
|
||||
enable = false;
|
||||
navbuddy.enable = false;
|
||||
};
|
||||
smartcolumn = {
|
||||
enable = true;
|
||||
};
|
||||
fastaction.enable = true;
|
||||
};
|
||||
|
||||
session = {
|
||||
nvim-session-manager.enable = false;
|
||||
};
|
||||
comments = {
|
||||
comment-nvim.enable = true;
|
||||
};
|
||||
|
||||
luaConfigPost = ''
|
||||
-- Nix LSP (nil) configuration for auto-eval-inputs
|
||||
local lspconfig = require('lspconfig')
|
||||
lspconfig.nil_ls.setup({
|
||||
settings = {
|
||||
['nil'] = {
|
||||
nix = {
|
||||
auto_eval_inputs = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
-- Auto-update programming wordlist on first startup
|
||||
vim.api.nvim_create_autocmd("VimEnter", {
|
||||
callback = function()
|
||||
-- Check if dirtytalk dict file exists
|
||||
local dict_path = vim.fn.stdpath('data') .. '/site/spell/programming.utf-8.add'
|
||||
if vim.fn.filereadable(dict_path) == 0 then
|
||||
-- Only run if file doesn't exist to avoid repeated downloads
|
||||
vim.schedule(function()
|
||||
vim.cmd('DirtytalkUpdate')
|
||||
end)
|
||||
end
|
||||
end,
|
||||
})
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
home.activation = {
|
||||
dirtytalkUpdate = ''
|
||||
# Create the spell directory if it doesn't exist
|
||||
mkdir -p "$HOME/.local/share/nvim/site/spell"
|
||||
|
||||
# Try to run DirtytalkUpdate in headless mode with better error handling
|
||||
if ! ${config.programs.nvf.finalPackage}/bin/nvim --headless -c "DirtytalkUpdate" -c "qa!" 2>/dev/null; then
|
||||
echo "Note: DirtytalkUpdate will run automatically on first Neovim startup"
|
||||
fi
|
||||
'';
|
||||
};
|
||||
}
|
||||
15
modules/home/obs-studio.nix
Normal file
@@ -0,0 +1,15 @@
|
||||
{ pkgs, ... }: {
|
||||
programs.obs-studio = {
|
||||
enable = true;
|
||||
#enableVirtualCamera = true;
|
||||
plugins = with pkgs.obs-studio-plugins; [
|
||||
wlrobs
|
||||
obs-pipewire-audio-capture
|
||||
obs-vkcapture
|
||||
obs-source-clone
|
||||
obs-move-transition
|
||||
obs-composite-blur
|
||||
obs-backgroundremoval
|
||||
];
|
||||
};
|
||||
}
|
||||
6
modules/home/qt.nix
Normal file
@@ -0,0 +1,6 @@
|
||||
{ lib, ... }: {
|
||||
qt = {
|
||||
enable = true;
|
||||
platformTheme.name = lib.mkForce "qtct";
|
||||
};
|
||||
}
|
||||
49
modules/home/rofi/config-long.nix
Normal file
@@ -0,0 +1,49 @@
|
||||
{ ... }: {
|
||||
home.file.".config/rofi/config-long.rasi".text = ''
|
||||
@import "~/.config/rofi/config.rasi"
|
||||
window {
|
||||
width: 750px;
|
||||
border-radius: 20px;
|
||||
}
|
||||
mainbox {
|
||||
orientation: vertical;
|
||||
children: [ "inputbar", "listbox" ];
|
||||
}
|
||||
inputbar {
|
||||
padding: 75px 40px;
|
||||
background-color: transparent;
|
||||
background-image: url("~/Pictures/Wallpapers/Rainnight.jpg", width);
|
||||
text-color: @foreground;
|
||||
children: [ "textbox-prompt-colon", "entry" ];
|
||||
}
|
||||
textbox-prompt-colon {
|
||||
padding: 12px 20px;
|
||||
border-radius: 100%;
|
||||
background-color: @bg-alt;
|
||||
text-color: @foreground;
|
||||
}
|
||||
entry {
|
||||
expand: true;
|
||||
padding: 12px 16px;
|
||||
border-radius: 100%;
|
||||
background-color: @bg-alt;
|
||||
text-color: @foreground;
|
||||
}
|
||||
button {
|
||||
padding: 12px;
|
||||
border-radius: 100%;
|
||||
}
|
||||
element {
|
||||
spacing: 10px;
|
||||
padding: 12px;
|
||||
border-radius: 100%;
|
||||
}
|
||||
textbox {
|
||||
padding: 12px;
|
||||
border-radius: 100%;
|
||||
}
|
||||
error-message {
|
||||
border-radius: 0px;
|
||||
}
|
||||
'';
|
||||
}
|
||||
6
modules/home/rofi/default.nix
Normal file
@@ -0,0 +1,6 @@
|
||||
{ ... }: {
|
||||
imports = [
|
||||
./config-long.nix
|
||||
./rofi.nix
|
||||
];
|
||||
}
|
||||
208
modules/home/rofi/rofi.nix
Normal file
@@ -0,0 +1,208 @@
|
||||
{ pkgs
|
||||
, config
|
||||
, ...
|
||||
}: {
|
||||
programs = {
|
||||
rofi = {
|
||||
enable = true;
|
||||
package = pkgs.rofi-wayland;
|
||||
extraConfig = {
|
||||
modi = "drun,filebrowser,run";
|
||||
show-icons = true;
|
||||
icon-theme = "Papirus";
|
||||
font = "JetBrainsMono Nerd Font Mono 12";
|
||||
drun-display-format = "{icon} {name}";
|
||||
display-drun = " Apps";
|
||||
display-run = " Run";
|
||||
display-filebrowser = " File";
|
||||
};
|
||||
theme =
|
||||
let
|
||||
inherit (config.lib.formats.rasi) mkLiteral;
|
||||
in
|
||||
{
|
||||
"*" = {
|
||||
bg = mkLiteral "#${config.stylix.base16Scheme.base00}";
|
||||
bg-alt = mkLiteral "#${config.stylix.base16Scheme.base09}";
|
||||
foreground = mkLiteral "#${config.stylix.base16Scheme.base01}";
|
||||
selected = mkLiteral "#${config.stylix.base16Scheme.base08}";
|
||||
active = mkLiteral "#${config.stylix.base16Scheme.base0B}";
|
||||
text-selected = mkLiteral "#${config.stylix.base16Scheme.base00}";
|
||||
text-color = mkLiteral "#${config.stylix.base16Scheme.base05}";
|
||||
border-color = mkLiteral "#${config.stylix.base16Scheme.base0F}";
|
||||
urgent = mkLiteral "#${config.stylix.base16Scheme.base0E}";
|
||||
};
|
||||
"window" = {
|
||||
transparency = "real";
|
||||
width = mkLiteral "1000px";
|
||||
location = mkLiteral "center";
|
||||
anchor = mkLiteral "center";
|
||||
fullscreen = false;
|
||||
x-offset = mkLiteral "0px";
|
||||
y-offset = mkLiteral "0px";
|
||||
cursor = "default";
|
||||
enabled = true;
|
||||
border-radius = mkLiteral "15px";
|
||||
background-color = mkLiteral "@bg";
|
||||
};
|
||||
"mainbox" = {
|
||||
enabled = true;
|
||||
spacing = mkLiteral "0px";
|
||||
orientation = mkLiteral "horizontal";
|
||||
children = map mkLiteral [
|
||||
"imagebox"
|
||||
"listbox"
|
||||
];
|
||||
background-color = mkLiteral "transparent";
|
||||
};
|
||||
"imagebox" = {
|
||||
padding = mkLiteral "20px";
|
||||
background-color = mkLiteral "transparent";
|
||||
background-image = mkLiteral ''url("~/Pictures/Wallpapers/Rainnight.jpg", height)'';
|
||||
orientation = mkLiteral "vertical";
|
||||
children = map mkLiteral [
|
||||
"inputbar"
|
||||
"dummy"
|
||||
"mode-switcher"
|
||||
];
|
||||
};
|
||||
"listbox" = {
|
||||
spacing = mkLiteral "20px";
|
||||
padding = mkLiteral "20px";
|
||||
background-color = mkLiteral "transparent";
|
||||
orientation = mkLiteral "vertical";
|
||||
children = map mkLiteral [
|
||||
"message"
|
||||
"listview"
|
||||
];
|
||||
};
|
||||
"dummy" = {
|
||||
background-color = mkLiteral "transparent";
|
||||
};
|
||||
"inputbar" = {
|
||||
enabled = true;
|
||||
spacing = mkLiteral "10px";
|
||||
padding = mkLiteral "10px";
|
||||
border-radius = mkLiteral "10px";
|
||||
background-color = mkLiteral "@bg-alt";
|
||||
text-color = mkLiteral "@foreground";
|
||||
children = map mkLiteral [
|
||||
"textbox-prompt-colon"
|
||||
"entry"
|
||||
];
|
||||
};
|
||||
"textbox-prompt-colon" = {
|
||||
enabled = true;
|
||||
expand = false;
|
||||
str = "";
|
||||
background-color = mkLiteral "inherit";
|
||||
text-color = mkLiteral "inherit";
|
||||
};
|
||||
"entry" = {
|
||||
enabled = true;
|
||||
background-color = mkLiteral "inherit";
|
||||
text-color = mkLiteral "inherit";
|
||||
cursor = mkLiteral "text";
|
||||
placeholder = "Search";
|
||||
placeholder-color = mkLiteral "inherit";
|
||||
};
|
||||
"mode-switcher" = {
|
||||
enabled = true;
|
||||
spacing = mkLiteral "20px";
|
||||
background-color = mkLiteral "transparent";
|
||||
text-color = mkLiteral "@foreground";
|
||||
};
|
||||
"button" = {
|
||||
padding = mkLiteral "15px";
|
||||
border-radius = mkLiteral "10px";
|
||||
background-color = mkLiteral "@bg-alt";
|
||||
text-color = mkLiteral "inherit";
|
||||
cursor = mkLiteral "pointer";
|
||||
};
|
||||
"button selected" = {
|
||||
background-color = mkLiteral "@selected";
|
||||
text-color = mkLiteral "@foreground";
|
||||
};
|
||||
"listview" = {
|
||||
enabled = true;
|
||||
columns = 1;
|
||||
lines = 8;
|
||||
cycle = true;
|
||||
dynamic = true;
|
||||
scrollbar = false;
|
||||
layout = mkLiteral "vertical";
|
||||
reverse = false;
|
||||
fixed-height = true;
|
||||
fixed-columns = true;
|
||||
spacing = mkLiteral "10px";
|
||||
background-color = mkLiteral "transparent";
|
||||
text-color = mkLiteral "@foreground";
|
||||
cursor = "default";
|
||||
};
|
||||
"element" = {
|
||||
enabled = true;
|
||||
spacing = mkLiteral "15px";
|
||||
padding = mkLiteral "8px";
|
||||
border-radius = mkLiteral "10px";
|
||||
background-color = mkLiteral "transparent";
|
||||
text-color = mkLiteral "@text-color";
|
||||
cursor = mkLiteral "pointer";
|
||||
};
|
||||
"element normal.normal" = {
|
||||
background-color = mkLiteral "inherit";
|
||||
text-color = mkLiteral "@text-color";
|
||||
};
|
||||
"element normal.urgent" = {
|
||||
background-color = mkLiteral "@urgent";
|
||||
text-color = mkLiteral "@text-color";
|
||||
};
|
||||
"element normal.active" = {
|
||||
background-color = mkLiteral "inherit";
|
||||
text-color = mkLiteral "@text-color";
|
||||
};
|
||||
"element selected.normal" = {
|
||||
background-color = mkLiteral "@selected";
|
||||
text-color = mkLiteral "@foreground";
|
||||
};
|
||||
"element selected.urgent" = {
|
||||
background-color = mkLiteral "@urgent";
|
||||
text-color = mkLiteral "@text-selected";
|
||||
};
|
||||
"element selected.active" = {
|
||||
background-color = mkLiteral "@urgent";
|
||||
text-color = mkLiteral "@text-selected";
|
||||
};
|
||||
"element-icon" = {
|
||||
background-color = mkLiteral "transparent";
|
||||
text-color = mkLiteral "inherit";
|
||||
size = mkLiteral "36px";
|
||||
cursor = mkLiteral "inherit";
|
||||
};
|
||||
"element-text" = {
|
||||
background-color = mkLiteral "transparent";
|
||||
text-color = mkLiteral "inherit";
|
||||
cursor = mkLiteral "inherit";
|
||||
vertical-align = mkLiteral "0.5";
|
||||
horizontal-align = mkLiteral "0.0";
|
||||
};
|
||||
"message" = {
|
||||
background-color = mkLiteral "transparent";
|
||||
};
|
||||
"textbox" = {
|
||||
padding = mkLiteral "15px";
|
||||
border-radius = mkLiteral "10px";
|
||||
background-color = mkLiteral "@bg-alt";
|
||||
text-color = mkLiteral "@foreground";
|
||||
vertical-align = mkLiteral "0.5";
|
||||
horizontal-align = mkLiteral "0.0";
|
||||
};
|
||||
"error-message" = {
|
||||
padding = mkLiteral "15px";
|
||||
border-radius = mkLiteral "20px";
|
||||
background-color = mkLiteral "@bg";
|
||||
text-color = mkLiteral "@foreground";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
29
modules/home/scripts/default.nix
Normal file
@@ -0,0 +1,29 @@
|
||||
{ pkgs
|
||||
, username
|
||||
, profile
|
||||
, ...
|
||||
}: {
|
||||
home.packages = [
|
||||
(import ./emopicker9000.nix { inherit pkgs; })
|
||||
(import ./hm-find.nix { inherit pkgs; })
|
||||
(import ./keybinds.nix { inherit pkgs; })
|
||||
(import ./note.nix { inherit pkgs; })
|
||||
(import ./note-from-clipboard.nix { inherit pkgs; })
|
||||
(import ./nvidia-offload.nix { inherit pkgs; })
|
||||
(import ./rofi-launcher.nix { inherit pkgs; })
|
||||
(import ./screenshootin.nix { inherit pkgs; })
|
||||
(import ./squirtle.nix { inherit pkgs; })
|
||||
(import ./task-waybar.nix { inherit pkgs; })
|
||||
(import ./wallsetter.nix {
|
||||
inherit pkgs;
|
||||
inherit username;
|
||||
})
|
||||
(import ./web-search.nix { inherit pkgs; })
|
||||
(import ./zcli.nix {
|
||||
inherit pkgs profile;
|
||||
backupFiles = [
|
||||
".config/mimeapps.list.backup"
|
||||
];
|
||||
})
|
||||
];
|
||||
}
|
||||
22
modules/home/scripts/emopicker9000.nix
Normal file
@@ -0,0 +1,22 @@
|
||||
{ pkgs }:
|
||||
pkgs.writeShellScriptBin "emopicker9000" ''
|
||||
# check if rofi is already running
|
||||
if pidof rofi > /dev/null; then
|
||||
pkill rofi
|
||||
fi
|
||||
|
||||
# Get user selection via wofi from emoji file.
|
||||
chosen=$(cat $HOME/.config/.emoji | ${pkgs.rofi-wayland}/bin/rofi -i -dmenu -config ~/.config/rofi/config-long.rasi | awk '{print $1}')
|
||||
|
||||
# Exit if none chosen.
|
||||
[ -z "$chosen" ] && exit
|
||||
|
||||
# If you run this command with an argument, it will automatically insert the
|
||||
# character. Otherwise, show a message that the emoji has been copied.
|
||||
if [ -n "$1" ]; then
|
||||
${pkgs.ydotool}/bin/ydotool type "$chosen"
|
||||
else
|
||||
printf "$chosen" | ${pkgs.wl-clipboard}/bin/wl-copy
|
||||
${pkgs.libnotify}/bin/notify-send "'$chosen' copied to clipboard." &
|
||||
fi
|
||||
''
|
||||
37
modules/home/scripts/gemini-cli.nix
Normal file
@@ -0,0 +1,37 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
let
|
||||
gemini-launcher = pkgs.writeShellScriptBin "gemini-launcher" ''
|
||||
#!${pkgs.bash}/bin/bash
|
||||
|
||||
# Define the path to your API key file
|
||||
KEY_FILE="${config.home.homeDirectory}/gem.key"
|
||||
|
||||
# Check if the key file exists and is readable
|
||||
if [ -f "$KEY_FILE" ]; then
|
||||
# Source the API key from the file.
|
||||
source "$KEY_FILE"
|
||||
# Launch Gemini directly; it will pick up the exported key.
|
||||
exec ${pkgs.kitty}/bin/kitty -e ${pkgs.gemini-cli}/bin/gemini
|
||||
else
|
||||
# If the key file doesn't exist, launch kitty with an informational message, then start gemini.
|
||||
exec ${pkgs.kitty}/bin/kitty -e bash -c "echo 'NOTE: Gemini API key file not found at ~/.gem.key.'; echo 'To use a key, create this file with content: export GEMINI_API_KEY=\"YOUR_KEY\"'; echo; echo 'Starting Gemini CLI, which will fall back to web-based login...'; echo; exec ${pkgs.gemini-cli}/bin/gemini"
|
||||
fi
|
||||
'';
|
||||
|
||||
in
|
||||
{
|
||||
home.packages = [
|
||||
gemini-launcher
|
||||
];
|
||||
|
||||
xdg.desktopEntries.gemini-cli = {
|
||||
name = "Gemini CLI";
|
||||
comment = "Launch the Gemini CLI in Kitty terminal";
|
||||
icon = "utilities-terminal";
|
||||
exec = "gemini-launcher";
|
||||
terminal = false;
|
||||
type = "Application";
|
||||
categories = [ "Development" "Utility" ];
|
||||
};
|
||||
}
|
||||
60
modules/home/scripts/hm-find.nix
Normal file
@@ -0,0 +1,60 @@
|
||||
{ pkgs }:
|
||||
pkgs.writeShellScriptBin "hm-find" ''
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Script Metadata
|
||||
#===============================================
|
||||
# This script searches recent journalctl entries for Home Manager errors
|
||||
# It identifies backup files that prevent rebuilds and allows removal.
|
||||
# Author: Don Williams
|
||||
# Creation Date: May 6th, 2025
|
||||
# Revision History:
|
||||
#-----------------------------------------------
|
||||
# 0.1 - 5/6/25 - Initial version
|
||||
# 0.2 - 5/7/25 - Improved messaging, added log directory check
|
||||
|
||||
# Display WARNING message
|
||||
echo "==============================================="
|
||||
echo " ⚠️ WARNING ⚠️ "
|
||||
echo "==============================================="
|
||||
echo "*** This script is experimental! ***"
|
||||
echo "It will attempt to find old backup files that are preventing Home Manager from rebuilding."
|
||||
echo "If conflicting files are found, you will be prompted to remove them."
|
||||
echo "A log of any deletions will be stored in \$HOME/hm-logs."
|
||||
echo "==============================================="
|
||||
|
||||
# Define the time range (default: last 30 minutes)
|
||||
TIME_RANGE="30m"
|
||||
LOG_DIR="$HOME/hm-logs"
|
||||
LOG_FILE="$LOG_DIR/hm-cleanup-$(date +'%Y-%m-%d_%H-%M-%S').log"
|
||||
|
||||
# Ensure the log directory exists
|
||||
if [ ! -d "$LOG_DIR" ]; then
|
||||
echo "Creating log directory: $LOG_DIR"
|
||||
mkdir -p "$LOG_DIR"
|
||||
fi
|
||||
|
||||
# Search journal logs for backup conflicts and extract file paths
|
||||
FILES=$(journalctl --since "-$TIME_RANGE" -xe | grep hm-activate | awk -F "'|'" '/would be clobbered by backing up/ {print $2}')
|
||||
|
||||
# Check if any files were found
|
||||
if [ -z "$FILES" ]; then
|
||||
echo "No conflicting backup files found in the last $TIME_RANGE."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Display found backup files
|
||||
echo "🚨 The following backup files are preventing Home Manager from rebuilding:"
|
||||
echo "$FILES" | tr ' ' '\n'
|
||||
|
||||
# Ask for user confirmation before deletion
|
||||
read -p "❓ Do you want to remove these files? (y/N): " confirm
|
||||
|
||||
if [[ "$confirm" == "y" || "$confirm" == "Y" ]]; then
|
||||
echo "🗑️ Deleting files..." | tee -a "$LOG_FILE"
|
||||
echo "$FILES" | xargs rm -v | tee -a "$LOG_FILE"
|
||||
echo "✅ Cleanup completed at $(date)" | tee -a "$LOG_FILE"
|
||||
else
|
||||
echo "⛔ No files were removed." | tee -a "$LOG_FILE"
|
||||
fi
|
||||
''
|
||||
17
modules/home/scripts/keybinds.nix
Normal file
@@ -0,0 +1,17 @@
|
||||
{ pkgs }:
|
||||
pkgs.writeShellScriptBin "list-keybinds" ''
|
||||
# check if rofi is already running
|
||||
if pidof rofi > /dev/null; then
|
||||
pkill rofi
|
||||
fi
|
||||
|
||||
msg='☣️ NOTE ☣️: Clicking with Mouse or Pressing ENTER will have NO function'
|
||||
keybinds=$(cat ~/.config/hypr/hyprland.conf | grep -E '^bind')
|
||||
|
||||
# replace #modifier with SUPER in the displayed keybinds for rofi
|
||||
display_keybinds=$(echo "$keybinds" | sed 's/\$modifier/SUPER/g')
|
||||
|
||||
# use rofi to display the keybinds with the modified content
|
||||
echo "$display_keybinds" | rofi -dmenu -i -config ~/.config/rofi/config-long.rasi -mesg "$msg"
|
||||
|
||||
''
|
||||
20
modules/home/scripts/note-from-clipboard.nix
Normal file
@@ -0,0 +1,20 @@
|
||||
{ pkgs, ... }:
|
||||
pkgs.writeShellScriptBin "note-from-clipboard" ''
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Check clipboard content type
|
||||
clipboard_type=$(${pkgs.wl-clipboard}/bin/wl-paste --list-types | head -n 1)
|
||||
|
||||
if [[ "$clipboard_type" == "text/plain"* ]]; then
|
||||
# It's text, let's create a note
|
||||
${pkgs.wl-clipboard}/bin/wl-paste | note
|
||||
if [ $? -eq 0 ]; then
|
||||
${pkgs.libnotify}/bin/notify-send -t 3000 "📝 Note Created" "Clipboard content added as a new note."
|
||||
else
|
||||
${pkgs.libnotify}/bin/notify-send -t 5000 -u critical "❌ Note Creation Failed" "There was an error creating the note."
|
||||
fi
|
||||
else
|
||||
# It's not text, so we do nothing and notify the user
|
||||
${pkgs.libnotify}/bin/notify-send -t 4000 -u low "📋 Note Skipped" "Clipboard does not contain text."
|
||||
fi
|
||||
''
|
||||
244
modules/home/scripts/note.nix
Normal file
@@ -0,0 +1,244 @@
|
||||
{ pkgs, ... }:
|
||||
pkgs.writeShellScriptBin "note" ''
|
||||
|
||||
# Colors for nice output
|
||||
RED='\033[0;31m'
|
||||
GREEN='\033[0;32m'
|
||||
YELLOW='\033[0;33m'
|
||||
BLUE='\033[0;34m'
|
||||
MAGENTA='\033[0;35m'
|
||||
CYAN='\033[0;36m'
|
||||
WHITE='\033[1;37m'
|
||||
GRAY='\033[0;37m'
|
||||
BOLD='\033[1m'
|
||||
NC='\033[0m' # No Color
|
||||
|
||||
# XDG-compliant notes directory and file
|
||||
NOTES_DIR="$HOME/.local/share/notes"
|
||||
NOTES_FILE="$NOTES_DIR/notes.txt"
|
||||
|
||||
# Create notes directory if it doesn't exist
|
||||
mkdir -p "$NOTES_DIR"
|
||||
|
||||
# Function to display usage
|
||||
show_usage() {
|
||||
echo -e "''${BOLD}''${BLUE}📝 Note Manager''${NC}"
|
||||
echo -e "''${GRAY}Usage:''${NC}"
|
||||
echo -e " ''${CYAN}note''${NC} ''${YELLOW}<text>''${NC} - Add a new note"
|
||||
echo -e " ''${CYAN}note''${NC} - Display all notes"
|
||||
echo -e " ''${CYAN}note del''${NC} ''${YELLOW}<number>''${NC} - Delete note by number"
|
||||
echo -e " ''${CYAN}note clear''${NC} - Clear all notes"
|
||||
echo -e " ''${CYAN}echo 'text' | note''${NC} - Add note from stdin"
|
||||
echo -e " ''${CYAN}cat file | note''${NC} - Add file contents as note"
|
||||
echo ""
|
||||
echo -e "''${GRAY}Examples:''${NC}"
|
||||
echo -e " ''${GREEN}note call plumber tomorrow''${NC}"
|
||||
echo -e " ''${GREEN}cat todo.txt | note''${NC}"
|
||||
echo -e " ''${GREEN}note del 3''${NC}"
|
||||
}
|
||||
|
||||
# Function to add a note
|
||||
add_note() {
|
||||
local note_text="$1"
|
||||
local timestamp=$(date '+%Y-%m-%d %H:%M:%S')
|
||||
local date_only=$(date '+%Y-%m-%d')
|
||||
|
||||
# Create notes file if it doesn't exist
|
||||
touch "$NOTES_FILE"
|
||||
|
||||
# Get next note number
|
||||
local note_num=1
|
||||
if [ -f "$NOTES_FILE" ] && [ -s "$NOTES_FILE" ]; then
|
||||
note_num=$(grep -E "^#[0-9]+" "$NOTES_FILE" | sed 's/^#\([0-9]*\).*/\1/' | sort -n | tail -1)
|
||||
note_num=$((note_num + 1))
|
||||
fi
|
||||
|
||||
# Add the note with proper formatting
|
||||
{
|
||||
echo "#$note_num [$timestamp]"
|
||||
echo "$note_text"
|
||||
echo ""
|
||||
} >> "$NOTES_FILE"
|
||||
|
||||
echo -e "''${GREEN}✓''${NC} Note #$note_num added ''${GRAY}($date_only)''${NC}"
|
||||
}
|
||||
|
||||
# Function to display all notes
|
||||
display_notes() {
|
||||
if [ ! -f "$NOTES_FILE" ] || [ ! -s "$NOTES_FILE" ]; then
|
||||
echo -e "''${YELLOW}📝 No notes found''${NC}"
|
||||
echo -e "''${GRAY}Use ''${CYAN}note <text>''${GRAY} to add your first note''${NC}"
|
||||
return
|
||||
fi
|
||||
|
||||
echo -e "''${BOLD}''${BLUE}📝 Your Notes''${NC}"
|
||||
echo -e "''${GRAY}📁 $NOTES_FILE''${NC}"
|
||||
echo -e "''${GRAY}$(printf '%.0s─' {1..50})''${NC}"
|
||||
|
||||
local in_note=false
|
||||
local note_content=""
|
||||
|
||||
while IFS= read -r line; do
|
||||
# Check if line starts with # followed by numbers and space and [
|
||||
if echo "$line" | grep -q "^#[0-9][0-9]* \["; then
|
||||
# Print previous note content if exists
|
||||
if [ "$in_note" = true ] && [ -n "$note_content" ]; then
|
||||
echo -e "$note_content"
|
||||
echo ""
|
||||
fi
|
||||
|
||||
# Extract note number and timestamp
|
||||
local num=$(echo "$line" | sed 's/^#\([0-9]*\) \[.*/\1/')
|
||||
local timestamp=$(echo "$line" | sed 's/^#[0-9]* \[\(.*\)\]/\1/')
|
||||
local date_part=$(echo "$timestamp" | cut -d' ' -f1)
|
||||
local time_part=$(echo "$timestamp" | cut -d' ' -f2)
|
||||
|
||||
echo -e "''${BOLD}''${CYAN}#$num''${NC} ''${GRAY}[$date_part ''${YELLOW}$time_part''${GRAY}]''${NC}"
|
||||
in_note=true
|
||||
note_content=""
|
||||
elif [ -n "$line" ] && [ "$in_note" = true ]; then
|
||||
# Accumulate note content
|
||||
if [ -z "$note_content" ]; then
|
||||
note_content="''${WHITE}$line''${NC}"
|
||||
else
|
||||
note_content="$note_content\n''${WHITE}$line''${NC}"
|
||||
fi
|
||||
elif [ -z "$line" ] && [ "$in_note" = true ]; then
|
||||
# End of current note
|
||||
if [ -n "$note_content" ]; then
|
||||
echo -e "$note_content"
|
||||
echo ""
|
||||
fi
|
||||
in_note=false
|
||||
note_content=""
|
||||
fi
|
||||
done < "$NOTES_FILE"
|
||||
|
||||
# Print last note if file doesn't end with empty line
|
||||
if [ "$in_note" = true ] && [ -n "$note_content" ]; then
|
||||
echo -e "$note_content"
|
||||
echo ""
|
||||
fi
|
||||
|
||||
local total_notes=$(grep -c "^#[0-9]" "$NOTES_FILE")
|
||||
echo -e "''${GRAY}$(printf '%.0s─' {1..50})''${NC}"
|
||||
echo -e "''${GRAY}Total: ''${BOLD}$total_notes''${NC} ''${GRAY}notes''${NC}"
|
||||
}
|
||||
|
||||
# Function to delete a note
|
||||
delete_note() {
|
||||
local note_num="$1"
|
||||
|
||||
if [ ! -f "$NOTES_FILE" ] || [ ! -s "$NOTES_FILE" ]; then
|
||||
echo -e "''${RED}✗''${NC} No notes found"
|
||||
return 1
|
||||
fi
|
||||
|
||||
if ! echo "$note_num" | grep -q "^[0-9][0-9]*$"; then
|
||||
echo -e "''${RED}✗''${NC} Invalid note number: $note_num"
|
||||
return 1
|
||||
fi
|
||||
|
||||
# Check if note exists
|
||||
if ! grep -q "^#$note_num " "$NOTES_FILE"; then
|
||||
echo -e "''${RED}✗''${NC} Note #$note_num not found"
|
||||
return 1
|
||||
fi
|
||||
|
||||
# Create temporary file without the specified note
|
||||
local temp_file=$(mktemp)
|
||||
local skip_lines=false
|
||||
|
||||
while IFS= read -r line; do
|
||||
if echo "$line" | grep -q "^#[0-9][0-9]* "; then
|
||||
local current_num=$(echo "$line" | sed 's/^#\([0-9]*\) .*/\1/')
|
||||
if [ "$current_num" = "$note_num" ]; then
|
||||
skip_lines=true
|
||||
continue
|
||||
else
|
||||
skip_lines=false
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$skip_lines" = false ]; then
|
||||
echo "$line" >> "$temp_file"
|
||||
elif [ -z "$line" ]; then
|
||||
# Stop skipping when we hit an empty line (end of note)
|
||||
skip_lines=false
|
||||
fi
|
||||
done < "$NOTES_FILE"
|
||||
|
||||
mv "$temp_file" "$NOTES_FILE"
|
||||
echo -e "''${GREEN}✓''${NC} Note #$note_num deleted"
|
||||
}
|
||||
|
||||
# Function to clear all notes
|
||||
clear_notes() {
|
||||
if [ ! -f "$NOTES_FILE" ] || [ ! -s "$NOTES_FILE" ]; then
|
||||
echo -e "''${YELLOW}📝 No notes to clear''${NC}"
|
||||
return
|
||||
fi
|
||||
|
||||
local total_notes=$(grep -c "^#[0-9]" "$NOTES_FILE")
|
||||
echo -e "''${YELLOW}⚠''${NC} This will delete all $total_notes notes. Are you sure? ''${GRAY}[y/N]''${NC}"
|
||||
read -r confirmation
|
||||
|
||||
if echo "$confirmation" | grep -qi "^y"; then
|
||||
> "$NOTES_FILE"
|
||||
echo -e "''${GREEN}✓''${NC} All notes cleared"
|
||||
else
|
||||
echo -e "''${BLUE}ℹ''${NC} Operation cancelled"
|
||||
fi
|
||||
}
|
||||
|
||||
# Main script logic
|
||||
main() {
|
||||
# Check if input is being piped
|
||||
if [ ! -t 0 ]; then
|
||||
# Read from stdin (pipe)
|
||||
local piped_content=""
|
||||
while IFS= read -r line; do
|
||||
if [ -z "$piped_content" ]; then
|
||||
piped_content="$line"
|
||||
else
|
||||
piped_content="$piped_content"$'\n'"$line"
|
||||
fi
|
||||
done
|
||||
|
||||
if [ -n "$piped_content" ]; then
|
||||
add_note "$piped_content"
|
||||
else
|
||||
echo -e "''${RED}✗''${NC} No input received from pipe"
|
||||
exit 1
|
||||
fi
|
||||
return
|
||||
fi
|
||||
|
||||
# Handle command line arguments
|
||||
case "$1" in
|
||||
"")
|
||||
display_notes
|
||||
;;
|
||||
"del")
|
||||
if [ -z "$2" ]; then
|
||||
echo -e "''${RED}✗''${NC} Please specify note number to delete"
|
||||
echo -e "''${GRAY}Usage: ''${CYAN}note del <number>''${NC}"
|
||||
exit 1
|
||||
fi
|
||||
delete_note "$2"
|
||||
;;
|
||||
"clear")
|
||||
clear_notes
|
||||
;;
|
||||
"help"|"--help"|"-h")
|
||||
show_usage
|
||||
;;
|
||||
*)
|
||||
# Everything else is treated as note content
|
||||
add_note "$*"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
main "$@"
|
||||
''
|
||||
9
modules/home/scripts/nvidia-offload.nix
Normal file
@@ -0,0 +1,9 @@
|
||||
{ pkgs }:
|
||||
|
||||
pkgs.writeShellScriptBin "nvidia-offload" ''
|
||||
export __NV_PRIME_RENDER_OFFLOAD=1
|
||||
export __NV_PRIME_RENDER_OFFLOAD_PROVIDER=NVIDIA-G0
|
||||
export __GLX_VENDOR_LIBRARY_NAME=nvidia
|
||||
export __VK_LAYER_NV_optimus=NVIDIA_only
|
||||
exec "$@"
|
||||
''
|
||||
8
modules/home/scripts/rofi-launcher.nix
Normal file
@@ -0,0 +1,8 @@
|
||||
{ pkgs }:
|
||||
pkgs.writeShellScriptBin "rofi-launcher" ''
|
||||
# check if rofi is already running
|
||||
if pidof rofi > /dev/null; then
|
||||
pkill rofi
|
||||
fi
|
||||
rofi -show drun
|
||||
''
|
||||
5
modules/home/scripts/screenshootin.nix
Normal file
@@ -0,0 +1,5 @@
|
||||
{ pkgs }:
|
||||
|
||||
pkgs.writeShellScriptBin "screenshootin" ''
|
||||
grim -g "$(slurp)" - | swappy -f -
|
||||
''
|
||||
23
modules/home/scripts/squirtle.nix
Normal file
@@ -0,0 +1,23 @@
|
||||
{ pkgs }:
|
||||
|
||||
pkgs.writeShellScriptBin "squirtle" ''
|
||||
echo "
|
||||
[38;2;0;0;0m ████████ ██████
|
||||
[38;2;0;0;0m ██[38;2;82;156;154m██[38;2;115;198;243m██████[38;2;0;0;0m████ ██[38;2;115;198;243m██████[38;2;0;0;0m██
|
||||
[38;2;0;0;0m ██[38;2;115;200;243m████████████[38;2;85;137;157m██[38;2;8;0;0m██[38;2;0;0;0m██ ██[38;2;115;198;243m██████[38;2;79;159;151m████[38;2;0;0;0m██
|
||||
[38;2;0;0;0m ██[38;2;115;200;243m████████████[38;2;123;206;235m██[38;2;46;69;78m██[38;2;189;107;37m██[38;2;0;0;0m████ ██[38;2;115;198;243m████[38;2;82;156;154m██[38;2;57;66;65m██[38;2;68;113;108m██[38;2;0;0;0m██
|
||||
[38;2;0;0;0m██[38;2;115;198;243m██[38;2;115;200;243m████[38;2;159;208;204m██[38;2;96;162;155m██[38;2;115;198;243m██████[38;2;82;156;154m██[38;2;66;61;66m██[38;2;214;132;38m██[38;2;198;119;38m██[38;2;0;0;0m██[38;2;86;146;154m██[38;2;107;214;243m██[38;2;82;156;154m██[38;2;66;66;66m██[38;2;82;156;154m████[38;2;0;0;0m██
|
||||
[38;2;0;0;0m██[38;2;115;198;243m██[38;2;115;200;243m████[38;2;33;115;105m██[38;2;222;255;254m██[38;2;0;0;0m██[38;2;115;198;243m████[38;2;82;156;154m██[38;2;66;61;66m██[38;2;140;96;52m██[38;2;198;119;38m████[38;2;66;78;66m██[38;2;86;146;154m██[38;2;82;156;154m██[38;2;66;66;66m██[38;2;82;156;154m██[38;2;0;0;0m██
|
||||
[38;2;0;0;0m██[38;2;115;198;243m██[38;2;115;200;243m████[38;2;77;144;162m██[38;2;0;4;0m██[38;2;41;8;1m██[38;2;123;214;235m██[38;2;82;156;154m████[38;2;66;66;66m██[38;2;255;255;255m██[38;2;140;82;44m██[38;2;214;140;46m██[38;2;90;103;88m██[38;2;49;111;121m██[38;2;85;159;151m██[38;2;46;80;76m██[38;2;0;0;0m██
|
||||
[38;2;0;0;0m ██[38;2;115;200;243m████[38;2;115;214;243m██[38;2;0;4;0m██[38;2;68;77;79m██[38;2;96;145;157m██[38;2;82;156;154m██[38;2;66;66;66m██[38;2;192;192;192m██[38;2;255;255;255m██[38;2;140;82;44m██[38;2;214;140;46m██[38;2;173;86;21m██[38;2;90;103;88m██[38;2;85;159;151m██[38;2;8;0;0m██[38;2;0;0;0m
|
||||
[38;2;0;0;0m [38;2;8;0;0m██[38;2;49;77;76m██[38;2;82;156;154m████[38;2;99;132;115m████[38;2;57;74;81m██[38;2;118;129;107m██[38;2;66;66;66m██[38;2;148;198;220m██[38;2;255;255;255m██[38;2;140;82;44m██[38;2;189;103;37m██[38;2;66;66;66m██[38;2;82;156;154m██[38;2;0;0;0m██
|
||||
[38;2;0;0;0m [38;2;8;0;0m██[38;2;91;154;152m██[38;2;66;66;66m████[38;2;49;103;113m██[38;2;198;189;118m██[38;2;239;239;159m██[38;2;57;74;81m██[38;2;148;198;220m██[38;2;66;66;66m██[38;2;255;255;255m██[38;2;140;82;44m██[38;2;148;91;47m██[38;2;66;66;66m██[38;2;0;0;0m██
|
||||
[38;2;0;0;0m ████[38;2;247;231;143m██████[38;2;66;66;66m██[38;2;115;198;243m██████[38;2;66;66;66m██[38;2;140;82;44m██[38;2;189;107;37m██[38;2;0;0;0m██
|
||||
[38;2;0;0;0m ██[38;2;206;173;94m████[38;2;66;66;66m██[38;2;115;198;243m████[38;2;82;156;154m██[38;2;66;66;66m██[38;2;140;82;44m██[38;2;189;107;37m██[38;2;0;0;0m██
|
||||
[38;2;0;0;0m ██[38;2;57;115;105m██[38;2;80;85;69m██[38;2;239;239;159m██[38;2;255;231;127m██[38;2;74;66;58m██[38;2;82;156;154m██[38;2;66;66;66m██[38;2;58;69;71m██[38;2;173;198;197m██[38;2;0;0;0m██
|
||||
[38;2;0;0;0m ██[38;2;57;115;105m██[38;2;80;85;69m██[38;2;0;8;24m██[38;2;195;176;104m████[38;2;66;66;66m████[38;2;115;133;134m██[38;2;58;69;71m██[38;2;0;0;0m██
|
||||
[38;2;0;0;0m ████ ██[38;2;66;66;66m██[38;2;115;206;243m██[38;2;76;151;151m██[38;2;82;156;154m██[38;2;0;0;0m██
|
||||
[38;2;0;0;0m ██[38;2;76;151;151m██[38;2;57;123;105m██[38;2;82;156;154m██[38;2;0;0;0m██
|
||||
[38;2;0;0;0m ██████ [0m
|
||||
"
|
||||
''
|
||||
6
modules/home/scripts/task-waybar.nix
Normal file
@@ -0,0 +1,6 @@
|
||||
{ pkgs }:
|
||||
|
||||
pkgs.writeShellScriptBin "task-waybar" ''
|
||||
sleep 0.1
|
||||
${pkgs.swaynotificationcenter}/bin/swaync-client -t &
|
||||
''
|
||||
24
modules/home/scripts/wallsetter.nix
Normal file
@@ -0,0 +1,24 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
pkgs.writeShellScriptBin "wallsetter" ''
|
||||
|
||||
TIMEOUT=720
|
||||
|
||||
for pid in $(pidof -o %PPID -x wallsetter); do
|
||||
kill $pid
|
||||
done
|
||||
|
||||
if ! [ -d ~/Pictures/Wallpapers ]; then notify-send -t 5000 "~/Pictures/Wallpapers does not exist" && exit 1; fi
|
||||
if [ $(ls -1 ~/Pictures/Wallpapers | wc -l) -lt 1 ]; then notify-send -t 9000 "The wallpaper folder is expected to have more than 1 image. Exiting Wallsetter." && exit 1; fi
|
||||
|
||||
while true; do
|
||||
while [ "$WALLPAPER" == "$PREVIOUS" ]; do
|
||||
WALLPAPER=$(find ~/Pictures/Wallpapers -name '*' | awk '!/.git/' | tail -n +2 | shuf -n 1)
|
||||
done
|
||||
|
||||
PREVIOUS=$WALLPAPER
|
||||
|
||||
${pkgs.swww}/bin/swww img "$WALLPAPER" --transition-type random --transition-step 1 --transition-fps 60
|
||||
sleep $TIMEOUT
|
||||
done
|
||||
''
|
||||
47
modules/home/scripts/web-search.nix
Normal file
@@ -0,0 +1,47 @@
|
||||
{ pkgs }:
|
||||
pkgs.writeShellScriptBin "web-search" ''
|
||||
# check if rofi is already running
|
||||
if pidof rofi > /dev/null; then
|
||||
pkill rofi
|
||||
fi
|
||||
|
||||
declare -A URLS
|
||||
|
||||
URLS=(
|
||||
["🌎 Search"]="https://search.brave.com/search?q="
|
||||
["❄️ Unstable Packages"]="https://search.nixos.org/packages?channel=unstable&from=0&size=50&sort=relevance&type=packages&query="
|
||||
["🎞️ YouTube"]="https://www.youtube.com/results?search_query="
|
||||
["🦥 Arch Wiki"]="https://wiki.archlinux.org/title/"
|
||||
["🐃 Gentoo Wiki"]="https://wiki.gentoo.org/index.php?title="
|
||||
)
|
||||
|
||||
# List for rofi
|
||||
gen_list() {
|
||||
for i in "''${!URLS[@]}"
|
||||
do
|
||||
echo "$i"
|
||||
done
|
||||
}
|
||||
|
||||
main() {
|
||||
# Pass the list to rofi
|
||||
platform=$( (gen_list) | ${pkgs.rofi-wayland}/bin/rofi -dmenu -config ~/.config/rofi/config-long.rasi )
|
||||
|
||||
if [[ -n "$platform" ]]; then
|
||||
query=$( (echo ) | ${pkgs.rofi-wayland}/bin/rofi -dmenu -config ~/.config/rofi/config-long.rasi )
|
||||
|
||||
if [[ -n "$query" ]]; then
|
||||
url=''${URLS[$platform]}$query
|
||||
xdg-open "$url"
|
||||
else
|
||||
exit
|
||||
fi
|
||||
else
|
||||
exit
|
||||
fi
|
||||
}
|
||||
|
||||
main
|
||||
|
||||
exit 0
|
||||
''
|
||||
700
modules/home/scripts/zcli.nix
Normal file
@@ -0,0 +1,700 @@
|
||||
{ pkgs
|
||||
, profile
|
||||
, backupFiles ? [ ".config/mimeapps.list.backup" ]
|
||||
, ...
|
||||
}:
|
||||
let
|
||||
backupFilesString = pkgs.lib.strings.concatStringsSep " " backupFiles;
|
||||
|
||||
# Create the get-doom script as a dependency
|
||||
get-doom-script = pkgs.writeShellScriptBin "get-doom" ''
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
# --- Icons ---
|
||||
ICON_CHECK="✔"
|
||||
ICON_INFO="ℹ"
|
||||
ICON_ROCKET="🚀"
|
||||
|
||||
# --- Helper Functions ---
|
||||
print_status() {
|
||||
echo
|
||||
echo "--- $ICON_INFO $1 ---"
|
||||
}
|
||||
|
||||
print_success() {
|
||||
echo "--- $ICON_CHECK $1 ---"
|
||||
}
|
||||
|
||||
print_banner() {
|
||||
echo "==============================="
|
||||
echo " Doom Emacs Installer $ICON_ROCKET"
|
||||
echo "==============================="
|
||||
}
|
||||
|
||||
is_doom_installed() {
|
||||
local dir="$1"
|
||||
[[ -x "$dir/bin/doom" ]] && [[ -f "$dir/core/doom.el" ]]
|
||||
}
|
||||
|
||||
emacsdir_is_empty() {
|
||||
local dir="$1"
|
||||
[[ -d "$dir" ]] && [[ -z "$(ls -A "$dir" 2>/dev/null)" ]]
|
||||
}
|
||||
|
||||
# --- Main Script ---
|
||||
print_banner
|
||||
EMACSDIR="$HOME/.emacs.d"
|
||||
|
||||
if is_doom_installed "$EMACSDIR"; then
|
||||
print_success "Doom Emacs is already installed."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [[ -d "$EMACSDIR" ]]; then
|
||||
if emacsdir_is_empty "$EMACSDIR"; then
|
||||
print_status "Found empty $EMACSDIR; proceeding to install Doom Emacs into it..."
|
||||
else
|
||||
echo "Error: Found $EMACSDIR but it does not look like a Doom Emacs installation." >&2
|
||||
echo "Refusing to overwrite a non-empty directory. Move it away and re-run, e.g.:" >&2
|
||||
echo " mv \"$EMACSDIR\" \"$EMACSDIR.bak\"" >&2
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
print_status "Cloning Doom Emacs..."
|
||||
${pkgs.git}/bin/git clone --depth 1 https://github.com/doomemacs/doomemacs "$EMACSDIR"
|
||||
print_success "Doom Emacs cloned."
|
||||
|
||||
print_status "Running Doom install..."
|
||||
"$EMACSDIR/bin/doom" install
|
||||
print_success "Doom install complete."
|
||||
|
||||
print_status "Running doom sync..."
|
||||
"$EMACSDIR/bin/doom" sync
|
||||
print_success "Doom sync complete."
|
||||
|
||||
echo
|
||||
print_success "All done! Doom Emacs is ready to use."
|
||||
'';
|
||||
in
|
||||
|
||||
pkgs.writeShellScriptBin "zcli" ''
|
||||
#!${pkgs.bash}/bin/bash
|
||||
set -euo pipefail
|
||||
|
||||
# --- Program info ---
|
||||
#
|
||||
# zcli - NixOS System Management CLI
|
||||
# ==================================
|
||||
#
|
||||
# Purpose: NixOS system management utility for ZaneyOS distribution
|
||||
# Author: Don Williams (ddubs) & Zaney
|
||||
# Start Date: June 7th, 2025
|
||||
# Version: 1.0.2
|
||||
#
|
||||
# Architecture:
|
||||
# - Nix-generated shell script using writeShellScriptBin
|
||||
# - Configuration via Nix parameters (profile, backupFiles)
|
||||
# - Uses 'nh' tool for NixOS operations, 'inxi' for diagnostics
|
||||
# - Git integration for host configuration versioning
|
||||
#
|
||||
# Helper Functions:
|
||||
# verify_hostname() - Validates current hostname against flake.nix host variable
|
||||
# Exits with error if mismatch or missing host directory
|
||||
# detect_gpu_profile() - Parses lspci output to identify GPU hardware
|
||||
# Returns: nvidia/nvidia-laptop/amd/intel/vm/empty
|
||||
# handle_backups() - Removes files listed in BACKUP_FILES array from $HOME
|
||||
# parse_nh_args() - Parses command-line arguments for nh operations
|
||||
# print_help() - Outputs command usage and available operations
|
||||
#
|
||||
# Command Functions:
|
||||
# cleanup - Interactive cleanup of old generations via 'nh clean'
|
||||
# diag - Generate system report using 'inxi --full'
|
||||
# list-gens - Display user/system generations via nix-env and nix profile
|
||||
# rebuild - NixOS rebuild using 'nh os switch'
|
||||
# rebuild-boot - NixOS rebuild for next boot using 'nh os boot'
|
||||
# trim - SSD optimization via 'sudo fstrim -v /'
|
||||
# update - Flake update + rebuild using 'nh os switch --update'
|
||||
# update-host - Modify flake.nix host/profile variables via sed
|
||||
# add-host - Add new host configuration
|
||||
# del-host - Delete host configuration
|
||||
# doom [sub] - Doom Emacs management (install/status/remove/update)
|
||||
#
|
||||
# Variables:
|
||||
# PROJECT - Base directory name (ddubsos/zaneyos)
|
||||
# PROFILE - Hardware profile from Nix parameter
|
||||
# BACKUP_FILES - Array of backup file paths to clean
|
||||
# FLAKE_NIX_PATH - Path to flake.nix for host/profile updates
|
||||
#
|
||||
|
||||
|
||||
# --- Configuration ---
|
||||
PROJECT="zaneyos" #ddubos or zaneyos
|
||||
PROFILE="${profile}"
|
||||
BACKUP_FILES_STR="${backupFilesString}"
|
||||
VERSION="1.0.2"
|
||||
FLAKE_NIX_PATH="$HOME/$PROJECT/flake.nix"
|
||||
|
||||
read -r -a BACKUP_FILES <<< "$BACKUP_FILES_STR"
|
||||
|
||||
# --- Helper Functions ---
|
||||
verify_hostname() {
|
||||
local current_hostname
|
||||
local flake_hostname
|
||||
|
||||
current_hostname="$(hostname)"
|
||||
|
||||
# Extract the host value from flake.nix
|
||||
if [ -f "$FLAKE_NIX_PATH" ]; then
|
||||
flake_hostname=$(${pkgs.gnugrep}/bin/grep -E '^[[:space:]]*host[[:space:]]*=' "$FLAKE_NIX_PATH" | ${pkgs.gnused}/bin/sed 's/.*=[[:space:]]*"\([^"]*\)".*/\1/')
|
||||
|
||||
if [ -z "$flake_hostname" ]; then
|
||||
echo "Error: Could not find 'host' variable in $FLAKE_NIX_PATH" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ "$current_hostname" != "$flake_hostname" ]; then
|
||||
echo "Error: Hostname mismatch!" >&2
|
||||
echo " Current hostname: '$current_hostname'" >&2
|
||||
echo " Flake.nix host: '$flake_hostname'" >&2
|
||||
echo "" >&2
|
||||
echo "Hint: Run 'zcli update-host' to automatically update flake.nix" >&2
|
||||
echo " or manually edit $FLAKE_NIX_PATH" >&2
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
echo "Error: Flake.nix not found at $FLAKE_NIX_PATH" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Also check if host folder exists
|
||||
local folder="$HOME/$PROJECT/hosts/$current_hostname"
|
||||
if [ ! -d "$folder" ]; then
|
||||
echo "Error: Matching host not found in $PROJECT, Missing folder: $folder" >&2
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
print_help() {
|
||||
echo "ZaneyOS CLI Utility -- version $VERSION"
|
||||
echo ""
|
||||
echo "Usage: zcli [command] [options]"
|
||||
echo ""
|
||||
echo "Commands:"
|
||||
echo " cleanup - Clean up old system generations. Can specify a number to keep."
|
||||
echo " diag - Create a system diagnostic report."
|
||||
echo " (Filename: homedir/diag.txt)"
|
||||
echo " list-gens - List user and system generations."
|
||||
echo " rebuild - Rebuild the NixOS system configuration."
|
||||
echo " rebuild-boot - Rebuild and set as boot default (activates on next restart)."
|
||||
echo " trim - Trim filesystems to improve SSD performance."
|
||||
echo " update - Update the flake and rebuild the system."
|
||||
echo " update-host - Auto set host and profile in flake.nix."
|
||||
echo " (Opt: zcli update-host [hostname] [profile])"
|
||||
echo ""
|
||||
echo "Options for rebuild, rebuild-boot, and update commands:"
|
||||
echo " --dry, -n - Show what would be done without doing it"
|
||||
echo " --ask, -a - Ask for confirmation before proceeding"
|
||||
echo " --cores N - Limit build to N cores (useful for VMs)"
|
||||
echo " --verbose, -v - Show verbose output"
|
||||
echo " --no-nom - Don't use nix-output-monitor"
|
||||
echo ""
|
||||
echo "Doom Emacs:"
|
||||
echo " doom install - Install Doom Emacs using get-doom script."
|
||||
echo " doom status - Check if Doom Emacs is installed."
|
||||
echo " doom remove - Remove Doom Emacs installation."
|
||||
echo " doom update - Update Doom Emacs (runs doom sync)."
|
||||
echo ""
|
||||
echo " help - Show this help message."
|
||||
}
|
||||
|
||||
handle_backups() {
|
||||
if [ ''${#BACKUP_FILES[@]} -eq 0 ]; then
|
||||
echo "No backup files configured to check."
|
||||
return
|
||||
fi
|
||||
|
||||
echo "Checking for backup files to remove..."
|
||||
for file_path in "''${BACKUP_FILES[@]}"; do
|
||||
full_path="$HOME/$file_path"
|
||||
if [ -f "$full_path" ]; then
|
||||
echo "Removing stale backup file: $full_path"
|
||||
rm "$full_path"
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
detect_gpu_profile() {
|
||||
local detected_profile=""
|
||||
local has_nvidia=false
|
||||
local has_intel=false
|
||||
local has_amd=false
|
||||
local has_vm=false
|
||||
|
||||
if ${pkgs.pciutils}/bin/lspci &> /dev/null; then # Check if lspci is available
|
||||
if ${pkgs.pciutils}/bin/lspci | ${pkgs.gnugrep}/bin/grep -qi 'vga\|3d'; then
|
||||
while read -r line; do
|
||||
if echo "$line" | ${pkgs.gnugrep}/bin/grep -qi 'nvidia'; then
|
||||
has_nvidia=true
|
||||
elif echo "$line" | ${pkgs.gnugrep}/bin/grep -qi 'amd'; then
|
||||
has_amd=true
|
||||
elif echo "$line" | ${pkgs.gnugrep}/bin/grep -qi 'intel'; then
|
||||
has_intel=true
|
||||
elif echo "$line" | ${pkgs.gnugrep}/bin/grep -qi 'virtio\|vmware'; then
|
||||
has_vm=true
|
||||
fi
|
||||
done < <(${pkgs.pciutils}/bin/lspci | ${pkgs.gnugrep}/bin/grep -i 'vga\|3d')
|
||||
|
||||
if "$has_vm"; then
|
||||
detected_profile="vm"
|
||||
elif "$has_nvidia" && "$has_intel"; then
|
||||
detected_profile="nvidia-laptop"
|
||||
elif "$has_nvidia"; then
|
||||
detected_profile="nvidia"
|
||||
elif "$has_amd"; then
|
||||
detected_profile="amd"
|
||||
elif "$has_intel"; then
|
||||
detected_profile="intel"
|
||||
fi
|
||||
fi
|
||||
else
|
||||
echo "Warning: lspci command not found. Cannot auto-detect GPU profile." >&2
|
||||
fi
|
||||
echo "$detected_profile" # Return the detected profile
|
||||
}
|
||||
|
||||
# --- Helper function to parse additional arguments ---
|
||||
parse_nh_args() {
|
||||
local args_string=""
|
||||
local options_selected=()
|
||||
shift # Remove the main command (rebuild, rebuild-boot, update)
|
||||
|
||||
while [[ $# -gt 0 ]]; do
|
||||
case $1 in
|
||||
--dry|-n)
|
||||
args_string="$args_string --dry"
|
||||
options_selected+=("dry run mode (showing what would be done)")
|
||||
shift
|
||||
;;
|
||||
--ask|-a)
|
||||
args_string="$args_string --ask"
|
||||
options_selected+=("confirmation prompts enabled")
|
||||
shift
|
||||
;;
|
||||
--cores)
|
||||
if [[ -n $2 && $2 =~ ^[0-9]+$ ]]; then
|
||||
args_string="$args_string -- --cores $2"
|
||||
options_selected+=("limited to $2 CPU cores")
|
||||
shift 2
|
||||
else
|
||||
echo "Error: --cores requires a numeric argument" >&2
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
--verbose|-v)
|
||||
args_string="$args_string --verbose"
|
||||
options_selected+=("verbose output enabled")
|
||||
shift
|
||||
;;
|
||||
--no-nom)
|
||||
args_string="$args_string --no-nom"
|
||||
options_selected+=("nix-output-monitor disabled")
|
||||
shift
|
||||
;;
|
||||
--)
|
||||
shift
|
||||
args_string="$args_string -- $*"
|
||||
options_selected+=("additional arguments: $*")
|
||||
break
|
||||
;;
|
||||
-*)
|
||||
echo "Warning: Unknown flag '$1' - passing through to nh" >&2
|
||||
args_string="$args_string $1"
|
||||
options_selected+=("unknown flag '$1' passed through")
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
echo "Error: Unexpected argument '$1'" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
# Print friendly confirmation of selected options to stderr so it doesn't interfere with return value
|
||||
if [[ ''${#options_selected[@]} -gt 0 ]]; then
|
||||
echo "Options selected:" >&2
|
||||
for option in "''${options_selected[@]}"; do
|
||||
echo " ✓ $option" >&2
|
||||
done
|
||||
echo >&2
|
||||
fi
|
||||
|
||||
# Return only the args string
|
||||
echo "$args_string"
|
||||
}
|
||||
|
||||
# --- Main Logic ---
|
||||
if [ "$#" -eq 0 ]; then
|
||||
echo "Error: No command provided." >&2
|
||||
print_help
|
||||
exit 1
|
||||
fi
|
||||
|
||||
case "$1" in
|
||||
cleanup)
|
||||
echo "Warning! This will remove old generations of your system."
|
||||
read -p "How many generations to keep (default: all)? " keep_count
|
||||
|
||||
if [ -z "$keep_count" ]; then
|
||||
read -p "This will remove all but the current generation. Continue (y/N)? " -n 1 -r
|
||||
echo
|
||||
if [[ $REPLY =~ ^[Yy]$ ]]; then
|
||||
${pkgs.nh}/bin/nh clean all -v
|
||||
else
|
||||
echo "Cleanup cancelled."
|
||||
fi
|
||||
else
|
||||
read -p "This will keep the last $keep_count generations. Continue (y/N)? " -n 1 -r
|
||||
echo
|
||||
if [[ $REPLY =~ ^[Yy]$ ]]; then
|
||||
${pkgs.nh}/bin/nh clean all -k "$keep_count" -v
|
||||
else
|
||||
echo "Cleanup cancelled."
|
||||
fi
|
||||
fi
|
||||
|
||||
LOG_DIR="$HOME/zcli-cleanup-logs"
|
||||
mkdir -p "$LOG_DIR"
|
||||
LOG_FILE="$LOG_DIR/zcli-cleanup-$(${pkgs.coreutils}/bin/date +%Y-%m-%d_%H-%M-%S).log"
|
||||
echo "Cleaning up old log files..." >> "$LOG_FILE"
|
||||
${pkgs.findutils}/bin/find "$LOG_DIR" -type f -mtime +3 -name "*.log" -delete >> "$LOG_FILE" 2>&1
|
||||
echo "Cleanup process logged to $LOG_FILE"
|
||||
;;
|
||||
diag)
|
||||
echo "Generating system diagnostic report..."
|
||||
${pkgs.inxi}/bin/inxi --full > "$HOME/diag.txt"
|
||||
echo "Diagnostic report saved to $HOME/diag.txt"
|
||||
;;
|
||||
help)
|
||||
print_help
|
||||
;;
|
||||
list-gens)
|
||||
echo "--- User Generations ---"
|
||||
${pkgs.nix}/bin/nix-env --list-generations | ${pkgs.coreutils}/bin/cat || echo "Could not list user generations."
|
||||
echo ""
|
||||
echo "--- System Generations ---"
|
||||
${pkgs.nix}/bin/nix profile history --profile /nix/var/nix/profiles/system | ${pkgs.coreutils}/bin/cat || echo "Could not list system generations."
|
||||
;;
|
||||
rebuild)
|
||||
verify_hostname
|
||||
handle_backups
|
||||
|
||||
# Parse additional arguments
|
||||
extra_args=$(parse_nh_args "$@")
|
||||
|
||||
echo "Starting NixOS rebuild for host: $(${pkgs.nettools}/bin/hostname)"
|
||||
if eval "${pkgs.nh}/bin/nh os switch --hostname '$PROFILE' $extra_args"; then
|
||||
echo "Rebuild finished successfully"
|
||||
else
|
||||
echo "Rebuild Failed" >&2
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
rebuild-boot)
|
||||
verify_hostname
|
||||
handle_backups
|
||||
|
||||
# Parse additional arguments
|
||||
extra_args=$(parse_nh_args "$@")
|
||||
|
||||
echo "Starting NixOS rebuild (boot) for host: $(${pkgs.nettools}/bin/hostname)"
|
||||
echo "Note: Configuration will be activated on next reboot"
|
||||
if eval "${pkgs.nh}/bin/nh os boot --hostname '$PROFILE' $extra_args"; then
|
||||
echo "Rebuild-boot finished successfully"
|
||||
echo "New configuration set as boot default - restart to activate"
|
||||
else
|
||||
echo "Rebuild-boot Failed" >&2
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
trim)
|
||||
echo "Running 'sudo fstrim -v /' may take a few minutes and impact system performance."
|
||||
read -p "Enter (y/Y) to run now or enter to exit (y/N): " -n 1 -r
|
||||
echo # move to a new line
|
||||
if [[ $REPLY =~ ^[Yy]$ ]]; then
|
||||
echo "Running fstrim..."
|
||||
sudo ${pkgs.util-linux}/bin/fstrim -v /
|
||||
echo "fstrim complete."
|
||||
else
|
||||
echo "Trim operation cancelled."
|
||||
fi
|
||||
;;
|
||||
update)
|
||||
verify_hostname
|
||||
handle_backups
|
||||
|
||||
# Parse additional arguments
|
||||
extra_args=$(parse_nh_args "$@")
|
||||
|
||||
echo "Updating flake and rebuilding system for host: $(${pkgs.nettools}/bin/hostname)"
|
||||
if eval "${pkgs.nh}/bin/nh os switch --hostname '$PROFILE' --update $extra_args"; then
|
||||
echo "Update and rebuild finished successfully"
|
||||
else
|
||||
echo "Update and rebuild Failed" >&2
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
update-host)
|
||||
target_hostname=""
|
||||
target_profile=""
|
||||
|
||||
if [ "$#" -eq 3 ]; then # zcli update-host <hostname> <profile>
|
||||
target_hostname="$2"
|
||||
target_profile="$3"
|
||||
elif [ "$#" -eq 1 ]; then # zcli update-host (auto-detect)
|
||||
echo "Attempting to auto-detect hostname and GPU profile..."
|
||||
target_hostname=$(${pkgs.nettools}/bin/hostname)
|
||||
target_profile=$(detect_gpu_profile)
|
||||
|
||||
if [ -z "$target_profile" ]; then
|
||||
echo "Error: Could not auto-detect a specific GPU profile. Please provide it manually." >&2
|
||||
echo "Usage: zcli update-host [hostname] [profile]" >&2
|
||||
exit 1
|
||||
fi
|
||||
echo "Auto-detected Hostname: $target_hostname"
|
||||
echo "Auto-detected Profile: $target_profile"
|
||||
else
|
||||
echo "Error: Invalid number of arguments for 'update-host'." >&2
|
||||
echo "Usage: zcli update-host [hostname] [profile]" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Updating $FLAKE_NIX_PATH..."
|
||||
|
||||
# Update host
|
||||
if ${pkgs.gnused}/bin/sed -i "s/^[[:space:]]*host[[:space:]]*=[[:space:]]*\".*\"/ host = \"$target_hostname\"/" "$FLAKE_NIX_PATH"; then
|
||||
echo "Successfully updated host to: $target_hostname"
|
||||
else
|
||||
echo "Error: Failed to update host in $FLAKE_NIX_PATH" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Update profile
|
||||
if ${pkgs.gnused}/bin/sed -i "s/^[[:space:]]*profile[[:space:]]*=[[:space:]]*\".*\"/ profile = \"$target_profile\"/" "$FLAKE_NIX_PATH"; then
|
||||
echo "Successfully updated profile to: $target_profile"
|
||||
else
|
||||
echo "Error: Failed to update profile in $FLAKE_NIX_PATH" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Flake.nix updated successfully!"
|
||||
;;
|
||||
add-host)
|
||||
hostname=""
|
||||
profile_arg=""
|
||||
|
||||
if [ "$#" -ge 2 ]; then
|
||||
hostname="$2"
|
||||
fi
|
||||
if [ "$#" -eq 3 ]; then
|
||||
profile_arg="$3"
|
||||
fi
|
||||
|
||||
if [ -z "$hostname" ]; then
|
||||
read -p "Enter the new hostname: " hostname
|
||||
fi
|
||||
|
||||
if [ -d "$HOME/$PROJECT/hosts/$hostname" ]; then
|
||||
echo "Error: Host '$hostname' already exists." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Copying default host configuration..."
|
||||
${pkgs.coreutils}/bin/cp -r "$HOME/$PROJECT/hosts/default" "$HOME/$PROJECT/hosts/$hostname"
|
||||
|
||||
detected_profile=""
|
||||
if [[ -n "$profile_arg" && "$profile_arg" =~ ^(intel|amd|nvidia|nvidia-hybrid|vm)$ ]]; then
|
||||
detected_profile="$profile_arg"
|
||||
else
|
||||
echo "Detecting GPU profile..."
|
||||
detected_profile=$(detect_gpu_profile)
|
||||
echo "Detected GPU profile: $detected_profile"
|
||||
read -p "Is this correct? (y/n) " -n 1 -r
|
||||
echo
|
||||
if [[ $REPLY =~ ^[Nn]$ ]]; then
|
||||
read -p "Enter the correct profile (intel, amd, nvidia, nvidia-hybrid, vm): " new_profile
|
||||
while [[ ! "$new_profile" =~ ^(intel|amd|nvidia|nvidia-hybrid|vm)$ ]]; do
|
||||
echo "Invalid profile. Please enter one of the following: intel, amd, nvidia, nvidia-hybrid, vm"
|
||||
read -p "Enter the correct profile: " new_profile
|
||||
done
|
||||
detected_profile=$new_profile
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "Setting profile to '$detected_profile'..."
|
||||
${pkgs.gnused}/bin/sed -i "s/profile = .*/profile = \"$detected_profile\";/" "$HOME/$PROJECT/hosts/$hostname/default.nix"
|
||||
|
||||
read -p "Generate new hardware.nix? (y/n) " -n 1 -r
|
||||
echo
|
||||
if [[ $REPLY =~ ^[Yy]$ ]]; then
|
||||
echo "Generating hardware.nix..."
|
||||
sudo nixos-generate-config --show-hardware-config > "$HOME/$PROJECT/hosts/$hostname/hardware.nix"
|
||||
echo "hardware.nix generated."
|
||||
fi
|
||||
|
||||
echo "Adding new host to git..."
|
||||
${pkgs.git}/bin/git -C "$HOME/$PROJECT" add .
|
||||
echo "hostname: $hostname added"
|
||||
;;
|
||||
del-host)
|
||||
hostname=""
|
||||
if [ "$#" -eq 2 ]; then
|
||||
hostname="$2"
|
||||
else
|
||||
read -p "Enter the hostname to delete: " hostname
|
||||
fi
|
||||
|
||||
if [ ! -d "$HOME/$PROJECT/hosts/$hostname" ]; then
|
||||
echo "Error: Host '$hostname' does not exist." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
read -p "Are you sure you want to delete the host '$hostname'? (y/N) " -n 1 -r
|
||||
echo
|
||||
if [[ $REPLY =~ ^[Yy]$ ]]; then
|
||||
echo "Deleting host '$hostname'..."
|
||||
${pkgs.coreutils}/bin/rm -rf "$HOME/$PROJECT/hosts/$hostname"
|
||||
${pkgs.git}/bin/git -C "$HOME/$PROJECT" add .
|
||||
echo "hostname: $hostname removed"
|
||||
else
|
||||
echo "Deletion cancelled."
|
||||
fi
|
||||
;;
|
||||
doom)
|
||||
if [ "$#" -lt 2 ]; then
|
||||
echo "Error: doom command requires a subcommand." >&2
|
||||
echo "Usage: zcli doom [install|status|remove|update]" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Ensure we're acting on a valid host and we can locate variables.nix
|
||||
verify_hostname
|
||||
current_hostname="$(hostname)"
|
||||
host_vars_file="$HOME/$PROJECT/hosts/$current_hostname/variables.nix"
|
||||
|
||||
if [ ! -f "$host_vars_file" ]; then
|
||||
echo "Error: Host variables file not found: $host_vars_file" >&2
|
||||
echo "Please ensure your host folder exists and contains variables.nix." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
is_doom_enabled() {
|
||||
# Return 0 if doomEmacsEnable = true; appears (ignoring leading spaces)
|
||||
${pkgs.gnugrep}/bin/grep -Eq '^[[:space:]]*doomEmacsEnable[[:space:]]*=[[:space:]]*true[[:space:]]*;' "$host_vars_file"
|
||||
}
|
||||
|
||||
ensure_doom_enabled() {
|
||||
# If the variable is present but false, flip it; if missing, append it
|
||||
if ${pkgs.gnugrep}/bin/grep -Eq '^[[:space:]]*doomEmacsEnable[[:space:]]*=' "$host_vars_file"; then
|
||||
${pkgs.gnused}/bin/sed -i 's/^[[:space:]]*doomEmacsEnable[[:space:]]*=.*/ doomEmacsEnable = true;/' "$host_vars_file"
|
||||
else
|
||||
echo "" >> "$host_vars_file"
|
||||
echo " # Enabled by zcli doom on $(date)" >> "$host_vars_file"
|
||||
echo " doomEmacsEnable = true;" >> "$host_vars_file"
|
||||
fi
|
||||
}
|
||||
|
||||
doom_subcommand="$2"
|
||||
case "$doom_subcommand" in
|
||||
install)
|
||||
if ! is_doom_enabled; then
|
||||
echo "✗ Doom Emacs is disabled for host '$current_hostname' (doomEmacsEnable = false)." >&2
|
||||
echo "To enable, set doomEmacsEnable = true; in:" >&2
|
||||
echo " $host_vars_file" >&2
|
||||
echo "and rebuild your system before installing Doom." >&2
|
||||
echo
|
||||
read -p "Enable Doom for this host now and rebuild? (y/N) " -n 1 -r
|
||||
echo
|
||||
if [[ $REPLY =~ ^[Yy]$ ]]; then
|
||||
echo "Enabling Doom Emacs in $host_vars_file..."
|
||||
ensure_doom_enabled
|
||||
echo "Rebuilding system so user modules are applied..."
|
||||
if ${pkgs.nh}/bin/nh os switch --hostname "$PROFILE"; then
|
||||
echo "Rebuild complete. Proceeding with Doom installation."
|
||||
else
|
||||
echo "Error: Rebuild failed. Please fix the build and re-run 'zcli doom install'." >&2
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
echo "Aborting. Please enable doomEmacsEnable and rebuild before installing." >&2
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
echo "Installing Doom Emacs..."
|
||||
${get-doom-script}/bin/get-doom
|
||||
;;
|
||||
status)
|
||||
if [ -x "$HOME/.emacs.d/bin/doom" ] && [ -f "$HOME/.emacs.d/core/doom.el" ]; then
|
||||
echo "✔ Doom Emacs appears installed at $HOME/.emacs.d"
|
||||
if [ -f "$HOME/.doom.d/init.el" ]; then
|
||||
echo " • User config found: $HOME/.doom.d/init.el"
|
||||
else
|
||||
echo " • Warning: User config (~/.doom.d) not found"
|
||||
fi
|
||||
echo "Version information:"
|
||||
"$HOME/.emacs.d/bin/doom" version 2>/dev/null || echo "Could not get version information"
|
||||
else
|
||||
if [ -d "$HOME/.emacs.d" ]; then
|
||||
if [ -z "$(ls -A "$HOME/.emacs.d" 2>/dev/null)" ]; then
|
||||
echo "✗ Found empty ~/.emacs.d (not a valid Doom installation)"
|
||||
else
|
||||
echo "✗ ~/.emacs.d exists but Doom was not detected"
|
||||
fi
|
||||
else
|
||||
echo "✗ Doom Emacs is not installed"
|
||||
fi
|
||||
echo "Run 'zcli doom install' to install it"
|
||||
fi
|
||||
;;
|
||||
remove)
|
||||
if [ ! -d "$HOME/.emacs.d" ]; then
|
||||
echo "Doom Emacs is not installed"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo "Warning: This will completely remove Doom Emacs and all your configuration!"
|
||||
read -p "Are you sure you want to continue? (y/N) " -n 1 -r
|
||||
echo
|
||||
if [[ $REPLY =~ ^[Yy]$ ]]; then
|
||||
echo "Removing Doom Emacs..."
|
||||
${pkgs.coreutils}/bin/rm -rf "$HOME/.emacs.d"
|
||||
echo "✔ Doom Emacs has been removed"
|
||||
else
|
||||
echo "Removal cancelled"
|
||||
fi
|
||||
;;
|
||||
update)
|
||||
if [ ! -x "$HOME/.emacs.d/bin/doom" ] || [ ! -f "$HOME/.emacs.d/core/doom.el" ]; then
|
||||
echo "Error: Doom Emacs is not installed correctly. Run 'zcli doom install' first." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Updating Doom Emacs..."
|
||||
"$HOME/.emacs.d/bin/doom" sync
|
||||
echo "✔ Doom Emacs update complete"
|
||||
;;
|
||||
*)
|
||||
echo "Error: Invalid doom subcommand '$doom_subcommand'" >&2
|
||||
echo "Usage: zcli doom [install|status|remove|update]" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*)
|
||||
echo "Error: Invalid command '$1'" >&2
|
||||
print_help
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
''
|
||||
60
modules/home/starship-ddubs-1.nix
Normal file
@@ -0,0 +1,60 @@
|
||||
# starship is a minimal, fast, and extremely customizable prompt for any shell!
|
||||
{ config
|
||||
, lib
|
||||
, ...
|
||||
}:
|
||||
let
|
||||
accent = "#${config.lib.stylix.colors.base0D}";
|
||||
background-alt = "#${config.lib.stylix.colors.base01}";
|
||||
in
|
||||
{
|
||||
programs.starship = {
|
||||
enable = false;
|
||||
settings = {
|
||||
add_newline = false;
|
||||
format = lib.concatStrings [
|
||||
"$nix_shell"
|
||||
"$hostname"
|
||||
"$directory"
|
||||
"$git_branch"
|
||||
"$git_state"
|
||||
"$git_status"
|
||||
"\n"
|
||||
"$character"
|
||||
];
|
||||
directory = { style = accent; };
|
||||
|
||||
character = {
|
||||
success_symbol = "[❯](${accent})";
|
||||
error_symbol = "[❯](red)";
|
||||
vimcmd_symbol = "[❮](cyan)";
|
||||
};
|
||||
|
||||
nix_shell = {
|
||||
format = "[$symbol]($style) ";
|
||||
symbol = "🐚";
|
||||
style = "";
|
||||
};
|
||||
|
||||
git_branch = {
|
||||
symbol = "[](${background-alt}) ";
|
||||
style = "fg:${accent} bg:${background-alt}";
|
||||
format = "on [$symbol$branch]($style)[](${background-alt}) ";
|
||||
};
|
||||
|
||||
git_status = {
|
||||
format = "[[(*$conflicted$untracked$modified$staged$renamed$deleted)](218)($ahead_behind$stashed)]($style)";
|
||||
style = "cyan";
|
||||
conflicted = "";
|
||||
renamed = "";
|
||||
deleted = "";
|
||||
stashed = "≡";
|
||||
};
|
||||
|
||||
git_state = {
|
||||
format = "([$state( $progress_current/$progress_total)]($style)) ";
|
||||
style = "bright-black";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
6
modules/home/starship.nix
Normal file
@@ -0,0 +1,6 @@
|
||||
{ pkgs, ... }: {
|
||||
programs.starship = {
|
||||
enable = false;
|
||||
package = pkgs.starship;
|
||||
};
|
||||
}
|
||||
13
modules/home/stylix.nix
Normal file
@@ -0,0 +1,13 @@
|
||||
_: {
|
||||
stylix.targets = {
|
||||
waybar.enable = false;
|
||||
rofi.enable = false;
|
||||
hyprland.enable = false;
|
||||
hyprlock.enable = false;
|
||||
ghostty.enable = false;
|
||||
qt = {
|
||||
enable = true;
|
||||
platform = "qtct";
|
||||
};
|
||||
};
|
||||
}
|
||||
16
modules/home/swappy.nix
Normal file
@@ -0,0 +1,16 @@
|
||||
{ username, ... }: {
|
||||
home.file = {
|
||||
".config/swappy/config".text = ''
|
||||
[Default]
|
||||
save_dir=/home/${username}/Pictures/Screenshots
|
||||
save_filename_format=swappy-%Y%m%d-%H%M%S.png
|
||||
show_panel=false
|
||||
line_size=5
|
||||
text_size=20
|
||||
text_font=Ubuntu
|
||||
paint_mode=brush
|
||||
early_exit=true
|
||||
fill_shape=false
|
||||
'';
|
||||
};
|
||||
}
|
||||
311
modules/home/swaync.nix
Normal file
@@ -0,0 +1,311 @@
|
||||
{ config, ... }: {
|
||||
services.swaync = {
|
||||
enable = true;
|
||||
settings = {
|
||||
positionX = "right";
|
||||
positionY = "top";
|
||||
layer = "overlay";
|
||||
control-center-margin-top = 10;
|
||||
control-center-margin-bottom = 10;
|
||||
control-center-margin-right = 10;
|
||||
control-center-margin-left = 10;
|
||||
notification-icon-size = 64;
|
||||
notification-body-image-height = 100;
|
||||
notification-body-image-width = 200;
|
||||
timeout = 10;
|
||||
timeout-low = 5;
|
||||
timeout-critical = 0;
|
||||
fit-to-screen = false;
|
||||
control-center-width = 500;
|
||||
control-center-height = 1025;
|
||||
notification-window-width = 500;
|
||||
keyboard-shortcuts = true;
|
||||
image-visibility = "when-available";
|
||||
transition-time = 200;
|
||||
hide-on-clear = false;
|
||||
hide-on-action = true;
|
||||
script-fail-notify = true;
|
||||
widget-config = {
|
||||
title = {
|
||||
text = "Notification Center";
|
||||
clear-all-button = true;
|
||||
button-text = " Clear All";
|
||||
};
|
||||
dnd = {
|
||||
text = "Do Not Disturb";
|
||||
};
|
||||
label = {
|
||||
max-lines = 1;
|
||||
text = "Notification Center";
|
||||
};
|
||||
mpris = {
|
||||
image-size = 96;
|
||||
image-radius = 7;
|
||||
};
|
||||
volume = {
|
||||
label = "";
|
||||
};
|
||||
backlight = {
|
||||
label = "";
|
||||
};
|
||||
};
|
||||
widgets = [
|
||||
"title"
|
||||
"mpris"
|
||||
"volume"
|
||||
"backlight"
|
||||
"dnd"
|
||||
"notifications"
|
||||
];
|
||||
};
|
||||
style = ''
|
||||
* {
|
||||
font-family: JetBrainsMono Nerd Font Mono;
|
||||
font-weight: bold;
|
||||
}
|
||||
.control-center .notification-row:focus,
|
||||
.control-center .notification-row:hover {
|
||||
opacity: 0.9;
|
||||
background: #${config.lib.stylix.colors.base00}
|
||||
}
|
||||
.notification-row {
|
||||
outline: none;
|
||||
margin: 10px;
|
||||
padding: 0;
|
||||
}
|
||||
.notification {
|
||||
background: transparent;
|
||||
padding: 0;
|
||||
margin: 0px;
|
||||
}
|
||||
.notification-content {
|
||||
background: #${config.lib.stylix.colors.base00};
|
||||
padding: 10px;
|
||||
border-radius: 5px;
|
||||
border: 2px solid #${config.lib.stylix.colors.base0D};
|
||||
margin: 0;
|
||||
}
|
||||
.notification-default-action {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border-radius: 5px;
|
||||
}
|
||||
.close-button {
|
||||
background: #${config.lib.stylix.colors.base08};
|
||||
color: #${config.lib.stylix.colors.base00};
|
||||
text-shadow: none;
|
||||
padding: 0;
|
||||
border-radius: 5px;
|
||||
margin-top: 5px;
|
||||
margin-right: 5px;
|
||||
}
|
||||
.close-button:hover {
|
||||
box-shadow: none;
|
||||
background: #${config.lib.stylix.colors.base0D};
|
||||
transition: all .15s ease-in-out;
|
||||
border: none
|
||||
}
|
||||
.notification-action {
|
||||
border: 2px solid #${config.lib.stylix.colors.base0D};
|
||||
border-top: none;
|
||||
border-radius: 5px;
|
||||
}
|
||||
.notification-default-action:hover,
|
||||
.notification-action:hover {
|
||||
color: #${config.lib.stylix.colors.base0B};
|
||||
background: #${config.lib.stylix.colors.base0B}
|
||||
}
|
||||
.notification-default-action {
|
||||
border-radius: 5px;
|
||||
margin: 0px;
|
||||
}
|
||||
.notification-default-action:not(:only-child) {
|
||||
border-bottom-left-radius: 7px;
|
||||
border-bottom-right-radius: 7px
|
||||
}
|
||||
.notification-action:first-child {
|
||||
border-bottom-left-radius: 10px;
|
||||
background: #${config.lib.stylix.colors.base00}
|
||||
}
|
||||
.notification-action:last-child {
|
||||
border-bottom-right-radius: 10px;
|
||||
background: #${config.lib.stylix.colors.base00}
|
||||
}
|
||||
.inline-reply {
|
||||
margin-top: 8px
|
||||
}
|
||||
.inline-reply-entry {
|
||||
background: #${config.lib.stylix.colors.base00};
|
||||
color: #${config.lib.stylix.colors.base05};
|
||||
caret-color: #${config.lib.stylix.colors.base05};
|
||||
border: 1px solid #${config.lib.stylix.colors.base09};
|
||||
border-radius: 5px
|
||||
}
|
||||
.inline-reply-button {
|
||||
margin-left: 4px;
|
||||
background: #${config.lib.stylix.colors.base00};
|
||||
border: 1px solid #${config.lib.stylix.colors.base09};
|
||||
border-radius: 5px;
|
||||
color: #${config.lib.stylix.colors.base05}
|
||||
}
|
||||
.inline-reply-button:disabled {
|
||||
background: initial;
|
||||
color: #${config.lib.stylix.colors.base03};
|
||||
border: 1px solid transparent
|
||||
}
|
||||
.inline-reply-button:hover {
|
||||
background: #${config.lib.stylix.colors.base00}
|
||||
}
|
||||
.body-image {
|
||||
margin-top: 6px;
|
||||
background-color: #${config.lib.stylix.colors.base05};
|
||||
border-radius: 5px
|
||||
}
|
||||
.summary {
|
||||
font-size: 16px;
|
||||
font-weight: 700;
|
||||
background: transparent;
|
||||
color: rgba(158, 206, 106, 1);
|
||||
text-shadow: none
|
||||
}
|
||||
.time {
|
||||
font-size: 16px;
|
||||
font-weight: 700;
|
||||
background: transparent;
|
||||
color: #${config.lib.stylix.colors.base05};
|
||||
text-shadow: none;
|
||||
margin-right: 18px
|
||||
}
|
||||
.body {
|
||||
font-size: 15px;
|
||||
font-weight: 400;
|
||||
background: transparent;
|
||||
color: #${config.lib.stylix.colors.base05};
|
||||
text-shadow: none
|
||||
}
|
||||
.control-center {
|
||||
background: #${config.lib.stylix.colors.base00};
|
||||
border: 2px solid #${config.lib.stylix.colors.base0C};
|
||||
border-radius: 5px;
|
||||
}
|
||||
.control-center-list {
|
||||
background: transparent
|
||||
}
|
||||
.control-center-list-placeholder {
|
||||
opacity: .5
|
||||
}
|
||||
.floating-notifications {
|
||||
background: transparent
|
||||
}
|
||||
.blank-window {
|
||||
background: alpha(black, 0)
|
||||
}
|
||||
.widget-title {
|
||||
color: #${config.lib.stylix.colors.base0B};
|
||||
background: #${config.lib.stylix.colors.base00};
|
||||
padding: 5px 10px;
|
||||
margin: 10px 10px 5px 10px;
|
||||
font-size: 1.5rem;
|
||||
border-radius: 5px;
|
||||
}
|
||||
.widget-title>button {
|
||||
font-size: 1rem;
|
||||
color: #${config.lib.stylix.colors.base05};
|
||||
text-shadow: none;
|
||||
background: #${config.lib.stylix.colors.base00};
|
||||
box-shadow: none;
|
||||
border-radius: 5px;
|
||||
}
|
||||
.widget-title>button:hover {
|
||||
background: #${config.lib.stylix.colors.base08};
|
||||
color: #${config.lib.stylix.colors.base00};
|
||||
}
|
||||
.widget-dnd {
|
||||
background: #${config.lib.stylix.colors.base00};
|
||||
padding: 5px 10px;
|
||||
margin: 10px 10px 5px 10px;
|
||||
border-radius: 5px;
|
||||
font-size: large;
|
||||
color: #${config.lib.stylix.colors.base0B};
|
||||
}
|
||||
.widget-dnd>switch {
|
||||
border-radius: 5px;
|
||||
/* border: 1px solid #${config.lib.stylix.colors.base0B}; */
|
||||
background: #${config.lib.stylix.colors.base0B};
|
||||
}
|
||||
.widget-dnd>switch:checked {
|
||||
background: #${config.lib.stylix.colors.base08};
|
||||
border: 1px solid #${config.lib.stylix.colors.base08};
|
||||
}
|
||||
.widget-dnd>switch slider {
|
||||
background: #${config.lib.stylix.colors.base00};
|
||||
border-radius: 5px
|
||||
}
|
||||
.widget-dnd>switch:checked slider {
|
||||
background: #${config.lib.stylix.colors.base00};
|
||||
border-radius: 5px
|
||||
}
|
||||
.widget-label {
|
||||
margin: 10px 10px 5px 10px;
|
||||
}
|
||||
.widget-label>label {
|
||||
font-size: 1rem;
|
||||
color: #${config.lib.stylix.colors.base05};
|
||||
}
|
||||
.widget-mpris {
|
||||
color: #${config.lib.stylix.colors.base05};
|
||||
padding: 5px 10px;
|
||||
margin: 10px 10px 5px 10px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
.widget-mpris > box > button {
|
||||
border-radius: 5px;
|
||||
}
|
||||
.widget-mpris-player {
|
||||
padding: 5px 10px;
|
||||
margin: 10px
|
||||
}
|
||||
.widget-mpris-title {
|
||||
font-weight: 700;
|
||||
font-size: 1.25rem
|
||||
}
|
||||
.widget-mpris-subtitle {
|
||||
font-size: 1.1rem
|
||||
}
|
||||
.widget-menubar>box>.menu-button-bar>button {
|
||||
border: none;
|
||||
background: transparent
|
||||
}
|
||||
.topbar-buttons>button {
|
||||
border: none;
|
||||
background: transparent
|
||||
}
|
||||
.widget-volume {
|
||||
background: #${config.lib.stylix.colors.base01};
|
||||
padding: 5px;
|
||||
margin: 10px 10px 5px 10px;
|
||||
border-radius: 5px;
|
||||
font-size: x-large;
|
||||
color: #${config.lib.stylix.colors.base05};
|
||||
}
|
||||
.widget-volume>box>button {
|
||||
background: #${config.lib.stylix.colors.base0B};
|
||||
border: none
|
||||
}
|
||||
.per-app-volume {
|
||||
background-color: #${config.lib.stylix.colors.base00};
|
||||
padding: 4px 8px 8px;
|
||||
margin: 0 8px 8px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
.widget-backlight {
|
||||
background: #${config.lib.stylix.colors.base01};
|
||||
padding: 5px;
|
||||
margin: 10px 10px 5px 10px;
|
||||
border-radius: 5px;
|
||||
font-size: x-large;
|
||||
color: #${config.lib.stylix.colors.base05}
|
||||
}
|
||||
'';
|
||||
};
|
||||
}
|
||||
10
modules/home/tealdeer.nix
Normal file
@@ -0,0 +1,10 @@
|
||||
{ ... }: {
|
||||
programs.tealdeer = {
|
||||
enable = true;
|
||||
settings = {
|
||||
display.compact = false;
|
||||
display.use_pager = true;
|
||||
updates.auto_update = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
118
modules/home/tmux.nix
Normal file
@@ -0,0 +1,118 @@
|
||||
# Tmux is a terminal multiplexer that allows you to run multiple terminal sessions in a single window.
|
||||
{ pkgs, ... }: {
|
||||
programs.tmux = {
|
||||
enable = true;
|
||||
mouse = true;
|
||||
shell = "${pkgs.zsh}/bin/zsh";
|
||||
prefix = "C-a";
|
||||
terminal = "kitty";
|
||||
keyMode = "vi";
|
||||
|
||||
extraConfig = ''
|
||||
set-option -g status-position top
|
||||
|
||||
#set -g default-terminal "screen-256color"
|
||||
set-option -g history-limit 5000
|
||||
unbind %
|
||||
unbind '"'
|
||||
|
||||
bind-key h select-pane -L
|
||||
bind-key j select-pane -D
|
||||
bind-key k select-pane -U
|
||||
bind-key l select-pane -R
|
||||
|
||||
set -gq allow-passthrough on
|
||||
bind-key x kill-pane # skip "kill-pane 1? (y/n)" prompt
|
||||
|
||||
bind-key -n C-Tab next-window
|
||||
bind-key -n C-S-Tab previous-window
|
||||
bind-key -n M-Tab new-window
|
||||
|
||||
|
||||
# Start windows and panes index at 1, not 0.
|
||||
set -g base-index 1
|
||||
setw -g pane-base-index 1
|
||||
|
||||
|
||||
bind-key "|" split-window -h -c "#{pane_current_path}"
|
||||
bind-key "\\" split-window -fh -c "#{pane_current_path}"
|
||||
|
||||
bind-key "-" split-window -v -c "#{pane_current_path}"
|
||||
bind-key "_" split-window -fv -c "#{pane_current_path}"
|
||||
|
||||
bind -r C-j resize-pane -D 15
|
||||
bind -r C-k resize-pane -U 15
|
||||
bind -r C-h resize-pane -L 15
|
||||
bind -r C-l resize-pane -R 15
|
||||
|
||||
# 'c' to new window
|
||||
bind-key c new-window
|
||||
|
||||
# 'n' next window
|
||||
bind-key n next-window
|
||||
|
||||
# 'p' next previous
|
||||
bind-key n previous-window
|
||||
|
||||
unbind r
|
||||
bind r source-file ~/.config/tmux/tmux.conf
|
||||
|
||||
bind -r m resize-pane -Z
|
||||
|
||||
bind-key t clock-mode
|
||||
bind-key q display-panes
|
||||
bind-key u refresh-client
|
||||
bind-key o select-pane -t :.+
|
||||
|
||||
|
||||
##### Display Popups #####
|
||||
|
||||
bind C-y display-popup \
|
||||
-d "#{pane_current_path}" \
|
||||
-w 80% \
|
||||
-h 80% \
|
||||
-E "lazygit"
|
||||
bind C-n display-popup -E 'bash -i -c "read -p \"Session name: \" name; tmux new-session -d -s \$name && tmux switch-client -t \$name"'
|
||||
bind C-j display-popup -E "tmux list-sessions | sed -E 's/:.*$//' | grep -v \"^$(tmux display-message -p '#S')\$\" | fzf --reverse | xargs tmux switch-client -t"
|
||||
#bind C-p display-popup -E "ipython"
|
||||
#bind C-f display-popup \
|
||||
# -w 80% \
|
||||
# -h 80% \
|
||||
# -E 'rmpc'
|
||||
bind C-r display-popup \
|
||||
-d "#{pane_current_path}" \
|
||||
-w 90% \
|
||||
-h 90% \
|
||||
-E "yazi"
|
||||
bind C-z display-popup \
|
||||
-w 90% \
|
||||
-h 90% \
|
||||
-E 'nvim ~/ddubsos/flake.nix'
|
||||
#bind C-g display-popup -E "bash -i ~/.tmux/scripts/chat-popup.sh"
|
||||
bind C-t display-popup \
|
||||
-d "#{pane_current_path}" \
|
||||
-w 75% \
|
||||
-h 75% \
|
||||
-E "zsh"
|
||||
|
||||
##### Display Menu #####
|
||||
|
||||
bind d display-menu -T "#[align=centre]Dotfiles" -x C -y C \
|
||||
"ZaneyOS flake.nix" f "display-popup -E 'nvim ~/garandos/flake.nix'" \
|
||||
"ZaneyOS packages" p "display-popup -E 'nvim ~/garandos/modules/core/packages.nix'" \
|
||||
"ZaneyOS keybinds" k "display-popup -E 'nvim ~/garandos/modules/home/hyprland/binds.nix'" \
|
||||
"ZaneyOS env variables" e "display-popup -E 'nvim ~/garandos/modules/home/hyprland/env.nix'" \
|
||||
"ZaneyOS windowrules" w "display-popup -E 'nvim ~/garandos/modules/home/hyprland/windowrules.nix'" \
|
||||
"Exit" q ""
|
||||
|
||||
|
||||
|
||||
'';
|
||||
|
||||
plugins = with pkgs; [
|
||||
tmuxPlugins.vim-tmux-navigator
|
||||
tmuxPlugins.sensible
|
||||
tmuxPlugins.tokyo-night-tmux
|
||||
];
|
||||
};
|
||||
}
|
||||
10
modules/home/virtmanager.nix
Normal file
@@ -0,0 +1,10 @@
|
||||
{ ... }:
|
||||
|
||||
{
|
||||
dconf.settings = {
|
||||
"org/virt-manager/virt-manager/connections" = {
|
||||
autoconnect = [ "qemu:///system" ];
|
||||
uris = [ "qemu:///system" ];
|
||||
};
|
||||
};
|
||||
}
|
||||
39
modules/home/vscode.nix
Normal file
@@ -0,0 +1,39 @@
|
||||
{ pkgs, lib, ... }: {
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
programs.vscode = {
|
||||
enable = true;
|
||||
package = pkgs.vscodium;
|
||||
profiles = {
|
||||
default = {
|
||||
extensions = with pkgs.vscode-extensions; [
|
||||
bbenoist.nix
|
||||
jeff-hykin.better-nix-syntax
|
||||
ms-vscode.cpptools-extension-pack
|
||||
mads-hartmann.bash-ide-vscode
|
||||
tamasfe.even-better-toml
|
||||
zainchen.json
|
||||
shd101wyy.markdown-preview-enhanced
|
||||
];
|
||||
# userSettings = {
|
||||
# "chat.editor.fontFamily" = "JetBrains Mono";
|
||||
# "chat.editor.fontSize" = 20.0;
|
||||
# "debug.console.fontFamily" = "JetBrains Mono";
|
||||
# "debug.console.fontSize" = 20.0;
|
||||
# "editor.fontFamily" = "JetBrains Mono";
|
||||
# "editor.fontSize" = 20.0;
|
||||
# "editor.inlayHints.fontFamily" = "JetBrains Mono";
|
||||
# "editor.inlineSuggest.fontFamily" = "JetBrains Mono";
|
||||
# "editor.minimap.sectionHeaderFontSize" = 12.857142857142858;
|
||||
# "markdown.preview.fontFamily" = "Montserrat";
|
||||
# "markdown.preview.fontSize" = 20.0;
|
||||
# "scm.inputFontFamily" = "JetBrains Mono";
|
||||
# "scm.inputFontSize" = 18.571428571428573;
|
||||
# "screencastMode.fontSize" = 80.0;
|
||||
# "terminal.integrated.fontSize" = 20.0;
|
||||
# "workbench.colorTheme" = "One Dark Pro Monokai Darker";
|
||||
# };
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
277
modules/home/waybar/waybar-curved.nix
Normal file
@@ -0,0 +1,277 @@
|
||||
{ pkgs
|
||||
, lib
|
||||
, host
|
||||
, config
|
||||
, ...
|
||||
}:
|
||||
let
|
||||
betterTransition = "all 0.3s cubic-bezier(.55,-0.68,.48,1.682)";
|
||||
inherit (import ../../../hosts/${host}/variables.nix) clock24h;
|
||||
in
|
||||
with lib; {
|
||||
# Configure & Theme Waybar
|
||||
programs.waybar = {
|
||||
enable = true;
|
||||
package = pkgs.waybar;
|
||||
settings = [
|
||||
{
|
||||
layer = "top";
|
||||
position = "top";
|
||||
modules-center = [ "hyprland/workspaces" ];
|
||||
modules-left = [
|
||||
"custom/startmenu"
|
||||
"hyprland/window"
|
||||
"pulseaudio"
|
||||
"cpu"
|
||||
"memory"
|
||||
"idle_inhibitor"
|
||||
];
|
||||
modules-right = [
|
||||
"custom/hyprbindings"
|
||||
"custom/notification"
|
||||
"custom/exit"
|
||||
"battery"
|
||||
"tray"
|
||||
"clock"
|
||||
];
|
||||
|
||||
"hyprland/workspaces" = {
|
||||
format = "{name}";
|
||||
format-icons = {
|
||||
default = " ";
|
||||
active = " ";
|
||||
urgent = " ";
|
||||
};
|
||||
on-scroll-up = "hyprctl dispatch workspace e+1";
|
||||
on-scroll-down = "hyprctl dispatch workspace e-1";
|
||||
};
|
||||
"clock" = {
|
||||
format =
|
||||
if clock24h == true
|
||||
then '' {:L%H:%M}''
|
||||
else '' {:L%I:%M %p}'';
|
||||
tooltip = true;
|
||||
tooltip-format = "<big>{:%A, %d.%B %Y }</big>\n<tt><small>{calendar}</small></tt>";
|
||||
};
|
||||
"hyprland/window" = {
|
||||
max-length = 22;
|
||||
separate-outputs = false;
|
||||
rewrite = {
|
||||
"" = " 🙈 No Windows? ";
|
||||
};
|
||||
};
|
||||
"memory" = {
|
||||
interval = 5;
|
||||
format = " {}%";
|
||||
tooltip = true;
|
||||
};
|
||||
"cpu" = {
|
||||
interval = 5;
|
||||
format = " {usage:2}%";
|
||||
tooltip = true;
|
||||
};
|
||||
"disk" = {
|
||||
format = " {free}";
|
||||
tooltip = true;
|
||||
};
|
||||
"network" = {
|
||||
format-icons = [
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
];
|
||||
format-ethernet = " {bandwidthDownOctets}";
|
||||
format-wifi = "{icon} {signalStrength}%";
|
||||
format-disconnected = "";
|
||||
tooltip = false;
|
||||
};
|
||||
"tray" = {
|
||||
spacing = 12;
|
||||
};
|
||||
"pulseaudio" = {
|
||||
format = "{icon} {volume}% {format_source}";
|
||||
format-bluetooth = "{volume}% {icon} {format_source}";
|
||||
format-bluetooth-muted = " {icon} {format_source}";
|
||||
format-muted = " {format_source}";
|
||||
format-source = " {volume}%";
|
||||
format-source-muted = "";
|
||||
format-icons = {
|
||||
headphone = "";
|
||||
hands-free = "";
|
||||
headset = "";
|
||||
phone = "";
|
||||
portable = "";
|
||||
car = "";
|
||||
default = [
|
||||
""
|
||||
""
|
||||
""
|
||||
];
|
||||
};
|
||||
on-click = "sleep 0.1 && pavucontrol";
|
||||
};
|
||||
"custom/exit" = {
|
||||
tooltip = false;
|
||||
format = "";
|
||||
on-click = "sleep 0.1 && wlogout";
|
||||
};
|
||||
"custom/startmenu" = {
|
||||
tooltip = false;
|
||||
format = "";
|
||||
# exec = "rofi -show drun";
|
||||
on-click = "sleep 0.1 && rofi-launcher";
|
||||
};
|
||||
"custom/hyprbindings" = {
|
||||
tooltip = false;
|
||||
format = "";
|
||||
on-click = "sleep 0.1 && list-keybinds";
|
||||
};
|
||||
"idle_inhibitor" = {
|
||||
format = "{icon}";
|
||||
format-icons = {
|
||||
activated = "";
|
||||
deactivated = "";
|
||||
};
|
||||
tooltip = "true";
|
||||
};
|
||||
"custom/notification" = {
|
||||
tooltip = false;
|
||||
format = "{icon} {}";
|
||||
format-icons = {
|
||||
notification = "<span foreground='red'><sup></sup></span>";
|
||||
none = "";
|
||||
dnd-notification = "<span foreground='red'><sup></sup></span>";
|
||||
dnd-none = "";
|
||||
inhibited-notification = "<span foreground='red'><sup></sup></span>";
|
||||
inhibited-none = "";
|
||||
dnd-inhibited-notification = "<span foreground='red'><sup></sup></span>";
|
||||
dnd-inhibited-none = "";
|
||||
};
|
||||
return-type = "json";
|
||||
exec-if = "which swaync-client";
|
||||
exec = "swaync-client -swb";
|
||||
on-click = "sleep 0.1 && task-waybar";
|
||||
escape = true;
|
||||
};
|
||||
"battery" = {
|
||||
states = {
|
||||
warning = 30;
|
||||
critical = 15;
|
||||
};
|
||||
format = "{icon} {capacity}%";
|
||||
format-charging = " {capacity}%";
|
||||
format-plugged = " {capacity}%";
|
||||
format-icons = [
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
];
|
||||
on-click = "";
|
||||
tooltip = false;
|
||||
};
|
||||
}
|
||||
];
|
||||
style = concatStrings [
|
||||
''
|
||||
* {
|
||||
font-family: JetBrainsMono Nerd Font Mono;
|
||||
font-size: 16px;
|
||||
border-radius: 0px;
|
||||
border: none;
|
||||
min-height: 0px;
|
||||
}
|
||||
window#waybar {
|
||||
background: rgba(0,0,0,0);
|
||||
}
|
||||
#workspaces {
|
||||
color: #${config.lib.stylix.colors.base00};
|
||||
background: #${config.lib.stylix.colors.base01};
|
||||
margin: 4px 4px;
|
||||
padding: 5px 5px;
|
||||
border-radius: 16px;
|
||||
}
|
||||
#workspaces button {
|
||||
font-weight: bold;
|
||||
padding: 0px 5px;
|
||||
margin: 0px 3px;
|
||||
border-radius: 16px;
|
||||
color: #${config.lib.stylix.colors.base00};
|
||||
background: linear-gradient(45deg, #${config.lib.stylix.colors.base08}, #${config.lib.stylix.colors.base0D});
|
||||
opacity: 0.5;
|
||||
transition: ${betterTransition};
|
||||
}
|
||||
#workspaces button.active {
|
||||
font-weight: bold;
|
||||
padding: 0px 5px;
|
||||
margin: 0px 3px;
|
||||
border-radius: 16px;
|
||||
color: #${config.lib.stylix.colors.base00};
|
||||
background: linear-gradient(45deg, #${config.lib.stylix.colors.base08}, #${config.lib.stylix.colors.base0D});
|
||||
transition: ${betterTransition};
|
||||
opacity: 1.0;
|
||||
min-width: 40px;
|
||||
}
|
||||
#workspaces button:hover {
|
||||
font-weight: bold;
|
||||
border-radius: 16px;
|
||||
color: #${config.lib.stylix.colors.base00};
|
||||
background: linear-gradient(45deg, #${config.lib.stylix.colors.base08}, #${config.lib.stylix.colors.base0D});
|
||||
opacity: 0.8;
|
||||
transition: ${betterTransition};
|
||||
}
|
||||
tooltip {
|
||||
background: #${config.lib.stylix.colors.base00};
|
||||
border: 1px solid #${config.lib.stylix.colors.base08};
|
||||
border-radius: 12px;
|
||||
}
|
||||
tooltip label {
|
||||
color: #${config.lib.stylix.colors.base08};
|
||||
}
|
||||
#window, #pulseaudio, #cpu, #memory, #idle_inhibitor {
|
||||
font-weight: bold;
|
||||
margin: 4px 0px;
|
||||
margin-left: 7px;
|
||||
padding: 0px 18px;
|
||||
background: #${config.lib.stylix.colors.base04};
|
||||
color: #${config.lib.stylix.colors.base00};
|
||||
border-radius: 24px 10px 24px 10px;
|
||||
}
|
||||
#custom-startmenu {
|
||||
color: #${config.lib.stylix.colors.base0B};
|
||||
background: #${config.lib.stylix.colors.base02};
|
||||
font-size: 28px;
|
||||
margin: 0px;
|
||||
padding: 0px 30px 0px 15px;
|
||||
border-radius: 0px 0px 40px 0px;
|
||||
}
|
||||
#custom-hyprbindings, #network, #battery,
|
||||
#custom-notification, #tray, #custom-exit {
|
||||
font-weight: bold;
|
||||
background: #${config.lib.stylix.colors.base0F};
|
||||
color: #${config.lib.stylix.colors.base00};
|
||||
margin: 4px 0px;
|
||||
margin-right: 7px;
|
||||
border-radius: 10px 24px 10px 24px;
|
||||
padding: 0px 18px;
|
||||
}
|
||||
#clock {
|
||||
font-weight: bold;
|
||||
color: #0D0E15;
|
||||
background: linear-gradient(90deg, #${config.lib.stylix.colors.base0E}, #${config.lib.stylix.colors.base0C});
|
||||
margin: 0px;
|
||||
padding: 0px 15px 0px 30px;
|
||||
border-radius: 0px 0px 0px 40px;
|
||||
}
|
||||
''
|
||||
];
|
||||
};
|
||||
}
|
||||
356
modules/home/waybar/waybar-ddubs-2.nix
Normal file
@@ -0,0 +1,356 @@
|
||||
{ pkgs
|
||||
, config
|
||||
, lib
|
||||
, ...
|
||||
}:
|
||||
let
|
||||
terminal = "kitty";
|
||||
base00 = "0F1419";
|
||||
base01 = "131721";
|
||||
base03 = "3E4B59";
|
||||
base05 = "E6E1CF";
|
||||
base06 = "E6E1CF";
|
||||
base07 = "F3F4F5";
|
||||
base08 = "F07178";
|
||||
base09 = "FF8F40";
|
||||
base0A = "FFB454";
|
||||
base0B = "B8CC52";
|
||||
base0C = "95E6CB";
|
||||
base0D = "59C2FF";
|
||||
base0E = "D2A6FF";
|
||||
base0F = "E6B673";
|
||||
in
|
||||
with lib; {
|
||||
# Configure & Theme Waybar
|
||||
programs.waybar = {
|
||||
enable = true;
|
||||
package = pkgs.waybar;
|
||||
settings = [
|
||||
{
|
||||
layer = "top";
|
||||
position = "top";
|
||||
|
||||
modules-left = [ "custom/startmenu" "tray" "hyprland/window" ];
|
||||
modules-center = [ "hyprland/workspaces" ];
|
||||
modules-right = [ "idle_inhibitor" "custom/notification" "pulseaudio" "battery" "clock" "custom/exit" ];
|
||||
|
||||
"hyprland/workspaces" = {
|
||||
format = "{name}";
|
||||
format-icons = {
|
||||
default = " ";
|
||||
active = " ";
|
||||
urgent = " ";
|
||||
};
|
||||
on-scroll-up = "hyprctl dispatch workspace e+1";
|
||||
on-scroll-down = "hyprctl dispatch workspace e-1";
|
||||
};
|
||||
"clock" = {
|
||||
format = '' {:%H:%M}'';
|
||||
/*
|
||||
''{: %I:%M %p}'';
|
||||
*/
|
||||
tooltip = true;
|
||||
tooltip-format = "<big>{:%A, %d.%B %Y }</big><tt><small>{calendar}</small></tt>";
|
||||
};
|
||||
"hyprland/window" = {
|
||||
max-length = 60;
|
||||
separate-outputs = false;
|
||||
};
|
||||
"memory" = {
|
||||
interval = 5;
|
||||
format = " {}%";
|
||||
tooltip = true;
|
||||
on-click = "${terminal} -e btop";
|
||||
};
|
||||
"cpu" = {
|
||||
interval = 5;
|
||||
format = " {usage:2}%";
|
||||
tooltip = true;
|
||||
on-click = "${terminal} -e btop";
|
||||
};
|
||||
"disk" = {
|
||||
format = " {free}";
|
||||
tooltip = true;
|
||||
# Not working with zaneyos window open then closes
|
||||
#on-click = "${terminal} -e sh -c df -h ; read";
|
||||
};
|
||||
"network" = {
|
||||
format-icons = [ "" "" "" "" "" ];
|
||||
format-ethernet = " {bandwidthDownBits}";
|
||||
format-wifi = " {bandwidthDownBits}";
|
||||
format-disconnected = "";
|
||||
tooltip = false;
|
||||
on-click = "${terminal} -e btop";
|
||||
};
|
||||
"tray" = {
|
||||
spacing = 12;
|
||||
};
|
||||
"pulseaudio" = {
|
||||
format = "{icon} {volume}% {format_source}";
|
||||
format-bluetooth = "{volume}% {icon} {format_source}";
|
||||
format-bluetooth-muted = " {icon} {format_source}";
|
||||
format-muted = " {format_source}";
|
||||
format-source = " {volume}%";
|
||||
format-source-muted = "";
|
||||
format-icons = {
|
||||
headphone = "";
|
||||
hands-free = "";
|
||||
headset = "";
|
||||
phone = "";
|
||||
portable = "";
|
||||
car = "";
|
||||
default = [ "" "" "" ];
|
||||
};
|
||||
on-click = "pavucontrol";
|
||||
};
|
||||
"custom/exit" = {
|
||||
tooltip = false;
|
||||
format = "⏻";
|
||||
on-click = "sleep 0.1 && wlogout";
|
||||
};
|
||||
"custom/startmenu" = {
|
||||
tooltip = false;
|
||||
format = " ";
|
||||
# exec = "rofi -show drun";
|
||||
on-click = "rofi -show drun";
|
||||
};
|
||||
"idle_inhibitor" = {
|
||||
format = "{icon}";
|
||||
format-icons = {
|
||||
activated = " ";
|
||||
deactivated = " ";
|
||||
};
|
||||
tooltip = "true";
|
||||
};
|
||||
"custom/notification" = {
|
||||
tooltip = false;
|
||||
format = "{icon} {}";
|
||||
format-icons = {
|
||||
notification = "<span foreground='red'><sup></sup></span>";
|
||||
none = "";
|
||||
dnd-notification = "<span foreground='red'><sup></sup></span>";
|
||||
dnd-none = "";
|
||||
inhibited-notification = "<span foreground='red'><sup></sup></span>";
|
||||
inhibited-none = "";
|
||||
dnd-inhibited-notification = "<span foreground='red'><sup></sup></span>";
|
||||
dnd-inhibited-none = "";
|
||||
};
|
||||
return-type = "json";
|
||||
exec-if = "which swaync-client";
|
||||
exec = "swaync-client -swb";
|
||||
on-click = "swaync-client -t";
|
||||
escape = true;
|
||||
};
|
||||
"battery" = {
|
||||
states = {
|
||||
warning = 30;
|
||||
critical = 15;
|
||||
};
|
||||
format = "{icon} {capacity}%";
|
||||
format-charging = " {capacity}%";
|
||||
format-plugged = " {capacity}%";
|
||||
format-icons = [ "" "" "" "" "" "" "" "" "" "" ];
|
||||
on-click = "";
|
||||
tooltip = false;
|
||||
};
|
||||
}
|
||||
];
|
||||
style = concatStrings [
|
||||
''
|
||||
* {
|
||||
font-size: 16px;
|
||||
font-family: JetBrainsMono Nerd Font, Font Awesome, sans-serif;
|
||||
font-weight: bold;
|
||||
}
|
||||
window#waybar {
|
||||
/*
|
||||
|
||||
background-color: rgba(26,27,38,0);
|
||||
border-bottom: 1px solid rgba(26,27,38,0);
|
||||
border-radius: 0px;
|
||||
color: #${base0F};
|
||||
*/
|
||||
|
||||
background-color: rgba(26,27,38,0);
|
||||
border-bottom: 1px solid rgba(26,27,38,0);
|
||||
border-radius: 0px;
|
||||
color: #${base0F};
|
||||
}
|
||||
#workspaces {
|
||||
/*
|
||||
Eternal
|
||||
background: linear-gradient(180deg, #${base00}, #${base01});
|
||||
margin: 5px 5px 5px 0px;
|
||||
padding: 0px 10px;
|
||||
border-radius: 0px 15px 15px 0px;
|
||||
border: 0px;
|
||||
font-style: normal;
|
||||
color: #${base00};
|
||||
*/
|
||||
background: linear-gradient(45deg, #${base01}, #${base01});
|
||||
margin: 5px;
|
||||
padding: 0px 1px;
|
||||
border-radius: 15px;
|
||||
border: 0px;
|
||||
font-style: normal;
|
||||
color: #${base00};
|
||||
}
|
||||
#workspaces button {
|
||||
padding: 0px 5px;
|
||||
margin: 4px 3px;
|
||||
border-radius: 15px;
|
||||
border: 0px;
|
||||
color: #${base00};
|
||||
background: linear-gradient(45deg, #${base0D}, #${base0E});
|
||||
opacity: 0.5;
|
||||
transition: all 0.3s ease-in-out;
|
||||
}
|
||||
#workspaces button.active {
|
||||
padding: 0px 5px;
|
||||
margin: 4px 3px;
|
||||
border-radius: 15px;
|
||||
border: 0px;
|
||||
color: #${base00};
|
||||
background: linear-gradient(45deg, #${base0D}, #${base0E});
|
||||
opacity: 1.0;
|
||||
min-width: 40px;
|
||||
transition: all 0.3s ease-in-out;
|
||||
}
|
||||
#workspaces button:hover {
|
||||
border-radius: 15px;
|
||||
color: #${base00};
|
||||
background: linear-gradient(45deg, #${base0D}, #${base0E});
|
||||
opacity: 0.8;
|
||||
}
|
||||
tooltip {
|
||||
background: #${base00};
|
||||
border: 1px solid #${base0E};
|
||||
border-radius: 10px;
|
||||
}
|
||||
tooltip label {
|
||||
color: #${base07};
|
||||
}
|
||||
#window {
|
||||
/*
|
||||
Eternal
|
||||
color: #${base05};
|
||||
background: #${base00};
|
||||
border-radius: 15px;
|
||||
margin: 5px;
|
||||
padding: 2px 20px;
|
||||
*/
|
||||
margin: 5px;
|
||||
padding: 2px 20px;
|
||||
color: #${base05};
|
||||
background: #${base01};
|
||||
border-radius: 15px 15px 15px 15px;
|
||||
}
|
||||
#memory {
|
||||
color: #${base0F};
|
||||
/*
|
||||
Eternal
|
||||
background: #${base00};
|
||||
border-radius: 15px 15px 15px 15px;
|
||||
margin: 5px;
|
||||
padding: 2px 20px;
|
||||
*/
|
||||
background: #${base01};
|
||||
margin: 5px;
|
||||
padding: 2px 20px;
|
||||
border-radius: 15px 15px 15px 15px;
|
||||
}
|
||||
#clock {
|
||||
color: #${base0B};
|
||||
background: #${base00};
|
||||
border-radius: 15px 15px 15px 15px;
|
||||
margin: 5px;
|
||||
padding: 2px 20px;
|
||||
}
|
||||
#idle_inhibitor {
|
||||
color: #${base0A};
|
||||
background: #${base00};
|
||||
border-radius: 15px 15px 15px 15px;
|
||||
margin: 3px;
|
||||
padding: 2px 20px;
|
||||
}
|
||||
#cpu {
|
||||
color: #${base07};
|
||||
background: #${base00};
|
||||
border-radius: 15px 15px 15px 15px;
|
||||
margin: 5px;
|
||||
padding: 2px 20px;
|
||||
}
|
||||
#disk {
|
||||
color: #${base0F};
|
||||
background: #${base00};
|
||||
border-radius: 15px 15px 15px 15px;
|
||||
margin: 5px;
|
||||
padding: 2px 20px;
|
||||
}
|
||||
#battery {
|
||||
color: #${base08};
|
||||
background: #${base00};
|
||||
border-radius: 15px 15px 15px 15px;
|
||||
margin: 5px;
|
||||
padding: 2px 20px;
|
||||
}
|
||||
#network {
|
||||
color: #${base09};
|
||||
background: #${base00};
|
||||
border-radius: 15px 15px 15px 15px;
|
||||
margin: 5px;
|
||||
padding: 2px 20px;
|
||||
}
|
||||
#tray {
|
||||
color: #${base05};
|
||||
background: #${base00};
|
||||
border-radius: 15px 15px 15px 15px;
|
||||
margin: 5px;
|
||||
padding: 2px 15px;
|
||||
}
|
||||
#pulseaudio {
|
||||
color: #${base0D};
|
||||
/*
|
||||
Eternal
|
||||
background: #${base00};
|
||||
border-radius: 15px 15px 15px 15px;
|
||||
margin: 5px;
|
||||
padding: 2px 20px;
|
||||
*/
|
||||
background: #${base01};
|
||||
margin: 4px;
|
||||
padding: 2px 20px;
|
||||
border-radius: 15px 15px 15px 15px;
|
||||
}
|
||||
#custom-notification {
|
||||
color: #${base0C};
|
||||
background: #${base00};
|
||||
border-radius: 15px 15px 15px 15px;
|
||||
margin: 5px;
|
||||
padding: 2px 20px;
|
||||
}
|
||||
#custom-startmenu {
|
||||
color: #${base0E};
|
||||
background: #${base00};
|
||||
border-radius: 0px 15px 15px 0px;
|
||||
margin: 5px 5px 5px 0px;
|
||||
padding: 2px 20px;
|
||||
}
|
||||
#idle_inhibitor {
|
||||
color: #${base09};
|
||||
background: #${base00};
|
||||
border-radius: 15px 15px 15px 15px;
|
||||
margin: 5px;
|
||||
padding: 2px 20px;
|
||||
}
|
||||
#custom-exit {
|
||||
color: #${base0E};
|
||||
background: #${base00};
|
||||
border-radius: 15px 0px 0px 15px;
|
||||
margin: 5px 0px 5px 5px;
|
||||
padding: 2px 20px;
|
||||
}
|
||||
''
|
||||
];
|
||||
};
|
||||
}
|
||||
283
modules/home/waybar/waybar-ddubs.nix
Normal file
@@ -0,0 +1,283 @@
|
||||
{ pkgs
|
||||
, lib
|
||||
, host
|
||||
, config
|
||||
, ...
|
||||
}:
|
||||
let
|
||||
betterTransition = "all 0.3s cubic-bezier(.55,-0.68,.48,1.682)";
|
||||
inherit (import ../../../hosts/${host}/variables.nix) clock24h;
|
||||
in
|
||||
with lib; {
|
||||
# Configure & Theme Waybar
|
||||
programs.waybar = {
|
||||
enable = true;
|
||||
package = pkgs.waybar;
|
||||
settings = [
|
||||
{
|
||||
layer = "top";
|
||||
position = "top";
|
||||
modules-center = [ "hyprland/workspaces" ];
|
||||
modules-left = [
|
||||
"custom/startmenu"
|
||||
"hyprland/window"
|
||||
"pulseaudio"
|
||||
"cpu"
|
||||
"memory"
|
||||
"idle_inhibitor"
|
||||
];
|
||||
modules-right = [
|
||||
"custom/hyprbindings"
|
||||
"custom/notification"
|
||||
"custom/exit"
|
||||
"battery"
|
||||
"tray"
|
||||
"clock"
|
||||
];
|
||||
|
||||
"hyprland/workspaces" = {
|
||||
format = "{name}";
|
||||
format-icons = {
|
||||
default = " ";
|
||||
active = " ";
|
||||
urgent = " ";
|
||||
};
|
||||
on-scroll-up = "hyprctl dispatch workspace e+1";
|
||||
on-scroll-down = "hyprctl dispatch workspace e-1";
|
||||
};
|
||||
"clock" = {
|
||||
format =
|
||||
if clock24h == true
|
||||
then '' {:L%H:%M}''
|
||||
else '' {:L%I:%M %p}'';
|
||||
tooltip = true;
|
||||
tooltip-format = "<big>{:%A, %d.%B %Y }</big>\n<tt><small>{calendar}</small></tt>";
|
||||
};
|
||||
"hyprland/window" = {
|
||||
max-length = 22;
|
||||
separate-outputs = false;
|
||||
rewrite = {
|
||||
"" = " 🙈 No Windows? ";
|
||||
};
|
||||
};
|
||||
"memory" = {
|
||||
interval = 5;
|
||||
format = " {}%";
|
||||
tooltip = true;
|
||||
};
|
||||
"cpu" = {
|
||||
interval = 5;
|
||||
format = " {usage:2}%";
|
||||
tooltip = true;
|
||||
};
|
||||
"disk" = {
|
||||
format = " {free}";
|
||||
tooltip = true;
|
||||
};
|
||||
"network" = {
|
||||
format-icons = [
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
];
|
||||
format-ethernet = " {bandwidthDownOctets}";
|
||||
format-wifi = "{icon} {signalStrength}%";
|
||||
format-disconnected = "";
|
||||
tooltip = false;
|
||||
};
|
||||
"tray" = {
|
||||
spacing = 12;
|
||||
};
|
||||
"pulseaudio" = {
|
||||
format = "{icon} {volume}% {format_source}";
|
||||
format-bluetooth = "{volume}% {icon} {format_source}";
|
||||
format-bluetooth-muted = " {icon} {format_source}";
|
||||
format-muted = " {format_source}";
|
||||
format-source = " {volume}%";
|
||||
format-source-muted = "";
|
||||
format-icons = {
|
||||
headphone = "";
|
||||
hands-free = "";
|
||||
headset = "";
|
||||
phone = "";
|
||||
portable = "";
|
||||
car = "";
|
||||
default = [
|
||||
""
|
||||
""
|
||||
""
|
||||
];
|
||||
};
|
||||
on-click = "sleep 0.1 && pavucontrol";
|
||||
};
|
||||
"custom/exit" = {
|
||||
tooltip = false;
|
||||
format = "";
|
||||
on-click = "sleep 0.1 && wlogout";
|
||||
};
|
||||
"custom/startmenu" = {
|
||||
tooltip = false;
|
||||
format = "";
|
||||
# exec = "rofi -show drun";
|
||||
#on-click = "sleep 0.1 && rofi-launcher";
|
||||
on-click = "sleep 0.1 && nwg-drawer -mb 200 -mt 200 -mr 200 -ml 200";
|
||||
};
|
||||
"custom/hyprbindings" = {
|
||||
tooltip = false;
|
||||
format = "";
|
||||
on-click = "sleep 0.1 && list-keybinds";
|
||||
};
|
||||
"idle_inhibitor" = {
|
||||
format = "{icon}";
|
||||
format-icons = {
|
||||
activated = "";
|
||||
deactivated = "";
|
||||
};
|
||||
tooltip = "true";
|
||||
};
|
||||
"custom/notification" = {
|
||||
tooltip = false;
|
||||
format = "{icon} {}";
|
||||
format-icons = {
|
||||
notification = "<span foreground='red'><sup></sup></span>";
|
||||
none = "";
|
||||
dnd-notification = "<span foreground='red'><sup></sup></span>";
|
||||
dnd-none = "";
|
||||
inhibited-notification = "<span foreground='red'><sup></sup></span>";
|
||||
inhibited-none = "";
|
||||
dnd-inhibited-notification = "<span foreground='red'><sup></sup></span>";
|
||||
dnd-inhibited-none = "";
|
||||
};
|
||||
return-type = "json";
|
||||
exec-if = "which swaync-client";
|
||||
exec = "swaync-client -swb";
|
||||
on-click = "sleep 0.1 && task-waybar";
|
||||
escape = true;
|
||||
};
|
||||
"battery" = {
|
||||
states = {
|
||||
warning = 30;
|
||||
critical = 15;
|
||||
};
|
||||
format = "{icon} {capacity}%";
|
||||
format-charging = " {capacity}%";
|
||||
format-plugged = " {capacity}%";
|
||||
format-icons = [
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
];
|
||||
on-click = "";
|
||||
tooltip = false;
|
||||
};
|
||||
}
|
||||
];
|
||||
style = concatStrings [
|
||||
''
|
||||
* {
|
||||
font-family: JetBrainsMono Nerd Font Mono;
|
||||
font-size: 18px;
|
||||
border-radius: 0px;
|
||||
border: none;
|
||||
min-height: 0px;
|
||||
}
|
||||
window#waybar {
|
||||
background: rgba(0,0,0,0);
|
||||
}
|
||||
#workspaces {
|
||||
color: #${config.lib.stylix.colors.base00};
|
||||
background: #${config.lib.stylix.colors.base01};
|
||||
margin: 4px 4px;
|
||||
padding: 5px 5px;
|
||||
border-radius: 16px;
|
||||
}
|
||||
#workspaces button {
|
||||
font-weight: bold;
|
||||
padding: 0px 5px;
|
||||
margin: 0px 3px;
|
||||
border-radius: 16px;
|
||||
color: #${config.lib.stylix.colors.base00};
|
||||
background: linear-gradient(45deg, #${config.lib.stylix.colors.base08}, #${config.lib.stylix.colors.base0D});
|
||||
opacity: 0.5;
|
||||
transition: ${betterTransition};
|
||||
}
|
||||
#workspaces button.active {
|
||||
font-weight: bold;
|
||||
padding: 0px 5px;
|
||||
margin: 0px 3px;
|
||||
border-radius: 16px;
|
||||
color: #${config.lib.stylix.colors.base00};
|
||||
background: linear-gradient(45deg, #${config.lib.stylix.colors.base08}, #${config.lib.stylix.colors.base0D});
|
||||
transition: ${betterTransition};
|
||||
opacity: 1.0;
|
||||
min-width: 40px;
|
||||
}
|
||||
#workspaces button:hover {
|
||||
font-weight: bold;
|
||||
border-radius: 16px;
|
||||
color: #${config.lib.stylix.colors.base00};
|
||||
background: linear-gradient(45deg, #${config.lib.stylix.colors.base08}, #${config.lib.stylix.colors.base0D});
|
||||
opacity: 0.8;
|
||||
transition: ${betterTransition};
|
||||
}
|
||||
tooltip {
|
||||
background: #${config.lib.stylix.colors.base00};
|
||||
border: 1px solid #${config.lib.stylix.colors.base08};
|
||||
border-radius: 12px;
|
||||
}
|
||||
tooltip label {
|
||||
color: #${config.lib.stylix.colors.base08};
|
||||
}
|
||||
#window, #pulseaudio, #cpu, #memory, #idle_inhibitor {
|
||||
font-weight: bold;
|
||||
margin: 4px 0px;
|
||||
margin-left: 7px;
|
||||
padding: 0px 18px;
|
||||
background: #${config.lib.stylix.colors.base00};
|
||||
color: #${config.lib.stylix.colors.base08};
|
||||
border-radius: 8px 8px 8px 8px;
|
||||
}
|
||||
#idle_inhibitor {
|
||||
font-size: 28px;
|
||||
}
|
||||
#custom-startmenu {
|
||||
color: #${config.lib.stylix.colors.base0B};
|
||||
background: #${config.lib.stylix.colors.base02};
|
||||
font-size: 22px;
|
||||
margin: 0px;
|
||||
padding: 0px 5px 0px 5px;
|
||||
border-radius: 16px 16px 16px 16px;
|
||||
}
|
||||
#custom-hyprbindings, #network, #battery,
|
||||
#custom-notification, #tray, #custom-exit {
|
||||
/* font-weight: bold; */
|
||||
font-size: 20px;
|
||||
background: #${config.lib.stylix.colors.base00};
|
||||
color: #${config.lib.stylix.colors.base08};
|
||||
margin: 4px 0px;
|
||||
margin-right: 7px;
|
||||
border-radius: 8px 8px 8px 8px;
|
||||
padding: 0px 18px;
|
||||
}
|
||||
#clock {
|
||||
font-weight: bold;
|
||||
font-size: 16px;
|
||||
color: #0D0E15;
|
||||
background: linear-gradient(90deg, #${config.lib.stylix.colors.base0B}, #${config.lib.stylix.colors.base02});
|
||||
margin: 0px;
|
||||
padding: 0px 5px 0px 5px;
|
||||
border-radius: 16px 16px 16px 16px;
|
||||
}
|
||||
''
|
||||
];
|
||||
};
|
||||
}
|
||||
480
modules/home/waybar/waybar-dwm-2.nix
Normal file
@@ -0,0 +1,480 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
home.packages = with pkgs; [waybar];
|
||||
|
||||
programs.waybar = {
|
||||
enable = true;
|
||||
settings = {
|
||||
mainBar = {
|
||||
layer = "top";
|
||||
"modules-left" = ["hyprland/workspaces" "temperature" "hyprland/window"];
|
||||
"modules-center" = ["custom/spacer"];
|
||||
"modules-right" = ["tray" "cpu" "memory" "idle_inhibitor" "clock" "pulseaudio" "bluetooth"];
|
||||
"hyprland/window" = {
|
||||
format = "{title}";
|
||||
"max-length" = 333;
|
||||
"seperate-outputs" = true;
|
||||
};
|
||||
clock = {
|
||||
format = "<span foreground='#282828'> </span><span>{:%I:%M %a %d}</span>";
|
||||
"tooltip-format" = "{calendar}";
|
||||
calendar = {
|
||||
mode = "month";
|
||||
"mode-mon-col" = 3;
|
||||
"on-scroll" = 1;
|
||||
"on-click-right" = "mode";
|
||||
format = {
|
||||
months = "<span color='#ffead3'><b>{}</b></span>";
|
||||
days = "<span color='#ecc6d9'><b>{}</b></span>";
|
||||
weeks = "<span color='#99ffdd'><b>{%W}</b></span>";
|
||||
weekdays = "<span color='#ffcc66'><b>{}</b></span>";
|
||||
today = "<span color='#ff6699'><b>{}</b></span>";
|
||||
};
|
||||
};
|
||||
actions = {
|
||||
"on-click-middle" = "mode";
|
||||
"on-click-right" = "shift_up";
|
||||
"on-click" = "shift_down";
|
||||
};
|
||||
};
|
||||
cpu = {
|
||||
format = "<span foreground='#b8bb26'></span> {usage}%";
|
||||
};
|
||||
memory = {
|
||||
format = "<span foreground='#d65d9e'></span> {}%";
|
||||
interval = 1;
|
||||
};
|
||||
"custom/gpu-util" = {
|
||||
exec = "./scripts/gpu-util";
|
||||
format = "<span foreground='#67b0e8'></span> {}";
|
||||
interval = 1;
|
||||
};
|
||||
"custom/gpu-temp" = {
|
||||
exec = "./scripts/gpu-temp";
|
||||
format = "<span foreground='#e57474'></span> {}";
|
||||
interval = 1;
|
||||
};
|
||||
temperature = {
|
||||
"hwmon-path" = "/sys/class/hwmon/hwmon1/temp1_input";
|
||||
"critical-threshold" = 80;
|
||||
format = "<span foreground='#83a598'></span> {temperatureC}°C";
|
||||
interval = 1;
|
||||
};
|
||||
"hyprland/workspaces" = {
|
||||
format = "{icon}";
|
||||
"active-only" = false;
|
||||
"sort-by-number" = false;
|
||||
"on-click" = "activate";
|
||||
"all-outputs" = false;
|
||||
"format-icons" = {
|
||||
"1" = "1";
|
||||
"2" = "2";
|
||||
"3" = "3";
|
||||
"4" = "4";
|
||||
"5" = "5";
|
||||
"6" = "6";
|
||||
"7" = "7";
|
||||
"8" = "8";
|
||||
"9" = "9";
|
||||
"10" = "10";
|
||||
};
|
||||
};
|
||||
network = {
|
||||
format = " Off";
|
||||
"format-wifi" = "{essid} ({signalStrength}%)";
|
||||
"format-ethernet" = "<span foreground='#b48ead'></span>";
|
||||
"format-disconnected" = " Disconnected";
|
||||
"tooltip-format" = "{ifname} via {gwaddr} ";
|
||||
"tooltip-format-wifi" = "{essid}({signalStrength}%) ";
|
||||
"tooltip-format-ethernet" = " {ifname}";
|
||||
"tooltip-format-disconnected" = "Disconnected";
|
||||
};
|
||||
pulseaudio = {
|
||||
format = "<span foreground='#cc241d'>{icon}</span> {volume}% {format_source}";
|
||||
"format-bluetooth" = "<span foreground='#b16286'>{icon}</span> {volume}% {format_source}";
|
||||
"format-bluetooth-muted" = "<span foreground='#D699B6'></span> {format_source}";
|
||||
"format-muted" = "<span foreground='#7A8478'></span> {format_source}";
|
||||
"format-source" = "<span foreground='#E67E80'></span> {volume}%";
|
||||
"format-source-muted" = "<span foreground='#F38BA8'></span>";
|
||||
"format-icons" = {
|
||||
headphone = "";
|
||||
phone = "";
|
||||
portable = "";
|
||||
default = ["" "" ""];
|
||||
};
|
||||
"on-click-left" = "pavucontrol";
|
||||
input = true;
|
||||
};
|
||||
"custom/playerctl" = {
|
||||
format = "{icon} <span>{}</span>";
|
||||
"return-type" = "json";
|
||||
"max-length" = 333;
|
||||
exec = "playerctl -a metadata --format '{\"text\": \"{{artist}} ~ {{markup_escape(title)}}\", \"tooltip\": \"{{playerName}} : {{markup_escape(title)}}\", \"alt\": \"{{status}}\", \"class\": \"{{status}}\"}' -F";
|
||||
"on-click-middle" = "playerctl play-pause";
|
||||
"on-click" = "playerctl previous";
|
||||
"on-click-right" = "playerctl next";
|
||||
"format-icons" = {
|
||||
Playing = "<span foreground='#98BB6C'></span>";
|
||||
Paused = "<span foreground='#E46876'></span>";
|
||||
};
|
||||
};
|
||||
tray = {
|
||||
format = "<span foreground='#D3C6AA'>{icon}</span>";
|
||||
"icon-size" = 14;
|
||||
spacing = 5;
|
||||
};
|
||||
idle_inhibitor = {
|
||||
format = "{icon}";
|
||||
"format-icons" = {
|
||||
activated = "";
|
||||
deactivated = "";
|
||||
};
|
||||
};
|
||||
"custom/subs" = {
|
||||
format = "<span foreground='#fbf1c7'> </span> {}";
|
||||
exec = "/usr/local/bin/subsfile.sh";
|
||||
"on-click" = "vivaldi-stable https://youtube.com/thelinuxcast";
|
||||
"restart-interval" = 1;
|
||||
};
|
||||
"custom/spacer" = {
|
||||
format = " ";
|
||||
};
|
||||
"wlr/taskbar" = {
|
||||
format = "{name}";
|
||||
"icon-size" = 14;
|
||||
"icon-theme" = "Numix-Circle";
|
||||
"tooltip-format" = "{title}";
|
||||
"on-click" = "activate";
|
||||
"on-click-middle" = "close";
|
||||
"ignore-list" = ["Alacritty"];
|
||||
"app_ids-mapping" = {
|
||||
firefoxdeveloperedition = "firefox-developer-edition";
|
||||
};
|
||||
rewrite = {
|
||||
"Firefox Web Browser" = "Firefox";
|
||||
"Foot Server" = "Terminal";
|
||||
};
|
||||
};
|
||||
bluetooth = {
|
||||
"on-click" = "./scripts/bluetooth-control";
|
||||
"on-click-right" = "./scripts/rofi-bluetooth";
|
||||
"on-click-middle" = "./scripts/rofi-bluetooth";
|
||||
format = "{icon}";
|
||||
interval = 15;
|
||||
"format-icons" = {
|
||||
on = "<span foreground='#43242B'></span>";
|
||||
off = "<span foreground='#76946A'></span>";
|
||||
disabled = "";
|
||||
connected = "";
|
||||
};
|
||||
"tooltip-format" = "{device_alias} {status}";
|
||||
};
|
||||
};
|
||||
};
|
||||
style = ''
|
||||
@define-color background #${config.stylix.base16Scheme.base00};
|
||||
@define-color foreground #${config.stylix.base16Scheme.base05};
|
||||
@define-color border #${config.stylix.base16Scheme.base02};
|
||||
@define-color color1 #${config.stylix.base16Scheme.base01};
|
||||
@define-color color2 #${config.stylix.base16Scheme.base02};
|
||||
@define-color color3 #${config.stylix.base16Scheme.base03};
|
||||
@define-color color4 #${config.stylix.base16Scheme.base04};
|
||||
@define-color color5 #${config.stylix.base16Scheme.base05};
|
||||
@define-color color6 #${config.stylix.base16Scheme.base06};
|
||||
@define-color color7 #${config.stylix.base16Scheme.base07};
|
||||
@define-color color8 #${config.stylix.base16Scheme.base08};
|
||||
@define-color color9 #${config.stylix.base16Scheme.base09};
|
||||
@define-color color10 #${config.stylix.base16Scheme.base0A};
|
||||
@define-color color11 #${config.stylix.base16Scheme.base0B};
|
||||
@define-color color12 #${config.stylix.base16Scheme.base0C};
|
||||
@define-color color13 #${config.stylix.base16Scheme.base0D};
|
||||
@define-color color14 #${config.stylix.base16Scheme.base0E};
|
||||
@define-color color15 #${config.stylix.base16Scheme.base0F};
|
||||
|
||||
* {
|
||||
min-height: 0;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
font-family: "JetBrains Mono Nerd Font";
|
||||
font-size: 14pt;
|
||||
font-weight: 700;
|
||||
padding-bottom: 0px;
|
||||
}
|
||||
|
||||
tooltip {
|
||||
background: @background;
|
||||
border: 2px solid @border;
|
||||
}
|
||||
|
||||
#window {
|
||||
margin: 0px 5px 0px 5px;
|
||||
padding-left: 10px;
|
||||
padding-right: 7px;
|
||||
background-color: @color14;
|
||||
color: #282828;
|
||||
}
|
||||
|
||||
window#waybar.empty #window {
|
||||
background-color: transparent;
|
||||
border-bottom: none;
|
||||
border-right: none;
|
||||
}
|
||||
|
||||
window#waybar {
|
||||
background-color:@color14;
|
||||
color: @color2;
|
||||
}
|
||||
|
||||
/* Workspaces */
|
||||
|
||||
#workspaces {
|
||||
margin: 0px 0px 0px 0px;
|
||||
padding: 0px;
|
||||
background-color: @background;
|
||||
color: @color7;
|
||||
}
|
||||
|
||||
#workspaces button {
|
||||
margin: 0px 0px 0px 0px;
|
||||
padding-left: 3px;
|
||||
padding-right: 9px;
|
||||
background-color: @background;
|
||||
color: @color7;
|
||||
}
|
||||
|
||||
#workspaces button.active {
|
||||
padding: 0 2px 0 1px;
|
||||
color: @color3;
|
||||
}
|
||||
|
||||
#workspaces button.urgent {
|
||||
color: @color9;
|
||||
}
|
||||
|
||||
#custom-gpu-util {
|
||||
margin: 0px 5px 0px 5px;
|
||||
padding-left: 10px;
|
||||
padding-right: 10px;
|
||||
background-color: @background;
|
||||
color: @foreground;
|
||||
}
|
||||
|
||||
#tray {
|
||||
margin: 0px 0px 0px 0px;
|
||||
padding-left: 10px;
|
||||
padding-right: 10px;
|
||||
background-color: @background;
|
||||
color: @foreground;
|
||||
}
|
||||
|
||||
#idle_inhibitor {
|
||||
margin: 0px 0px 0px 0px;
|
||||
padding-left: 10px;
|
||||
padding-right: 12px;
|
||||
background-color: @background;
|
||||
color: @foreground;
|
||||
}
|
||||
|
||||
#idle_inhibitor.activated {
|
||||
color: @color9;
|
||||
}
|
||||
|
||||
#network {
|
||||
margin: 0px 0px 0px 0px;
|
||||
padding-left: 10px;
|
||||
padding-right: 12px;
|
||||
background-color: @background;
|
||||
color: @color11;
|
||||
}
|
||||
|
||||
#network.linked {
|
||||
color: @color6;
|
||||
}
|
||||
#network.disconnected,
|
||||
#network.disabled {
|
||||
color: @color4;
|
||||
}
|
||||
|
||||
#custom-subs {
|
||||
color: @foreground;
|
||||
margin: 0px 5px 0px 5px;
|
||||
padding-left: 10px;
|
||||
padding-right: 12px;
|
||||
border-bottom: 2px solid @background;
|
||||
border-right: 2px solid @background;
|
||||
border-color: @color8;
|
||||
background-color: @color13;
|
||||
}
|
||||
|
||||
#custom-cliphist {
|
||||
color: @color14;
|
||||
margin: 0px 5px 0px 5px;
|
||||
padding-left: 10px;
|
||||
padding-right: 12px;
|
||||
background-color: @background;
|
||||
}
|
||||
|
||||
#custom-gpu-temp,
|
||||
#custom-clipboard {
|
||||
margin: 0px 5px 0px 5px;
|
||||
padding-left: 10px;
|
||||
padding-right: 10px;
|
||||
color: @foreground;
|
||||
background-color: @background;
|
||||
}
|
||||
|
||||
#cpu {
|
||||
margin: 0px 0px 0px 0px;
|
||||
padding-left: 6px;
|
||||
padding-right: 6px;
|
||||
color: @foreground;
|
||||
background-color: @background;
|
||||
}
|
||||
|
||||
#custom-cpuicon {
|
||||
margin: 0px 0px 0px 0px;
|
||||
padding: 0px 10px 0px 10px;
|
||||
color: @color14;
|
||||
background-color: @background;
|
||||
}
|
||||
|
||||
#custom-diskicon {
|
||||
margin: 0px 0px 0px 0;
|
||||
padding: 0 10px 0 10px;
|
||||
color: @color2;
|
||||
background-color: @background;
|
||||
}
|
||||
|
||||
#disk {
|
||||
margin: 0px 0px 0px 0;
|
||||
padding-left: 0px;
|
||||
padding-right: 0px;
|
||||
color: @foreground;
|
||||
background-color: @background;
|
||||
}
|
||||
|
||||
#custom-notification {
|
||||
background-color: @background;
|
||||
color: @color15;
|
||||
padding: 0 12px;
|
||||
margin-right: 0px;
|
||||
font-size: 14px;
|
||||
font-family: "JetBrainsMono Nerd Font";
|
||||
}
|
||||
|
||||
#custom-memoryicon {
|
||||
margin: 0px 0px 0px 0px;
|
||||
color: @color4;
|
||||
padding: 0 11px 0 7px;
|
||||
background-color: @background;
|
||||
}
|
||||
|
||||
#memory {
|
||||
margin: 0px 0px 0px 0px;
|
||||
padding-left: 5px;
|
||||
padding-right: 10px;
|
||||
color: @color4;
|
||||
background-color: @background;
|
||||
}
|
||||
|
||||
#custom-tempicon {
|
||||
margin: 0px 0px 0px 0px;
|
||||
color: @color10;
|
||||
padding: 0 11px 0 8px;
|
||||
background-color: @background;
|
||||
}
|
||||
|
||||
#temperature {
|
||||
margin: 0px 0px 0px 0px;
|
||||
padding-left: 5px;
|
||||
padding-right: 10px;
|
||||
color: @color10;
|
||||
background-color: @background;
|
||||
}
|
||||
|
||||
#custom-playerctl {
|
||||
margin: 0px 5px 0px 5px;
|
||||
padding-left: 10px;
|
||||
padding-right: 10px;
|
||||
color: @foreground;
|
||||
background-color: @background;
|
||||
}
|
||||
|
||||
#battery,
|
||||
#backlight,
|
||||
#bluetooth,
|
||||
#pulseaudio {
|
||||
margin-top: 0px;
|
||||
margin-bottom: 0px;
|
||||
color: @foreground;
|
||||
background-color: @background;
|
||||
}
|
||||
|
||||
#pulseaudio {
|
||||
margin-top: 0px;
|
||||
margin-bottom: 0px;
|
||||
color: @color15;
|
||||
background-color: @background;
|
||||
}
|
||||
|
||||
#battery,
|
||||
#bluetooth {
|
||||
margin-left: 0px;
|
||||
margin-right: 0px;
|
||||
padding-left: 0px;
|
||||
padding-right: 2px;
|
||||
}
|
||||
|
||||
#backlight,
|
||||
#pulseaudio {
|
||||
margin-right: 0px;
|
||||
margin-left: 0px;
|
||||
padding-left: 10px;
|
||||
padding-right: 7.5px;
|
||||
}
|
||||
|
||||
#clock {
|
||||
margin: 0px 0px 0px 0px;
|
||||
padding-left: 10px;
|
||||
padding-right: 10px;
|
||||
color: @color6;
|
||||
background-color: @background;
|
||||
}
|
||||
|
||||
#custom-clockicon {
|
||||
margin: 0px 0 0px 0px;
|
||||
color: @color6;
|
||||
padding: 0 5px 0 10px;
|
||||
background-color: @background;
|
||||
}
|
||||
|
||||
#taskbar {
|
||||
padding: 0 3px;
|
||||
margin: 0 0px;
|
||||
color: #ffffff;
|
||||
background-color: rgba(120,118,117,0.3);
|
||||
}
|
||||
#taskbar button {
|
||||
padding: 0 0 0 3px;
|
||||
margin: 0px 0px;
|
||||
color: #ffffff;
|
||||
background-color: rgba(120,118,117,0.1);
|
||||
}
|
||||
#taskbar button.active {
|
||||
background-color: rgba(120,118,117,0.8);
|
||||
}
|
||||
|
||||
#mode {
|
||||
margin: 0px 5px 0px 5px;
|
||||
padding-left: 10px;
|
||||
padding-right: 10px;
|
||||
background-color: @background;
|
||||
color: @color9;
|
||||
}
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
||||
429
modules/home/waybar/waybar-dwm.nix
Normal file
@@ -0,0 +1,429 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
home.packages = with pkgs; [waybar];
|
||||
|
||||
programs.waybar = {
|
||||
enable = true;
|
||||
settings = {
|
||||
mainBar = {
|
||||
layer = "top";
|
||||
"modules-left" = ["hyprland/workspaces" "hyprland/window"];
|
||||
"modules-center" = ["clock"];
|
||||
"modules-right" = ["tray" "cpu" "memory" "idle_inhibitor" "pulseaudio" "bluetooth"];
|
||||
"hyprland/window" = {
|
||||
format = "{title}";
|
||||
"max-length" = 333;
|
||||
"seperate-outputs" = true;
|
||||
};
|
||||
clock = {
|
||||
format = "<span foreground='#282828'> </span><span>{:%I:%M %a %d}</span>";
|
||||
"tooltip-format" = "{calendar}";
|
||||
calendar = {
|
||||
mode = "month";
|
||||
"mode-mon-col" = 3;
|
||||
"on-scroll" = 1;
|
||||
"on-click-right" = "mode";
|
||||
format = {
|
||||
months = "<span color='#ffead3'><b>{}</b></span>";
|
||||
days = "<span color='#ecc6d9'><b>{}</b></span>";
|
||||
weeks = "<span color='#99ffdd'><b>{%W}</b></span>";
|
||||
weekdays = "<span color='#ffcc66'><b>{}</b></span>";
|
||||
today = "<span color='#ff6699'><b>{}</b></span>";
|
||||
};
|
||||
};
|
||||
actions = {
|
||||
"on-click-middle" = "mode";
|
||||
"on-click-right" = "shift_up";
|
||||
"on-click" = "shift_down";
|
||||
};
|
||||
};
|
||||
cpu = {
|
||||
format = "<span foreground='#b8bb26'></span> {usage}%";
|
||||
};
|
||||
memory = {
|
||||
format = "<span foreground='#d65d9e'></span> {}%";
|
||||
interval = 1;
|
||||
};
|
||||
"custom/gpu-util" = {
|
||||
exec = "./scripts/gpu-util";
|
||||
format = "<span foreground='#67b0e8'></span> {}";
|
||||
interval = 1;
|
||||
};
|
||||
"custom/gpu-temp" = {
|
||||
exec = "./scripts/gpu-temp";
|
||||
format = "<span foreground='#e57474'></span> {}";
|
||||
interval = 1;
|
||||
};
|
||||
temperature = {
|
||||
"hwmon-path" = "/sys/class/hwmon/hwmon1/temp1_input";
|
||||
"critical-threshold" = 80;
|
||||
format = "<span foreground='#83a598'></span> {temperatureC}°C";
|
||||
interval = 1;
|
||||
};
|
||||
"hyprland/workspaces" = {
|
||||
format = "{icon}";
|
||||
"active-only" = false;
|
||||
"sort-by-number" = true;
|
||||
"on-click" = "activate";
|
||||
"all-outputs" = false;
|
||||
"format-icons" = {
|
||||
"1" = "1";
|
||||
"2" = "2";
|
||||
"3" = "3";
|
||||
"4" = "4";
|
||||
"5" = "5";
|
||||
"6" = "6";
|
||||
"7" = "7";
|
||||
"8" = "8";
|
||||
"9" = "9";
|
||||
"10" = "10";
|
||||
};
|
||||
};
|
||||
network = {
|
||||
format = " Off";
|
||||
"format-wifi" = "{essid} ({signalStrength}%)";
|
||||
"format-ethernet" = "<span foreground='#b48ead'></span>";
|
||||
"format-disconnected" = " Disconnected";
|
||||
"tooltip-format" = "{ifname} via {gwaddr} ";
|
||||
"tooltip-format-wifi" = "{essid}({signalStrength}%) ";
|
||||
"tooltip-format-ethernet" = " {ifname}";
|
||||
"tooltip-format-disconnected" = "Disconnected";
|
||||
};
|
||||
pulseaudio = {
|
||||
format = "<span foreground='#cc241d'>{icon}</span> {volume}% {format_source}";
|
||||
"format-bluetooth" = "<span foreground='#b16286'>{icon}</span> {volume}% {format_source}";
|
||||
"format-bluetooth-muted" = "<span foreground='#D699B6'></span> {format_source}";
|
||||
"format-muted" = "<span foreground='#7A8478'></span> {format_source}";
|
||||
"format-source" = "<span foreground='#E67E80'></span> {volume}%";
|
||||
"format-source-muted" = "<span foreground='#F38BA8'></span>";
|
||||
"format-icons" = {
|
||||
headphone = "";
|
||||
phone = "";
|
||||
portable = "";
|
||||
default = ["" "" ""];
|
||||
};
|
||||
"on-click-left" = "pavucontrol";
|
||||
input = true;
|
||||
};
|
||||
"custom/playerctl" = {
|
||||
format = "{icon} <span>{}</span>";
|
||||
"return-type" = "json";
|
||||
"max-length" = 333;
|
||||
exec = "playerctl -a metadata --format '{\"text\": \"{{artist}} ~ {{markup_escape(title)}}\", \"tooltip\": \"{{playerName}} : {{markup_escape(title)}}\", \"alt\": \"{{status}}\", \"class\": \"{{status}}\"}' -F";
|
||||
"on-click-middle" = "playerctl play-pause";
|
||||
"on-click" = "playerctl previous";
|
||||
"on-click-right" = "playerctl next";
|
||||
"format-icons" = {
|
||||
Playing = "<span foreground='#98BB6C'></span>";
|
||||
Paused = "<span foreground='#E46876'></span>";
|
||||
};
|
||||
};
|
||||
tray = {
|
||||
format = "<span foreground='#D3C6AA'>{icon}</span>";
|
||||
"icon-size" = 14;
|
||||
spacing = 5;
|
||||
};
|
||||
idle_inhibitor = {
|
||||
format = "{icon}";
|
||||
"format-icons" = {
|
||||
activated = "";
|
||||
deactivated = "";
|
||||
};
|
||||
};
|
||||
"custom/subs" = {
|
||||
format = "<span foreground='#fbf1c7'> </span> {}";
|
||||
exec = "/usr/local/bin/subsfile.sh";
|
||||
"on-click" = "vivaldi-stable https://youtube.com/thelinuxcast";
|
||||
"restart-interval" = 1;
|
||||
};
|
||||
"custom/spacer" = {
|
||||
format = " ";
|
||||
};
|
||||
"wlr/taskbar" = {
|
||||
format = "{name}";
|
||||
"icon-size" = 14;
|
||||
"icon-theme" = "Numix-Circle";
|
||||
"tooltip-format" = "{title}";
|
||||
"on-click" = "activate";
|
||||
"on-click-middle" = "close";
|
||||
"ignore-list" = ["Alacritty"];
|
||||
"app_ids-mapping" = {
|
||||
firefoxdeveloperedition = "firefox-developer-edition";
|
||||
};
|
||||
rewrite = {
|
||||
"Firefox Web Browser" = "Firefox";
|
||||
"Foot Server" = "Terminal";
|
||||
};
|
||||
};
|
||||
bluetooth = {
|
||||
"on-click" = "./scripts/bluetooth-control";
|
||||
"on-click-right" = "./scripts/rofi-bluetooth";
|
||||
"on-click-middle" = "./scripts/rofi-bluetooth";
|
||||
format = "{icon}";
|
||||
interval = 15;
|
||||
"format-icons" = {
|
||||
on = "<span foreground='#43242B'></span>";
|
||||
off = "<span foreground='#76946A'></span>";
|
||||
disabled = "";
|
||||
connected = "";
|
||||
};
|
||||
"tooltip-format" = "{device_alias} {status}";
|
||||
};
|
||||
};
|
||||
};
|
||||
style = ''
|
||||
@define-color bg #${config.stylix.base16Scheme.base00};
|
||||
@define-color fg #${config.stylix.base16Scheme.base05};
|
||||
@define-color lbg #${config.stylix.base16Scheme.base01};
|
||||
@define-color yellow #${config.stylix.base16Scheme.base0A};
|
||||
@define-color lavender #${config.stylix.base16Scheme.base0E};
|
||||
@define-color peach #${config.stylix.base16Scheme.base0A};
|
||||
@define-color red #${config.stylix.base16Scheme.base08};
|
||||
@define-color green #${config.stylix.base16Scheme.base0B};
|
||||
@define-color blue #${config.stylix.base16Scheme.base0D};
|
||||
@define-color border #${config.stylix.base16Scheme.base02};
|
||||
|
||||
* {
|
||||
min-height: 0;
|
||||
margin: 0px 0px 0px 0px;
|
||||
padding: 0;
|
||||
border-radius: 7px;
|
||||
font-family: "JetBrains Mono Nerd Font";
|
||||
font-size: 10pt;
|
||||
font-weight: 700;
|
||||
padding-bottom: 0px;
|
||||
}
|
||||
|
||||
tooltip {
|
||||
background: @bg;
|
||||
border-radius: 7px;
|
||||
border: 2px solid @border;
|
||||
}
|
||||
|
||||
#window {
|
||||
margin: 0px 0px 0px 0px;
|
||||
padding-left: 10px;
|
||||
padding-right: 7px;
|
||||
border-radius: 3px;
|
||||
border-color: @lbg;
|
||||
background-color: @yellow;
|
||||
color: @bg;
|
||||
}
|
||||
|
||||
window#waybar.empty #window {
|
||||
background-color: @bg;
|
||||
border-bottom: none;
|
||||
border-right: none;
|
||||
}
|
||||
|
||||
window#waybar {
|
||||
background-color: @bg;
|
||||
color: @lavender;
|
||||
}
|
||||
|
||||
/* Workspaces */
|
||||
@keyframes button_activate {
|
||||
from { opacity: .3 }
|
||||
to { opacity: 1.; }
|
||||
}
|
||||
|
||||
#workspaces {
|
||||
margin: 0px 0px 0px 0px;
|
||||
border-radius: 3px;
|
||||
padding: 1px;
|
||||
background-color: @bg;
|
||||
color: @bg;
|
||||
}
|
||||
|
||||
#workspaces button {
|
||||
margin: 0px 0px 0px 0px;
|
||||
border-radius: 3px;
|
||||
padding-left: 3px;
|
||||
padding-right: 9px;
|
||||
background-color: @bg;
|
||||
color: @fg;
|
||||
}
|
||||
|
||||
#workspaces button.active {
|
||||
background-color:@blue;
|
||||
color: @bg;
|
||||
}
|
||||
|
||||
#workspaces button.urgent {
|
||||
color: #F38BA8;
|
||||
}
|
||||
|
||||
#workspaces button:hover {
|
||||
border: solid transparent;
|
||||
}
|
||||
|
||||
#custom-gpu-util {
|
||||
margin: 0px 0px 0px 0px;
|
||||
padding-left: 10px;
|
||||
padding-right: 10px;
|
||||
border-radius: 7px;
|
||||
background-color: @bg;
|
||||
color: @fg;
|
||||
}
|
||||
|
||||
#tray {
|
||||
margin: 0px 0px 0px 0px;
|
||||
border-radius: 3px;
|
||||
padding-left: 10px;
|
||||
padding-right: 10px;
|
||||
background-color: @bg;
|
||||
color: @fg;
|
||||
}
|
||||
|
||||
#idle_inhibitor {
|
||||
margin: 0px 0px 0px 0px;
|
||||
padding-left: 10px;
|
||||
padding-right: 12px;
|
||||
border-radius: 3px;
|
||||
background-color: @bg;
|
||||
color: @fg;
|
||||
}
|
||||
|
||||
#network {
|
||||
margin: 5px 5px 2px 5px;
|
||||
padding-left: 10px;
|
||||
padding-right: 12px;
|
||||
border-radius: 7px;
|
||||
background-color: @bg;
|
||||
color: @lavender;
|
||||
}
|
||||
|
||||
#network.linked {
|
||||
color: @peach;
|
||||
}
|
||||
#network.disconnected,
|
||||
#network.disabled {
|
||||
color: @red;
|
||||
}
|
||||
|
||||
#custom-subs {
|
||||
color: @fg;
|
||||
margin: 5px 5px 2px 5px;
|
||||
padding-left: 10px;
|
||||
padding-right: 12px;
|
||||
border-radius: 3px;
|
||||
border-bottom: 2px solid @bg;
|
||||
border-right: 2px solid @bg;
|
||||
border-color: @lbg;
|
||||
background-color: @red;
|
||||
}
|
||||
|
||||
#custom-spacer {
|
||||
background-color: @yellow;
|
||||
}
|
||||
|
||||
#custom-cliphist {
|
||||
color: @peach;
|
||||
margin: 5px 5px 2px 5px;
|
||||
padding-left: 10px;
|
||||
padding-right: 12px;
|
||||
border-radius: 3px;
|
||||
background-color: @bg;
|
||||
}
|
||||
|
||||
#custom-gpu-temp,
|
||||
#cpu,
|
||||
#memory,
|
||||
#custom-clipboard,
|
||||
#temperature {
|
||||
margin: 0px 0px 0px 0px;
|
||||
padding-left: 10px;
|
||||
padding-right: 10px;
|
||||
border-radius: 3px;
|
||||
color: @fg;
|
||||
background-color: @bg;
|
||||
}
|
||||
|
||||
#custom-playerctl {
|
||||
margin: 5px 5px 2px 5px;
|
||||
padding-left: 10px;
|
||||
padding-right: 10px;
|
||||
border-radius: 3px;
|
||||
color: @fg;
|
||||
background-color: @bg;
|
||||
}
|
||||
|
||||
#battery,
|
||||
#backlight,
|
||||
#bluetooth,
|
||||
#pulseaudio {
|
||||
margin-top: 5px;
|
||||
margin-bottom: 2px;
|
||||
color: @fg;
|
||||
background-color: @bg;
|
||||
border-top-right-radius: 0px;
|
||||
border-bottom-right-radius: 0px;
|
||||
border-top-left-radius: 3px;
|
||||
border-bottom-left-radius: 3px;
|
||||
}
|
||||
|
||||
#battery,
|
||||
#bluetooth {
|
||||
margin-left: 0px;
|
||||
margin-right: 5px;
|
||||
padding-left: 7.5px;
|
||||
padding-right: 10px;
|
||||
border-top-left-radius: 0px;
|
||||
border-bottom-left-radius: 0px;
|
||||
border-top-right-radius: 3px;
|
||||
border-bottom-right-radius: 3px;
|
||||
}
|
||||
|
||||
#backlight,
|
||||
#pulseaudio {
|
||||
margin-right: 0px;
|
||||
margin-left: 5px;
|
||||
padding-left: 10px;
|
||||
padding-right: 7.5px;
|
||||
border-top-right-radius: 0px;
|
||||
border-bottom-right-radius: 0px;
|
||||
border-top-left-radius: 3px;
|
||||
border-bottom-left-radius: 3px;
|
||||
}
|
||||
|
||||
#clock {
|
||||
margin: 0px 0px 0px 0px;
|
||||
padding-left: 10px;
|
||||
padding-right: 10px;
|
||||
border-radius: 3px;
|
||||
color: @bg;
|
||||
background-color: @green;
|
||||
}
|
||||
|
||||
#taskbar {
|
||||
border-radius: 0px 0px 0px 0;
|
||||
padding: 0 3px;
|
||||
margin: 0 0px;
|
||||
color: #ffffff;
|
||||
background-color: rgba(120,118,117,0.3);
|
||||
}
|
||||
#taskbar button {
|
||||
border-radius: 0px 0px 0px 0px;
|
||||
padding: 0 0 0 3px;
|
||||
margin: 3px 1;
|
||||
color: #ffffff;
|
||||
background-color: rgba(120,118,117,0.1);
|
||||
}
|
||||
#taskbar button.active {
|
||||
background-color: rgba(120,118,117,0.8);
|
||||
}
|
||||
|
||||
#mode {
|
||||
margin: 0px 0px 0px 0px;
|
||||
padding-left: 10px;
|
||||
padding-right: 10px;
|
||||
border-radius: 3px;
|
||||
background-color: @bg;
|
||||
color: @peach;
|
||||
}
|
||||
'';
|
||||
};
|
||||
}
|
||||
356
modules/home/waybar/waybar-jerry.nix
Normal file
@@ -0,0 +1,356 @@
|
||||
{ pkgs
|
||||
, config
|
||||
, lib
|
||||
, ...
|
||||
}:
|
||||
let
|
||||
terminal = "kitty";
|
||||
base00 = "0F1419";
|
||||
base01 = "131721";
|
||||
base03 = "3E4B59";
|
||||
base05 = "E6E1CF";
|
||||
base06 = "E6E1CF";
|
||||
base07 = "F3F4F5";
|
||||
base08 = "F07178";
|
||||
base09 = "FF8F40";
|
||||
base0A = "FFB454";
|
||||
base0B = "B8CC52";
|
||||
base0C = "95E6CB";
|
||||
base0D = "59C2FF";
|
||||
base0E = "D2A6FF";
|
||||
base0F = "E6B673";
|
||||
in
|
||||
with lib; {
|
||||
# Configure & Theme Waybar
|
||||
programs.waybar = {
|
||||
enable = true;
|
||||
package = pkgs.waybar;
|
||||
settings = [
|
||||
{
|
||||
layer = "top";
|
||||
position = "top";
|
||||
|
||||
modules-center = [ "network" "pulseaudio" "cpu" "hyprland/workspaces" "memory" "disk" "clock" ]; # Eterna: [ "hyprland/window" ]
|
||||
modules-left = [ "custom/startmenu" "hyprland/window" ]; # Eternal: [ "hyprland/workspaces" "cpu" "memory" "network" ]
|
||||
modules-right = [ "tray" "idle_inhibitor" "custom/notification" "battery" "custom/exit" ]; # Eternal: [ "idle_inhibitor" "pulseaudio" "clock" "custom/notification" "tray" ]
|
||||
|
||||
"hyprland/workspaces" = {
|
||||
format = "{name}";
|
||||
format-icons = {
|
||||
default = " ";
|
||||
active = " ";
|
||||
urgent = " ";
|
||||
};
|
||||
on-scroll-up = "hyprctl dispatch workspace e+1";
|
||||
on-scroll-down = "hyprctl dispatch workspace e-1";
|
||||
};
|
||||
"clock" = {
|
||||
format = '' {:%H:%M}'';
|
||||
/*
|
||||
''{: %I:%M %p}'';
|
||||
*/
|
||||
tooltip = true;
|
||||
tooltip-format = "<big>{:%A, %d.%B %Y }</big><tt><small>{calendar}</small></tt>";
|
||||
};
|
||||
"hyprland/window" = {
|
||||
max-length = 60;
|
||||
separate-outputs = false;
|
||||
};
|
||||
"memory" = {
|
||||
interval = 5;
|
||||
format = " {}%";
|
||||
tooltip = true;
|
||||
on-click = "${terminal} -e btop";
|
||||
};
|
||||
"cpu" = {
|
||||
interval = 5;
|
||||
format = " {usage:2}%";
|
||||
tooltip = true;
|
||||
on-click = "${terminal} -e btop";
|
||||
};
|
||||
"disk" = {
|
||||
format = " {free}";
|
||||
tooltip = true;
|
||||
# Not working with zaneyos window open then closes
|
||||
#on-click = "${terminal} -e sh -c df -h ; read";
|
||||
};
|
||||
"network" = {
|
||||
format-icons = [ "" "" "" "" "" ];
|
||||
format-ethernet = " {bandwidthDownBits}";
|
||||
format-wifi = " {bandwidthDownBits}";
|
||||
format-disconnected = "";
|
||||
tooltip = false;
|
||||
on-click = "${terminal} -e btop";
|
||||
};
|
||||
"tray" = {
|
||||
spacing = 12;
|
||||
};
|
||||
"pulseaudio" = {
|
||||
format = "{icon} {volume}% {format_source}";
|
||||
format-bluetooth = "{volume}% {icon} {format_source}";
|
||||
format-bluetooth-muted = " {icon} {format_source}";
|
||||
format-muted = " {format_source}";
|
||||
format-source = " {volume}%";
|
||||
format-source-muted = "";
|
||||
format-icons = {
|
||||
headphone = "";
|
||||
hands-free = "";
|
||||
headset = "";
|
||||
phone = "";
|
||||
portable = "";
|
||||
car = "";
|
||||
default = [ "" "" "" ];
|
||||
};
|
||||
on-click = "pavucontrol";
|
||||
};
|
||||
"custom/exit" = {
|
||||
tooltip = false;
|
||||
format = "⏻";
|
||||
on-click = "sleep 0.1 && wlogout";
|
||||
};
|
||||
"custom/startmenu" = {
|
||||
tooltip = false;
|
||||
format = " ";
|
||||
# exec = "rofi -show drun";
|
||||
on-click = "rofi -show drun";
|
||||
};
|
||||
"idle_inhibitor" = {
|
||||
format = "{icon}";
|
||||
format-icons = {
|
||||
activated = " ";
|
||||
deactivated = " ";
|
||||
};
|
||||
tooltip = "true";
|
||||
};
|
||||
"custom/notification" = {
|
||||
tooltip = false;
|
||||
format = "{icon} {}";
|
||||
format-icons = {
|
||||
notification = "<span foreground='red'><sup></sup></span>";
|
||||
none = "";
|
||||
dnd-notification = "<span foreground='red'><sup></sup></span>";
|
||||
dnd-none = "";
|
||||
inhibited-notification = "<span foreground='red'><sup></sup></span>";
|
||||
inhibited-none = "";
|
||||
dnd-inhibited-notification = "<span foreground='red'><sup></sup></span>";
|
||||
dnd-inhibited-none = "";
|
||||
};
|
||||
return-type = "json";
|
||||
exec-if = "which swaync-client";
|
||||
exec = "swaync-client -swb";
|
||||
on-click = "swaync-client -t";
|
||||
escape = true;
|
||||
};
|
||||
"battery" = {
|
||||
states = {
|
||||
warning = 30;
|
||||
critical = 15;
|
||||
};
|
||||
format = "{icon} {capacity}%";
|
||||
format-charging = " {capacity}%";
|
||||
format-plugged = " {capacity}%";
|
||||
format-icons = [ "" "" "" "" "" "" "" "" "" "" ];
|
||||
on-click = "";
|
||||
tooltip = false;
|
||||
};
|
||||
}
|
||||
];
|
||||
style = concatStrings [
|
||||
''
|
||||
* {
|
||||
font-size: 16px;
|
||||
font-family: JetBrainsMono Nerd Font, Font Awesome, sans-serif;
|
||||
font-weight: bold;
|
||||
}
|
||||
window#waybar {
|
||||
/*
|
||||
|
||||
background-color: rgba(26,27,38,0);
|
||||
border-bottom: 1px solid rgba(26,27,38,0);
|
||||
border-radius: 0px;
|
||||
color: #${base0F};
|
||||
*/
|
||||
|
||||
background-color: rgba(26,27,38,0);
|
||||
border-bottom: 1px solid rgba(26,27,38,0);
|
||||
border-radius: 0px;
|
||||
color: #${base0F};
|
||||
}
|
||||
#workspaces {
|
||||
/*
|
||||
Eternal
|
||||
background: linear-gradient(180deg, #${base00}, #${base01});
|
||||
margin: 5px 5px 5px 0px;
|
||||
padding: 0px 10px;
|
||||
border-radius: 0px 15px 50px 0px;
|
||||
border: 0px;
|
||||
font-style: normal;
|
||||
color: #${base00};
|
||||
*/
|
||||
background: linear-gradient(45deg, #${base01}, #${base01});
|
||||
margin: 5px;
|
||||
padding: 0px 1px;
|
||||
border-radius: 15px;
|
||||
border: 0px;
|
||||
font-style: normal;
|
||||
color: #${base00};
|
||||
}
|
||||
#workspaces button {
|
||||
padding: 0px 5px;
|
||||
margin: 4px 3px;
|
||||
border-radius: 15px;
|
||||
border: 0px;
|
||||
color: #${base00};
|
||||
background: linear-gradient(45deg, #${base0D}, #${base0E});
|
||||
opacity: 0.5;
|
||||
transition: all 0.3s ease-in-out;
|
||||
}
|
||||
#workspaces button.active {
|
||||
padding: 0px 5px;
|
||||
margin: 4px 3px;
|
||||
border-radius: 15px;
|
||||
border: 0px;
|
||||
color: #${base00};
|
||||
background: linear-gradient(45deg, #${base0D}, #${base0E});
|
||||
opacity: 1.0;
|
||||
min-width: 40px;
|
||||
transition: all 0.3s ease-in-out;
|
||||
}
|
||||
#workspaces button:hover {
|
||||
border-radius: 15px;
|
||||
color: #${base00};
|
||||
background: linear-gradient(45deg, #${base0D}, #${base0E});
|
||||
opacity: 0.8;
|
||||
}
|
||||
tooltip {
|
||||
background: #${base00};
|
||||
border: 1px solid #${base0E};
|
||||
border-radius: 10px;
|
||||
}
|
||||
tooltip label {
|
||||
color: #${base07};
|
||||
}
|
||||
#window {
|
||||
/*
|
||||
Eternal
|
||||
color: #${base05};
|
||||
background: #${base00};
|
||||
border-radius: 15px;
|
||||
margin: 5px;
|
||||
padding: 2px 20px;
|
||||
*/
|
||||
margin: 5px;
|
||||
padding: 2px 20px;
|
||||
color: #${base05};
|
||||
background: #${base01};
|
||||
border-radius: 50px 15px 50px 15px;
|
||||
}
|
||||
#memory {
|
||||
color: #${base0F};
|
||||
/*
|
||||
Eternal
|
||||
background: #${base00};
|
||||
border-radius: 50px 15px 50px 15px;
|
||||
margin: 5px;
|
||||
padding: 2px 20px;
|
||||
*/
|
||||
background: #${base01};
|
||||
margin: 5px;
|
||||
padding: 2px 20px;
|
||||
border-radius: 15px 50px 15px 50px;
|
||||
}
|
||||
#clock {
|
||||
color: #${base0B};
|
||||
background: #${base00};
|
||||
border-radius: 15px 50px 15px 50px;
|
||||
margin: 5px;
|
||||
padding: 2px 20px;
|
||||
}
|
||||
#idle_inhibitor {
|
||||
color: #${base0A};
|
||||
background: #${base00};
|
||||
border-radius: 50px 15px 50px 15px;
|
||||
margin: 5px;
|
||||
padding: 2px 20px;
|
||||
}
|
||||
#cpu {
|
||||
color: #${base07};
|
||||
background: #${base00};
|
||||
border-radius: 50px 15px 50px 15px;
|
||||
margin: 5px;
|
||||
padding: 2px 20px;
|
||||
}
|
||||
#disk {
|
||||
color: #${base0F};
|
||||
background: #${base00};
|
||||
border-radius: 15px 50px 15px 50px;
|
||||
margin: 5px;
|
||||
padding: 2px 20px;
|
||||
}
|
||||
#battery {
|
||||
color: #${base08};
|
||||
background: #${base00};
|
||||
border-radius: 15px 50px 15px 50px;
|
||||
margin: 5px;
|
||||
padding: 2px 20px;
|
||||
}
|
||||
#network {
|
||||
color: #${base09};
|
||||
background: #${base00};
|
||||
border-radius: 50px 15px 50px 15px;
|
||||
margin: 5px;
|
||||
padding: 2px 20px;
|
||||
}
|
||||
#tray {
|
||||
color: #${base05};
|
||||
background: #${base00};
|
||||
border-radius: 15px 50px 15px 50px;
|
||||
margin: 5px;
|
||||
padding: 2px 20px;
|
||||
}
|
||||
#pulseaudio {
|
||||
color: #${base0D};
|
||||
/*
|
||||
Eternal
|
||||
background: #${base00};
|
||||
border-radius: 15px 50px 15px 50px;
|
||||
margin: 5px;
|
||||
padding: 2px 20px;
|
||||
*/
|
||||
background: #${base01};
|
||||
margin: 4px;
|
||||
padding: 2px 20px;
|
||||
border-radius: 50px 15px 50px 15px;
|
||||
}
|
||||
#custom-notification {
|
||||
color: #${base0C};
|
||||
background: #${base00};
|
||||
border-radius: 15px 50px 15px 50px;
|
||||
margin: 5px;
|
||||
padding: 2px 20px;
|
||||
}
|
||||
#custom-startmenu {
|
||||
color: #${base0E};
|
||||
background: #${base00};
|
||||
border-radius: 0px 15px 50px 0px;
|
||||
margin: 5px 5px 5px 0px;
|
||||
padding: 2px 20px;
|
||||
}
|
||||
#idle_inhibitor {
|
||||
color: #${base09};
|
||||
background: #${base00};
|
||||
border-radius: 15px 50px 15px 50px;
|
||||
margin: 5px;
|
||||
padding: 2px 20px;
|
||||
}
|
||||
#custom-exit {
|
||||
color: #${base0E};
|
||||
background: #${base00};
|
||||
border-radius: 15px 0px 0px 50px;
|
||||
margin: 5px 0px 5px 5px;
|
||||
padding: 2px 20px;
|
||||
}
|
||||
''
|
||||
];
|
||||
};
|
||||
}
|
||||
306
modules/home/waybar/waybar-nekodyke.nix
Executable file
@@ -0,0 +1,306 @@
|
||||
{ pkgs
|
||||
, lib
|
||||
, host
|
||||
, config
|
||||
, ...
|
||||
}:
|
||||
let
|
||||
betterTransition = "all 0.3s cubic-bezier(.55,-0.68,.48,1.682)";
|
||||
inherit (import ../../../hosts/${host}/variables.nix) clock24h;
|
||||
in
|
||||
with lib; {
|
||||
# Configure & Theme Waybar
|
||||
programs.waybar = {
|
||||
enable = true;
|
||||
package = pkgs.waybar;
|
||||
settings = [
|
||||
{
|
||||
layer = "top";
|
||||
position = "top";
|
||||
margin-top = 6;
|
||||
margin-left = 6;
|
||||
margin-right = 6;
|
||||
modules-center = [ "hyprland/workspaces" ];
|
||||
modules-left = [
|
||||
"custom/startmenu"
|
||||
"cpu"
|
||||
"memory"
|
||||
"temperature"
|
||||
"disk"
|
||||
"hyprland/window"
|
||||
"idle_inhibitor"
|
||||
];
|
||||
modules-right = [
|
||||
"pulseaudio"
|
||||
"battery"
|
||||
"custom/hyprbindings"
|
||||
"custom/notification"
|
||||
"clock"
|
||||
"tray"
|
||||
];
|
||||
|
||||
"hyprland/workspaces" = {
|
||||
format = "{name}";
|
||||
format-icons = {
|
||||
default = " ";
|
||||
active = " ";
|
||||
urgent = " ";
|
||||
};
|
||||
on-scroll-up = "hyprctl dispatch workspace e+1";
|
||||
on-scroll-down = "hyprctl dispatch workspace e-1";
|
||||
};
|
||||
"pulseaudio/slider" = {
|
||||
min = 0;
|
||||
max = 100;
|
||||
orientation = "horizontal";
|
||||
};
|
||||
"temperature" = {
|
||||
format = " {temperatureC}°C ";
|
||||
};
|
||||
"clock" = {
|
||||
format =
|
||||
if clock24h == true
|
||||
then '' {:L%H:%M}''
|
||||
else '' {:L%I:%M %p}'';
|
||||
tooltip = true;
|
||||
tooltip-format = "<big>{:%A, %d.%B %Y }</big>\n<tt><small>{calendar}</small></tt>";
|
||||
};
|
||||
"hyprland/window" = {
|
||||
max-length = 22;
|
||||
separate-outputs = false;
|
||||
rewrite = {
|
||||
"" = " 🙈 No Windows? ";
|
||||
};
|
||||
};
|
||||
"memory" = {
|
||||
interval = 5;
|
||||
icon-size = 20;
|
||||
format = " {}%";
|
||||
tooltip = true;
|
||||
};
|
||||
"cpu" = {
|
||||
interval = 5;
|
||||
format = " {usage:2}%";
|
||||
tooltip = true;
|
||||
};
|
||||
"disk" = {
|
||||
format = " {free}";
|
||||
tooltip = true;
|
||||
};
|
||||
"network" = {
|
||||
format-icons = [
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
];
|
||||
format-ethernet = " {bandwidthDownOctets}";
|
||||
format-wifi = "{icon} {signalStrength}%";
|
||||
format-disconnected = "";
|
||||
tooltip = false;
|
||||
};
|
||||
"tray" = {
|
||||
spacing = 12;
|
||||
};
|
||||
"pulseaudio" = {
|
||||
format = "{icon} {volume}% {format_source}";
|
||||
format-bluetooth = "{volume}% {icon} {format_source}";
|
||||
format-bluetooth-muted = " {icon} {format_source}";
|
||||
format-muted = " {format_source}";
|
||||
format-source = " {volume}%";
|
||||
format-source-muted = "";
|
||||
format-icons = {
|
||||
headphone = "";
|
||||
hands-free = "";
|
||||
headset = "";
|
||||
phone = "";
|
||||
portable = "";
|
||||
car = "";
|
||||
default = [
|
||||
""
|
||||
""
|
||||
""
|
||||
];
|
||||
};
|
||||
on-click = "sleep 0.1 && pavucontrol";
|
||||
scroll-step = 2;
|
||||
};
|
||||
"custom/exit" = {
|
||||
tooltip = false;
|
||||
format = "";
|
||||
on-click = "sleep 0.1 && wlogout";
|
||||
};
|
||||
"custom/startmenu" = {
|
||||
tooltip = false;
|
||||
format = "";
|
||||
# exec = "rofi -show drun";
|
||||
#on-click = "sleep 0.1 && rofi-launcher";
|
||||
on-click = "sleep 0.1 && nwg-drawer -mb 200 -mt 200 -mr 200 -ml 200";
|
||||
};
|
||||
"custom/hyprbindings" = {
|
||||
tooltip = false;
|
||||
format = "";
|
||||
on-click = "sleep 0.1 && list-keybinds";
|
||||
};
|
||||
"idle_inhibitor" = {
|
||||
format = "{icon}";
|
||||
format-icons = {
|
||||
activated = "";
|
||||
deactivated = "";
|
||||
};
|
||||
tooltip = "true";
|
||||
};
|
||||
"custom/notification" = {
|
||||
tooltip = false;
|
||||
format = "{icon} {}";
|
||||
format-icons = {
|
||||
notification = "<span foreground='red'><sup></sup></span>";
|
||||
none = "";
|
||||
dnd-notification = "<span foreground='red'><sup></sup></span>";
|
||||
dnd-none = "";
|
||||
inhibited-notification = "<span foreground='red'><sup></sup></span>";
|
||||
inhibited-none = "";
|
||||
dnd-inhibited-notification = "<span foreground='red'><sup></sup></span>";
|
||||
dnd-inhibited-none = "";
|
||||
};
|
||||
return-type = "json";
|
||||
exec-if = "which swaync-client";
|
||||
exec = "swaync-client -swb";
|
||||
on-click = "sleep 0.1 && task-waybar";
|
||||
escape = true;
|
||||
};
|
||||
"battery" = {
|
||||
states = {
|
||||
warning = 30;
|
||||
critical = 15;
|
||||
};
|
||||
format = "{icon} {capacity}%";
|
||||
format-charging = " {capacity}%";
|
||||
format-plugged = " {capacity}%";
|
||||
format-icons = [
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
];
|
||||
on-click = "";
|
||||
tooltip = false;
|
||||
};
|
||||
}
|
||||
];
|
||||
style = concatStrings [
|
||||
''
|
||||
* {
|
||||
font-family: JetBrainsMono Nerd Font Mono;
|
||||
font-size: 18px;
|
||||
border-radius: 0px;
|
||||
border: none;
|
||||
min-height: 0px;
|
||||
margin: 0px;
|
||||
}
|
||||
window#waybar {
|
||||
background: #${config.lib.stylix.colors.base00};
|
||||
padding: 2px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
#workspaces {
|
||||
color: #${config.lib.stylix.colors.base00};
|
||||
background: #${config.lib.stylix.colors.base00};
|
||||
border: 2px solid #${config.lib.stylix.colors.base0B};
|
||||
margin: 2px 4px;
|
||||
padding: 5px 5px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
#workspaces button {
|
||||
font-weight: bold;
|
||||
padding: 0px 5px;
|
||||
margin: 0px 3px;
|
||||
border-radius: 16px;
|
||||
color: #${config.lib.stylix.colors.base0B};
|
||||
background: #${config.lib.stylix.colors.base00};
|
||||
|
||||
}
|
||||
#workspaces button.active {
|
||||
font-weight: bold;
|
||||
padding: 0px 5px;
|
||||
margin: 0px 3px;
|
||||
border-radius: 4px;
|
||||
color: #${config.lib.stylix.colors.base00};
|
||||
background: #${config.lib.stylix.colors.base0B};
|
||||
transition: ${betterTransition};
|
||||
opacity: 1.0;
|
||||
min-width: 40px;
|
||||
}
|
||||
#workspaces button:hover {
|
||||
font-weight: bold;
|
||||
border-radius: 4px;
|
||||
color: #${config.lib.stylix.colors.base00};
|
||||
background: #${config.lib.stylix.colors.base0B};
|
||||
opacity: 0.8;
|
||||
}
|
||||
tooltip {
|
||||
background: #${config.lib.stylix.colors.base00};
|
||||
border: 1px solid #${config.lib.stylix.colors.base08};
|
||||
border-radius: 12px;
|
||||
}
|
||||
tooltip label {
|
||||
color: #${config.lib.stylix.colors.base08};
|
||||
}
|
||||
#window, #pulseaudio, #temperature, #cpu, #memory, #idle_inhibitor, #disk {
|
||||
font-weight: bold;
|
||||
margin: 2px 0px;
|
||||
margin-right: 7px;
|
||||
padding: 0px 18px;
|
||||
background: #${config.lib.stylix.colors.base00};
|
||||
color: #${config.lib.stylix.colors.base0B};
|
||||
border: 2px solid #${config.lib.stylix.colors.base0B};
|
||||
border-radius: 4px;
|
||||
}
|
||||
#idle_inhibitor {
|
||||
font-size: 28px;
|
||||
}
|
||||
#custom-startmenu {
|
||||
color: #${config.lib.stylix.colors.base00};
|
||||
background: #${config.lib.stylix.colors.base0B};
|
||||
font-size: 22px;
|
||||
padding: 0px 5px 0px 5px;
|
||||
border-radius: 4px;
|
||||
padding: 0px 8px;
|
||||
margin: 0px;
|
||||
margin-right:7px;
|
||||
|
||||
}
|
||||
#custom-hyprbindings, #network, #battery,
|
||||
#custom-notification, #clock, #custom-exit {
|
||||
/* font-weight: bold; */
|
||||
font-size: 20px;
|
||||
background: #${config.lib.stylix.colors.base00};
|
||||
color: #${config.lib.stylix.colors.base0B};
|
||||
margin: 2px 0px;
|
||||
margin-right: 7px;
|
||||
border: 2px solid #${config.lib.stylix.colors.base0B};
|
||||
border-radius: 4px;
|
||||
padding: 0px 12px;
|
||||
}
|
||||
#tray{
|
||||
font-weight: bold;
|
||||
font-size: 16px;
|
||||
margin: 0px;
|
||||
background: #${config.lib.stylix.colors.base0B};
|
||||
color: #${config.lib.stylix.colors.base00};
|
||||
border: 2px solid #${config.lib.stylix.colors.base0B};
|
||||
padding: 0px 18px;
|
||||
margin: 0px 0px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
''
|
||||
];
|
||||
};
|
||||
}
|
||||
305
modules/home/waybar/waybar-simple.nix
Normal file
@@ -0,0 +1,305 @@
|
||||
{ pkgs
|
||||
, lib
|
||||
, host
|
||||
, config
|
||||
, ...
|
||||
}:
|
||||
let
|
||||
inherit (import ../../../hosts/${host}/variables.nix) clock24h;
|
||||
in
|
||||
with lib; {
|
||||
# Configure & Theme Waybar
|
||||
programs.waybar = {
|
||||
enable = true;
|
||||
package = pkgs.waybar;
|
||||
settings = [
|
||||
{
|
||||
layer = "top";
|
||||
position = "top";
|
||||
modules-center = [ "hyprland/workspaces" ];
|
||||
modules-left = [
|
||||
"custom/startmenu"
|
||||
"custom/arrow6"
|
||||
"pulseaudio"
|
||||
"cpu"
|
||||
"memory"
|
||||
"idle_inhibitor"
|
||||
"custom/arrow7"
|
||||
"hyprland/window"
|
||||
];
|
||||
modules-right = [
|
||||
"custom/arrow4"
|
||||
"custom/hyprbindings"
|
||||
"custom/arrow3"
|
||||
"custom/notification"
|
||||
"custom/arrow3"
|
||||
"custom/exit"
|
||||
"battery"
|
||||
"custom/arrow2"
|
||||
"tray"
|
||||
"custom/arrow1"
|
||||
"clock"
|
||||
];
|
||||
|
||||
"hyprland/workspaces" = {
|
||||
format = "{name}";
|
||||
format-icons = {
|
||||
default = " ";
|
||||
active = " ";
|
||||
urgent = " ";
|
||||
};
|
||||
on-scroll-up = "hyprctl dispatch workspace e+1";
|
||||
on-scroll-down = "hyprctl dispatch workspace e-1";
|
||||
};
|
||||
"clock" = {
|
||||
format =
|
||||
if clock24h == true
|
||||
then '' {:L%H:%M}''
|
||||
else '' {:L%I:%M %p}'';
|
||||
tooltip = true;
|
||||
tooltip-format = "<big>{:%A, %d.%B %Y }</big>\n<tt><small>{calendar}</small></tt>";
|
||||
};
|
||||
"hyprland/window" = {
|
||||
max-length = 22;
|
||||
separate-outputs = false;
|
||||
rewrite = {
|
||||
"" = " 🙈 No Windows? ";
|
||||
};
|
||||
};
|
||||
"memory" = {
|
||||
interval = 5;
|
||||
format = " {}%";
|
||||
tooltip = true;
|
||||
};
|
||||
"cpu" = {
|
||||
interval = 5;
|
||||
format = " {usage:2}%";
|
||||
tooltip = true;
|
||||
};
|
||||
"disk" = {
|
||||
format = " {free}";
|
||||
tooltip = true;
|
||||
};
|
||||
"network" = {
|
||||
format-icons = [
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
];
|
||||
format-ethernet = " {bandwidthDownOctets}";
|
||||
format-wifi = "{icon} {signalStrength}%";
|
||||
format-disconnected = "";
|
||||
tooltip = false;
|
||||
};
|
||||
"tray" = {
|
||||
spacing = 12;
|
||||
};
|
||||
"pulseaudio" = {
|
||||
format = "{icon} {volume}% {format_source}";
|
||||
format-bluetooth = "{volume}% {icon} {format_source}";
|
||||
format-bluetooth-muted = " {icon} {format_source}";
|
||||
format-muted = " {format_source}";
|
||||
format-source = " {volume}%";
|
||||
format-source-muted = "";
|
||||
format-icons = {
|
||||
headphone = "";
|
||||
hands-free = "";
|
||||
headset = "";
|
||||
phone = "";
|
||||
portable = "";
|
||||
car = "";
|
||||
default = [
|
||||
""
|
||||
""
|
||||
""
|
||||
];
|
||||
};
|
||||
on-click = "sleep 0.1 && pavucontrol";
|
||||
};
|
||||
"custom/exit" = {
|
||||
tooltip = false;
|
||||
format = "";
|
||||
on-click = "sleep 0.1 && wlogout";
|
||||
};
|
||||
"custom/startmenu" = {
|
||||
tooltip = false;
|
||||
format = "";
|
||||
on-click = "sleep 0.1 && rofi-launcher";
|
||||
};
|
||||
"custom/hyprbindings" = {
|
||||
tooltip = false;
|
||||
format = "";
|
||||
on-click = "sleep 0.1 && list-keybinds";
|
||||
};
|
||||
"idle_inhibitor" = {
|
||||
format = "{icon}";
|
||||
format-icons = {
|
||||
activated = "";
|
||||
deactivated = "";
|
||||
};
|
||||
tooltip = "true";
|
||||
};
|
||||
"custom/notification" = {
|
||||
tooltip = false;
|
||||
format = "{icon} {}";
|
||||
format-icons = {
|
||||
notification = "<span foreground='red'><sup></sup></span>";
|
||||
none = "";
|
||||
dnd-notification = "<span foreground='red'><sup></sup></span>";
|
||||
dnd-none = "";
|
||||
inhibited-notification = "<span foreground='red'><sup></sup></span>";
|
||||
inhibited-none = "";
|
||||
dnd-inhibited-notification = "<span foreground='red'><sup></sup></span>";
|
||||
dnd-inhibited-none = "";
|
||||
};
|
||||
return-type = "json";
|
||||
exec-if = "which swaync-client";
|
||||
exec = "swaync-client -swb";
|
||||
on-click = "sleep 0.1 && task-waybar";
|
||||
escape = true;
|
||||
};
|
||||
"battery" = {
|
||||
states = {
|
||||
warning = 30;
|
||||
critical = 15;
|
||||
};
|
||||
format = "{icon} {capacity}%";
|
||||
format-charging = " {capacity}%";
|
||||
format-plugged = " {capacity}%";
|
||||
format-icons = [
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
];
|
||||
on-click = "";
|
||||
tooltip = false;
|
||||
};
|
||||
"custom/arrow1" = {
|
||||
format = "";
|
||||
};
|
||||
"custom/arrow2" = {
|
||||
format = "";
|
||||
};
|
||||
"custom/arrow3" = {
|
||||
format = "";
|
||||
};
|
||||
"custom/arrow4" = {
|
||||
format = "";
|
||||
};
|
||||
"custom/arrow5" = {
|
||||
format = "";
|
||||
};
|
||||
"custom/arrow6" = {
|
||||
format = "";
|
||||
};
|
||||
"custom/arrow7" = {
|
||||
format = "";
|
||||
};
|
||||
}
|
||||
];
|
||||
style = concatStrings [
|
||||
''
|
||||
* {
|
||||
font-family: JetBrainsMono Nerd Font Mono;
|
||||
font-size: 14px;
|
||||
border-radius: 0px;
|
||||
border: none;
|
||||
min-height: 0px;
|
||||
}
|
||||
window#waybar {
|
||||
background: #${config.lib.stylix.colors.base00};
|
||||
color: #${config.lib.stylix.colors.base05};
|
||||
}
|
||||
#workspaces button {
|
||||
padding: 0px 5px;
|
||||
background: transparent;
|
||||
color: #${config.lib.stylix.colors.base04};
|
||||
}
|
||||
#workspaces button.active {
|
||||
color: #${config.lib.stylix.colors.base08};
|
||||
}
|
||||
#workspaces button:hover {
|
||||
color: #${config.lib.stylix.colors.base08};
|
||||
}
|
||||
tooltip {
|
||||
background: #${config.lib.stylix.colors.base00};
|
||||
border: 1px solid #${config.lib.stylix.colors.base05};
|
||||
border-radius: 12px;
|
||||
}
|
||||
tooltip label {
|
||||
color: #${config.lib.stylix.colors.base05};
|
||||
}
|
||||
#window {
|
||||
padding: 0px 10px;
|
||||
}
|
||||
#pulseaudio, #cpu, #memory, #idle_inhibitor {
|
||||
padding: 0px 10px;
|
||||
background: #${config.lib.stylix.colors.base04};
|
||||
color: #${config.lib.stylix.colors.base00};
|
||||
}
|
||||
#custom-startmenu {
|
||||
color: #${config.lib.stylix.colors.base02};
|
||||
padding: 0px 14px;
|
||||
font-size: 20px;
|
||||
background: #${config.lib.stylix.colors.base0B};
|
||||
}
|
||||
#custom-hyprbindings, #network, #battery,
|
||||
#custom-notification, #custom-exit {
|
||||
background: #${config.lib.stylix.colors.base0F};
|
||||
color: #${config.lib.stylix.colors.base00};
|
||||
padding: 0px 10px;
|
||||
}
|
||||
#tray {
|
||||
background: #${config.lib.stylix.colors.base02};
|
||||
color: #${config.lib.stylix.colors.base00};
|
||||
padding: 0px 10px;
|
||||
}
|
||||
#clock {
|
||||
font-weight: bold;
|
||||
padding: 0px 10px;
|
||||
color: #${config.lib.stylix.colors.base00};
|
||||
background: #${config.lib.stylix.colors.base0E};
|
||||
}
|
||||
#custom-arrow1 {
|
||||
font-size: 24px;
|
||||
color: #${config.lib.stylix.colors.base0E};
|
||||
background: #${config.lib.stylix.colors.base02};
|
||||
}
|
||||
#custom-arrow2 {
|
||||
font-size: 24px;
|
||||
color: #${config.lib.stylix.colors.base02};
|
||||
background: #${config.lib.stylix.colors.base0F};
|
||||
}
|
||||
#custom-arrow3 {
|
||||
font-size: 24px;
|
||||
color: #${config.lib.stylix.colors.base00};
|
||||
background: #${config.lib.stylix.colors.base0F};
|
||||
}
|
||||
#custom-arrow4 {
|
||||
font-size: 24px;
|
||||
color: #${config.lib.stylix.colors.base0F};
|
||||
background: transparent;
|
||||
}
|
||||
#custom-arrow6 {
|
||||
font-size: 24px;
|
||||
color: #${config.lib.stylix.colors.base0B};
|
||||
background: #${config.lib.stylix.colors.base04};
|
||||
}
|
||||
#custom-arrow7 {
|
||||
font-size: 24px;
|
||||
color: #${config.lib.stylix.colors.base04};
|
||||
background: transparent;
|
||||
}
|
||||
''
|
||||
];
|
||||
};
|
||||
}
|
||||
82
modules/home/wezterm.nix
Normal file
@@ -0,0 +1,82 @@
|
||||
{ pkgs, ... }: {
|
||||
programs.wezterm = {
|
||||
enable = true;
|
||||
package = pkgs.wezterm;
|
||||
};
|
||||
home.file."./.config/wezterm/wezterm.lua".text = ''
|
||||
-- Config from Drew @justaguylinux small mods
|
||||
|
||||
local wezterm = require("wezterm")
|
||||
|
||||
local config = wezterm.config_builder()
|
||||
|
||||
config.enable_wayland = false
|
||||
|
||||
-- General appearance and visuals
|
||||
config.colors = {
|
||||
tab_bar = {
|
||||
background = "#00141d", -- col_gray1, your main DWM bar background
|
||||
|
||||
active_tab = {
|
||||
bg_color = "#80bfff", -- col_gray2 (selected tab in bright blue)
|
||||
fg_color = "#00141d", -- contrast text on active tab
|
||||
},
|
||||
|
||||
inactive_tab = {
|
||||
bg_color = "#1a1a1a", -- col_gray4 (dark background for inactive tabs)
|
||||
fg_color = "#FFFFFF", -- col_gray3 (white text on inactive tabs)
|
||||
},
|
||||
|
||||
new_tab = {
|
||||
bg_color = "#1a1a1a", -- same as inactive
|
||||
fg_color = "#4fc3f7", -- col_barbie (for the "+" button)
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
config.window_background_opacity = 0.90
|
||||
config.color_scheme = "nightfox"
|
||||
config.font_size = 12
|
||||
config.font = wezterm.font("FiraCode", { weight = "Regular", italic = false })
|
||||
|
||||
config.window_padding = {
|
||||
left = 10,
|
||||
right = 10,
|
||||
top = 10,
|
||||
bottom = 10,
|
||||
}
|
||||
|
||||
config.use_fancy_tab_bar = true
|
||||
config.window_frame = {
|
||||
-- font = wezterm.font({ family = "FiraCode Nerd Font Mono", weight = "Regular" }),
|
||||
font = wezterm.font({ family = "JetBrainsMono Nerd Font Mono", weight = "Regular" }),
|
||||
}
|
||||
|
||||
config.default_cursor_style = "BlinkingUnderline"
|
||||
config.cursor_blink_rate = 500
|
||||
config.term = "xterm-256color"
|
||||
config.max_fps = 144
|
||||
config.animation_fps = 30
|
||||
|
||||
-- Keybindings using ALT for tabs & splits
|
||||
config.keys = {
|
||||
-- Tab management
|
||||
{ key = "t", mods = "ALT", action = wezterm.action.SpawnTab("CurrentPaneDomain") },
|
||||
{ key = "w", mods = "ALT", action = wezterm.action.CloseCurrentTab({ confirm = false }) },
|
||||
{ key = "n", mods = "ALT", action = wezterm.action.ActivateTabRelative(1) },
|
||||
{ key = "p", mods = "ALT", action = wezterm.action.ActivateTabRelative(-1) },
|
||||
|
||||
-- Pane management
|
||||
{ key = "v", mods = "ALT", action = wezterm.action.SplitVertical({ domain = "CurrentPaneDomain" }) },
|
||||
{ key = "h", mods = "ALT", action = wezterm.action.SplitHorizontal({ domain = "CurrentPaneDomain" }) },
|
||||
{ key = "q", mods = "ALT", action = wezterm.action.CloseCurrentPane({ confirm = false }) },
|
||||
|
||||
-- Pane navigation (move between panes with ALT + Arrows)
|
||||
{ key = "LeftArrow", mods = "ALT", action = wezterm.action.ActivatePaneDirection("Left") },
|
||||
{ key = "RightArrow", mods = "ALT", action = wezterm.action.ActivatePaneDirection("Right") },
|
||||
{ key = "UpArrow", mods = "ALT", action = wezterm.action.ActivatePaneDirection("Up") },
|
||||
{ key = "DownArrow", mods = "ALT", action = wezterm.action.ActivatePaneDirection("Down") },
|
||||
}
|
||||
return config
|
||||
'';
|
||||
}
|
||||
107
modules/home/wlogout/default.nix
Normal file
@@ -0,0 +1,107 @@
|
||||
{ config, ... }:
|
||||
|
||||
{
|
||||
programs.wlogout = {
|
||||
enable = true;
|
||||
layout = [
|
||||
{
|
||||
label = "shutdown";
|
||||
action = "sleep 1; systemctl poweroff";
|
||||
text = "Shutdown";
|
||||
keybind = "s";
|
||||
}
|
||||
{
|
||||
"label" = "reboot";
|
||||
"action" = "sleep 1; systemctl reboot";
|
||||
"text" = "Reboot";
|
||||
"keybind" = "r";
|
||||
}
|
||||
{
|
||||
"label" = "logout";
|
||||
"action" = "sleep 1; hyprctl dispatch exit";
|
||||
"text" = "Exit";
|
||||
"keybind" = "e";
|
||||
}
|
||||
{
|
||||
"label" = "suspend";
|
||||
"action" = "sleep 1; systemctl suspend";
|
||||
"text" = "Suspend";
|
||||
"keybind" = "u";
|
||||
}
|
||||
{
|
||||
"label" = "lock";
|
||||
"action" = "sleep 1; hyprlock";
|
||||
"text" = "Lock";
|
||||
"keybind" = "l";
|
||||
}
|
||||
{
|
||||
"label" = "hibernate";
|
||||
"action" = "sleep 1; systemctl hibernate";
|
||||
"text" = "Hibernate";
|
||||
"keybind" = "h";
|
||||
}
|
||||
];
|
||||
style = ''
|
||||
* {
|
||||
font-family: "JetBrainsMono NF", FontAwesome, sans-serif;
|
||||
background-image: none;
|
||||
transition: 20ms;
|
||||
}
|
||||
window {
|
||||
background-color: rgba(12, 12, 12, 0.1);
|
||||
}
|
||||
button {
|
||||
color: #${config.lib.stylix.colors.base05};
|
||||
font-size:20px;
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
background-size: 25%;
|
||||
border-style: solid;
|
||||
background-color: rgba(12, 12, 12, 0.3);
|
||||
border: 3px solid #${config.lib.stylix.colors.base05};
|
||||
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
|
||||
}
|
||||
button:focus,
|
||||
button:active,
|
||||
button:hover {
|
||||
color: #${config.lib.stylix.colors.base0B};
|
||||
background-color: rgba(12, 12, 12, 0.5);
|
||||
border: 3px solid #${config.lib.stylix.colors.base0B};
|
||||
}
|
||||
#logout {
|
||||
margin: 10px;
|
||||
border-radius: 20px;
|
||||
background-image: image(url("icons/logout.png"));
|
||||
}
|
||||
#suspend {
|
||||
margin: 10px;
|
||||
border-radius: 20px;
|
||||
background-image: image(url("icons/suspend.png"));
|
||||
}
|
||||
#shutdown {
|
||||
margin: 10px;
|
||||
border-radius: 20px;
|
||||
background-image: image(url("icons/shutdown.png"));
|
||||
}
|
||||
#reboot {
|
||||
margin: 10px;
|
||||
border-radius: 20px;
|
||||
background-image: image(url("icons/reboot.png"));
|
||||
}
|
||||
#lock {
|
||||
margin: 10px;
|
||||
border-radius: 20px;
|
||||
background-image: image(url("icons/lock.png"));
|
||||
}
|
||||
#hibernate {
|
||||
margin: 10px;
|
||||
border-radius: 20px;
|
||||
background-image: image(url("icons/hibernate.png"));
|
||||
}
|
||||
'';
|
||||
};
|
||||
home.file.".config/wlogout/icons" = {
|
||||
source = ./icons;
|
||||
recursive = true;
|
||||
};
|
||||
}
|
||||
BIN
modules/home/wlogout/icons/hibernate.png
Normal file
|
After Width: | Height: | Size: 4.6 KiB |
BIN
modules/home/wlogout/icons/lock.png
Normal file
|
After Width: | Height: | Size: 2.9 KiB |
BIN
modules/home/wlogout/icons/logout.png
Normal file
|
After Width: | Height: | Size: 3.6 KiB |
BIN
modules/home/wlogout/icons/reboot.png
Normal file
|
After Width: | Height: | Size: 3.9 KiB |
BIN
modules/home/wlogout/icons/shutdown.png
Normal file
|
After Width: | Height: | Size: 4.0 KiB |
BIN
modules/home/wlogout/icons/suspend.png
Normal file
|
After Width: | Height: | Size: 4.4 KiB |
14
modules/home/xdg.nix
Normal file
@@ -0,0 +1,14 @@
|
||||
{ pkgs, ... }: {
|
||||
xdg = {
|
||||
enable = true;
|
||||
mime.enable = true;
|
||||
mimeApps = {
|
||||
enable = true;
|
||||
};
|
||||
portal = {
|
||||
enable = true;
|
||||
extraPortals = [ pkgs.xdg-desktop-portal-hyprland ];
|
||||
configPackages = [ pkgs.hyprland ];
|
||||
};
|
||||
};
|
||||
}
|
||||
32
modules/home/yazi/default.nix
Normal file
@@ -0,0 +1,32 @@
|
||||
{ pkgs, ... }:
|
||||
let
|
||||
settings = import ./yazi.nix;
|
||||
keymap = import ./keymap.nix;
|
||||
theme = import ./theme.nix;
|
||||
in
|
||||
{
|
||||
programs.yazi = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
enableBashIntegration = true;
|
||||
enableFishIntegration = true;
|
||||
shellWrapperName = "yy";
|
||||
settings = settings;
|
||||
keymap = keymap;
|
||||
theme = theme;
|
||||
plugins = {
|
||||
lazygit = pkgs.yaziPlugins.lazygit;
|
||||
full-border = pkgs.yaziPlugins.full-border;
|
||||
git = pkgs.yaziPlugins.git;
|
||||
smart-enter = pkgs.yaziPlugins.smart-enter;
|
||||
};
|
||||
|
||||
initLua = ''
|
||||
require("full-border"):setup()
|
||||
require("git"):setup()
|
||||
require("smart-enter"):setup {
|
||||
open_multi = true,
|
||||
}
|
||||
'';
|
||||
};
|
||||
}
|
||||
1201
modules/home/yazi/keymap.nix
Normal file
3404
modules/home/yazi/theme.nix
Normal file
389
modules/home/yazi/yazi.nix
Normal file
@@ -0,0 +1,389 @@
|
||||
{
|
||||
settings = {
|
||||
manager = {
|
||||
ratio = [ 1 4 3 ];
|
||||
sort_by = "alphabetical";
|
||||
sort_sensitive = false;
|
||||
sort_reverse = false;
|
||||
sort_dir_first = true;
|
||||
sort_translit = false;
|
||||
linemode = "none";
|
||||
show_hidden = false;
|
||||
show_symlink = true;
|
||||
scrolloff = 5;
|
||||
mouse_events = [ "click" "scroll" ];
|
||||
title_format = "Yazi: {cwd}";
|
||||
};
|
||||
preview = {
|
||||
wrap = "no";
|
||||
tab_size = 2;
|
||||
max_width = 600;
|
||||
max_height = 900;
|
||||
cache_dir = "";
|
||||
image_delay = 30;
|
||||
image_filter = "triangle";
|
||||
image_quality = 75;
|
||||
sixel_fraction = 15;
|
||||
ueberzug_scale = 1;
|
||||
ueberzug_offset = [ 0 0 0 0 ];
|
||||
};
|
||||
opener = {
|
||||
edit = [
|
||||
{
|
||||
run = ''${"EDITOR:-vi"} "$@"'';
|
||||
desc = "$EDITOR";
|
||||
block = true;
|
||||
for = "unix";
|
||||
}
|
||||
{
|
||||
run = "code %*";
|
||||
orphan = true;
|
||||
desc = "code";
|
||||
for = "windows";
|
||||
}
|
||||
{
|
||||
run = "code -w %*";
|
||||
block = true;
|
||||
desc = "code (block)";
|
||||
for = "windows";
|
||||
}
|
||||
];
|
||||
open = [
|
||||
{
|
||||
run = ''xdg-open "$1"'';
|
||||
desc = "Open";
|
||||
for = "linux";
|
||||
}
|
||||
{
|
||||
run = ''open "$@"'';
|
||||
desc = "Open";
|
||||
for = "macos";
|
||||
}
|
||||
{
|
||||
run = ''start "" "%1"'';
|
||||
orphan = true;
|
||||
desc = "Open";
|
||||
for = "windows";
|
||||
}
|
||||
{
|
||||
run = ''termux-open "$1"'';
|
||||
desc = "Open";
|
||||
for = "android";
|
||||
}
|
||||
];
|
||||
reveal = [
|
||||
{
|
||||
run = ''xdg-open "$(dirname "$1")"'';
|
||||
desc = "Reveal";
|
||||
for = "linux";
|
||||
}
|
||||
{
|
||||
run = ''open -R "$1"'';
|
||||
desc = "Reveal";
|
||||
for = "macos";
|
||||
}
|
||||
{
|
||||
run = ''explorer /select,"%1"'';
|
||||
orphan = true;
|
||||
desc = "Reveal";
|
||||
for = "windows";
|
||||
}
|
||||
{
|
||||
run = ''termux-open "$(dirname "$1")"'';
|
||||
desc = "Reveal";
|
||||
for = "android";
|
||||
}
|
||||
{
|
||||
run = ''exiftool "$1"; echo "Press enter to exit"; read _'';
|
||||
block = true;
|
||||
desc = "Show EXIF";
|
||||
for = "unix";
|
||||
}
|
||||
];
|
||||
extract = [
|
||||
{
|
||||
run = ''ya pub extract --list "$@"'';
|
||||
desc = "Extract here";
|
||||
for = "unix";
|
||||
}
|
||||
{
|
||||
run = "ya pub extract --list %*";
|
||||
desc = "Extract here";
|
||||
for = "windows";
|
||||
}
|
||||
];
|
||||
play = [
|
||||
{
|
||||
run = ''mpv --force-window "$@"'';
|
||||
orphan = true;
|
||||
for = "unix";
|
||||
}
|
||||
{
|
||||
run = "mpv --force-window %*";
|
||||
orphan = true;
|
||||
for = "windows";
|
||||
}
|
||||
{
|
||||
run = ''mediainfo "$1"; echo "Press enter to exit"; read _'';
|
||||
block = true;
|
||||
desc = "Show media info";
|
||||
for = "unix";
|
||||
}
|
||||
];
|
||||
};
|
||||
open = {
|
||||
rules = [
|
||||
{
|
||||
name = "*/";
|
||||
use = [ "edit" "open" "reveal" ];
|
||||
}
|
||||
{
|
||||
mime = "text/*";
|
||||
use = [ "edit" "reveal" ];
|
||||
}
|
||||
{
|
||||
mime = "image/*";
|
||||
use = [ "open" "reveal" ];
|
||||
}
|
||||
{
|
||||
mime = "{audio,video}/*";
|
||||
use = [ "play" "reveal" ];
|
||||
}
|
||||
{
|
||||
mime =
|
||||
"application/{zip,rar,7z*,tar,gzip,xz,zstd,bzip*,lzma,compress,archive,cpio,arj,xar,ms-cab*}";
|
||||
use = [ "extract" "reveal" ];
|
||||
}
|
||||
{
|
||||
mime = "application/{json,ndjson}";
|
||||
use = [ "edit" "reveal" ];
|
||||
}
|
||||
{
|
||||
mime = "*/javascript";
|
||||
use = [ "edit" "reveal" ];
|
||||
}
|
||||
{
|
||||
mime = "inode/empty";
|
||||
use = [ "edit" "reveal" ];
|
||||
}
|
||||
{
|
||||
name = "*";
|
||||
use = [ "open" "reveal" ];
|
||||
}
|
||||
];
|
||||
};
|
||||
tasks = {
|
||||
micro_workers = 10;
|
||||
macro_workers = 10;
|
||||
bizarre_retry = 3;
|
||||
image_alloc = 536870912;
|
||||
image_bound = [ 0 0 ];
|
||||
suppress_preload = false;
|
||||
};
|
||||
plugin = {
|
||||
fetchers = [{
|
||||
id = "mime";
|
||||
name = "*";
|
||||
run = "mime";
|
||||
prio = "high";
|
||||
}];
|
||||
spotters = [
|
||||
{
|
||||
name = "*/";
|
||||
run = "folder";
|
||||
}
|
||||
{
|
||||
mime = "text/*";
|
||||
run = "code";
|
||||
}
|
||||
{
|
||||
mime = "application/{mbox,javascript,wine-extension-ini}";
|
||||
run = "code";
|
||||
}
|
||||
{
|
||||
mime = "image/{avif,hei?,jxl,svg+xml}";
|
||||
run = "magick";
|
||||
}
|
||||
{
|
||||
mime = "image/*";
|
||||
run = "image";
|
||||
}
|
||||
{
|
||||
mime = "video/*";
|
||||
run = "video";
|
||||
}
|
||||
{
|
||||
name = "*";
|
||||
run = "file";
|
||||
}
|
||||
];
|
||||
preloaders = [
|
||||
{
|
||||
mime = "image/{avif,hei?,jxl,svg+xml}";
|
||||
run = "magick";
|
||||
}
|
||||
{
|
||||
mime = "image/*";
|
||||
run = "image";
|
||||
}
|
||||
{
|
||||
mime = "video/*";
|
||||
run = "video";
|
||||
}
|
||||
{
|
||||
mime = "application/pdf";
|
||||
run = "pdf";
|
||||
}
|
||||
{
|
||||
mime = "font/*";
|
||||
run = "font";
|
||||
}
|
||||
{
|
||||
mime = "application/ms-opentype";
|
||||
run = "font";
|
||||
}
|
||||
];
|
||||
previewers = [
|
||||
{
|
||||
name = "*/";
|
||||
run = "folder";
|
||||
sync = true;
|
||||
}
|
||||
{
|
||||
mime = "text/*";
|
||||
run = "code";
|
||||
}
|
||||
{
|
||||
mime = "application/{mbox,javascript,wine-extension-ini}";
|
||||
run = "code";
|
||||
}
|
||||
{
|
||||
mime = "application/{json,ndjson}";
|
||||
run = "json";
|
||||
}
|
||||
{
|
||||
mime = "image/{avif,hei?,jxl,svg+xml}";
|
||||
run = "magick";
|
||||
}
|
||||
{
|
||||
mime = "image/*";
|
||||
run = "image";
|
||||
}
|
||||
{
|
||||
mime = "video/*";
|
||||
run = "video";
|
||||
}
|
||||
{
|
||||
mime = "application/pdf";
|
||||
run = "pdf";
|
||||
}
|
||||
{
|
||||
mime =
|
||||
"application/{zip,rar,7z*,tar,gzip,xz,zstd,bzip*,lzma,compress,archive,cpio,arj,xar,ms-cab*}";
|
||||
run = "archive";
|
||||
}
|
||||
{
|
||||
mime =
|
||||
"application/{debian*-package,redhat-package-manager,rpm,android.package-archive}";
|
||||
run = "archive";
|
||||
}
|
||||
{
|
||||
name = "*.{AppImage,appimage}";
|
||||
run = "archive";
|
||||
}
|
||||
{
|
||||
mime = "application/{iso9660-image,qemu-disk,ms-wim,apple-diskimage}";
|
||||
run = "archive";
|
||||
}
|
||||
{
|
||||
mime = "application/virtualbox-{vhd,vhdx}";
|
||||
run = "archive";
|
||||
}
|
||||
{
|
||||
name = "*.{img,fat,ext,ext2,ext3,ext4,squashfs,ntfs,hfs,hfsx}";
|
||||
run = "archive";
|
||||
}
|
||||
{
|
||||
mime = "font/*";
|
||||
run = "font";
|
||||
}
|
||||
{
|
||||
mime = "application/ms-opentype";
|
||||
run = "font";
|
||||
}
|
||||
{
|
||||
mime = "inode/empty";
|
||||
run = "empty";
|
||||
}
|
||||
{
|
||||
name = "*";
|
||||
run = "file";
|
||||
}
|
||||
];
|
||||
prepend_fetchers = [
|
||||
{
|
||||
id = "git";
|
||||
name = "*";
|
||||
run = "git";
|
||||
}
|
||||
{
|
||||
id = "git";
|
||||
name = "*/";
|
||||
run = "git";
|
||||
}
|
||||
];
|
||||
};
|
||||
input = {
|
||||
cursor_blink = false;
|
||||
cd_title = "Change directory:";
|
||||
cd_origin = "top-center";
|
||||
cd_offset = [ 0 2 50 3 ];
|
||||
create_title = [ "Create:" "Create (dir):" ];
|
||||
create_origin = "top-center";
|
||||
create_offset = [ 0 2 50 3 ];
|
||||
rename_title = "Rename:";
|
||||
rename_origin = "hovered";
|
||||
rename_offset = [ 0 1 50 3 ];
|
||||
filter_title = "Filter:";
|
||||
filter_origin = "top-center";
|
||||
filter_offset = [ 0 2 50 3 ];
|
||||
find_title = [ "Find next:" "Find previous:" ];
|
||||
find_origin = "top-center";
|
||||
find_offset = [ 0 2 50 3 ];
|
||||
search_title = "Search via {n}:";
|
||||
search_origin = "top-center";
|
||||
search_offset = [ 0 2 50 3 ];
|
||||
shell_title = [ "Shell:" "Shell (block):" ];
|
||||
shell_origin = "top-center";
|
||||
shell_offset = [ 0 2 50 3 ];
|
||||
};
|
||||
confirm = {
|
||||
trash_title = "Trash {n} selected file{s}?";
|
||||
trash_origin = "center";
|
||||
trash_offset = [ 0 0 70 20 ];
|
||||
delete_title = "Permanently delete {n} selected file{s}?";
|
||||
delete_origin = "center";
|
||||
delete_offset = [ 0 0 70 20 ];
|
||||
overwrite_title = "Overwrite file?";
|
||||
overwrite_content = "Will overwrite the following file:";
|
||||
overwrite_origin = "center";
|
||||
overwrite_offset = [ 0 0 50 15 ];
|
||||
quit_title = "Quit?";
|
||||
quit_content =
|
||||
"The following tasks are still running, are you sure you want to quit?";
|
||||
quit_origin = "center";
|
||||
quit_offset = [ 0 0 50 15 ];
|
||||
};
|
||||
pick = {
|
||||
open_title = "Open with:";
|
||||
open_origin = "hovered";
|
||||
open_offset = [ 0 1 50 7 ];
|
||||
};
|
||||
which = {
|
||||
sort_by = "none";
|
||||
sort_sensitive = false;
|
||||
sort_reverse = false;
|
||||
sort_translit = false;
|
||||
};
|
||||
};
|
||||
}
|
||||
13
modules/home/zoxide.nix
Normal file
@@ -0,0 +1,13 @@
|
||||
_: {
|
||||
programs = {
|
||||
zoxide = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
enableBashIntegration = true;
|
||||
options = [
|
||||
"--cmd cd"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
64
modules/home/zsh/default.nix
Normal file
@@ -0,0 +1,64 @@
|
||||
{ profile
|
||||
, pkgs
|
||||
, lib
|
||||
, ...
|
||||
}: {
|
||||
imports = [
|
||||
./zshrc-personal.nix
|
||||
];
|
||||
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
autosuggestion.enable = true;
|
||||
syntaxHighlighting = {
|
||||
enable = true;
|
||||
highlighters = [ "main" "brackets" "pattern" "regexp" "root" "line" ];
|
||||
};
|
||||
historySubstringSearch.enable = true;
|
||||
|
||||
history = {
|
||||
ignoreDups = true;
|
||||
save = 10000;
|
||||
size = 10000;
|
||||
};
|
||||
|
||||
oh-my-zsh = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
plugins = [
|
||||
{
|
||||
name = "powerlevel10k";
|
||||
src = pkgs.zsh-powerlevel10k;
|
||||
file = "share/zsh-powerlevel10k/powerlevel10k.zsh-theme";
|
||||
}
|
||||
{
|
||||
name = "powerlevel10k-config";
|
||||
src = lib.cleanSource ./p10k-config;
|
||||
file = "p10k.zsh";
|
||||
}
|
||||
];
|
||||
|
||||
initContent = ''
|
||||
bindkey "\eh" backward-word
|
||||
bindkey "\ej" down-line-or-history
|
||||
bindkey "\ek" up-line-or-history
|
||||
bindkey "\el" forward-word
|
||||
if [ -f $HOME/.zshrc-personal ]; then
|
||||
source $HOME/.zshrc-personal
|
||||
fi
|
||||
'';
|
||||
|
||||
shellAliases = {
|
||||
sv = "sudo nvim";
|
||||
v = "nvim";
|
||||
c = "clear";
|
||||
fr = "nh os switch --hostname ${profile}";
|
||||
fu = "nh os switch --hostname ${profile} --update";
|
||||
zu = "sh <(curl -L https://gitlab.com/Zaney/zaneyos/-/releases/latest/download/install-zaneyos.sh)";
|
||||
ncg = "nix-collect-garbage --delete-old && sudo nix-collect-garbage -d && sudo /run/current-system/bin/switch-to-configuration boot";
|
||||
cat = "bat";
|
||||
man = "batman";
|
||||
};
|
||||
};
|
||||
}
|
||||
1827
modules/home/zsh/p10k-config/p10k.zsh
Normal file
20
modules/home/zsh/zshrc-personal.nix
Normal file
@@ -0,0 +1,20 @@
|
||||
{ pkgs, ... }: {
|
||||
home.packages = with pkgs; [ zsh ];
|
||||
|
||||
home.file."./.zshrc-personal".text = ''
|
||||
|
||||
# This file allows you to define your own aliases, functions, etc
|
||||
# below are just some examples of what you can use this file for
|
||||
|
||||
#!/usr/bin/env zsh
|
||||
# Set defaults
|
||||
#
|
||||
#export EDITOR="nvim"
|
||||
#export VISUAL="nvim"
|
||||
|
||||
#alias c="clear"
|
||||
|
||||
|
||||
'';
|
||||
}
|
||||
|
||||