probably broken
146
system/users/default.nix
Normal file
@@ -0,0 +1,146 @@
|
||||
{ config, lib, pkgs, inputs, ... }: {
|
||||
|
||||
imports = let
|
||||
dir = builtins.readDir ./.;
|
||||
in (builtins.filter
|
||||
(file: (dir.${file} == "directory"))
|
||||
(builtins.attrNames dir)
|
||||
);
|
||||
|
||||
options.sysconfig = with lib; {
|
||||
|
||||
sshHostKeys = lib.mkOption {
|
||||
type = with lib.types; attrsOf str;
|
||||
default = {};
|
||||
};
|
||||
|
||||
users = let
|
||||
|
||||
userType = types.submodule ({ name, ... }: {
|
||||
options = with lib; {
|
||||
name = mkOption {
|
||||
type = with types; passwdEntry str;
|
||||
default = name;
|
||||
};
|
||||
|
||||
home-manager = {
|
||||
enable = mkOption {
|
||||
type = with types; bool;
|
||||
default = false;
|
||||
};
|
||||
|
||||
standalone = mkOption {
|
||||
type = with types; bool;
|
||||
default = true;
|
||||
description = "is this home-manager standalone?";
|
||||
};
|
||||
|
||||
extraModules = mkOption {
|
||||
type = with types; listOf raw;
|
||||
default = [];
|
||||
};
|
||||
};
|
||||
|
||||
isSuperuser = mkOption {
|
||||
type = with types; bool;
|
||||
default = false;
|
||||
description = "sudo?";
|
||||
};
|
||||
|
||||
usePresets = mkOption {
|
||||
type = with types; bool;
|
||||
default = true;
|
||||
description = "search for predefined settings?";
|
||||
};
|
||||
|
||||
ssh = {
|
||||
keys = mkOption {
|
||||
type = with types; listOf str;
|
||||
default = [];
|
||||
description = "public keys used to login as this user";
|
||||
};
|
||||
|
||||
hosts = mkOption {
|
||||
type = with types; listOf str;
|
||||
default = [];
|
||||
description = "user@host's used to login as this user";
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
uid = mkOption {
|
||||
type = with types; nullOr int;
|
||||
default = null;
|
||||
};
|
||||
|
||||
hashedPasswordFile = mkOption {
|
||||
type = with types; nullOr str;
|
||||
default = null;
|
||||
};
|
||||
|
||||
extraGroups = mkOption {
|
||||
type = with types; listOf str;
|
||||
default = [];
|
||||
};
|
||||
|
||||
shell = mkOption {
|
||||
type = with types; package;
|
||||
default = pkgs.shadow;
|
||||
};
|
||||
};
|
||||
});
|
||||
|
||||
in lib.mkOption {
|
||||
type = with lib.types; attrsOf userType;
|
||||
default = {};
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
config = lib.mkIf (config.sysconfig.host != "android") {
|
||||
users.users = builtins.mapAttrs (x: y: let
|
||||
cfg = config.sysconfig.users.${x};
|
||||
in {
|
||||
name = cfg.name;
|
||||
isNormalUser = true;
|
||||
uid = cfg.uid;
|
||||
hashedPasswordFile = lib.mkIf (cfg.hashedPasswordFile != null) cfg.hashedPasswordFile;
|
||||
shell = cfg.shell;
|
||||
extraGroups = cfg.extraGroups ++ (if cfg.isSuperuser then [ "wheel" ] else []);
|
||||
openssh.authorizedKeys.keys = lib.mkIf config.sysconfig.services.openssh.enable (cfg.ssh.keys ++ (map (z: config.sysconfig.sshHostKeys.${z}) cfg.ssh.hosts));
|
||||
packages = with pkgs; lib.mkIf (cfg.home-manager.enable && cfg.home-manager.standalone) [ home-manager ];
|
||||
}) config.sysconfig.users;
|
||||
|
||||
programs.fuse.userAllowOther = true;
|
||||
|
||||
home-manager = {
|
||||
backupFileExtension = "backup";
|
||||
extraSpecialArgs = { inherit inputs; };
|
||||
useUserPackages = true;
|
||||
sharedModules = [
|
||||
inputs.sops-nix.homeManagerModules.sops
|
||||
];
|
||||
users = builtins.listToAttrs (builtins.map
|
||||
(x: {
|
||||
name = x;
|
||||
value = (lib.mkMerge ([
|
||||
|
||||
(if let
|
||||
dir = builtins.readDir ./.;
|
||||
in dir ? ${x} && dir.${x} == "directory" then
|
||||
import ./${x}/home-manager
|
||||
else {})
|
||||
|
||||
(if inputs ? ${x} then inputs.${x} else {})
|
||||
|
||||
] ++ config.sysconfig.users.${x}.home-manager.extraModules));
|
||||
})
|
||||
(builtins.filter
|
||||
(y: (config.sysconfig.users.${y}.home-manager.enable && !config.sysconfig.users.${y}.home-manager.standalone))
|
||||
(builtins.attrNames config.sysconfig.users)
|
||||
)
|
||||
);
|
||||
|
||||
};
|
||||
};
|
||||
}
|
||||
5
system/users/nathan/default.nix
Normal file
@@ -0,0 +1,5 @@
|
||||
{ ... }: {
|
||||
imports = [
|
||||
./system
|
||||
];
|
||||
}
|
||||
109
system/users/nathan/home-manager/default.nix
Normal file
@@ -0,0 +1,109 @@
|
||||
{ config, lib, pkgs, inputs, ... }: {
|
||||
|
||||
imports = [
|
||||
./programs
|
||||
./services
|
||||
./packages
|
||||
./dotfiles
|
||||
];
|
||||
|
||||
options.homeconfig = with lib; {
|
||||
|
||||
name = mkOption {
|
||||
type = with types; nullOr str;
|
||||
default = null;
|
||||
};
|
||||
|
||||
graphical = mkOption {
|
||||
type = with types; bool;
|
||||
default = true;
|
||||
};
|
||||
|
||||
standalone = mkOption {
|
||||
type = with types; bool;
|
||||
default = false;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
config = {
|
||||
|
||||
homeconfig = {
|
||||
name = "nathan";
|
||||
|
||||
mpd.enable = lib.mkDefault true;
|
||||
calcurse.enable = lib.mkDefault true;
|
||||
git.enable = lib.mkDefault true;
|
||||
nh.enable = lib.mkDefault true;
|
||||
|
||||
minimal = lib.mkDefault false;
|
||||
hyprland.enable = lib.mkDefault config.homeconfig.graphical && !config.homeconfig.standalone;
|
||||
hyprlock.enable = lib.mkDefault config.homeconfig.hyprland.enable;
|
||||
wal.enable = lib.mkDefault config.homeconfig.graphical;
|
||||
hyprpanel.enable = lib.mkDefault config.homeconfig.hyprland.enable;
|
||||
rofi.enable = lib.mkDefault config.homeconfig.hyprland.enable;
|
||||
firefox.enable = lib.mkDefault config.homeconfig.graphical;
|
||||
};
|
||||
|
||||
home.username = lib.mkDefault config.homeconfig.name;
|
||||
|
||||
home.homeDirectory = lib.mkDefault "/home/${config.home.username}";
|
||||
|
||||
programs.home-manager.enable = config.homeconfig.standalone;
|
||||
|
||||
home.stateVersion = "23.11";
|
||||
|
||||
home.pointerCursor = lib.mkIf config.homeconfig.graphical {
|
||||
gtk.enable = true;
|
||||
package = pkgs.bibata-cursors;
|
||||
name = "Bibata-Modern-Classic";
|
||||
size = 16;
|
||||
};
|
||||
|
||||
gtk = lib.mkIf config.homeconfig.graphical {
|
||||
enable = true;
|
||||
theme.name = "Tokyonight-Dark";
|
||||
theme.package = pkgs.tokyonight-gtk-theme;
|
||||
iconTheme.package = pkgs.rose-pine-icon-theme;
|
||||
iconTheme.name = "rose-pine-moon";
|
||||
};
|
||||
|
||||
sops = {
|
||||
age.keyFile = "${config.home.homeDirectory}/.config/sops/age/keys.txt";
|
||||
defaultSopsFile = ./secrets.yaml;
|
||||
defaultSopsFormat = "yaml";
|
||||
};
|
||||
|
||||
nix = lib.mkIf config.homeconfig.standalone {
|
||||
nixPath = [ "nixpkgs=${inputs.nixpkgs}" ];
|
||||
settings = {
|
||||
experimental-features = [ "nix-command" "flakes" ];
|
||||
builders = "ssh://builder x86_64-linux,aarch64-linux /run/secrets/remoteBuildKey 1 1 nixos-test,benchmark,big-parallel,kvm - -";
|
||||
builders-use-substituters = true;
|
||||
};
|
||||
};
|
||||
|
||||
services.mpris-proxy.enable = true;
|
||||
|
||||
programs.ssh = {
|
||||
enable = true;
|
||||
|
||||
matchBlocks = {
|
||||
"builder" = {
|
||||
hostname = "blunkall.us";
|
||||
user = "remote-builder";
|
||||
identityFile = "${config.home.homeDirectory}/.ssh/id_ed25519";
|
||||
port = 2222;
|
||||
};
|
||||
|
||||
"remote" = {
|
||||
hostname = "blunkall.us";
|
||||
user = "nathan";
|
||||
identityFile = "${config.home.homeDirectory}/.ssh/id_ed25519";
|
||||
port = 2222;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
BIN
system/users/nathan/home-manager/dotfiles/Wallpaper/Tron.jpg
Normal file
|
After Width: | Height: | Size: 1.4 MiB |
|
After Width: | Height: | Size: 1.0 MiB |
BIN
system/users/nathan/home-manager/dotfiles/Wallpaper/galaxy.jpg
Normal file
|
After Width: | Height: | Size: 1007 KiB |
BIN
system/users/nathan/home-manager/dotfiles/Wallpaper/kurisu.gif
Normal file
|
After Width: | Height: | Size: 110 MiB |
BIN
system/users/nathan/home-manager/dotfiles/Wallpaper/kurisu.jpg
Normal file
|
After Width: | Height: | Size: 191 KiB |
BIN
system/users/nathan/home-manager/dotfiles/Wallpaper/llenn.png
Normal file
|
After Width: | Height: | Size: 874 KiB |
BIN
system/users/nathan/home-manager/dotfiles/Wallpaper/megumin.png
Normal file
|
After Width: | Height: | Size: 1.5 MiB |
BIN
system/users/nathan/home-manager/dotfiles/Wallpaper/megumin1.gif
Normal file
|
After Width: | Height: | Size: 48 MiB |
BIN
system/users/nathan/home-manager/dotfiles/Wallpaper/megumin2.gif
Normal file
|
After Width: | Height: | Size: 203 MiB |
BIN
system/users/nathan/home-manager/dotfiles/Wallpaper/ngnl.jpg
Normal file
|
After Width: | Height: | Size: 670 KiB |
|
After Width: | Height: | Size: 273 KiB |
BIN
system/users/nathan/home-manager/dotfiles/Wallpaper/pink_fc.mp4
Normal file
BIN
system/users/nathan/home-manager/dotfiles/Wallpaper/rezero.gif
Normal file
|
After Width: | Height: | Size: 140 MiB |
BIN
system/users/nathan/home-manager/dotfiles/Wallpaper/sao.gif
Normal file
|
After Width: | Height: | Size: 3.1 MiB |
BIN
system/users/nathan/home-manager/dotfiles/Wallpaper/sao.png
Normal file
|
After Width: | Height: | Size: 2.8 MiB |
BIN
system/users/nathan/home-manager/dotfiles/Wallpaper/sinon.gif
Normal file
|
After Width: | Height: | Size: 36 MiB |
11
system/users/nathan/home-manager/dotfiles/default.nix
Normal file
@@ -0,0 +1,11 @@
|
||||
{ config, lib, ... }: {
|
||||
|
||||
home.file = {
|
||||
".config/hypr" = lib.mkIf config.homeconfig.hyprland.enable { source = ./hypr; recursive = true; };
|
||||
".config/hyprpanel" = lib.mkIf config.homeconfig.hyprpanel.enable { source = ./hyprpanel; recursive = true; };
|
||||
".config/wal/templates" = lib.mkIf config.homeconfig.wal.enable { source = ./wal/templates; recursive = true; };
|
||||
".config/ohmyposh" = { source = ./ohmyposh; recursive = true; };
|
||||
"Pictures/Wallpaper" = lib.mkIf config.homeconfig.graphical { source = ./Wallpaper; recursive = true; };
|
||||
};
|
||||
|
||||
}
|
||||
106
system/users/nathan/home-manager/dotfiles/hypr/hyprlock.conf
Normal file
@@ -0,0 +1,106 @@
|
||||
# sample hyprlock.conf
|
||||
# for more configuration options, refer https://wiki.hyprland.org/Hypr-Ecosystem/hyprlock
|
||||
#
|
||||
# rendered text in all widgets supports pango markup (e.g. <b> or <i> tags)
|
||||
# ref. https://wiki.hyprland.org/Hypr-Ecosystem/hyprlock/#general-remarks
|
||||
#
|
||||
# shortcuts to clear password buffer: ESC, Ctrl+U, Ctrl+Backspace
|
||||
#
|
||||
# you can get started by copying this config to ~/.config/hypr/hyprlock.conf
|
||||
#
|
||||
|
||||
$font = Monospace
|
||||
|
||||
general {
|
||||
hide_cursor = false
|
||||
}
|
||||
|
||||
# uncomment to enable fingerprint authentication
|
||||
# auth {
|
||||
# fingerprint {
|
||||
# enabled = true
|
||||
# ready_message = Scan fingerprint to unlock
|
||||
# present_message = Scanning...
|
||||
# retry_delay = 250 # in milliseconds
|
||||
# }
|
||||
# }
|
||||
|
||||
animations {
|
||||
enabled = true
|
||||
bezier = linear, 1, 1, 0, 0
|
||||
animation = fadeIn, 1, 5, linear
|
||||
animation = fadeOut, 1, 5, linear
|
||||
animation = inputFieldDots, 1, 2, linear
|
||||
}
|
||||
|
||||
background {
|
||||
monitor =
|
||||
path = screenshot
|
||||
blur_passes = 3
|
||||
}
|
||||
|
||||
input-field {
|
||||
monitor =
|
||||
size = 20%, 5%
|
||||
outline_thickness = 3
|
||||
inner_color = rgba(0, 0, 0, 0.0) # no fill
|
||||
|
||||
outer_color = rgba(33ccffee) rgba(00ff99ee) 45deg
|
||||
check_color = rgba(00ff99ee) rgba(ff6633ee) 120deg
|
||||
fail_color = rgba(ff6633ee) rgba(ff0066ee) 40deg
|
||||
|
||||
font_color = rgb(143, 143, 143)
|
||||
fade_on_empty = false
|
||||
rounding = 15
|
||||
|
||||
font_family = $font
|
||||
placeholder_text = Input password...
|
||||
fail_text = $PAMFAIL
|
||||
|
||||
# uncomment to use a letter instead of a dot to indicate the typed password
|
||||
# dots_text_format = *
|
||||
# dots_size = 0.4
|
||||
dots_spacing = 0.3
|
||||
|
||||
# uncomment to use an input indicator that does not show the password length (similar to swaylock's input indicator)
|
||||
# hide_input = true
|
||||
|
||||
position = 0, -20
|
||||
halign = center
|
||||
valign = center
|
||||
}
|
||||
|
||||
# TIME
|
||||
label {
|
||||
monitor =
|
||||
text = $TIME # ref. https://wiki.hyprland.org/Hypr-Ecosystem/hyprlock/#variable-substitution
|
||||
font_size = 90
|
||||
font_family = $font
|
||||
|
||||
position = -30, 0
|
||||
halign = right
|
||||
valign = top
|
||||
}
|
||||
|
||||
# DATE
|
||||
label {
|
||||
monitor =
|
||||
text = cmd[update:60000] date +"%A, %d %B %Y" # update every 60 seconds
|
||||
font_size = 25
|
||||
font_family = $font
|
||||
|
||||
position = -30, -150
|
||||
halign = right
|
||||
valign = top
|
||||
}
|
||||
|
||||
label {
|
||||
monitor =
|
||||
text = $LAYOUT[en,ru]
|
||||
font_size = 24
|
||||
onclick = hyprctl switchxkblayout all next
|
||||
|
||||
position = 250, -20
|
||||
halign = center
|
||||
valign = center
|
||||
}
|
||||
301
system/users/nathan/home-manager/dotfiles/hypr/main.conf
Normal file
@@ -0,0 +1,301 @@
|
||||
|
||||
#------------------------------------------------#
|
||||
# _ _ _ _ #
|
||||
#| | | | | | | | #
|
||||
#| |___| |_ _ ____ _ _| | __ _.-.___ ___| | #
|
||||
#| ___ | | | | _ \| |/ | |/ _` | _ \/ _ | #
|
||||
#| | | | |_| | |_) | /| | (_| | | | | (_| | #
|
||||
#|_| |_|\__, | __/|__| |_|\__,_|_| |_|\___/_| #
|
||||
# |___/|_| #
|
||||
# #
|
||||
#------------------------------------------------#
|
||||
|
||||
exec-once=onSystemStart
|
||||
|
||||
# Some default env vars.
|
||||
env = XCURSOR_SIZE,16
|
||||
|
||||
source = ~/.config/hypr/otf.conf
|
||||
source = ~/.cache/wal/colors-hypr.conf
|
||||
|
||||
# For all categories, see https://wiki.hyprland.org/Configuring/Variables/
|
||||
input {
|
||||
kb_layout = us
|
||||
kb_variant =
|
||||
kb_model =
|
||||
kb_options =
|
||||
kb_rules =
|
||||
|
||||
follow_mouse = 1
|
||||
|
||||
touchpad {
|
||||
natural_scroll = yes
|
||||
}
|
||||
|
||||
sensitivity = 0 # -1.0 - 1.0, 0 means no modification.
|
||||
}
|
||||
|
||||
cursor {
|
||||
no_hardware_cursors = true
|
||||
}
|
||||
|
||||
general {
|
||||
# See https://wiki.hyprland.org/Configuring/Variables/ for more
|
||||
|
||||
gaps_in = 5
|
||||
gaps_out = 4
|
||||
border_size = 2
|
||||
col.active_border = $color1 $color5 100deg
|
||||
col.inactive_border = $color0
|
||||
|
||||
layout = master
|
||||
}
|
||||
decoration { # See https://wiki.hyprland.org/Configuring/Variables/ for more
|
||||
|
||||
rounding = 2
|
||||
|
||||
blur {
|
||||
enabled = false
|
||||
}
|
||||
|
||||
|
||||
#drop_shadow = yes
|
||||
#shadow_range = 4
|
||||
#shadow_render_power = 3
|
||||
#col.shadow = rgba(1a1a1aee)
|
||||
}
|
||||
|
||||
animations {
|
||||
enabled = yes
|
||||
|
||||
# Some default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more
|
||||
|
||||
bezier = myBezier, 0.05, 0.9, 0.1, 1.05
|
||||
|
||||
animation = windows, 1, 7, myBezier
|
||||
animation = windowsOut, 1, 7, default, popin 80%
|
||||
animation = border, 1, 10, default
|
||||
animation = borderangle, 1, 8, default
|
||||
animation = fade, 1, 7, default
|
||||
animation = workspaces, 1, 6, default
|
||||
}
|
||||
|
||||
|
||||
|
||||
dwindle {
|
||||
# See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more
|
||||
pseudotile = yes # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
|
||||
preserve_split = yes # you probably want this
|
||||
}
|
||||
|
||||
master {
|
||||
# See https://wiki.hyprland.org/Configuring/Master-Layout/ for more
|
||||
new_status = "master"
|
||||
}
|
||||
|
||||
gestures {
|
||||
# See https://wiki.hyprland.org/Configuring/Variables/ for more
|
||||
workspace_swipe = off
|
||||
}
|
||||
|
||||
misc {
|
||||
disable_hyprland_logo = false
|
||||
disable_splash_rendering = true
|
||||
force_default_wallpaper = 0
|
||||
}
|
||||
|
||||
ecosystem {
|
||||
no_update_news = true
|
||||
no_donation_nag = true
|
||||
}
|
||||
|
||||
# Binds
|
||||
$mainMod = ALT
|
||||
|
||||
bind = CTRL SHIFT, H, exec, colorPrefix kitty -e 'bash -c "hyprctl binds | less"'
|
||||
|
||||
bind = $mainMod SHIFT, E, exec, colorPrefix kitty
|
||||
|
||||
bind = $mainMod, B, exec, firefox
|
||||
|
||||
bind = $mainMod SHIFT, B, exec, firefox --private-window
|
||||
|
||||
bind = $mainMod, Q, killactive,
|
||||
|
||||
#bind = $mainMod, R, exec, colorPrefix kitty -e _systemRebuild
|
||||
|
||||
#bind = $mainMod SHIFT, R, exec, colorPrefix kitty -e _homeRebuild
|
||||
|
||||
bind = $mainMod, F, exec, thunar
|
||||
bind = $mainMod SHIFT, F, fullscreen
|
||||
|
||||
bind = $mainMod SHIFT, semicolon, exec, colorPrefix kitty -e lf
|
||||
|
||||
bind = $mainMod, Insert, exec, libreoffice
|
||||
|
||||
bind = $mainMod, V, togglefloating,
|
||||
|
||||
bind = $mainMod SHIFT, V, exec, vlc
|
||||
|
||||
bind = , Menu, exec, rofi -show drun
|
||||
|
||||
bind = $mainMod, Menu, exec, hyprpanel -q; hyprpanel
|
||||
|
||||
#bind = $mainMod, P, pseudo, # dwindle
|
||||
#bind = $mainMod, Z, togglesplit, # dwindle
|
||||
|
||||
bind = $mainMod, N, layoutmsg, rollnext # master
|
||||
bind = $mainMod, P, layoutmsg, rollprev # master
|
||||
|
||||
bind = $mainMod, M, exec, spotify
|
||||
|
||||
bind = $mainMod SHIFT, M, exec, firefox soundcloud.com/you/library
|
||||
|
||||
bind = $mainMod CTRL, M, exec, colorPrefix kitty -e ncmpcpp -s browser
|
||||
|
||||
bind = $mainMod, XF86AudioPlay, exec, mpc load casual
|
||||
|
||||
bind = , XF86AudioPlay, exec, playerctl play-pause
|
||||
|
||||
bind = , XF86AudioPause, exec, playerctl pause
|
||||
|
||||
bind = , XF86AudioNext, exec, playerctl next
|
||||
|
||||
bind = , XF86AudioPrev, exec, playerctl previous
|
||||
|
||||
bind = , XF86Launch2, exec, steam
|
||||
bind = $mainMod, XF86Launch2, exec, prismlauncher
|
||||
|
||||
bind = , XF86Calculator, exec, geogebra
|
||||
|
||||
bind = $mainMod SHIFT, Print, exec, firefox localhost:631
|
||||
|
||||
bind = $mainMod, Return, exec, discord --enable-features=UseOzonePlatform --ozone-platform=wayland
|
||||
|
||||
bind = $mainMod CTRL, Return, exec, firefox https://discord.com/app
|
||||
|
||||
bind = , Home, exec, setWallpaper
|
||||
|
||||
# Move focus with mainMod + arrow keys
|
||||
bind = $mainMod, W, movefocus, u
|
||||
bind = $mainMod, A, movefocus, l
|
||||
bind = $mainMod, S, movefocus, d
|
||||
bind = $mainMod, D, movefocus, r
|
||||
# Switch workspaces with mainMod + [0-9]
|
||||
bind = $mainMod, 1, workspace, 1
|
||||
bind = $mainMod, 2, workspace, 2
|
||||
bind = $mainMod, 3, workspace, 3
|
||||
bind = $mainMod, 4, workspace, 4
|
||||
bind = $mainMod, 5, workspace, 5
|
||||
bind = $mainMod, 6, workspace, 6
|
||||
bind = $mainMod, 7, workspace, 7
|
||||
bind = $mainMod, 8, workspace, 8
|
||||
bind = $mainMod, 9, workspace, 9
|
||||
bind = $mainMod, 0, workspace, 10
|
||||
|
||||
bind = $mainMod, Home, workspace, 11
|
||||
|
||||
# Move active window to a workspace with mainMod + SHIFT + [0-9]
|
||||
bind = $mainMod SHIFT, 1, movetoworkspace, 1
|
||||
bind = $mainMod SHIFT, 2, movetoworkspace, 2
|
||||
bind = $mainMod SHIFT, 3, movetoworkspace, 3
|
||||
bind = $mainMod SHIFT, 4, movetoworkspace, 4
|
||||
bind = $mainMod SHIFT, 5, movetoworkspace, 5
|
||||
bind = $mainMod SHIFT, 6, movetoworkspace, 6
|
||||
bind = $mainMod SHIFT, 7, movetoworkspace, 7
|
||||
bind = $mainMod SHIFT, 8, movetoworkspace, 8
|
||||
bind = $mainMod SHIFT, 9, movetoworkspace, 9
|
||||
bind = $mainMod SHIFT, 0, movetoworkspace, 10
|
||||
|
||||
bind = $mainMod SHIFT, Home, movetoworkspace, 11
|
||||
|
||||
# Scroll through existing workspaces with mainMod + scroll
|
||||
bind = $mainMod, right, workspace, e+1
|
||||
bind = $mainMod, left, workspace, e-1
|
||||
|
||||
bind = $mainMod, H, exec, hyprctl keyword animation workspaces,1,6,default
|
||||
bind = $mainMod, H, workspace, e-1
|
||||
bind = $mainMod, J, exec, hyprctl keyword animation workspaces,1,6,default,slidevert
|
||||
bind = $mainMod, J, workspace, e+1
|
||||
bind = $mainMod, K, exec, hyprctl keyword animation workspaces,1,6,default,slidevert
|
||||
bind = $mainMod, K, workspace, e-1
|
||||
bind = $mainMod, L, exec, hyprctl keyword animation workspaces,1,6,default
|
||||
bind = $mainMod, L, workspace, e+1
|
||||
|
||||
bind = $mainMod SHIFT, H, exec, hyprctl keyword animation workspaces,1,6,default
|
||||
bind = $mainMod SHIFT, H, movetoworkspace, e-1
|
||||
bind = $mainMod SHIFT, J, exec, hyprctl keyword animation workspaces,1,6,default,slidevert
|
||||
bind = $mainMod SHIFT, J, movetoworkspace, e+1
|
||||
bind = $mainMod SHIFT, K, exec, hyprctl keyword animation workspaces,1,6,default,slidevert
|
||||
bind = $mainMod SHIFT, K, movetoworkspace, e-1
|
||||
bind = $mainMod SHIFT, L, exec, hyprctl keyword animation workspaces,1,6,default
|
||||
bind = $mainMod SHIFT, L, movetoworkspace, e+1
|
||||
|
||||
#switch network connections
|
||||
bind = CTRL SHIFT, Escape, exec, nmcli device down wlo1
|
||||
bind = CTRL SHIFT, 0, exec, nmcli connection up Hotspot
|
||||
bind = CTRL SHIFT, 1, exec, nmcli connection up EagleNet
|
||||
bind = CTRL SHIFT, 2, exec, nmcli connection up CXNK00813829
|
||||
bind = CTRL SHIFT, 3, exec, nmcli connection up ATT9MhT2ql
|
||||
|
||||
#brightness keys
|
||||
bind = , XF86MonBrightnessUp, exec, brightnessctl set +10%
|
||||
bind = , XF86MonBrightnessDown, exec, brightnessctl set 10%-
|
||||
|
||||
#volume keys
|
||||
binde = , XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_SINK@ 10%+
|
||||
binde = , XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_SINK@ 10%-
|
||||
bind = , XF86AudioMute, exec, wpctl set-mute @DEFAULT_SINK@ toggle
|
||||
bind = $mainMod, F9, exec, pavucontrol
|
||||
|
||||
#screen lock key
|
||||
#bind = $mainMod, F12, exec, swaylock
|
||||
|
||||
#logout shortcut
|
||||
bind = CTRL ALT, Delete, exec, loginctl kill-session self
|
||||
|
||||
|
||||
# Move/resize windows with mainMod + LMB/RMB and dragging
|
||||
bind = $mainMod SHIFT, W, movewindow, u
|
||||
bind = $mainMod SHIFT, A, movewindow, l
|
||||
bind = $mainMod SHIFT, S, movewindow, d
|
||||
bind = $mainMod SHIFT, D, movewindow, r
|
||||
|
||||
bindm = $mainMod, mouse:272, movewindow
|
||||
bindm = $mainMod SHIFT, mouse:272, resizewindow
|
||||
|
||||
$scratchpadsize = size 60% 80%
|
||||
|
||||
$kitty = class:^(scratchpad-kitty)$
|
||||
windowrulev2 = float, $kitty
|
||||
windowrulev2 = $scratchpadsize, $kitty
|
||||
windowrulev2 = workspace special silent, $kitty
|
||||
|
||||
$lf = class:^(scratchpad-lf)$
|
||||
windowrulev2 = float, $lf
|
||||
windowrulev2 = $scratchpadsize, $lf
|
||||
windowrulev2 = workspace special silent, $lf
|
||||
|
||||
$cal = class:^(scratchpad-cal)$
|
||||
windowrulev2 = float, $cal
|
||||
windowrulev2 = $scratchpadsize, $cal
|
||||
windowrulev2 = workspace special silent, $cal
|
||||
|
||||
bind = $mainMod, semicolon, exec, pypr toggle lf
|
||||
bind = $mainMod, E, exec, pypr toggle kitty
|
||||
bind = $mainMod, C, exec, pypr toggle calendar
|
||||
|
||||
|
||||
bind = CTRL SHIFT, Home, exec, ssh nathan@esotericbytes.com -fL 5900:localhost:5900 sleep 10; vncviewer localhost:5900 -fullscreen
|
||||
bind = CTRL SHIFT, Home, submap, clean
|
||||
|
||||
|
||||
bind = $mainMod CTRL, Home, submap, clean
|
||||
|
||||
submap = clean
|
||||
|
||||
bind = $mainMod CTRL, Home, submap, reset
|
||||
|
||||
submap = reset
|
||||
|
||||
|
||||
31
system/users/nathan/home-manager/dotfiles/hypr/pyprland.toml
Normal file
@@ -0,0 +1,31 @@
|
||||
[pyprland]
|
||||
plugins = [
|
||||
"scratchpads"
|
||||
]
|
||||
|
||||
[scratchpads.lf]
|
||||
animation = "fromTop"
|
||||
command = "kitty --class scratchpad-lf lf ~"
|
||||
lazy = true
|
||||
class = "scratchpad-lf"
|
||||
margin = 100
|
||||
multi = true
|
||||
excludes = "*"
|
||||
|
||||
[scratchpads.kitty]
|
||||
animation = "fromBottom"
|
||||
command = "kitty --class scratchpad-kitty"
|
||||
class = "scratchpad-kitty"
|
||||
lazy = true
|
||||
margin = 100
|
||||
multi = true
|
||||
excludes = "*"
|
||||
|
||||
[scratchpads.calendar]
|
||||
animation = "fromTop"
|
||||
command = "kitty --class scratchpad-cal -e calcurse"
|
||||
class = "scratchpad-cal"
|
||||
lazy = true
|
||||
margin = 100
|
||||
multi = true
|
||||
excludes = "*"
|
||||
@@ -0,0 +1,65 @@
|
||||
{
|
||||
"theme.font.name": "FiraCode Nerd Font Mono",
|
||||
"theme.font.label": "FiraCode Nerd Font Mono Medium",
|
||||
"theme.bar.floating": true,
|
||||
"bar.layouts": {
|
||||
"*": {
|
||||
"left": [
|
||||
"dashboard",
|
||||
"workspaces",
|
||||
"windowtitle",
|
||||
"submap",
|
||||
"kbinput"
|
||||
],
|
||||
"middle": [
|
||||
"volume",
|
||||
"battery",
|
||||
"hyprsunset",
|
||||
"clock",
|
||||
"hypridle",
|
||||
"network",
|
||||
"bluetooth"
|
||||
],
|
||||
"right": [
|
||||
"ram",
|
||||
"storage",
|
||||
"systray",
|
||||
"cava",
|
||||
"notifications",
|
||||
"power"
|
||||
]
|
||||
}
|
||||
},
|
||||
"theme.bar.opacity": 50,
|
||||
"wallpaper.image": "/tmp/nathan/bg",
|
||||
"wallpaper.enable": false,
|
||||
"theme.matugen_settings.scheme_type": "content",
|
||||
"theme.matugen_settings.variation": "standard_2",
|
||||
"theme.matugen": true,
|
||||
"bar.launcher.autoDetectIcon": true,
|
||||
"bar.network.truncation_size": 10,
|
||||
"bar.bluetooth.label": false,
|
||||
"bar.clock.showIcon": false,
|
||||
"bar.clock.format": "%A %H:%M:%S %m/%d/%C%y",
|
||||
"bar.notifications.show_total": true,
|
||||
"bar.notifications.hideCountWhenZero": true,
|
||||
"menus.dashboard.shortcuts.left.shortcut2.command": "spotify",
|
||||
"menus.dashboard.shortcuts.left.shortcut1.command": "$BROWSER",
|
||||
"menus.dashboard.shortcuts.left.shortcut1.tooltip": "Browser",
|
||||
"menus.dashboard.shortcuts.left.shortcut1.icon": "",
|
||||
"menus.dashboard.directories.enabled": false,
|
||||
"menus.dashboard.stats.enable_gpu": true,
|
||||
"menus.power.lowBatteryNotification": true,
|
||||
"bar.customModules.cava.leftClick": "menu:media",
|
||||
"bar.customModules.cava.showIcon": false,
|
||||
"bar.customModules.hypridle.label": false,
|
||||
"bar.customModules.hyprsunset.label": false,
|
||||
"bar.customModules.hyprsunset.temperature": "4000k",
|
||||
"bar.customModules.netstat.dynamicIcon": true,
|
||||
"bar.customModules.netstat.label": true,
|
||||
"bar.workspaces.show_numbered": true,
|
||||
"bar.workspaces.numbered_active_indicator": "highlight",
|
||||
"bar.workspaces.ignored": "-\\d+",
|
||||
"menus.clock.time.military": true,
|
||||
"menus.clock.weather.enabled": false
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{}
|
||||
120
system/users/nathan/home-manager/dotfiles/ohmyposh/ohmyposh.toml
Normal file
@@ -0,0 +1,120 @@
|
||||
console_title_template = '{{ .Shell }} in {{ .Folder }}'
|
||||
version = 3
|
||||
final_space = true
|
||||
|
||||
[palette]
|
||||
c0 = '#0B0704'
|
||||
c1 = '#846550'
|
||||
c10 = '#636E90'
|
||||
c11 = '#6FAEAC'
|
||||
c12 = '#A5ADA2'
|
||||
c13 = '#F1DCB7'
|
||||
c14 = '#A1E7DA'
|
||||
c15 = '#c2c1c0'
|
||||
c2 = '#4a526c'
|
||||
c3 = '#538281'
|
||||
c4 = '#7b8179'
|
||||
c5 = '#b4a589'
|
||||
c6 = '#78ada3'
|
||||
c7 = '#958d89'
|
||||
c8 = '#665b54'
|
||||
c9 = '#B1876B'
|
||||
|
||||
[secondary_prompt]
|
||||
template = '❭❭ '
|
||||
background = 'transparent'
|
||||
|
||||
[transient_prompt]
|
||||
template = '{{ if gt .Code 0 }}!❭ {{else}}❭ {{end}}'
|
||||
background = 'transparent'
|
||||
foreground_templates = ['{{ if gt .Code 0 }}p:c13{{end}}', '{{ if eq .Code 0 }}p:c14{{end}}']
|
||||
|
||||
[[blocks]]
|
||||
type = 'prompt'
|
||||
alignment = 'left'
|
||||
newline = true
|
||||
|
||||
[[blocks.segments]]
|
||||
trailing_diamond = ''
|
||||
template = ' {{ .Icon }} '
|
||||
foreground = 'p:c12'
|
||||
background = 'p:c1'
|
||||
type = 'os'
|
||||
style = 'diamond'
|
||||
|
||||
[blocks.segments.properties]
|
||||
cache_duration = 'none'
|
||||
|
||||
[[blocks.segments]]
|
||||
trailing_diamond = ''
|
||||
template = '{{ .UserName }}@{{ .HostName }}'
|
||||
foreground = 'p:c14'
|
||||
background = 'p:c2'
|
||||
type = 'session'
|
||||
style = 'diamond'
|
||||
|
||||
[blocks.segments.properties]
|
||||
cache_duration = 'none'
|
||||
|
||||
[[blocks.segments]]
|
||||
trailing_diamond = ''
|
||||
template = '{{ .Path }}'
|
||||
foreground = 'p:c13'
|
||||
background = 'p:c4'
|
||||
type = 'path'
|
||||
style = 'diamond'
|
||||
|
||||
[blocks.segments.properties]
|
||||
cache_duration = 'none'
|
||||
style = 'full'
|
||||
|
||||
[[blocks]]
|
||||
type = 'prompt'
|
||||
alignment = 'right'
|
||||
overflow = 'hidden'
|
||||
|
||||
[[blocks.segments]]
|
||||
leading_diamond = ''
|
||||
template = '{{ .FormattedMs }}'
|
||||
foreground = 'p:c13'
|
||||
background = 'p:c4'
|
||||
type = 'executiontime'
|
||||
style = 'diamond'
|
||||
|
||||
[blocks.segments.properties]
|
||||
cache_duration = 'none'
|
||||
|
||||
[[blocks.segments]]
|
||||
leading_diamond = ''
|
||||
foreground = 'p:c14'
|
||||
background = 'p:c2'
|
||||
type = 'time'
|
||||
style = 'diamond'
|
||||
|
||||
[blocks.segments.properties]
|
||||
cache_duration = 'none'
|
||||
|
||||
[[blocks.segments]]
|
||||
leading_diamond = ''
|
||||
foreground = 'p:c12'
|
||||
background = 'p:c1'
|
||||
type = 'shell'
|
||||
style = 'diamond'
|
||||
|
||||
[blocks.segments.properties]
|
||||
cache_duration = 'none'
|
||||
|
||||
[[blocks]]
|
||||
type = 'prompt'
|
||||
alignment = 'left'
|
||||
newline = true
|
||||
|
||||
[[blocks.segments]]
|
||||
template = '{{ if gt .Code 0 }}!❭ {{else}}❭ {{end}}'
|
||||
background = 'transparent'
|
||||
type = 'text'
|
||||
style = 'plain'
|
||||
foreground_templates = ['{{ if gt .Code 0 }}p:c13{{end}}', '{{ if eq .Code 0 }}p:c14{{end}}']
|
||||
|
||||
[blocks.segments.properties]
|
||||
cache_duration = 'none'
|
||||
@@ -0,0 +1,37 @@
|
||||
import QtQuick // for Text
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
import Quickshell.Widgets
|
||||
import Quickshell.Hyprland
|
||||
import Quickshell
|
||||
|
||||
Item {
|
||||
implicitWidth: t.contentWidth + 10
|
||||
implicitHeight: 30
|
||||
|
||||
ClippingWrapperRectangle {
|
||||
radius: 5
|
||||
anchors.fill: parent
|
||||
Text {
|
||||
id: t
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
text: {
|
||||
if(hws.toplevels.values.length > 0) {
|
||||
return Hyprland.activeToplevel.title
|
||||
} else {
|
||||
return " Desktop"
|
||||
}
|
||||
}
|
||||
|
||||
property HyprlandWorkspace hws: Hyprland.focusedWorkspace
|
||||
|
||||
onHwsChanged: {
|
||||
Hyprland.refreshToplevels()
|
||||
Hyprland.refreshWorkspaces()
|
||||
}
|
||||
|
||||
font.pointSize: 11
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,170 @@
|
||||
import Quickshell // for PanelWindow
|
||||
import QtQuick // for Text
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
import Quickshell.Io
|
||||
import Quickshell.Widgets
|
||||
import Quickshell.Wayland
|
||||
|
||||
PanelWindow {
|
||||
anchors {
|
||||
top: true
|
||||
//left: true
|
||||
//right: true
|
||||
//bottom: true
|
||||
|
||||
}
|
||||
|
||||
id: bar
|
||||
|
||||
exclusionMode: ExclusionMode.Ignore
|
||||
WlrLayershell.layer: WlrLayer.Background
|
||||
|
||||
color: "#a0706050"
|
||||
|
||||
|
||||
implicitHeight: 40
|
||||
implicitWidth: 1900
|
||||
|
||||
/*RowLayout {
|
||||
width: bar.width
|
||||
}*/
|
||||
RowLayout {
|
||||
//Layout.alignment: Qt.AlignLeft | Qt.AlignVCenter
|
||||
id: left
|
||||
x: 0
|
||||
y: parent.y + (parent.height - height) / 2
|
||||
//width: center.x
|
||||
spacing: 0
|
||||
|
||||
Launcher {
|
||||
id: l
|
||||
Layout.alignment: Qt.AlignLeft | Qt.AlignVCenter
|
||||
Layout.preferredWidth: width
|
||||
Layout.margins: 5
|
||||
}
|
||||
|
||||
Workspaces {
|
||||
id: ws
|
||||
Layout.alignment: Qt.AlignLeft | Qt.AlignVCenter
|
||||
Layout.margins: 5
|
||||
}
|
||||
|
||||
/*ActiveWindow {
|
||||
id: aw
|
||||
Layout.margins: 5
|
||||
|
||||
Layout.maximumWidth: Math.min(implicitWidth, center.x - (parent.x + x + Layout.margins))
|
||||
}*/
|
||||
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
//Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter
|
||||
id: center
|
||||
x: (parent.width - cl.width) / 2 + parent.x - centerLeft.width
|
||||
//y: parent.y + (parent.height - height) / 2
|
||||
y: parent.y + (parent.height - height) / 2
|
||||
spacing: 0
|
||||
|
||||
RowLayout {
|
||||
id: centerLeft
|
||||
spacing: 0
|
||||
|
||||
Volume {
|
||||
id: v
|
||||
window: bar
|
||||
popupOffset: center.x
|
||||
Layout.margins: 5
|
||||
}
|
||||
|
||||
Battery {
|
||||
id: bat
|
||||
window: bar
|
||||
popupOffset: center.x
|
||||
Layout.margins: 5
|
||||
}
|
||||
|
||||
Hyprsunset {
|
||||
id: hs
|
||||
Layout.margins: 5
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Clock {
|
||||
id: cl
|
||||
Layout.margins: 5
|
||||
}
|
||||
|
||||
IdleInhibitor {
|
||||
id: ii
|
||||
Layout.margins: 5
|
||||
}
|
||||
|
||||
Wifi {
|
||||
id: wifi
|
||||
window: bar
|
||||
Layout.margins: 5
|
||||
}
|
||||
|
||||
Bluetooth {
|
||||
id: bt
|
||||
window: bar
|
||||
popupOffset: center.x + center.width
|
||||
Layout.margins: 5
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
RowLayout {
|
||||
//Layout.alignment: Qt.AlignRight | Qt.AlignVCenter
|
||||
id: right
|
||||
//implicitWidth: bar.width - (spacer.x + spacer.width)
|
||||
x: bar.width - implicitWidth
|
||||
y: parent.y + (parent.height - height) / 2
|
||||
//Layout.maximumWidth: bar.width - (center.x + center.width)
|
||||
//Layout.preferredWidth: 10
|
||||
spacing: 0
|
||||
|
||||
Media {
|
||||
Layout.alignment: Qt.AlignRight | Qt.AlignVCenter
|
||||
id: media
|
||||
|
||||
implicitWidth: Math.min(textWidth, bar.width - (righter.width) - (center.x + center.width) - 10)
|
||||
|
||||
Layout.margins: 5
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
id: righter
|
||||
spacing: 0
|
||||
Tray {
|
||||
id: tray
|
||||
window: bar
|
||||
Layout.alignment: Qt.AlignRight | Qt.AlignVCenter
|
||||
Layout.margins: 5
|
||||
popupOffset: right.x + righter.x + x
|
||||
}
|
||||
|
||||
Notifications {
|
||||
id: notif
|
||||
window: bar
|
||||
Layout.alignment: Qt.AlignRight | Qt.AlignVCenter
|
||||
Layout.margins: 5
|
||||
}
|
||||
|
||||
Power {
|
||||
id: power
|
||||
window: bar
|
||||
popupOffset: bar.width
|
||||
Layout.alignment: Qt.AlignRight | Qt.AlignVCenter
|
||||
Layout.margins: 5
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
import Quickshell // for PanelWindow
|
||||
import QtQuick // for Text
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
import Quickshell.Io
|
||||
import Quickshell.Widgets
|
||||
import Quickshell.Hyprland
|
||||
import Quickshell.Services.UPower
|
||||
|
||||
ClippingWrapperRectangle {
|
||||
radius: 5
|
||||
width: 100; height: 30
|
||||
color: "red"
|
||||
Button {
|
||||
id: button
|
||||
text: " " + Math.floor(UPower.displayDevice.percentage * 100) + "%"
|
||||
font.pointSize: 12
|
||||
implicitHeight: parent.height
|
||||
//icon.color: "red"
|
||||
//icon.source: "/nix/store/c4dcn4vl0v5njv4d587sazrad1xgyd9h-rose-pine-icon-theme-unstable-2022-09-01/share/icons/rose-pine/symbolic/devices/battery-symbolic.svg"
|
||||
onClicked: {
|
||||
menu.visible = true
|
||||
grab.active = true
|
||||
}
|
||||
}
|
||||
|
||||
required property var window
|
||||
required property real popupOffset
|
||||
id: root
|
||||
|
||||
PopupWindow {
|
||||
|
||||
id: menu
|
||||
|
||||
anchor.window: window
|
||||
anchor.rect.x: popupOffset
|
||||
anchor.rect.y: 50
|
||||
implicitWidth: 250
|
||||
implicitHeight: 150
|
||||
visible: false
|
||||
|
||||
color: "transparent"
|
||||
|
||||
ClippingWrapperRectangle {
|
||||
radius: 5
|
||||
|
||||
implicitHeight: parent.height - 20
|
||||
implicitWidth: parent.width
|
||||
|
||||
ColumnLayout {
|
||||
|
||||
spacing: 0
|
||||
|
||||
Button {
|
||||
Layout.topMargin: 5
|
||||
x: (parent.width - width) / 2
|
||||
implicitWidth: parent.width - 10
|
||||
implicitHeight: parent.height / 5 - parent.spacing
|
||||
|
||||
text: 'shutdown'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
HyprlandFocusGrab {
|
||||
id: grab
|
||||
windows: [ menu ]
|
||||
onCleared: menu.visible = false
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,141 @@
|
||||
import Quickshell // for PanelWindow
|
||||
import QtQuick // for Text
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
import Quickshell.Io
|
||||
import Quickshell.Widgets
|
||||
import Quickshell.Hyprland
|
||||
import Quickshell.Bluetooth
|
||||
|
||||
ClippingWrapperRectangle {
|
||||
|
||||
|
||||
radius: 5
|
||||
implicitWidth: 30; implicitHeight: 30
|
||||
Button {
|
||||
id: button
|
||||
text: ""
|
||||
font.pointSize: 16
|
||||
|
||||
onClicked: {
|
||||
menu.visible = true
|
||||
grab.active = true
|
||||
}
|
||||
implicitHeight: parent.height
|
||||
}
|
||||
|
||||
required property PanelWindow window
|
||||
required property real popupOffset
|
||||
id: root
|
||||
|
||||
PopupWindow {
|
||||
|
||||
id: menu
|
||||
|
||||
anchor.window: window
|
||||
anchor.rect.x: popupOffset - width
|
||||
anchor.rect.y: 50
|
||||
implicitWidth: 250
|
||||
implicitHeight: 150
|
||||
visible: false
|
||||
|
||||
color: "transparent"
|
||||
|
||||
ClippingWrapperRectangle {
|
||||
radius: 5
|
||||
|
||||
implicitHeight: parent.height - 20
|
||||
implicitWidth: parent.width
|
||||
|
||||
ColumnLayout {
|
||||
|
||||
spacing: 0
|
||||
|
||||
ClippingWrapperRectangle {
|
||||
radius: 5
|
||||
implicitWidth: parent.width - 2 * Layout.margins
|
||||
implicitHeight: 30
|
||||
Layout.alignment: Qt.AlignHCenter | Qt.AlignTop
|
||||
Layout.margins: 5
|
||||
color: "#ff3333aa"
|
||||
|
||||
RowLayout {
|
||||
Text {
|
||||
text: 'Bluetooth'
|
||||
Layout.alignment: Qt.AlignLeft | Qt.AlignVCenter
|
||||
Layout.margins: 5
|
||||
}
|
||||
|
||||
Switch {
|
||||
Layout.alignment: Qt.AlignRight | Qt.AlignVCenter
|
||||
//Layout.margins: 5
|
||||
checked: Bluetooth.defaultAdapter.enabled
|
||||
onClicked: Bluetooth.defaultAdapter.enabled = checked
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
ScrollView {
|
||||
Layout.alignment: Qt.AlignHCenter | Qt.AlignTop
|
||||
Layout.margins: 5
|
||||
|
||||
implicitWidth: parent.width - 4 * Layout.margins
|
||||
implicitHeight: menu.height / 2
|
||||
|
||||
id: scroll
|
||||
|
||||
ColumnLayout {
|
||||
spacing: 0
|
||||
|
||||
Repeater {
|
||||
|
||||
id: rep
|
||||
|
||||
model: Bluetooth.devices.values
|
||||
|
||||
ClippingWrapperRectangle {
|
||||
radius: 5
|
||||
color: "#ff3333aa"
|
||||
|
||||
implicitWidth: menu.width - 3 * scroll.x
|
||||
implicitHeight: 40
|
||||
|
||||
Layout.alignment: Qt.AlignHCenter | Qt.AlignTop
|
||||
Layout.margins: 5
|
||||
|
||||
RowLayout {
|
||||
Text {
|
||||
Layout.alignment: Qt.AlignLeft | Qt.AlignVCenter
|
||||
Layout.margins: 5
|
||||
|
||||
text: rep.model[index].name
|
||||
}
|
||||
|
||||
Button {
|
||||
Layout.alignment: Qt.AlignRight | Qt.AlignVCenter
|
||||
Layout.rightMargin: 5
|
||||
text: 'Connect'
|
||||
|
||||
onClicked: rep.model[index].connected = !rep.model[index].connected
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
HyprlandFocusGrab {
|
||||
id: grab
|
||||
windows: [ menu ]
|
||||
onCleared: menu.visible = false
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
import QtQuick // for Text
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
import Quickshell.Widgets
|
||||
import Quickshell
|
||||
|
||||
Item {
|
||||
implicitWidth: t.contentWidth + 10
|
||||
implicitHeight: 30
|
||||
|
||||
ClippingWrapperRectangle {
|
||||
radius: 5
|
||||
anchors.fill: parent
|
||||
Text {
|
||||
id: t
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
text: Qt.formatDateTime(clock.date, "dddd HH:mm:ss MM/dd/yyyy")
|
||||
font.pointSize: 11
|
||||
|
||||
SystemClock {
|
||||
id: clock
|
||||
precision: SystemClock.Seconds
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
import Quickshell // for PanelWindow
|
||||
import QtQuick // for Text
|
||||
import QtQuick.Controls
|
||||
import Quickshell.Io
|
||||
import Quickshell.Widgets
|
||||
|
||||
ClippingWrapperRectangle {
|
||||
radius: 5
|
||||
implicitWidth: 30; height: 30
|
||||
Button {
|
||||
id: button
|
||||
text: " "
|
||||
font.pointSize: 16
|
||||
Process {
|
||||
id: idlent
|
||||
running: false
|
||||
command: ["hyprsunset", "-t", "4000"]
|
||||
|
||||
onExited: {
|
||||
running = button.text == " " ? false : true
|
||||
}
|
||||
}
|
||||
|
||||
onClicked: {
|
||||
idlent.running = button.text == " " ? true : false
|
||||
button.text = button.text == " " ? " " : " "
|
||||
}
|
||||
implicitHeight: parent.height
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
import Quickshell // for PanelWindow
|
||||
import QtQuick // for Text
|
||||
import QtQuick.Controls
|
||||
import Quickshell.Io
|
||||
import Quickshell.Widgets
|
||||
|
||||
ClippingWrapperRectangle {
|
||||
|
||||
property real interval: 100
|
||||
id: root
|
||||
|
||||
radius: 5
|
||||
implicitWidth: 30; height: 30
|
||||
Button {
|
||||
id: button
|
||||
text: " "
|
||||
font.pointSize: 16
|
||||
Process {
|
||||
id: idlent
|
||||
running: false
|
||||
command: ["systemd-inhibit", "--what=idle", "sleep", root.interval.toString()]
|
||||
|
||||
onExited: {
|
||||
running = button.text == " " ? false : true
|
||||
}
|
||||
}
|
||||
|
||||
onClicked: {
|
||||
idlent.running = button.text == " " ? true : false
|
||||
button.text = button.text == " " ? " " : " "
|
||||
}
|
||||
implicitHeight: parent.height
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
import Quickshell // for PanelWindow
|
||||
import QtQuick // for Text
|
||||
import QtQuick.Controls
|
||||
import Quickshell.Io
|
||||
import Quickshell.Widgets
|
||||
|
||||
ClippingWrapperRectangle {
|
||||
radius: 5
|
||||
width: 30; height: 30
|
||||
Button {
|
||||
id: button
|
||||
text: " "
|
||||
font.pointSize: 16
|
||||
Process {
|
||||
id: launcher
|
||||
running: false
|
||||
command: ["rofi", "-show", "drun"]
|
||||
}
|
||||
onClicked: launcher.running = true
|
||||
implicitHeight: parent.height
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
import QtQuick // for Text
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
import Quickshell.Services.Mpris
|
||||
import Quickshell.Widgets
|
||||
|
||||
Item {
|
||||
id: media
|
||||
height: 30
|
||||
|
||||
readonly property real textWidth: info.contentWidth + 10
|
||||
|
||||
ClippingWrapperRectangle {
|
||||
radius: 5
|
||||
anchors.fill: parent
|
||||
Text {
|
||||
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
|
||||
id: info
|
||||
|
||||
text: {
|
||||
let s = ''
|
||||
let players = []
|
||||
|
||||
Mpris.players.values.forEach((p) => {
|
||||
if(p.isPlaying) players.push(p)
|
||||
})
|
||||
|
||||
if(players[0]?.trackTitle) {
|
||||
s += players[0].trackTitle
|
||||
}
|
||||
if(players[0]?.trackAlbum) {
|
||||
s += ' - ' + players[0].trackAlbum
|
||||
}
|
||||
if(players[0]?.trackArtist) {
|
||||
s += ' - ' + players[0].trackArtist
|
||||
}
|
||||
|
||||
media.visible = players.length > 0
|
||||
|
||||
return s
|
||||
}
|
||||
font.pointSize: 11
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,183 @@
|
||||
import Quickshell
|
||||
import QtQuick // for Text
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
import Quickshell.Services.Notifications
|
||||
import Quickshell.Io
|
||||
import Quickshell.Widgets
|
||||
import Quickshell.Hyprland
|
||||
|
||||
Item {
|
||||
width: 50
|
||||
height: 30
|
||||
|
||||
ClippingWrapperRectangle {
|
||||
id: barbutton
|
||||
radius: 5
|
||||
anchors.fill: parent
|
||||
Button {
|
||||
id: button
|
||||
text: ""
|
||||
//text: server.trackedNotifications.values.length == 0 ? "" : ' ' + server.trackedNotifications.values.length
|
||||
//icon.source: ''
|
||||
font.pointSize: 16
|
||||
|
||||
onClicked: {
|
||||
|
||||
|
||||
menu.visible = true
|
||||
grab.active = true
|
||||
}
|
||||
implicitHeight: parent.height
|
||||
}
|
||||
}
|
||||
|
||||
NotificationServer {
|
||||
id: server
|
||||
persistenceSupported: true
|
||||
imageSupported: true
|
||||
actionsSupported: true
|
||||
bodyImagesSupported: true
|
||||
bodySupported: true
|
||||
bodyHyperlinksSupported: true
|
||||
inlineReplySupported: true
|
||||
actionIconsSupported: true
|
||||
|
||||
onNotification: (n) => {
|
||||
n.tracked = true
|
||||
console.log(n?.body)
|
||||
button.text = ' ' + (server.trackedNotifications.values.length + 1)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
required property PanelWindow window
|
||||
id: root
|
||||
|
||||
PopupWindow {
|
||||
|
||||
id: menu
|
||||
|
||||
anchor.window: window
|
||||
anchor.rect.x: window.width - width
|
||||
anchor.rect.y: 50
|
||||
implicitWidth: 400
|
||||
implicitHeight: 1080 - anchor.rect.y
|
||||
visible: false
|
||||
|
||||
color: "transparent"
|
||||
|
||||
ClippingWrapperRectangle {
|
||||
radius: 5
|
||||
|
||||
color: "#ff706050"
|
||||
|
||||
implicitHeight: parent.height - 20
|
||||
implicitWidth: parent.width
|
||||
|
||||
ColumnLayout {
|
||||
id: lay
|
||||
|
||||
spacing: 10
|
||||
|
||||
ClippingWrapperRectangle {
|
||||
radius: 5
|
||||
Layout.margins: 5
|
||||
Layout.alignment: Qt.AlignVCenter | Qt.AlignTop
|
||||
implicitWidth: menu.width - 2 * Layout.margins
|
||||
|
||||
RowLayout {
|
||||
width: parent.width
|
||||
Text {
|
||||
Layout.margins: 5
|
||||
Layout.alignment: Qt.AlignLeft | Qt.AlignVCenter
|
||||
text: 'Notifications'
|
||||
}
|
||||
Button {
|
||||
Layout.alignment: Qt.AlignRight | Qt.AlignVCenter
|
||||
Layout.margins: 5
|
||||
implicitWidth: 20
|
||||
implicitHeight: 20
|
||||
|
||||
text: 'x'
|
||||
|
||||
onClicked: {
|
||||
while(server.trackedNotifications.values.length > 0) {
|
||||
server.trackedNotifications.values[0].dismiss()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Repeater {
|
||||
id: rep
|
||||
|
||||
model: server.trackedNotifications.values
|
||||
ClippingWrapperRectangle {
|
||||
Layout.alignment: Qt.AlignHCenter | Qt.AlignTop
|
||||
Layout.margins: 5
|
||||
radius: 10
|
||||
implicitWidth: parent.width - 2 * Layout.margins
|
||||
implicitHeight: 100
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
|
||||
RowLayout {
|
||||
Image {
|
||||
//anchors.fill: parent
|
||||
source: {
|
||||
let icon = rep.model[index].image
|
||||
if (icon.includes("?path=")) {
|
||||
const [name, path] = icon.split("?path=");
|
||||
icon = Qt.resolvedUrl(`${path}/${name.slice(name.lastIndexOf("/") + 1)}`);
|
||||
}
|
||||
return icon
|
||||
}
|
||||
|
||||
Layout.maximumWidth: 100
|
||||
Layout.maximumHeight: 100
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
Layout.topMargin: 10
|
||||
Layout.alignment: Qt.AlignLeft | Qt.AlignTop
|
||||
Text {
|
||||
Layout.alignment: Qt.AlignLeft | Qt.AlignTop
|
||||
text: rep.model[index].summary
|
||||
Layout.leftMargin: 10
|
||||
font.pointSize: 14
|
||||
}
|
||||
Text {
|
||||
Layout.alignment: Qt.AlignLeft | Qt.AlignVCenter
|
||||
text: rep.model[index].body
|
||||
Layout.leftMargin: 10
|
||||
font.pointSize: 12
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
acceptedButtons: Qt.LeftButton | Qt.RightButton
|
||||
|
||||
onClicked: mouse => {
|
||||
if(mouse.button == Qt.LeftButton) {
|
||||
button.text = rep.count - 1 <= 0 ? "" : ' ' + (rep.count - 1)
|
||||
rep.model[index].dismiss()
|
||||
//button.text = server.trackedNotifications.values.length == 0 ? "" : ' ' + server.trackedNotifications.values.length
|
||||
} else if(mouse.button == Qt.RightButton) {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
HyprlandFocusGrab {
|
||||
id: grab
|
||||
windows: [ menu ]
|
||||
onCleared: menu.visible = false
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,96 @@
|
||||
import Quickshell
|
||||
import QtQuick // for Text
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
import Quickshell.Hyprland
|
||||
import Quickshell.Io
|
||||
import Quickshell.Widgets
|
||||
|
||||
Item {
|
||||
width: 30
|
||||
height: 30
|
||||
|
||||
id: root
|
||||
|
||||
required property PanelWindow window
|
||||
required property real popupOffset
|
||||
|
||||
ClippingWrapperRectangle {
|
||||
radius: 5
|
||||
width: 30; height: 30
|
||||
Button {
|
||||
id: button
|
||||
text: " "
|
||||
font.pointSize: 16
|
||||
|
||||
onClicked: {
|
||||
menu.visible = true
|
||||
grab.active = true
|
||||
}
|
||||
implicitHeight: parent.height
|
||||
}
|
||||
}
|
||||
|
||||
PopupWindow {
|
||||
|
||||
id: menu
|
||||
|
||||
anchor.window: window
|
||||
anchor.rect.x: popupOffset
|
||||
anchor.rect.y: 50
|
||||
implicitWidth: 150
|
||||
implicitHeight: 250
|
||||
visible: false
|
||||
|
||||
color: "transparent"
|
||||
|
||||
ClippingWrapperRectangle {
|
||||
radius: 5
|
||||
|
||||
implicitHeight: parent.height - 20
|
||||
implicitWidth: parent.width
|
||||
|
||||
ColumnLayout {
|
||||
|
||||
spacing: 0
|
||||
|
||||
Button {
|
||||
Layout.topMargin: 5
|
||||
x: (parent.width - width) / 2
|
||||
implicitWidth: parent.width - 10
|
||||
implicitHeight: parent.height / 5 - parent.spacing
|
||||
|
||||
text: 'shutdown'
|
||||
}
|
||||
|
||||
Button {
|
||||
x: (parent.width - width) / 2
|
||||
implicitWidth: parent.width - 10
|
||||
implicitHeight: parent.height / 5 - parent.spacing
|
||||
text: 'reboot'
|
||||
}
|
||||
|
||||
Button {
|
||||
x: (parent.width - width) / 2
|
||||
implicitWidth: parent.width - 10
|
||||
implicitHeight: parent.height / 5 - parent.spacing
|
||||
text: 'logout'
|
||||
}
|
||||
|
||||
Button {
|
||||
Layout.bottomMargin: 10
|
||||
x: (parent.width - width) / 2
|
||||
implicitWidth: parent.width - 10
|
||||
implicitHeight: parent.height / 5 - parent.spacing
|
||||
text: 'sleep'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
HyprlandFocusGrab {
|
||||
id: grab
|
||||
windows: [ menu ]
|
||||
onCleared: menu.visible = false
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
import QtQuick // for Text
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
import Quickshell.Services.SystemTray
|
||||
import Quickshell.Widgets
|
||||
|
||||
Item {
|
||||
implicitWidth: 10 + rep.count * (2 * lay.spacing + 20)
|
||||
height: 30
|
||||
visible: SystemTray.items.values.length != 0
|
||||
|
||||
id: root
|
||||
required property var window
|
||||
required property real popupOffset
|
||||
|
||||
ClippingWrapperRectangle {
|
||||
radius: 5
|
||||
anchors.fill: parent
|
||||
RowLayout {
|
||||
id: lay
|
||||
spacing: 4
|
||||
Repeater {
|
||||
id: rep
|
||||
|
||||
model: SystemTray.items
|
||||
ClippingWrapperRectangle {
|
||||
Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter
|
||||
radius: 10
|
||||
implicitWidth: 20
|
||||
implicitHeight: 20
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
|
||||
Image {
|
||||
anchors.fill: parent
|
||||
source: {
|
||||
let icon = SystemTray.items.values[index].icon
|
||||
if (icon.includes("?path=")) {
|
||||
const [name, path] = icon.split("?path=");
|
||||
icon = Qt.resolvedUrl(`${path}/${name.slice(name.lastIndexOf("/") + 1)}`);
|
||||
}
|
||||
return icon
|
||||
}
|
||||
}
|
||||
|
||||
acceptedButtons: Qt.LeftButton | Qt.RightButton
|
||||
|
||||
onClicked: (mouse) => {
|
||||
if(mouse.button == Qt.LeftButton) {
|
||||
SystemTray.items.values[index].activate()
|
||||
} else if(mouse.button == Qt.RightButton) {
|
||||
SystemTray.items.values[index].display(root.window, popupOffset, 40)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,97 @@
|
||||
import Quickshell // for PanelWindow
|
||||
import QtQuick // for Text
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
import Quickshell.Io
|
||||
import Quickshell.Widgets
|
||||
import Quickshell.Hyprland
|
||||
import Quickshell.Services.Pipewire
|
||||
|
||||
ClippingWrapperRectangle {
|
||||
radius: 5
|
||||
width: 100; height: 30
|
||||
Button {
|
||||
id: button
|
||||
text: " " + Math.floor(Pipewire.defaultAudioSink?.audio?.volume * 100) + "%"
|
||||
font.pointSize: 12
|
||||
implicitHeight: parent.height
|
||||
|
||||
PwObjectTracker {
|
||||
objects: [ Pipewire.defaultAudioSink ]
|
||||
}
|
||||
|
||||
onClicked: {
|
||||
menu.visible = true
|
||||
grab.active = true
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
required property var window
|
||||
required property real popupOffset
|
||||
id: root
|
||||
|
||||
PopupWindow {
|
||||
|
||||
id: menu
|
||||
|
||||
anchor.window: window
|
||||
anchor.rect.x: popupOffset
|
||||
anchor.rect.y: 50
|
||||
implicitWidth: 250
|
||||
implicitHeight: 150
|
||||
visible: false
|
||||
|
||||
color: "transparent"
|
||||
|
||||
ClippingWrapperRectangle {
|
||||
radius: 5
|
||||
|
||||
implicitHeight: parent.height - 20
|
||||
implicitWidth: parent.width
|
||||
|
||||
ScrollView {
|
||||
ColumnLayout {
|
||||
|
||||
spacing: 0
|
||||
|
||||
Text {
|
||||
text: 'Output Devices'
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
|
||||
}
|
||||
|
||||
Text {
|
||||
text: 'Input Devices'
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
/*Repeater {
|
||||
id: in
|
||||
|
||||
model: {
|
||||
set = []
|
||||
Pipewire.nodes.values.forEach(n => { !n.isSink && !n.isStream ? set.push(n) : return })
|
||||
return set
|
||||
}
|
||||
|
||||
Text {
|
||||
text: in.model[index].nickname
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
HyprlandFocusGrab {
|
||||
id: grab
|
||||
windows: [ menu ]
|
||||
onCleared: menu.visible = false
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
import Quickshell
|
||||
import QtQuick // for Text
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
import Quickshell.Hyprland
|
||||
import Quickshell.Io
|
||||
import Quickshell.Widgets
|
||||
|
||||
Item {
|
||||
implicitWidth: 30
|
||||
implicitHeight: 30
|
||||
|
||||
ClippingWrapperRectangle {
|
||||
radius: 5
|
||||
anchors.fill: parent
|
||||
Button {
|
||||
id: button
|
||||
text: " "
|
||||
font.pointSize: 16
|
||||
|
||||
onClicked: {
|
||||
menu.visible = true
|
||||
grab.active = true
|
||||
}
|
||||
implicitHeight: parent.height
|
||||
}
|
||||
}
|
||||
|
||||
property var window: null
|
||||
id: root
|
||||
|
||||
PopupWindow {
|
||||
|
||||
id: menu
|
||||
|
||||
anchor.window: window
|
||||
anchor.rect.x: root.parent.x + root.parent.width - width
|
||||
anchor.rect.y: 50
|
||||
implicitWidth: 250
|
||||
implicitHeight: 150
|
||||
visible: false
|
||||
|
||||
color: "transparent"
|
||||
|
||||
ClippingWrapperRectangle {
|
||||
radius: 5
|
||||
|
||||
implicitHeight: parent.height - 20
|
||||
implicitWidth: parent.width
|
||||
|
||||
ColumnLayout {
|
||||
|
||||
spacing: 0
|
||||
|
||||
Button {
|
||||
Layout.topMargin: 5
|
||||
x: (parent.width - width) / 2
|
||||
implicitWidth: parent.width - 10
|
||||
implicitHeight: parent.height / 5 - parent.spacing
|
||||
|
||||
text: 'shutdown'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
HyprlandFocusGrab {
|
||||
id: grab
|
||||
windows: [ menu ]
|
||||
onCleared: menu.visible = false
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
import QtQuick // for Text
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
import Quickshell.Hyprland
|
||||
import Quickshell.Widgets
|
||||
|
||||
Item {
|
||||
implicitWidth: 10 + rep.count * (2 * lay.spacing + 25)
|
||||
implicitHeight: 30
|
||||
|
||||
Component.onCompleted: Hyprland.refreshWorkspaces()
|
||||
|
||||
ClippingWrapperRectangle {
|
||||
radius: 5
|
||||
anchors.fill: parent
|
||||
RowLayout {
|
||||
id: lay
|
||||
Repeater {
|
||||
id: rep
|
||||
|
||||
property var ws: {
|
||||
let arr = [];
|
||||
Hyprland.workspaces.values.forEach((w) => { if(w.id > 0) arr.push(w) })
|
||||
return arr;
|
||||
}
|
||||
|
||||
model: ws
|
||||
ClippingWrapperRectangle {
|
||||
Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter
|
||||
radius: 10
|
||||
implicitWidth: 25
|
||||
Button {
|
||||
background: Rectangle {
|
||||
color: Hyprland.focusedWorkspace.id == rep.model[index].id ? "#ffff00ff" : "#ff7744dd"
|
||||
anchors.fill: parent
|
||||
}
|
||||
text: rep.model[index].id
|
||||
onClicked: rep.model[index].activate()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
//@ pragma Env QS_NO_RELOAD_POPUP=1
|
||||
//@ pragma Env QSG_RENDER_LOOP=threaded
|
||||
//@ pragma Env QT_QUICK_FLICKABLE_WHEEL_DECELERATION=10000
|
||||
|
||||
//@ pragma UseQApplication
|
||||
|
||||
import Quickshell // for ShellRoot
|
||||
import qs.modules
|
||||
|
||||
ShellRoot {
|
||||
Bar {
|
||||
id: bar
|
||||
}
|
||||
}
|
||||
16
system/users/nathan/home-manager/dotfiles/swaylock/config
Executable file
@@ -0,0 +1,16 @@
|
||||
indicator
|
||||
ignore-empty-password
|
||||
indicator-thickness=10
|
||||
indicator-radius=100
|
||||
image=~/.cache/bg
|
||||
clock
|
||||
ring-color=33ddff55
|
||||
key-hl-color=dd4444
|
||||
line-color=00000000
|
||||
inside-color=00000088
|
||||
text-color=00a6f0
|
||||
text-clear-color=daa520
|
||||
ring-clear-color=002251
|
||||
separator-color=00000000
|
||||
grace=2
|
||||
fade-in=0.5
|
||||
@@ -0,0 +1,279 @@
|
||||
## Configuration file for CAVA.
|
||||
# Remove the ; to change parameters.
|
||||
|
||||
|
||||
[general]
|
||||
|
||||
# Smoothing mode. Can be 'normal', 'scientific' or 'waves'. DEPRECATED as of 0.6.0
|
||||
; mode = normal
|
||||
|
||||
# Accepts only non-negative values.
|
||||
; framerate = 60
|
||||
|
||||
# 'autosens' will attempt to decrease sensitivity if the bars peak. 1 = on, 0 = off
|
||||
# new as of 0.6.0 autosens of low values (dynamic range)
|
||||
# 'overshoot' allows bars to overshoot (in % of terminal height) without initiating autosens. DEPRECATED as of 0.6.0
|
||||
; autosens = 1
|
||||
; overshoot = 20
|
||||
|
||||
# Manual sensitivity in %. If autosens is enabled, this will only be the initial value.
|
||||
# 200 means double height. Accepts only non-negative values.
|
||||
; sensitivity = 100
|
||||
|
||||
# The number of bars (0-512). 0 sets it to auto (fill up console).
|
||||
# Bars' width and space between bars in number of characters.
|
||||
; bars = 0
|
||||
; bar_width = 2
|
||||
; bar_spacing = 1
|
||||
# bar_height is only used for output in "noritake" format
|
||||
; bar_height = 32
|
||||
|
||||
# For SDL width and space between bars is in pixels, defaults are:
|
||||
; bar_width = 20
|
||||
; bar_spacing = 5
|
||||
|
||||
# sdl_glsl have these default values, they are only used to calulate max number of bars.
|
||||
; bar_width = 1
|
||||
; bar_spacing = 0
|
||||
|
||||
|
||||
# Lower and higher cutoff frequencies for lowest and highest bars
|
||||
# the bandwidth of the visualizer.
|
||||
# Note: there is a minimum total bandwidth of 43Mhz x number of bars.
|
||||
# Cava will automatically increase the higher cutoff if a too low band is specified.
|
||||
; lower_cutoff_freq = 50
|
||||
; higher_cutoff_freq = 10000
|
||||
|
||||
|
||||
# Seconds with no input before cava goes to sleep mode. Cava will not perform FFT or drawing and
|
||||
# only check for input once per second. Cava will wake up once input is detected. 0 = disable.
|
||||
; sleep_timer = 0
|
||||
|
||||
|
||||
[input]
|
||||
|
||||
# Audio capturing method. Possible methods are: 'fifo', 'portaudio', 'pipewire', 'alsa', 'pulse', 'sndio', 'oss', 'jack' or 'shmem'
|
||||
# Defaults to 'oss', 'pipewire', 'sndio', 'jack', 'pulse', 'alsa', 'portaudio' or 'fifo', in that order, dependent on what support cava was built with.
|
||||
# On Mac it defaults to 'portaudio' or 'fifo'
|
||||
# On windows this is automatic and no input settings are needed.
|
||||
#
|
||||
# All input methods uses the same config variable 'source'
|
||||
# to define where it should get the audio.
|
||||
#
|
||||
# For pulseaudio and pipewire 'source' will be the source. Default: 'auto', which uses the monitor source of the default sink
|
||||
# (all pulseaudio sinks(outputs) have 'monitor' sources(inputs) associated with them).
|
||||
#
|
||||
# For pipewire 'source' will be the object name or object.serial of the device to capture from.
|
||||
# Both input and output devices are supported.
|
||||
#
|
||||
# For alsa 'source' will be the capture device.
|
||||
# For fifo 'source' will be the path to fifo-file.
|
||||
# For shmem 'source' will be /squeezelite-AA:BB:CC:DD:EE:FF where 'AA:BB:CC:DD:EE:FF' will be squeezelite's MAC address
|
||||
#
|
||||
# For sndio 'source' will be a raw recording audio descriptor or a monitoring sub-device, e.g. 'rsnd/2' or 'snd/1'. Default: 'default'.
|
||||
# README.md contains further information on how to setup CAVA for sndio.
|
||||
#
|
||||
# For oss 'source' will be the path to a audio device, e.g. '/dev/dsp2'. Default: '/dev/dsp', i.e. the default audio device.
|
||||
# README.md contains further information on how to setup CAVA for OSS on FreeBSD.
|
||||
#
|
||||
# For jack 'source' will be the name of the JACK server to connect to, e.g. 'foobar'. Default: 'default'.
|
||||
# README.md contains further information on how to setup CAVA for JACK.
|
||||
#
|
||||
; method = pulse
|
||||
; source = auto
|
||||
|
||||
; method = pipewire
|
||||
; source = auto
|
||||
|
||||
; method = alsa
|
||||
; source = hw:Loopback,1
|
||||
|
||||
; method = fifo
|
||||
; source = /tmp/mpd.fifo
|
||||
|
||||
; method = shmem
|
||||
; source = /squeezelite-AA:BB:CC:DD:EE:FF
|
||||
|
||||
; method = portaudio
|
||||
; source = auto
|
||||
|
||||
; method = sndio
|
||||
; source = default
|
||||
|
||||
; method = oss
|
||||
; source = /dev/dsp
|
||||
|
||||
; method = jack
|
||||
; source = default
|
||||
|
||||
# The options 'sample_rate', 'sample_bits', 'channels' and 'autoconnect' can be configured for some input methods:
|
||||
# sample_rate: fifo, pipewire, sndio, oss
|
||||
# sample_bits: fifo, pipewire, sndio, oss
|
||||
# channels: sndio, oss, jack
|
||||
# autoconnect: jack
|
||||
# Other methods ignore these settings.
|
||||
#
|
||||
# For 'sndio' and 'oss' they are only preferred values, i.e. if the values are not supported
|
||||
# by the chosen audio device, the device will use other supported values instead.
|
||||
# Example: 48000, 32 and 2, but the device only supports 44100, 16 and 1, then it
|
||||
# will use 44100, 16 and 1.
|
||||
#
|
||||
; sample_rate = 44100
|
||||
; sample_bits = 16
|
||||
; channels = 2
|
||||
; autoconnect = 2
|
||||
|
||||
|
||||
[output]
|
||||
|
||||
# Output method. Can be 'ncurses', 'noncurses', 'raw', 'noritake', 'sdl'
|
||||
# or 'sdl_glsl'.
|
||||
# 'noncurses' (default) uses a buffer and cursor movements to only print
|
||||
# changes from frame to frame in the terminal. Uses less resources and is less
|
||||
# prone to tearing (vsync issues) than 'ncurses'.
|
||||
#
|
||||
# 'raw' is an 8 or 16 bit (configurable via the 'bit_format' option) data
|
||||
# stream of the bar heights that can be used to send to other applications.
|
||||
# 'raw' defaults to 200 bars, which can be adjusted in the 'bars' option above.
|
||||
#
|
||||
# 'noritake' outputs a bitmap in the format expected by a Noritake VFD display
|
||||
# in graphic mode. It only support the 3000 series graphical VFDs for now.
|
||||
#
|
||||
# 'sdl' uses the Simple DirectMedia Layer to render in a graphical context.
|
||||
# 'sdl_glsl' uses SDL to create an OpenGL context. Write your own shaders or
|
||||
# use one of the predefined ones.
|
||||
; method = noncurses
|
||||
|
||||
# Orientation of the visualization. Can be 'bottom', 'top', 'left' or 'right'.
|
||||
# Default is 'bottom'. Other orientations are only supported on sdl and ncruses
|
||||
# output. Note: many fonts have weird glyphs for 'top' and 'right' characters,
|
||||
# which can make ncurses not look right.
|
||||
; orientation = bottom
|
||||
|
||||
# Visual channels. Can be 'stereo' or 'mono'.
|
||||
# 'stereo' mirrors both channels with low frequencies in center.
|
||||
# 'mono' outputs left to right lowest to highest frequencies.
|
||||
# 'mono_option' set mono to either take input from 'left', 'right' or 'average'.
|
||||
# set 'reverse' to 1 to display frequencies the other way around.
|
||||
; channels = stereo
|
||||
; mono_option = average
|
||||
; reverse = 0
|
||||
|
||||
# Raw output target. A fifo will be created if target does not exist.
|
||||
; raw_target = /dev/stdout
|
||||
|
||||
# Raw data format. Can be 'binary' or 'ascii'.
|
||||
; data_format = binary
|
||||
|
||||
# Binary bit format, can be '8bit' (0-255) or '16bit' (0-65530).
|
||||
; bit_format = 16bit
|
||||
|
||||
# Ascii max value. In 'ascii' mode range will run from 0 to value specified here
|
||||
; ascii_max_range = 1000
|
||||
|
||||
# Ascii delimiters. In ascii format each bar and frame is separated by a delimiters.
|
||||
# Use decimal value in ascii table (i.e. 59 = ';' and 10 = '\n' (line feed)).
|
||||
; bar_delimiter = 59
|
||||
; frame_delimiter = 10
|
||||
|
||||
# sdl window size and position. -1,-1 is centered.
|
||||
; sdl_width = 1000
|
||||
; sdl_height = 500
|
||||
; sdl_x = -1
|
||||
; sdl_y= -1
|
||||
; sdl_full_screen = 0
|
||||
|
||||
# set label on bars on the x-axis. Can be 'frequency' or 'none'. Default: 'none'
|
||||
# 'frequency' displays the lower cut off frequency of the bar above.
|
||||
# Only supported on ncurses and noncurses output.
|
||||
; xaxis = none
|
||||
|
||||
# enable alacritty synchronized updates. 1 = on, 0 = off
|
||||
# removes flickering in alacritty terminal emulator.
|
||||
# defaults to off since the behaviour in other terminal emulators is unknown
|
||||
; alacritty_sync = 0
|
||||
|
||||
# Shaders for sdl_glsl, located in $HOME/.config/cava/shaders
|
||||
; vertex_shader = pass_through.vert
|
||||
; fragment_shader = bar_spectrum.frag
|
||||
|
||||
; for glsl output mode, keep rendering even if no audio
|
||||
; continuous_rendering = 0
|
||||
|
||||
# disable console blank (screen saver) in tty
|
||||
# (Not supported on FreeBSD)
|
||||
; disable_blanking = 0
|
||||
|
||||
# show a flat bar at the bottom of the screen when idle, 1 = on, 0 = off
|
||||
; show_idle_bar_heads = 1
|
||||
|
||||
# show waveform instead of frequency spectrum, 1 = on, 0 = off
|
||||
; waveform = 0
|
||||
|
||||
[color]
|
||||
|
||||
# Colors can be one of seven predefined: black, blue, cyan, green, magenta, red, white, yellow.
|
||||
# Or defined by hex code '#xxxxxx' (hex code must be within ''). User defined colors requires
|
||||
# a terminal that can change color definitions such as Gnome-terminal or rxvt.
|
||||
# default is to keep current terminal color
|
||||
; background = default
|
||||
; foreground = default
|
||||
|
||||
# SDL and sdl_glsl only support hex code colors, these are the default:
|
||||
; background = '#111111'
|
||||
; foreground = '#33ffff'
|
||||
|
||||
|
||||
# Gradient mode, only hex defined colors are supported,
|
||||
# background must also be defined in hex or remain commented out. 1 = on, 0 = off.
|
||||
# You can define as many as 8 different colors. They range from bottom to top of screen
|
||||
gradient = 1
|
||||
gradient_count = 8
|
||||
gradient_color_1 = '{color1}'
|
||||
gradient_color_2 = '{color2}'
|
||||
gradient_color_3 = '{color3}'
|
||||
gradient_color_4 = '{color4}'
|
||||
gradient_color_5 = '{color5}'
|
||||
gradient_color_6 = '{color6}'
|
||||
gradient_color_7 = '{color7}'
|
||||
gradient_color_8 = '{color8}'
|
||||
|
||||
|
||||
|
||||
[smoothing]
|
||||
|
||||
# Percentage value for integral smoothing. Takes values from 0 - 100.
|
||||
# Higher values means smoother, but less precise. 0 to disable.
|
||||
# DEPRECATED as of 0.8.0, use noise_reduction instead
|
||||
; integral = 77
|
||||
|
||||
# Disables or enables the so-called "Monstercat smoothing" with or without "waves". Set to 0 to disable.
|
||||
; monstercat = 0
|
||||
; waves = 0
|
||||
|
||||
# Set gravity percentage for "drop off". Higher values means bars will drop faster.
|
||||
# Accepts only non-negative values. 50 means half gravity, 200 means double. Set to 0 to disable "drop off".
|
||||
# DEPRECATED as of 0.8.0, use noise_reduction instead
|
||||
; gravity = 100
|
||||
|
||||
|
||||
# In bar height, bars that would have been lower that this will not be drawn.
|
||||
# DEPRECATED as of 0.8.0
|
||||
; ignore = 0
|
||||
|
||||
# Noise reduction, int 0 - 100. default 77
|
||||
# the raw visualization is very noisy, this factor adjusts the integral and gravity filters to keep the signal smooth
|
||||
# 100 will be very slow and smooth, 0 will be fast but noisy.
|
||||
; noise_reduction = 77
|
||||
|
||||
|
||||
[eq]
|
||||
|
||||
# This one is tricky. You can have as much keys as you want.
|
||||
# Remember to uncomment more than one key! More keys = more precision.
|
||||
# Look at readme.md on github for further explanations and examples.
|
||||
; 1 = 1 # bass
|
||||
; 2 = 1
|
||||
; 3 = 1 # midtone
|
||||
; 4 = 1
|
||||
; 5 = 1 # treble
|
||||
@@ -0,0 +1,23 @@
|
||||
--accent-color: {color7};
|
||||
--border-color: {color3};
|
||||
--background-1: rgba({color0.rgb}, 200);
|
||||
--background-2: transparent;
|
||||
--background-mentioned: {color3} !important;
|
||||
--background-mentioned-hover: {color3} !important;
|
||||
--background-modifier-hover: {color6} !important;
|
||||
--background-modifier-active: {color3} !important;
|
||||
--text-normal: {color1} !important;
|
||||
--text-positive: {color2} !important;
|
||||
--text-muted: {color3} !important;
|
||||
--text-link: {color4} !important;
|
||||
--button-background: {color5} !important;
|
||||
--button-background-hover: {color0} !important;
|
||||
--button-background-active: {color0} !important;
|
||||
--button-accent-hover: {color0} !important;
|
||||
--button-accent-active: {color5} !important;
|
||||
--button-destructive: {color5} !important;
|
||||
--button-destructive-hover: {color4} !important;
|
||||
--button-destructive-active: {color4} !important;
|
||||
--settings-icon-color: {color0} !important;
|
||||
--tab-selected: {color2} !important;
|
||||
--switch: {color1} !important;
|
||||
@@ -0,0 +1,18 @@
|
||||
$foregroundCol = 0xff{foreground.strip}
|
||||
$backgroundCol = 0xff{background.strip}
|
||||
$color0 = 0xff{color0.strip}
|
||||
$color1 = 0xff{color1.strip}
|
||||
$color2 = 0xff{color2.strip}
|
||||
$color3 = 0xff{color3.strip}
|
||||
$color4 = 0xff{color4.strip}
|
||||
$color5 = 0xff{color5.strip}
|
||||
$color6 = 0xff{color6.strip}
|
||||
$color7 = 0xff{color7.strip}
|
||||
$color8 = 0xff{color8.strip}
|
||||
$color9 = 0xff{color9.strip}
|
||||
$color10 = 0xff{color10.strip}
|
||||
$color11 = 0xff{color11.strip}
|
||||
$color12 = 0xff{color12.strip}
|
||||
$color13 = 0xff{color13.strip}
|
||||
$color14 = 0xff{color14.strip}
|
||||
$color15 = 0xff{color15.strip}
|
||||
104
system/users/nathan/home-manager/packages/default.nix
Normal file
@@ -0,0 +1,104 @@
|
||||
{ config, lib, pkgs, inputs, ... }: let
|
||||
system = "x86_64-linux";
|
||||
|
||||
pkgs-us = import inputs.nixpkgs-us {
|
||||
inherit system;
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
|
||||
in {
|
||||
|
||||
imports = [
|
||||
./scripts
|
||||
];
|
||||
|
||||
options.homeconfig.minimal = lib.options.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
};
|
||||
|
||||
config = {
|
||||
|
||||
nixpkgs.config = lib.mkIf (!config.homeconfig.minimal) {
|
||||
allowUnfree = true;
|
||||
};
|
||||
|
||||
home.packages = with pkgs; ([
|
||||
|
||||
inputs.disko.packages.${pkgs.system}.disko-install
|
||||
|
||||
kjv
|
||||
openssh
|
||||
sops
|
||||
killall
|
||||
btop
|
||||
zip
|
||||
unzip
|
||||
rsync
|
||||
curl
|
||||
wget
|
||||
(python313.withPackages (ps: with ps; [
|
||||
gpustat
|
||||
numpy
|
||||
matplotlib
|
||||
scipy
|
||||
pandas
|
||||
pyaudio
|
||||
pyusb
|
||||
debugpy
|
||||
requests
|
||||
]))
|
||||
] ++ (if config.homeconfig.graphical then [
|
||||
grim
|
||||
slurp
|
||||
xfce.thunar
|
||||
wl-clipboard
|
||||
blueberry
|
||||
pkgs-us.quickshell
|
||||
] else []) ++ (if !config.homeconfig.minimal then [
|
||||
cava
|
||||
android-tools
|
||||
neovim-remote
|
||||
gcc
|
||||
zulu
|
||||
fastfetch
|
||||
ncmpcpp
|
||||
playerctl
|
||||
mpc-cli
|
||||
ffmpeg
|
||||
|
||||
] else []) ++ (if !config.homeconfig.minimal && config.homeconfig.graphical then [
|
||||
handbrake
|
||||
quickemu
|
||||
bottles
|
||||
|
||||
brightnessctl
|
||||
libdbusmenu-gtk3
|
||||
lmms
|
||||
|
||||
#unfree {
|
||||
geogebra
|
||||
spotify
|
||||
pkgs-us.discord
|
||||
#}
|
||||
pkgs-us.rustdesk-flutter
|
||||
pkgs-us.mpv
|
||||
vlc
|
||||
pavucontrol
|
||||
rpi-imager
|
||||
tigervnc
|
||||
keepassxc
|
||||
|
||||
#3D modeling/printing
|
||||
blender
|
||||
freecad-wayland
|
||||
cura-appimage
|
||||
|
||||
#productivity
|
||||
libreoffice
|
||||
|
||||
#games
|
||||
prismlauncher
|
||||
] else []));
|
||||
};
|
||||
}
|
||||
119
system/users/nathan/home-manager/packages/scripts/default.nix
Normal file
@@ -0,0 +1,119 @@
|
||||
{ config, lib, pkgs, ... }: {
|
||||
|
||||
options = {
|
||||
homeconfig.scripts.enable = lib.options.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = true;
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf config.homeconfig.scripts.enable {
|
||||
home.packages = [
|
||||
|
||||
#scripts
|
||||
(pkgs.writeShellScriptBin "_systemRebuild" ''
|
||||
${pkgs.nh}/bin/nh os switch --ask
|
||||
echo //////Enter to close//////
|
||||
read
|
||||
'')
|
||||
|
||||
|
||||
(pkgs.writeShellScriptBin "randWallpaper" ''
|
||||
file=''$(ls ${config.home.homeDirectory}/Pictures/Wallpaper/ | shuf -n 1)
|
||||
setWallpaper ${config.home.homeDirectory}/Pictures/Wallpaper/''$file
|
||||
'')
|
||||
|
||||
(pkgs.writeShellScriptBin "setWallpaper" ''
|
||||
|
||||
if [[ ! -d /tmp/nathan ]]; then
|
||||
mkdir /tmp/nathan
|
||||
fi
|
||||
|
||||
img=''$(realpath "''${1:-$(find ~/Pictures/Wallpaper/* | rofi -dmenu)}")
|
||||
n=''$(basename "''$img")
|
||||
ext="''${n''\#''\#*.}"
|
||||
|
||||
if [[ ''$ext == "gif" || ''$ext == "mp4" ]]; then
|
||||
yes | ${pkgs.ffmpeg}/bin/ffmpeg -i "''$img" -vframes 1 /tmp/nathan/tmp.jpg
|
||||
cp /tmp/nathan/tmp.jpg /tmp/nathan/tmp2.jpg
|
||||
pidof mpvpaper && pkill mpvpaper
|
||||
${pkgs.swww}/bin/swww img /tmp/nathan/tmp.jpg -t wipe
|
||||
${pkgs.hyprpanel}/bin/hyprpanel sw /tmp/nathan/tmp2.jpg
|
||||
sleep 0.3
|
||||
hyprctl dispatch exec "${pkgs.mpvpaper}/bin/mpvpaper ALL ''$img -o loop"
|
||||
${pkgs.hyprpanel}/bin/hyprpanel sw /tmp/nathan/tmp.jpg
|
||||
rm /tmp/nathan/tmp2.jpg
|
||||
else
|
||||
pidof mpvpaper && pkill mpvpaper
|
||||
hyprctl dispatch exec "${pkgs.swww}/bin/swww img ''$img -t wipe"
|
||||
${pkgs.hyprpanel}/bin/hyprpanel sw "''$img"
|
||||
fi
|
||||
|
||||
changeColors "''$img" "''$2"
|
||||
'')
|
||||
|
||||
(pkgs.writeShellScriptBin "changeColors" ''
|
||||
|
||||
img=''$(realpath "''$1")
|
||||
alpha=''${2:-70}
|
||||
|
||||
if [[ ''$alpha -lt 0 ]]; then
|
||||
alpha=0
|
||||
elif [[ ''$alpha -gt 100 ]]; then
|
||||
alpha=100
|
||||
fi
|
||||
|
||||
if [[ -f ~/.config/wal/colorschemes/dark/''$(basename "''$img")-''$alpha.json ]]; then
|
||||
${pkgs.pywal16}/bin/wal -n -f "''$(basename "''$img")-''$alpha"
|
||||
else
|
||||
${pkgs.pywal16}/bin/wal -n -i "''$img" -a "''$alpha" --cols16 -p "''$(basename "''$img")-''$alpha"
|
||||
fi
|
||||
|
||||
colorPrefix
|
||||
'')
|
||||
|
||||
(pkgs.writeShellScriptBin "colorPrefix" ''
|
||||
exec -a "$0" "$@" &
|
||||
sleep 0.4
|
||||
${pkgs.pywalfox-native}/bin/pywalfox update &
|
||||
pkill -USR1 kitty
|
||||
pidof cava && pkill -USR1 cava
|
||||
for i in ''$(ls /run/user/1000 | grep nvim); do
|
||||
${pkgs.neovim-remote}/bin/nvr -s --servername /run/user/1000/''$i --remote-send '<cmd>colorscheme pywal<CR>';
|
||||
done
|
||||
'')
|
||||
|
||||
(pkgs.writeShellScriptBin "onSystemStart" ''
|
||||
|
||||
if [[ ! -d /tmp/nathan ]]; then
|
||||
mkdir /tmp/nathan
|
||||
fi
|
||||
|
||||
if [[ -f ${config.home.homeDirectory}/.local/share/calcurse/.calcurse.pid ]]; then
|
||||
rm ${config.home.homeDirectory}/.local/share/calcurse/.calcurse.pid
|
||||
fi
|
||||
|
||||
hyprctl --batch "\
|
||||
dispatch exec ${pkgs.swww}/bin/swww-daemon ;\
|
||||
dispatch exec setWallpaper ${config.home.homeDirectory}/Pictures/Wallpaper/bluescape.jpg ;\
|
||||
dispatch exec ${pkgs.pyprland}/bin/pypr ;\
|
||||
dispatch exec ${pkgs.netbird-ui}/bin/netbird-ui ;\
|
||||
dispatch exec ${pkgs.hyprpolkitagent}/libexec/hyprpolkitagent ;\
|
||||
setcursor Bibata-Modern-Classic 16"
|
||||
sleep 3
|
||||
hyprctl reload
|
||||
hyprctl dispatch exec ${pkgs.pyprland}/bin/pypr toggle calendar
|
||||
#tmux new-session -s hyprland
|
||||
'')
|
||||
|
||||
] ++ (if config.homeconfig.standalone.enable then [
|
||||
|
||||
(pkgs.writeShellScriptBin "_homeRebuild" ''
|
||||
${pkgs.nh}/bin/nh home switch --ask
|
||||
echo //////Enter to close//////
|
||||
read
|
||||
'')
|
||||
] else []);
|
||||
};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
{ config, lib, pkgs, ... }: {
|
||||
|
||||
options.homeconfig.calcurse.enable = lib.options.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
};
|
||||
|
||||
config = lib.mkIf config.homeconfig.calcurse.enable {
|
||||
home.packages = with pkgs; [
|
||||
calcurse
|
||||
libnotify
|
||||
];
|
||||
};
|
||||
}
|
||||
24
system/users/nathan/home-manager/programs/default.nix
Normal file
@@ -0,0 +1,24 @@
|
||||
{ config, lib, pkgs, inputs, ... }: {
|
||||
|
||||
imports = [
|
||||
./git
|
||||
./nh
|
||||
./hyprland
|
||||
./hyprpanel
|
||||
./terminal
|
||||
./rofi
|
||||
./pywal
|
||||
./hyprlock
|
||||
./calcurse
|
||||
./firefox
|
||||
];
|
||||
|
||||
config = lib.mkIf (config.homeconfig.host != "android") {
|
||||
|
||||
home.packages = lib.mkIf (!config.homeconfig.wal.enable) [
|
||||
inputs.nixvim.packages.${pkgs.system}.default
|
||||
];
|
||||
|
||||
home.sessionVariables.EDITOR = "nvim";
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
{ config, lib, pkgs, inputs, ... }: {
|
||||
|
||||
options.homeconfig.firefox.enable = lib.options.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
};
|
||||
|
||||
config = lib.mkIf config.homeconfig.firefox.enable {
|
||||
|
||||
home.sessionVariables.BROWSER = "${config.programs.firefox.package}/bin/firefox";
|
||||
|
||||
home.packages = lib.mkIf config.homeconfig.wal.enable [
|
||||
pkgs.pywalfox-native
|
||||
];
|
||||
|
||||
home.file.".mozilla/native-messaging-hosts/pywalfox.json".text = let
|
||||
pywalfox-wrapper = pkgs.writeShellScriptBin "pywalfox-wrapper" ''
|
||||
${pkgs.pywalfox-native}/bin/pywalfox start
|
||||
'';
|
||||
in lib.replaceStrings [ "<path>" ] [
|
||||
"${pywalfox-wrapper}/bin/pywalfox-wrapper"
|
||||
] (lib.readFile "${pkgs.pywalfox-native}/lib/python3.12/site-packages/pywalfox/assets/manifest.json");
|
||||
|
||||
|
||||
programs.firefox = {
|
||||
|
||||
enable = true;
|
||||
package = pkgs.firefox;
|
||||
|
||||
profiles.nathan = {
|
||||
search = {
|
||||
default = "ddg";
|
||||
privateDefault = "ddg";
|
||||
force = true;
|
||||
};
|
||||
bookmarks = {
|
||||
force = true;
|
||||
settings = [
|
||||
{
|
||||
name = "toolbar";
|
||||
toolbar = true;
|
||||
bookmarks = [
|
||||
{
|
||||
name = "NixOS Search - Packages";
|
||||
url = "https://search.nixos.org/packages";
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
extensions.packages = with inputs.firefox-addons.packages.${pkgs.system}; [
|
||||
ublock-origin
|
||||
keepassxc-browser
|
||||
pywalfox
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
44
system/users/nathan/home-manager/programs/git/default.nix
Normal file
@@ -0,0 +1,44 @@
|
||||
{ config, lib, ... }: {
|
||||
|
||||
options.homeconfig.git.enable = lib.options.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
};
|
||||
|
||||
config = lib.mkIf config.homeconfig.git.enable {
|
||||
|
||||
sops = {
|
||||
secrets = {
|
||||
"git/username" = {};
|
||||
"git/email" = {};
|
||||
};
|
||||
|
||||
templates.gitconfig.content = ''
|
||||
[user]
|
||||
name = "${config.sops.placeholder."git/username"}"
|
||||
email = "${config.sops.placeholder."git/email"}"
|
||||
'';
|
||||
};
|
||||
|
||||
programs.git = {
|
||||
enable = true;
|
||||
|
||||
includes = [
|
||||
{ path = "${config.sops.templates.gitconfig.path}"; }
|
||||
];
|
||||
|
||||
extraConfig = {
|
||||
init = {
|
||||
defaultBranch = "master";
|
||||
};
|
||||
url = {
|
||||
"ssh://gitea@gitea.blunkall.us/" = {
|
||||
insteadOf = [
|
||||
"blunkall:"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
{ config, lib, pkgs, ... }: {
|
||||
|
||||
options.homeconfig.hyprland.enable = lib.options.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
};
|
||||
|
||||
config = lib.mkIf config.homeconfig.hyprland.enable {
|
||||
|
||||
home.sessionVariables.NIX_OZONE_WL = "1";
|
||||
|
||||
programs.kitty.enable = lib.mkDefault true;
|
||||
|
||||
home.packages = with pkgs; [
|
||||
pyprland
|
||||
];
|
||||
|
||||
home.activation.extraHyprFile = lib.hm.dag.entryAfter ["writeBoundary"] ''
|
||||
if [[ ! -f ${config.home.homeDirectory}/.config/hypr/otf.conf ]]; then
|
||||
touch ${config.home.homeDirectory}/.config/hypr/otf.conf
|
||||
fi
|
||||
|
||||
if [[ ! -f ${config.home.homeDirectory}/.config/background ]]; then
|
||||
cp ${config.home.homeDirectory}/Pictures/Wallpaper/bluescape.jpg ${config.home.homeDirectory}/.config/background
|
||||
chmod 600 ${config.home.homeDirectory}/.config/background
|
||||
fi
|
||||
'';
|
||||
|
||||
|
||||
wayland.windowManager.hyprland = {
|
||||
|
||||
enable = true;
|
||||
|
||||
systemd = {
|
||||
enable = true;
|
||||
variables = [ "--all" ];
|
||||
};
|
||||
|
||||
extraConfig = (if config.homeconfig.host == "laptop" then ''
|
||||
bind = CTRL SHIFT, XF86Launch2, exec, bash -c 'if [[ $(hyprctl monitors | grep 0x0 | sed -n -e "s/\t*1920x1080@//" -e "s/.[1234567890]* at 0x0//p") == 300 ]]; then pkexec --user root /nix/var/nix/profiles/system/bin/switch-to-configuration switch; else pkexec --user root /nix/var/nix/profiles/system/specialisation/docked/bin/switch-to-configuration switch; fi'
|
||||
bind = ALT, Escape, exec, if [[ $(hyprctl monitors | grep 0x0 | sed -n -e "s/\t*1920x1080@//" -e "s/.[1234567890]* at 0x0//p") == 300 ]]; then hyprctl keyword monitor eDP-1,1920x1080@60,0x0,1; else hyprctl keyword monitor eDP-1,1920x1080@300,0x0,1; fi
|
||||
'' else if config.homeconfig.host == "homebox" then ''
|
||||
monitor=HDMI-A-2,1920x1080@60,0x0,1
|
||||
monitor=HEADLESS-2,1920x1080@60,0x0,1
|
||||
exec-once=hyprctl output create headless HEADLESS-2
|
||||
exec-once=hyprctl keyword monitor HDMI-A-2,disable
|
||||
exec-once=${pkgs.wayvnc}/bin/wayvnc 0.0.0.0 -o HEADLESS-2
|
||||
'' else if config.homeconfig.host == "container" then ''
|
||||
monitor=HEADLESS-2,1920x1080@60,0x0,1
|
||||
exec-once=hyprctl output create headless HEADLESS-2
|
||||
exec-once=${pkgs.wayvnc}/bin/wayvnc 0.0.0.0 -o HEADLESS-2
|
||||
'' else ''
|
||||
monitor= , prefered, auto, 1
|
||||
'') + (if config.homeconfig.hyprpanel.enable then ''
|
||||
bind = , Print, exec, bash -c ${pkgs.hyprpanel}/share/scripts/screenshot.sh"
|
||||
'' else ''
|
||||
bind = , Print, exec, grim -g "$(slurp)"
|
||||
'') + ''
|
||||
source = ${config.home.homeDirectory}/.config/hypr/main.conf
|
||||
|
||||
exec-shutdown = if [[ -f ${config.home.homeDirectory}/.local/share/calcurse/.calcurse.pid ]]; then rm ${config.home.homeDirectory}/.local/share/calcurse/.calcurse.pid; fi
|
||||
'';
|
||||
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
{ config, lib, pkgs, ... }: {
|
||||
|
||||
options.homeconfig.hyprlock.enable = lib.options.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
};
|
||||
|
||||
config = lib.mkIf config.homeconfig.hyprlock.enable {
|
||||
|
||||
programs.hyprlock = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
services.hypridle = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
|
||||
general = {
|
||||
lock_cmd = "pidof hyprlock || hyprlock"; # avoid starting multiple hyprlock instances.
|
||||
before_sleep_cmd = "loginctl lock-session"; # lock before suspend.
|
||||
after_sleep_cmd = "hyprctl --instance 0 dispatch dpms on"; # to avoid having to press a key twice to turn on the display.
|
||||
};
|
||||
|
||||
listener = [
|
||||
|
||||
{
|
||||
timeout = 150; # 2.5min.
|
||||
on-timeout = "brightnessctl -s set 10"; # set monitor backlight to minimum, avoid 0 on OLED monitor.
|
||||
on-resume = "brightnessctl -r"; # monitor backlight restore.
|
||||
}
|
||||
|
||||
{
|
||||
timeout = 300; # 5min
|
||||
on-timeout = "loginctl lock-session"; # lock screen when timeout has passed
|
||||
}
|
||||
|
||||
{
|
||||
timeout = 330; # 5.5min
|
||||
on-timeout = "hyprctl --instance 0 dispatch dpms off"; # screen off when timeout has passed
|
||||
on-resume = "hyprctl --instance 0 dispatch dpms on && brightnessctl -r"; # screen on when activity is detected after timeout has fired.
|
||||
}
|
||||
|
||||
{
|
||||
timeout = 1800; # 30min
|
||||
on-timeout = "systemctl suspend"; # suspend pc
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
{ config, lib, ... }: {
|
||||
|
||||
options.homeconfig.hyprpanel.enable = with lib; mkOption {
|
||||
type = with types; bool;
|
||||
default = false;
|
||||
};
|
||||
|
||||
config = lib.mkIf config.homeconfig.hyprpanel.enable {
|
||||
|
||||
programs.hyprpanel = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
21
system/users/nathan/home-manager/programs/nh/default.nix
Normal file
@@ -0,0 +1,21 @@
|
||||
{ config, lib, ... }: {
|
||||
|
||||
options.homeconfig.nh.enable = lib.options.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
};
|
||||
|
||||
config = lib.mkIf config.homeconfig.nh.enable {
|
||||
|
||||
programs.nh = {
|
||||
enable = true;
|
||||
flake = "${config.home.homeDirectory}/Projects/Olympus";
|
||||
|
||||
clean = {
|
||||
enable = true;
|
||||
dates = "weekly";
|
||||
extraArgs = "--keep 5 --keep-since 5d";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
19
system/users/nathan/home-manager/programs/pywal/default.nix
Normal file
@@ -0,0 +1,19 @@
|
||||
{ config, lib, pkgs, inputs, ... }: {
|
||||
|
||||
options.homeconfig.wal.enable = lib.options.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
};
|
||||
|
||||
config = lib.mkIf config.homeconfig.wal.enable {
|
||||
|
||||
home.packages = with pkgs; [
|
||||
inputs.nixvim.packages.${pkgs.system}.pywal
|
||||
|
||||
pywal16
|
||||
imagemagick
|
||||
];
|
||||
|
||||
|
||||
};
|
||||
}
|
||||
20
system/users/nathan/home-manager/programs/rofi/default.nix
Normal file
@@ -0,0 +1,20 @@
|
||||
{ config, lib, pkgs, ... }: {
|
||||
|
||||
options.homeconfig.rofi.enable = lib.options.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
};
|
||||
|
||||
config = lib.mkIf config.homeconfig.rofi.enable {
|
||||
programs.rofi = {
|
||||
|
||||
enable = true;
|
||||
package = pkgs.rofi-wayland;
|
||||
|
||||
cycle = true;
|
||||
|
||||
theme = "/home/nathan/.cache/wal/colors-rofi-dark.rasi";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
{ config, lib, pkgs, ... }: {
|
||||
|
||||
home.packages = with pkgs; [ oh-my-posh ];
|
||||
|
||||
programs.bash = {
|
||||
enable = true;
|
||||
enableCompletion = true;
|
||||
|
||||
shellAliases = {
|
||||
ls = "eza";
|
||||
ll = "ls -l";
|
||||
|
||||
ksh = "kitten ssh";
|
||||
|
||||
vi = "nvim";
|
||||
vim = "nvim";
|
||||
|
||||
};
|
||||
|
||||
bashrcExtra = ''
|
||||
source ${pkgs.blesh}/share/blesh/ble.sh
|
||||
'';
|
||||
|
||||
initExtra = if config.homeconfig.wal.enable then (lib.mkBefore ''
|
||||
cat ${config.home.homeDirectory}/.cache/wal/sequences
|
||||
eval "$(oh-my-posh init bash --config ${config.home.homeDirectory}/.cache/wal/ohmyposh.toml)"
|
||||
'') else (lib.mkBefore ''
|
||||
eval "$(oh-my-posh init bash --config ${config.home.homeDirectory}/.config/ohmyposh/ohmyposh.toml)"
|
||||
'');
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
{ config, lib, pkgs, ... }: {
|
||||
|
||||
programs.bat = {
|
||||
|
||||
enable = true;
|
||||
|
||||
extraPackages = with pkgs.bat-extras; [
|
||||
batman
|
||||
batpipe
|
||||
batgrep
|
||||
batdiff
|
||||
batwatch
|
||||
prettybat
|
||||
];
|
||||
|
||||
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
{ ... }: {
|
||||
|
||||
imports = [
|
||||
./bat
|
||||
./bash
|
||||
./eza
|
||||
./fzf
|
||||
./lf
|
||||
./tmux
|
||||
./kitty
|
||||
./zoxide
|
||||
./zsh
|
||||
./ssh
|
||||
./ohmyposh
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
{ config, lib, pkgs, ... }: {
|
||||
|
||||
programs.eza = {
|
||||
|
||||
enable = true;
|
||||
|
||||
enableZshIntegration = true;
|
||||
|
||||
extraOptions = [
|
||||
"--color=auto"
|
||||
];
|
||||
|
||||
git = true;
|
||||
|
||||
icons = "auto";
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
{ config, lib, pkgs, ... }: {
|
||||
|
||||
programs.fzf = {
|
||||
|
||||
enable = true;
|
||||
|
||||
enableZshIntegration = true;
|
||||
|
||||
tmux = {
|
||||
#enableShellIntegration = true;
|
||||
|
||||
#shellIntegrationOptions = [];
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
{ config, ... }: {
|
||||
|
||||
programs.kitty = {
|
||||
|
||||
enable = true;
|
||||
|
||||
font = {
|
||||
name = "FiraCode Nerd Font";
|
||||
size = 12;
|
||||
};
|
||||
|
||||
extraConfig = ''
|
||||
|
||||
confirm_os_window_close 0
|
||||
|
||||
include ${config.home.homeDirectory}/.cache/wal/colors-kitty.conf
|
||||
|
||||
disable_ligatures never
|
||||
|
||||
dynamic_background_opacity yes
|
||||
|
||||
tab_bar_edge top
|
||||
|
||||
map ctrl+shift+t new_tab
|
||||
map ctrl+shift+w close_tab
|
||||
|
||||
map ctrl+tab next_tab
|
||||
map ctrl+shift+tab previous_tab
|
||||
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
{ ... }: {
|
||||
config = {
|
||||
programs.lf = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,132 @@
|
||||
{ config, lib, pkgs, ... }: {
|
||||
|
||||
home.packages = with pkgs; [
|
||||
oh-my-posh
|
||||
];
|
||||
|
||||
programs.zsh = {
|
||||
|
||||
initContent = if config.homeconfig.wal.enable then (lib.mkBefore ''
|
||||
cat ${config.home.homeDirectory}/.cache/wal/sequences
|
||||
eval "$(oh-my-posh init zsh --config ${config.home.homeDirectory}/.cache/wal/ohmyposh.toml)"
|
||||
'') else (lib.mkBefore ''
|
||||
eval "$(oh-my-posh init zsh --config ${config.home.homeDirectory}/.config/ohmyposh/ohmyposh.toml)"
|
||||
'');
|
||||
|
||||
};
|
||||
|
||||
home.file.".config/wal/templates/ohmyposh.toml".text = ''
|
||||
#:schema https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json
|
||||
|
||||
version = 2
|
||||
final_space = true
|
||||
console_title_template = '{{{{ .Shell }}}} in {{{{ .Folder }}}}'
|
||||
|
||||
[[blocks]]
|
||||
type = 'prompt'
|
||||
alignment = 'left'
|
||||
newline = true
|
||||
|
||||
[[blocks.segments]]
|
||||
type = 'os'
|
||||
style = 'diamond'
|
||||
trailing_diamond = ''
|
||||
background = 'p:c1'
|
||||
foreground = 'p:c12'
|
||||
template = ' {{{{ .Icon }}}} '
|
||||
|
||||
[[blocks.segments]]
|
||||
type = 'session'
|
||||
style = 'diamond'
|
||||
trailing_diamond = ''
|
||||
background = 'p:c2'
|
||||
foreground = 'p:c14'
|
||||
template = '{{{{ .UserName }}}}@{{{{ .HostName }}}}'
|
||||
|
||||
[[blocks.segments]]
|
||||
type = 'path'
|
||||
style = 'diamond'
|
||||
trailing_diamond = ''
|
||||
background = 'p:c4'
|
||||
foreground = 'p:c13'
|
||||
template = '{{{{ .Path }}}}'
|
||||
|
||||
[blocks.segments.properties]
|
||||
style = 'full'
|
||||
|
||||
[[blocks]]
|
||||
type = 'prompt'
|
||||
overflow = 'hidden'
|
||||
alignment = 'right'
|
||||
|
||||
[[blocks.segments]]
|
||||
type = 'executiontime'
|
||||
style = 'diamond'
|
||||
leading_diamond = ''
|
||||
background = 'p:c4'
|
||||
foreground = 'p:c13'
|
||||
template = '{{{{ .FormattedMs }}}}'
|
||||
|
||||
[[blocks.segments]]
|
||||
type = 'time'
|
||||
style = 'diamond'
|
||||
leading_diamond = ''
|
||||
background = 'p:c2'
|
||||
foreground = 'p:c14'
|
||||
|
||||
[[blocks.segments]]
|
||||
type = 'shell'
|
||||
style = 'diamond'
|
||||
leading_diamond = ''
|
||||
background = 'p:c1'
|
||||
foreground = 'p:c12'
|
||||
|
||||
[[blocks]]
|
||||
type = 'prompt'
|
||||
alignment = 'left'
|
||||
newline = true
|
||||
|
||||
[[blocks.segments]]
|
||||
type = 'text'
|
||||
style = 'plain'
|
||||
background = 'transparent'
|
||||
foreground_templates = [
|
||||
"{{{{ if gt .Code 0 }}}}p:c13{{{{end}}}}",
|
||||
"{{{{ if eq .Code 0 }}}}p:c14{{{{end}}}}",
|
||||
]
|
||||
template = "{{{{ if gt .Code 0 }}}}!❭ {{{{else}}}}❭ {{{{end}}}}"
|
||||
|
||||
[transient_prompt]
|
||||
foreground_templates = [
|
||||
"{{{{ if gt .Code 0 }}}}p:c13{{{{end}}}}",
|
||||
"{{{{ if eq .Code 0 }}}}p:c14{{{{end}}}}",
|
||||
]
|
||||
background = 'transparent'
|
||||
template = "{{{{ if gt .Code 0 }}}}!❭ {{{{else}}}}❭ {{{{end}}}}"
|
||||
|
||||
[secondary_prompt]
|
||||
background = 'transparent'
|
||||
forground = 'p:c14'
|
||||
template = "❭❭ "
|
||||
|
||||
|
||||
[palette]
|
||||
|
||||
c0 = "{color0}"
|
||||
c1 = "{color1}"
|
||||
c2 = "{color2}"
|
||||
c3 = "{color3}"
|
||||
c4 = "{color4}"
|
||||
c5 = "{color5}"
|
||||
c6 = "{color6}"
|
||||
c7 = "{color7}"
|
||||
c8 = "{color8}"
|
||||
c9 = "{color9}"
|
||||
c10 = "{color10}"
|
||||
c11 = "{color11}"
|
||||
c12 = "{color12}"
|
||||
c13 = "{color13}"
|
||||
c14 = "{color14}"
|
||||
c15 = "{color15}"
|
||||
'';
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{ config, lib, pkgs, ... }: {
|
||||
|
||||
programs.ssh = {
|
||||
|
||||
enable = true;
|
||||
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{ config, lib, pkgs, ... }: {
|
||||
|
||||
programs.tmux = {
|
||||
|
||||
enable = true;
|
||||
|
||||
clock24 = true;
|
||||
|
||||
mouse = true;
|
||||
|
||||
baseIndex = 1;
|
||||
|
||||
keyMode = "vi";
|
||||
|
||||
prefix = "C-b";
|
||||
|
||||
shell = "${pkgs.zsh}/bin/zsh";
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
{ config, lib, pkgs, ... }: {
|
||||
|
||||
programs.zoxide = {
|
||||
|
||||
enable = true;
|
||||
|
||||
enableZshIntegration = true;
|
||||
|
||||
options = [
|
||||
"--cmd cd"
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
{ config, lib, pkgs, ... }: {
|
||||
|
||||
programs.zsh = {
|
||||
|
||||
enable = true;
|
||||
|
||||
enableCompletion = true;
|
||||
|
||||
autosuggestion.enable = true;
|
||||
|
||||
syntaxHighlighting.enable = true;
|
||||
|
||||
shellAliases = {
|
||||
ls = "eza";
|
||||
ll = "ls -l";
|
||||
|
||||
ksh = "kitten ssh";
|
||||
|
||||
vi = "nvim";
|
||||
vim = "nvim";
|
||||
|
||||
python = "python3.13";
|
||||
python3 = "python3.13";
|
||||
};
|
||||
|
||||
history = {
|
||||
size = 5000;
|
||||
ignoreAllDups = true;
|
||||
ignoreSpace = true;
|
||||
share = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
36
system/users/nathan/home-manager/secrets.yaml
Normal file
@@ -0,0 +1,36 @@
|
||||
git:
|
||||
username: ENC[AES256_GCM,data:418z4cCK,iv:tgPmynsW8fEJs6n+OGfm6IypOjNNhVdVaqFImeKXpC4=,tag:V5zI47vb9FnSO/OWurbJ+A==,type:str]
|
||||
email: ENC[AES256_GCM,data:xp6HlIO1pTgvrXpGAOQwl0UvcnY4zrLrmw==,iv:LzGkluWeSe8MQqPXQMnNOv062UY+BkQE1fGjGqd/nCg=,tag:Y9nwo+Hjcg4ea2GxGKWApA==,type:str]
|
||||
sops:
|
||||
age:
|
||||
- recipient: age1yqgyp2uxz4lzrc9f9ka0mfjl5fr6ahf8nf24nlmran2wulg6fpvq9hyp9q
|
||||
enc: |
|
||||
-----BEGIN AGE ENCRYPTED FILE-----
|
||||
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBvMktJdFhxRjhaT0MyZ0N3
|
||||
YVBMYlNkRnl1eU8zajZLWXRPajZzWDBGQWxVCkhMcEdsNlVKQ1VHR2hjZWdsR1gx
|
||||
MkhCeVZGUDJwdkdDTiswRW40QjRRYWMKLS0tIENIN2pheisyR21YZkIzblVZZ1cw
|
||||
bHpLWEdPdUc4d2ZSS1FjUDM0QWRQUWsKqvlH0oWHH/PhMDTYT5KhCTzaEffsf1jM
|
||||
r0o60YUCe6pUFs0qPvOxEPM3bq+7MkUpH4eXVAw3tCov3nUkmwlVZg==
|
||||
-----END AGE ENCRYPTED FILE-----
|
||||
- recipient: age1640eg0pnmkruc89m5xguz0m8fek44fl4tzez6qwuzlz6kmapqewsp8esxd
|
||||
enc: |
|
||||
-----BEGIN AGE ENCRYPTED FILE-----
|
||||
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSB5K3ovcmpPck1reGVPQ0lm
|
||||
YTYvNGtaSk4vLzlYSW0rSkpHcjZWUnBMS2dBCmt3RU1PMkJ1VU5wNUc1NC9lbGFk
|
||||
cjl6cXp6M292enFHckkyamwwaDRia2MKLS0tIGRUTzFGdDZFaS9LdkRjMW56U25B
|
||||
emRDTncvNnlycHF3V2VJN3NlZTNVSjgK8RUx9qImdqjHBHisnwY+qRZ9vuafl3MN
|
||||
jnJsIsKSdF51dWYskEMVnPYwn9HdOKkAh6amwSITcw3ZCcK7ftfT+g==
|
||||
-----END AGE ENCRYPTED FILE-----
|
||||
- recipient: age12pnf36uqesjmy3e0lythfnpwam3zg5mv8m936fc4jphy4ces2fdqwn0s74
|
||||
enc: |
|
||||
-----BEGIN AGE ENCRYPTED FILE-----
|
||||
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBRWXVTSVQvNEhsMkQ2QkRl
|
||||
SlZLTWN2eUdMa3MwdTBHZE8vdENKTTRKYVF3Ck01N2VNQUJPeHBwVHZTNWYzbXR5
|
||||
ZS9hUDQydy9nQnR0SVpiUHV6ejhPb0EKLS0tIEZKeXV5QnpZYzBCVDR3WjVSV2Vv
|
||||
TmJkL3VUbTRLNGNISGhFaGpmaXJ1cDAKpiZ8Nfml0KFq46JRg+394BCyZmnpE4XC
|
||||
zqxRrNlGH/EDp00q5/jN84vQA+bOhGHcScQpvRCDKMXehQn3H4jksw==
|
||||
-----END AGE ENCRYPTED FILE-----
|
||||
lastmodified: "2025-08-16T16:08:48Z"
|
||||
mac: ENC[AES256_GCM,data:3/ztJNXhOIPqgQ47QxjM5KTeAJwXPpUuVtvI5/xJsMOOZhXYRt+uhL584F98rJiMHhnbsuGIZi+jGlYRiE6c+GJ9X7TKLj9yRqKvCMSCdWHGzY721GH5kMPcjD2YDYZ4tt+olIMePNJBPjC1XJgfhfOvs43o2HyDTCS95cEQzB4=,iv:qofZBAwxbTrc/hPyuSi8nxibJ0bGhoytZpUTZwwzbuI=,tag:z1SJXutJmlJ+j6RnV4u29Q==,type:str]
|
||||
unencrypted_suffix: _unencrypted
|
||||
version: 3.10.2
|
||||
@@ -0,0 +1 @@
|
||||
{}: {}
|
||||
5
system/users/nathan/home-manager/services/default.nix
Normal file
@@ -0,0 +1,5 @@
|
||||
{ ... }: {
|
||||
imports = [
|
||||
./mpd
|
||||
];
|
||||
}
|
||||
41
system/users/nathan/home-manager/services/mpd/default.nix
Normal file
@@ -0,0 +1,41 @@
|
||||
{ config, lib, pkgs, ... }: {
|
||||
|
||||
options = {
|
||||
homeconfig.mpd.enable = lib.options.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf config.homeconfig.mpd.enable {
|
||||
services.mpd = {
|
||||
enable = true;
|
||||
network.startWhenNeeded = true;
|
||||
network.port = 6600;
|
||||
network.listenAddress = "127.0.0.1";
|
||||
musicDirectory = "/home/nathan/Music";
|
||||
extraConfig = ''
|
||||
audio_output {
|
||||
type "pipewire"
|
||||
name "Audio1"
|
||||
}
|
||||
audio_output {
|
||||
type "fifo"
|
||||
name "visualizer"
|
||||
path "/tmp/mpd.fifo"
|
||||
format "44100:16:1"
|
||||
}
|
||||
'';
|
||||
};
|
||||
|
||||
services.mpdris2 = {
|
||||
enable = true;
|
||||
mpd.host = "127.0.0.1";
|
||||
mpd.port = 6600;
|
||||
package = pkgs.mpdris2;
|
||||
mpd.musicDirectory = "/home/nathan/Music";
|
||||
notifications = true;
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
19
system/users/nathan/system/default.nix
Normal file
@@ -0,0 +1,19 @@
|
||||
{ config, lib, pkgs, ... }: {
|
||||
|
||||
config = with config.sysconfig;
|
||||
lib.mkIf (users ? nathan && users.nathan.usePresets) {
|
||||
|
||||
sops.secrets."nathan/pass".neededForUsers = true;
|
||||
|
||||
users.users.nathan = {
|
||||
shell = pkgs.zsh;
|
||||
name = "nathan";
|
||||
isNormalUser = true;
|
||||
#hashedPasswordFile = lib.mkIf (cfg.hashedPasswordFile != null) cfg.hashedPasswordFile;
|
||||
extraGroups = [ "networkmanager" ];
|
||||
openssh.authorizedKeys.keys = lib.mkIf config.sysconfig.services.openssh.enable (cfg.ssh.keys ++ (map (z: config.sysconfig.sshHostKeys.${z}) cfg.ssh.hosts));
|
||||
packages = with pkgs; lib.mkIf (cfg.home-manager.enable && cfg.home-manager.standalone) [ home-manager ];
|
||||
|
||||
};
|
||||
};
|
||||
}
|
||||