This commit is contained in:
gwg313 2025-01-15 13:28:20 -05:00
parent badcf3aa40
commit 42a0bf27e0
Signed by: gwg313
GPG key ID: 60FF63B4826B7400
24 changed files with 2870 additions and 392 deletions

View file

@ -4,6 +4,7 @@
./alacritty.nix
./fuzzel.nix
./kitty.nix
./ghostty.nix
];
fonts.fontconfig.enable = true;

View file

@ -8,7 +8,7 @@
imports = [
./atuin.nix
./bat.nix
./broot.nix
# ./broot.nix
./eza.nix
./git.nix
./pass.nix
@ -16,13 +16,14 @@
./tmux/tmux.nix
./zoxide.nix
./zsh.nix
./nushell.nix
./nushell/default.nix
];
nixpkgs.config.allowUnfree = true;
home.packages =
with pkgs;
[
ghostty
# Editors
# neovim # Improved version of vim, often used with overlays.
vim # Highly configurable text editor popular for efficiency and extensibility.

View file

@ -0,0 +1,23 @@
{
pkgs,
lib,
...
}:
{
programs.ghostty = {
enable = true;
enableZshIntegration = true;
settings = {
auto-update = "off";
background-opacity = 0.8;
confirm-close-surface = false;
font-family = "Comic Code Ligatures";
font-size = 14;
# theme = "Teerb";
};
};
home.packages = with pkgs; [
ueberzugpp
];
}

View file

@ -0,0 +1,56 @@
{ config, ... }:
let
animationSpeed = config.var.theme.animation-speed;
animationDuration =
if animationSpeed == "slow" then
"4"
else if animationSpeed == "medium" then
"2.5"
else
"1.5";
borderDuration =
if animationSpeed == "slow" then
"10"
else if animationSpeed == "medium" then
"6"
else
"3";
in
{
wayland.windowManager.hyprland.settings = {
animations = {
enabled = true;
bezier = [
"linear, 0, 0, 1, 1"
"md3_standard, 0.2, 0, 0, 1"
"md3_decel, 0.05, 0.7, 0.1, 1"
"md3_accel, 0.3, 0, 0.8, 0.15"
"overshot, 0.05, 0.9, 0.1, 1.1"
"crazyshot, 0.1, 1.5, 0.76, 0.92"
"hyprnostretch, 0.05, 0.9, 0.1, 1.0"
"menu_decel, 0.1, 1, 0, 1"
"menu_accel, 0.38, 0.04, 1, 0.07"
"easeInOutCirc, 0.85, 0, 0.15, 1"
"easeOutCirc, 0, 0.55, 0.45, 1"
"easeOutExpo, 0.16, 1, 0.3, 1"
"softAcDecel, 0.26, 0.26, 0.15, 1"
"md2, 0.4, 0, 0.2, 1"
];
animation = [
"windows, 1, ${animationDuration}, md3_decel, popin 60%"
"windowsIn, 1, ${animationDuration}, md3_decel, popin 60%"
"windowsOut, 1, ${animationDuration}, md3_accel, popin 60%"
"border, 1, ${borderDuration}, default"
"fade, 1, ${animationDuration}, md3_decel"
"layersIn, 1, ${animationDuration}, menu_decel, slide"
"layersOut, 1, ${animationDuration}, menu_accel"
"fadeLayersIn, 1, ${animationDuration}, menu_decel"
"fadeLayersOut, 1, ${animationDuration}, menu_accel"
"workspaces, 1, ${animationDuration}, menu_decel, slide"
"specialWorkspace, 1, ${animationDuration}, md3_decel, slidevert"
];
};
};
}

View file

@ -0,0 +1,70 @@
{ pkgs, ... }:
{
wayland.windowManager.hyprland.settings = {
bindm = [
# mouse movements
"$mod, mouse:272, movewindow"
"$mod_ALT, mouse:273, resizewindow"
"$mod_ALT, mouse:272, resizewindow"
];
"$mod" = "SUPER";
bind =
[
# general binds
",switch:Lid Switch, exec, ${pkgs.hyprlock}/bin/hyprlock" # Lock when closing Lid
# "$mod, RETURN, exec, ${pkgs.alacritty}/bin/alacritty"
"$mod, RETURN, exec, ${pkgs.kitty}/bin/kitty"
"$shiftMod,SPACE, exec, hyprfocus-toggle" # Toggle HyprFocus
"$mod, Q, killactive"
"SUPER_SHIFT, Q, exec, ${pkgs.wlogout}/bin/wlogout"
"$mod, SPACE, exec, pkill fuzzel || ${pkgs.fuzzel}/bin/fuzzel" # pkill or allows for toggle
"SUPER_SHIFT, SPACE, togglefloating"
# "$mod, F, fullscreen"
"$mod,F, exec, fullscreen" # Toggle fullscreen
"$mod, L, exec, ${pkgs.hyprlock}/bin/hyprlock"
"$mod, B, exec, ${pkgs.grim}/bin/grim \"desktop-$(${pkgs.busybox}/bin/date +\"%Y%m%d%H%m\").png"
"SUPER_SHIFT, B, exec, ${pkgs.grim}/bin/grim -g \"$(${pkgs.slurp}/bin/slurp -d)\" - | ${pkgs.wl-clipboard}/bin/wl-copy" # Screenshot selection directly to clipboard
# move focus
"$mod, left, movefocus, l"
"$mod, right, movefocus, r"
"$mod, up, movefocus, u"
"$mod, down, movefocus, d"
"$mod,right,workspace,+1"
"$mod,left,workspace,-1"
# Scroll through workspaces
"$mod, mouse_down, workspace, e+1"
"$mod, mouse_up, workspace, e-1"
]
++ (builtins.concatLists (
builtins.genList (
i:
let
ws = i + 1;
in
[
"$mod,code:1${toString i}, workspace, ${toString ws}"
"$mod SHIFT,code:1${toString i}, movetoworkspace, ${toString ws}"
]
) 9
));
bindl = [
",XF86AudioMute, exec, sound-toggle" # Toggle Mute
",XF86AudioPlay, exec, ${pkgs.playerctl}/bin/playerctl play-pause" # Play/Pause Song
",XF86AudioNext, exec, ${pkgs.playerctl}/bin/playerctl next" # Next Song
",XF86AudioPrev, exec, ${pkgs.playerctl}/bin/playerctl previous" # Previous Song
",switch:Lid Switch, exec, ${pkgs.hyprlock}/bin/hyprlock" # Lock when closing Lid
];
bindle = [
",XF86AudioRaiseVolume, exec, sound-up" # Sound Up
",XF86AudioLowerVolume, exec, sound-down" # Sound Down
",XF86MonBrightnessUp, exec, brightness-up" # Brightness Up
",XF86MonBrightnessDown, exec, brightness-down" # Brightness Down
];
};
}

View file

@ -0,0 +1,200 @@
{
config,
pkgs,
...
}:
{
imports = [ ./waybar.nix ];
# services.mako = {
# enable = true;
# defaultTimeout = 4000;
# borderRadius = 5;
# borderSize = 2;
# layer = "overlay";
# };
wayland.windowManager.hyprland.enable = true;
wayland.windowManager.hyprland.settings = {
xwayland.force_zero_scaling = true;
input = {
sensitivity = 0.4;
# todo custom
accel_profile = "adaptive";
# accel_profile = "custom 20000 0.755 0.05 0.855 0.06";
touchpad = {
natural_scroll = true;
scroll_factor = 0.38;
tap-and-drag = true;
middle_button_emulation = true;
tap-to-click = true;
};
};
general = {
gaps_in = 5;
gaps_out = 16;
resize_on_border = true;
hover_icon_on_border = false;
layout = "dwindle";
};
master = {
# new_is_master = false;
smart_resizing = false;
};
dwindle = {
force_split = 2;
preserve_split = true;
};
decoration = {
rounding = 5;
active_opacity = 0.93;
inactive_opacity = 0.93;
fullscreen_opacity = 1;
# drop_shadow = false;
};
animations = {
enabled = true;
bezier = [
"myBezier, 0.22, 1, 0.36, 1"
"snap, 0, 1, 0, 1"
];
animation = [
"windows, 1, 7, myBezier"
"windowsOut, 1, 3, default, popin 60%"
"border, 1, 0.5, snap"
"borderangle, 1, 0.5, snap"
"fade, 1, 0.001, myBezier"
"workspaces, 1, 0.8, myBezier, fade"
];
};
# https://wiki.hyprland.org/Configuring/Variables/#gestures
gestures = {
workspace_swipe = true;
workspace_swipe_fingers = 3;
workspace_swipe_cancel_ratio = 0.6;
workspace_swipe_min_speed_to_force = 30;
workspace_swipe_distance = 2000;
workspace_swipe_invert = true;
};
misc = {
disable_hyprland_logo = true;
disable_splash_rendering = true;
force_default_wallpaper = 0;
mouse_move_enables_dpms = true;
key_press_enables_dpms = true;
};
"$mod" = "SUPER";
bind = [
# general binds
",switch:Lid Switch, exec, ${pkgs.hyprlock}/bin/hyprlock" # Lock when closing Lid
# "$mod, RETURN, exec, ${pkgs.alacritty}/bin/alacritty"
"$mod, RETURN, exec, ${pkgs.kitty}/bin/kitty"
"$shiftMod,SPACE, exec, hyprfocus-toggle" # Toggle HyprFocus
"$mod, Q, killactive"
"SUPER_SHIFT, Q, exec, ${pkgs.wlogout}/bin/wlogout"
"$mod, SPACE, exec, pkill fuzzel || ${pkgs.fuzzel}/bin/fuzzel" # pkill or allows for toggle
"SUPER_SHIFT, SPACE, togglefloating"
# "$mod, F, fullscreen"
"$mod,F, exec, hyprfocus-toggle" # Toggle HyprFocus
"$mod, L, exec, ${pkgs.hyprlock}/bin/hyprlock"
"$mod, B, exec, ${pkgs.grim}/bin/grim \"desktop-$(${pkgs.busybox}/bin/date +\"%Y%m%d%H%m\").png"
"SUPER_SHIFT, B, exec, ${pkgs.grim}/bin/grim -g \"$(${pkgs.slurp}/bin/slurp -d)\" - | ${pkgs.wl-clipboard}/bin/wl-copy" # Screenshot selection directly to clipboard
# Volume
",XF86AudioRaiseVolume, exec, ${pkgs.ponymix}/bin/ponymix inc 2"
",XF86AudioLowerVolume, exec, ${pkgs.ponymix}/bin/ponymix dec 2"
",XF86AudioMute, exec, ${pkgs.ponymix}/bin/ponymix, toggle"
# Screen Brightness
#",XF86MonBrightnessUp, exec, ${pkgs.light}/bin/light -A 10"
#",XF86MonBrightnessDown, exec, ${pkgs.light}/bin/light -U 10"
# ",XF86MonBrightnessUp, exec, ${pkgs.light}/bin/light -S \"$(${pkgs.light}/bin/light -G | ${pkgs.busybox}/bin/awk '{ print int(($1 + .72) * 1.4) }')\""
# ",XF86MonBrightnessDown, exec, ${pkgs.light}/bin/light -S \"$(${pkgs.light}/bin/light -G | ${pkgs.busybox}/bin/awk '{ print int($1 / 1.4) }')\""
",XF86MonBrightnessUp, exec, brightness-up" # Brightness Up
",XF86MonBrightnessDown, exec, brightness-down" # Brightness Down
# move focus
"$mod, left, movefocus, l"
"$mod, right, movefocus, r"
"$mod, up, movefocus, u"
"$mod, down, movefocus, d"
"$mod,right,workspace,+1"
"$mod,left,workspace,-1"
# workspace switching
"$mod, 1, workspace, 1"
"$mod, 2, workspace, 2"
"$mod, 3, workspace, 3"
"$mod, 4, workspace, 4"
"$mod, 5, workspace, 5"
"$mod, 6, workspace, 6"
"$mod, 7, workspace, 7"
"$mod, 8, workspace, 8"
"$mod, 9, workspace, 9"
"$mod, 0, workspace, 10"
# move window to workspace
"$mod SHIFT, 1, movetoworkspace, 1"
"$mod SHIFT, 2, movetoworkspace, 2"
"$mod SHIFT, 3, movetoworkspace, 3"
"$mod SHIFT, 4, movetoworkspace, 4"
"$mod SHIFT, 5, movetoworkspace, 5"
"$mod SHIFT, 6, movetoworkspace, 6"
"$mod SHIFT, 7, movetoworkspace, 7"
"$mod SHIFT, 8, movetoworkspace, 8"
"$mod SHIFT, 9, movetoworkspace, 9"
"$mod SHIFT, 0, movetoworkspace, 10"
# Scroll through workspaces
"$mod, mouse_down, workspace, e+1"
"$mod, mouse_up, workspace, e-1"
];
bindm = [
# mouse movements
"$mod, mouse:272, movewindow"
"$mod_ALT, mouse:273, resizewindow"
"$mod_ALT, mouse:272, resizewindow"
];
monitor = [ ",preferred,auto,1" ];
# monitor = [ "HDMI-A-1,1920x1080@144,auto,1" ];
exec = [ "${pkgs.swaybg}/bin/swaybg -i ${config.stylix.image} -m fill" ];
exec-once = [
# Enables clipboard sync
"${pkgs.wl-clipboard}/bin/wl-paste -p | ${pkgs.wl-clipboard}/bin/wl-copy"
"${pkgs.wl-clipboard}/bin/wl-paste | ${pkgs.wl-clipboard}/bin/wl-copy -p"
];
};
wayland.windowManager.hyprland.extraConfig = ''
# will switch to a submap called resize
bind=$mod,R,submap,resize
# will start a submap called "resize"
submap=resize
# sets repeatable binds for resizing the active window
binde=,right,resizeactive,10 0
binde=,left,resizeactive,-10 0
binde=,up,resizeactive,0 -10
binde=,down,resizeactive,0 10
# use reset to go back to the global submap
bind=,escape,submap,reset
# will reset the submap, meaning end the current one and return to the global one
submap=reset
'';
}

View file

@ -0,0 +1,19 @@
{ inputs, pkgs, ... }:
{
wayland.windowManager.hyprland = {
plugins = [ inputs.hyprspace.packages.${pkgs.system}.Hyprspace ];
settings = {
plugin = {
overview = {
autoDrag = false;
};
};
bind = [
"$mod,TAB, overview:toggle" # Overview
];
};
};
}

View file

@ -0,0 +1,6 @@
{ inputs, pkgs, ... }:
{
home.packages = [ inputs.hyprpolkitagent.packages."${pkgs.system}".hyprpolkitagent ];
wayland.windowManager.hyprland.settings.exec-once = [ "systemctl --user start hyprpolkitagent" ];
}

View file

View file

@ -0,0 +1,56 @@
{ ... }:
{
programs = {
nushell = {
enable = true;
# The config.nu can be anywhere you want if you like to edit your Nushell with Nu
# configFile.source = ./.../config.nu;
# for editing directly to config.nu
envFile.source = ./env.nu;
extraConfig = ''
let carapace_completer = {|spans|
carapace $spans.0 nushell $spans | from json
}
$env.config = {
show_banner: false,
completions: {
case_sensitive: false # case-sensitive completions
quick: true # set to false to prevent auto-selecting completions
partial: true # set to false to prevent partial filling of the prompt
algorithm: "fuzzy" # prefix or fuzzy
external: {
# set to false to prevent nushell looking into $env.PATH to find more suggestions
enable: true
# set to lower can improve completion performance at the cost of omitting some options
max_results: 100
completer: $carapace_completer # check 'carapace_completer'
}
}
}
$env.PATH = ($env.PATH |
split row (char esep) |
prepend /home/myuser/.apps |
append /usr/bin/env
)
fastfetch
'';
shellAliases = {
c = "clear";
cd = "z";
};
};
carapace.enable = true;
carapace.enableNushellIntegration = true;
starship = {
enable = true;
settings = {
add_newline = true;
# character = {
# success_symbol = "[➜](bold green)";
# error_symbol = "[➜](bold red)";
# };
};
};
};
}

View file

@ -0,0 +1 @@
$env.config.buffer_editor = "nvim"

View file

@ -7,5 +7,6 @@
./caffeine
./notification
./screenshot
./sound
];
}

View file

@ -0,0 +1,45 @@
# - ## Sound
#-
#- This module provides a set of scripts to control the volume of the default audio sink using `wpctl`.
#-
#- - `sound-up` increases the volume by 5%.
#- - `sound-down` decreases the volume by 5%.
#- - `sound-set [value]` sets the volume to the given value.
#- - `sound-toggle` toggles the mute state of the default audio sink.
{ pkgs, ... }:
let
increments = "5";
sound-change = pkgs.writeShellScriptBin "sound-change" ''
[[ $1 == "mute" ]] && wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle
[[ $1 == "up" ]] && wpctl set-volume @DEFAULT_AUDIO_SINK@ ''${2-${increments}}%+
[[ $1 == "down" ]] && wpctl set-volume @DEFAULT_AUDIO_SINK@ ''${2-${increments}}%-
[[ $1 == "set" ]] && wpctl set-volume @DEFAULT_AUDIO_SINK@ ''${2-100}%
'';
sound-up = pkgs.writeShellScriptBin "sound-up" ''
sound-change up ${increments}
'';
sound-set = pkgs.writeShellScriptBin "sound-set" ''
sound-change set ''${1-100}
'';
sound-down = pkgs.writeShellScriptBin "sound-down" ''
sound-change down ${increments}
'';
sound-toggle = pkgs.writeShellScriptBin "sound-toggle" ''
sound-change mute
'';
in
{
home.packages = [
sound-change
sound-up
sound-down
sound-toggle
sound-set
];
}