convert nate-work and nate to stylix from fixed catppuccin module
This commit is contained in:
parent
704a211899
commit
964e4a63b3
6
flake.lock
generated
6
flake.lock
generated
@ -200,11 +200,11 @@
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1770464364,
|
||||
"narHash": "sha256-z5NJPSBwsLf/OfD8WTmh79tlSU8XgIbwmk6qB1/TFzY=",
|
||||
"lastModified": 1770617025,
|
||||
"narHash": "sha256-1jZvgZoAagZZB6NwGRv2T2ezPy+X6EFDsJm+YSlsvEs=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "23d72dabcb3b12469f57b37170fcbc1789bd7457",
|
||||
"rev": "2db38e08fdadcc0ce3232f7279bab59a15b94482",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
||||
@ -51,6 +51,7 @@
|
||||
inherit inputs outputs timeZone system;
|
||||
};
|
||||
modules = [
|
||||
stylix.nixosModules.stylix
|
||||
# Setup home manager
|
||||
inputs.home-manager.nixosModules.home-manager {
|
||||
home-manager.useGlobalPkgs = true;
|
||||
@ -69,6 +70,7 @@
|
||||
inherit inputs outputs timeZone system;
|
||||
};
|
||||
modules = [
|
||||
stylix.nixosModules.stylix
|
||||
# Setup home manager
|
||||
inputs.home-manager.nixosModules.home-manager {
|
||||
home-manager.useGlobalPkgs = true;
|
||||
|
||||
@ -70,8 +70,12 @@
|
||||
# Git setup
|
||||
programs.git = {
|
||||
enable = true;
|
||||
userEmail = email;
|
||||
userName = fullName;
|
||||
settings = {
|
||||
user.name = fullName;
|
||||
user.email = email;
|
||||
init.defaultBranch = "main";
|
||||
pull.ff = "only";
|
||||
};
|
||||
};
|
||||
|
||||
# Zsh setup
|
||||
|
||||
@ -57,6 +57,7 @@
|
||||
environment.systemPackages = with pkgs; lib.lists.flatten [
|
||||
[
|
||||
bash
|
||||
file-roller # for thunar archive plugin
|
||||
foot
|
||||
git
|
||||
glib
|
||||
@ -98,7 +99,7 @@
|
||||
thunar-volman
|
||||
];
|
||||
};
|
||||
programs.file-roller.enable = true;
|
||||
# file-roller added to environment.systemPackages above
|
||||
programs.xfconf.enable = true;
|
||||
|
||||
programs.zsh.enable = true;
|
||||
|
||||
@ -58,8 +58,12 @@ in
|
||||
# Git setup
|
||||
programs.git = {
|
||||
enable = true;
|
||||
userEmail = email;
|
||||
userName = fullName;
|
||||
settings = {
|
||||
user.name = fullName;
|
||||
user.email = email;
|
||||
init.defaultBranch = "main";
|
||||
pull.ff = "only";
|
||||
};
|
||||
};
|
||||
|
||||
programs = {
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
fullName = "Nate Anderson";
|
||||
email = "nate.anderson@vasion.com";
|
||||
hostName = "nate-vasion";
|
||||
desktop = "sway";
|
||||
desktop = "niri";
|
||||
gaming = true;
|
||||
in
|
||||
{
|
||||
@ -21,9 +21,80 @@
|
||||
installGaming = gaming;
|
||||
};
|
||||
|
||||
# Stylix theming - auto-generate color scheme from wallpaper
|
||||
stylix = {
|
||||
enable = true;
|
||||
image = ../shared/modules/services/wallpapers/Dark/IU-Dark.jpg;
|
||||
polarity = "dark";
|
||||
|
||||
# System-wide cursor
|
||||
cursor = {
|
||||
package = pkgs.bibata-cursors;
|
||||
name = "Bibata-Modern-Classic";
|
||||
size = 32;
|
||||
};
|
||||
|
||||
# Fonts
|
||||
fonts = {
|
||||
serif = {
|
||||
package = pkgs.lato;
|
||||
name = "Lato";
|
||||
};
|
||||
sansSerif = {
|
||||
package = pkgs.lato;
|
||||
name = "Lato";
|
||||
};
|
||||
monospace = {
|
||||
package = pkgs.maple-mono.NF;
|
||||
name = "Maple Mono NF";
|
||||
};
|
||||
emoji = {
|
||||
package = pkgs.noto-fonts-color-emoji;
|
||||
name = "Noto Color Emoji";
|
||||
};
|
||||
sizes = {
|
||||
applications = 12;
|
||||
desktop = 10;
|
||||
popups = 10;
|
||||
terminal = 11;
|
||||
};
|
||||
};
|
||||
|
||||
# Let plymouth use its own theme
|
||||
targets.plymouth.enable = false;
|
||||
};
|
||||
|
||||
# Limit the number of generations to keep
|
||||
boot.loader.systemd-boot.configurationLimit = 5;
|
||||
|
||||
# Systemd initrd for faster boot
|
||||
boot.initrd.systemd.enable = true;
|
||||
|
||||
# Plymouth boot animation
|
||||
boot.plymouth = {
|
||||
enable = true;
|
||||
theme = "rings";
|
||||
themePackages = with pkgs; [
|
||||
(adi1090x-plymouth-themes.override {
|
||||
selected_themes = [ "rings" ];
|
||||
})
|
||||
];
|
||||
};
|
||||
|
||||
# Silent boot
|
||||
boot.consoleLogLevel = 0;
|
||||
boot.initrd.verbose = false;
|
||||
boot.kernelParams = [
|
||||
"quiet"
|
||||
"splash"
|
||||
"boot.shell_on_fail"
|
||||
"loglevel=3"
|
||||
"rd.systemd.show_status=false"
|
||||
"rd.udev.log_level=3"
|
||||
"udev.log_priority=3"
|
||||
];
|
||||
boot.loader.timeout = 0;
|
||||
|
||||
# Perform garbage collection weekly to maintain low disk usage
|
||||
nix.gc = {
|
||||
automatic = true;
|
||||
|
||||
Binary file not shown.
File diff suppressed because it is too large
Load Diff
@ -1,45 +0,0 @@
|
||||
[main]
|
||||
font=Hurmit Nerd Font Mono:size=12
|
||||
|
||||
selection-target=clipboard
|
||||
|
||||
[colors]
|
||||
# Catpuccin Machiatto theme
|
||||
foreground=cad3f5 # Text
|
||||
background=24273a # Base
|
||||
regular0=494d64 # Surface 1
|
||||
regular1=ed8796 # red
|
||||
regular2=a6da95 # green
|
||||
regular3=eed49f # yellow
|
||||
regular4=8aadf4 # blue
|
||||
regular5=f5bde6 # pink
|
||||
regular6=8bd5ca # teal
|
||||
regular7=b8c0e0 # Subtext 1
|
||||
bright0=5b6078 # Surface 2
|
||||
bright1=ed8796 # red
|
||||
bright2=a6da95 # green
|
||||
bright3=eed49f # yellow
|
||||
bright4=8aadf4 # blue
|
||||
bright5=f5bde6 # pink
|
||||
bright6=8bd5ca # teal
|
||||
bright7=a5adcb # Subtext 0foreground=cdd6f4 # Text
|
||||
|
||||
# [colors]
|
||||
# Catpuccin Mocha theme colors
|
||||
# background=1e1e2e # Base
|
||||
# regular0=45475a # Surface 1
|
||||
# regular1=f38ba8 # red
|
||||
# regular2=a6e3a1 # green
|
||||
# regular3=f9e2af # yellow
|
||||
# regular4=89b4fa # blue
|
||||
# regular5=f5c2e7 # pink
|
||||
# regular6=94e2d5 # teal
|
||||
# regular7=bac2de # Subtext 1
|
||||
# bright0=585b70 # Surface 2
|
||||
# bright1=f38ba8 # red
|
||||
# bright2=a6e3a1 # green
|
||||
# bright3=f9e2af # yellow
|
||||
# bright4=89b4fa # blue
|
||||
# bright5=f5c2e7 # pink
|
||||
# bright6=94e2d5 # teal
|
||||
# bright7=a6adc8 # Subtext 0
|
||||
@ -1,46 +0,0 @@
|
||||
theme = "catppuccin-macchiato.conf"
|
||||
|
||||
###
|
||||
# Font config
|
||||
###
|
||||
|
||||
font-size = 14
|
||||
font-family = "Monaspace Xenon Var"
|
||||
font-family-bold = "Monaspace Argon Var"
|
||||
font-family-italic = "Monaspace Radon Var"
|
||||
font-family-bold-italic = "Monaspace Krypton Var"
|
||||
|
||||
font-variation = wght=400
|
||||
font-variation = wdth=100
|
||||
font-variation = slnt=-2
|
||||
|
||||
font-variation-bold = wght=600
|
||||
font-variation-bold = wdth=100
|
||||
|
||||
font-variation-italic = wght=400
|
||||
font-variation-italic = wdth=100
|
||||
font-variation-italic = slnt=-10
|
||||
|
||||
font-variation-bold-italic = wght=700
|
||||
font-variation-bold-italic = wdth=100
|
||||
font-variation-bold-italic = slnt=-3
|
||||
|
||||
# Liguratures
|
||||
font-feature = +ss01, +ss02, +ss03, +ss04, +ss05, +ss06, +ss07, +ss08, +ss09, +ss10
|
||||
# Enables texture healing
|
||||
font-feature = +calt
|
||||
font-feature = +liga
|
||||
|
||||
###
|
||||
# Keybinds
|
||||
###
|
||||
|
||||
keybind = ctrl+shift+plus=increase_font_size:1
|
||||
# keybind = ctrl+minus=decrease_font_size:1
|
||||
|
||||
###
|
||||
# Misc
|
||||
###
|
||||
|
||||
window-padding-x = 4
|
||||
window-padding-y = 4
|
||||
@ -1,22 +0,0 @@
|
||||
palette = 0=#51576d
|
||||
palette = 1=#e78284
|
||||
palette = 2=#a6d189
|
||||
palette = 3=#e5c890
|
||||
palette = 4=#8caaee
|
||||
palette = 5=#f4b8e4
|
||||
palette = 6=#81c8be
|
||||
palette = 7=#a5adce
|
||||
palette = 8=#626880
|
||||
palette = 9=#e78284
|
||||
palette = 10=#a6d189
|
||||
palette = 11=#e5c890
|
||||
palette = 12=#8caaee
|
||||
palette = 13=#f4b8e4
|
||||
palette = 14=#81c8be
|
||||
palette = 15=#b5bfe2
|
||||
background = 303446
|
||||
foreground = c6d0f5
|
||||
cursor-color = f2d5cf
|
||||
cursor-text = 232634
|
||||
selection-background = 44495d
|
||||
selection-foreground = c6d0f5
|
||||
@ -1,22 +0,0 @@
|
||||
palette = 0=#5c5f77
|
||||
palette = 1=#d20f39
|
||||
palette = 2=#40a02b
|
||||
palette = 3=#df8e1d
|
||||
palette = 4=#1e66f5
|
||||
palette = 5=#ea76cb
|
||||
palette = 6=#179299
|
||||
palette = 7=#acb0be
|
||||
palette = 8=#6c6f85
|
||||
palette = 9=#d20f39
|
||||
palette = 10=#40a02b
|
||||
palette = 11=#df8e1d
|
||||
palette = 12=#1e66f5
|
||||
palette = 13=#ea76cb
|
||||
palette = 14=#179299
|
||||
palette = 15=#bcc0cc
|
||||
background = eff1f5
|
||||
foreground = 4c4f69
|
||||
cursor-color = dc8a78
|
||||
cursor-text = eff1f5
|
||||
selection-background = d8dae1
|
||||
selection-foreground = 4c4f69
|
||||
@ -1,22 +0,0 @@
|
||||
palette = 0=#494d64
|
||||
palette = 1=#ed8796
|
||||
palette = 2=#a6da95
|
||||
palette = 3=#eed49f
|
||||
palette = 4=#8aadf4
|
||||
palette = 5=#f5bde6
|
||||
palette = 6=#8bd5ca
|
||||
palette = 7=#a5adcb
|
||||
palette = 8=#5b6078
|
||||
palette = 9=#ed8796
|
||||
palette = 10=#a6da95
|
||||
palette = 11=#eed49f
|
||||
palette = 12=#8aadf4
|
||||
palette = 13=#f5bde6
|
||||
palette = 14=#8bd5ca
|
||||
palette = 15=#b8c0e0
|
||||
background = 24273a
|
||||
foreground = cad3f5
|
||||
cursor-color = f4dbd6
|
||||
cursor-text = 181926
|
||||
selection-background = 3a3e53
|
||||
selection-foreground = cad3f5
|
||||
@ -1,22 +0,0 @@
|
||||
palette = 0=#45475a
|
||||
palette = 1=#f38ba8
|
||||
palette = 2=#a6e3a1
|
||||
palette = 3=#f9e2af
|
||||
palette = 4=#89b4fa
|
||||
palette = 5=#f5c2e7
|
||||
palette = 6=#94e2d5
|
||||
palette = 7=#a6adc8
|
||||
palette = 8=#585b70
|
||||
palette = 9=#f38ba8
|
||||
palette = 10=#a6e3a1
|
||||
palette = 11=#f9e2af
|
||||
palette = 12=#89b4fa
|
||||
palette = 13=#f5c2e7
|
||||
palette = 14=#94e2d5
|
||||
palette = 15=#bac2de
|
||||
background = 1e1e2e
|
||||
foreground = cdd6f4
|
||||
cursor-color = f5e0dc
|
||||
cursor-text = 11111b
|
||||
selection-background = 353749
|
||||
selection-foreground = cdd6f4
|
||||
@ -1,17 +0,0 @@
|
||||
hide_scroll=true
|
||||
show=drun
|
||||
width=25%
|
||||
lines=10
|
||||
line_wrap=word
|
||||
term=xfce4-terminal
|
||||
allow_markup=true
|
||||
always_parse_args=true
|
||||
show_all=true
|
||||
print_command=true
|
||||
layer=overlay
|
||||
allow_images=true
|
||||
insensitive=true
|
||||
prompt=
|
||||
image_size=15
|
||||
display_generic=true
|
||||
location=center
|
||||
@ -1,9 +0,0 @@
|
||||
hide_search=true
|
||||
hide_scroll=true
|
||||
insensitive=true
|
||||
show=dmenu
|
||||
width=100
|
||||
lines=4
|
||||
location=top_right
|
||||
x=-120
|
||||
y=10
|
||||
@ -1,9 +0,0 @@
|
||||
hide_scroll=true
|
||||
insensitive=true
|
||||
width=140
|
||||
height=200
|
||||
show=dmenu
|
||||
location=top_right
|
||||
x=-200
|
||||
y=60
|
||||
prompt="Screenshot"
|
||||
@ -1,164 +0,0 @@
|
||||
@define-color rosewater #f4dbd6;
|
||||
@define-color rosewater-rgb rgb(244, 219, 214);
|
||||
@define-color flamingo #f0c6c6;
|
||||
@define-color flamingo-rgb rgb(240, 198, 198);
|
||||
@define-color pink #f5bde6;
|
||||
@define-color pink-rgb rgb(245, 189, 230);
|
||||
@define-color mauve #c6a0f6;
|
||||
@define-color mauve-rgb rgb(198, 160, 246);
|
||||
@define-color red #ed8796;
|
||||
@define-color red-rgb rgb(237, 135, 150);
|
||||
@define-color maroon #ee99a0;
|
||||
@define-color maroon-rgb rgb(238, 153, 160);
|
||||
@define-color peach #f5a97f;
|
||||
@define-color peach-rgb rgb(245, 169, 127);
|
||||
@define-color yellow #eed49f;
|
||||
@define-color yellow-rgb rgb(238, 212, 159);
|
||||
@define-color green #a6da95;
|
||||
@define-color green-rgb rgb(166, 218, 149);
|
||||
@define-color teal #8bd5ca;
|
||||
@define-color teal-rgb rgb(139, 213, 202);
|
||||
@define-color sky #91d7e3;
|
||||
@define-color sky-rgb rgb(145, 215, 227);
|
||||
@define-color sapphire #7dc4e4;
|
||||
@define-color sapphire-rgb rgb(125, 196, 228);
|
||||
@define-color blue #8aadf4;
|
||||
@define-color blue-rgb rgb(138, 173, 244);
|
||||
@define-color lavender #b7bdf8;
|
||||
@define-color lavender-rgb rgb(183, 189, 248);
|
||||
@define-color text #cad3f5;
|
||||
@define-color text-rgb rgb(202, 211, 245);
|
||||
@define-color subtext1 #b8c0e0;
|
||||
@define-color subtext1-rgb rgb(184, 192, 224);
|
||||
@define-color subtext0 #a5adcb;
|
||||
@define-color subtext0-rgb rgb(165, 173, 203);
|
||||
@define-color overlay2 #939ab7;
|
||||
@define-color overlay2-rgb rgb(147, 154, 183);
|
||||
@define-color overlay1 #8087a2;
|
||||
@define-color overlay1-rgb rgb(128, 135, 162);
|
||||
@define-color overlay0 #6e738d;
|
||||
@define-color overlay0-rgb rgb(110, 115, 141);
|
||||
@define-color surface2 #5b6078;
|
||||
@define-color surface2-rgb rgb(91, 96, 120);
|
||||
@define-color surface1 #494d64;
|
||||
@define-color surface1-rgb rgb(73, 77, 100);
|
||||
@define-color surface0 #363a4f;
|
||||
@define-color surface0-rgb rgb(54, 58, 79);
|
||||
@define-color base #24273a;
|
||||
@define-color base-rgb rgb(36, 39, 58);
|
||||
@define-color mantle #1e2030;
|
||||
@define-color mantle-rgb rgb(30, 32, 48);
|
||||
@define-color crust #181926;
|
||||
@define-color crust-rgb rgb(24, 25, 38);
|
||||
|
||||
* {
|
||||
font-family: 'Overpass Nerd Font', monospace;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
/* Window */
|
||||
window {
|
||||
margin: 0px;
|
||||
padding: 10px;
|
||||
border: 0.16em solid @lavender;
|
||||
border-radius: 0.7em;
|
||||
background-color: @base;
|
||||
animation: slideIn 0.5s ease-in-out both;
|
||||
}
|
||||
|
||||
/* Slide In */
|
||||
@keyframes slideIn {
|
||||
0% {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
100% {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
/* Inner Box */
|
||||
#inner-box {
|
||||
margin: 5px;
|
||||
padding: 0px;
|
||||
border: none;
|
||||
background-color: @base;
|
||||
animation: fadeIn 0.5s ease-in-out both;
|
||||
}
|
||||
|
||||
/* Fade In */
|
||||
@keyframes fadeIn {
|
||||
0% {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
100% {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
/* Outer Box */
|
||||
#outer-box {
|
||||
margin: 5px;
|
||||
padding: 10px;
|
||||
border: none;
|
||||
background-color: @base;
|
||||
}
|
||||
|
||||
/* Scroll */
|
||||
#scroll {
|
||||
margin: 0px;
|
||||
padding: 10px;
|
||||
border: none;
|
||||
background-color: @base;
|
||||
}
|
||||
|
||||
/* Input */
|
||||
#input {
|
||||
margin: 0px 20px;
|
||||
padding: 10px;
|
||||
border: none;
|
||||
border-radius: 0.1em;
|
||||
color: @text;
|
||||
background-color: @base;
|
||||
animation: fadeIn 0.5s ease-in-out both;
|
||||
}
|
||||
|
||||
#input image {
|
||||
border: none;
|
||||
color: @red;
|
||||
}
|
||||
|
||||
#input * {
|
||||
outline: 4px solid @red;
|
||||
}
|
||||
|
||||
/* Text */
|
||||
#text {
|
||||
margin: 5px;
|
||||
border: none;
|
||||
color: @text;
|
||||
animation: fadeIn 0.5s ease-in-out both;
|
||||
}
|
||||
|
||||
#entry {
|
||||
background-color: @base;
|
||||
}
|
||||
|
||||
#entry arrow {
|
||||
border: none;
|
||||
color: @lavender;
|
||||
}
|
||||
|
||||
/* Selected Entry */
|
||||
#entry:selected {
|
||||
border: 0.11em solid @lavender;
|
||||
}
|
||||
|
||||
#entry:selected #text {
|
||||
color: @mauve;
|
||||
}
|
||||
|
||||
#entry:drop(active) {
|
||||
background-color: @lavender;
|
||||
}
|
||||
@ -1,70 +0,0 @@
|
||||
/*
|
||||
Nordic Color Scheme
|
||||
*/
|
||||
|
||||
@define-color nord2 #434c5e;
|
||||
@define-color nord3 #4c566a;
|
||||
@define-color nord4 #d8dee9;
|
||||
@define-color nord8 #88c0d0;
|
||||
@define-color nord_cyan #8fbcbb;
|
||||
@define-color nord_orange #d08770;
|
||||
@define-color nord_red #bf616a;
|
||||
@define-color nord_green #a3be8c;
|
||||
@define-color nord_yellow #ebcb8b;
|
||||
@define-color nord_purple #b48ead;
|
||||
|
||||
|
||||
*{
|
||||
font-family: Overpass Nerd Font;
|
||||
font-size: 16;
|
||||
}
|
||||
|
||||
window {
|
||||
border-radius: 10px;
|
||||
border: 2px solid @nord_purple;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
#input {
|
||||
margin-bottom: 15px;
|
||||
padding:6px;
|
||||
border-radius: 20px;
|
||||
border:none;
|
||||
color: @nord4;
|
||||
font-family: Overpass Nerd Font 18;
|
||||
}
|
||||
|
||||
#inner-box {
|
||||
border-radius: 10px;
|
||||
background-color: @nord3;
|
||||
}
|
||||
|
||||
#outer-box {
|
||||
border-radius: 10px;
|
||||
margin: 5px;
|
||||
padding:15px;
|
||||
background-color: @nord2;
|
||||
}
|
||||
|
||||
#text {
|
||||
padding: 5px;
|
||||
color: @nord4;
|
||||
}
|
||||
|
||||
#entry:nth-child(even) {
|
||||
background-color: @nord2;
|
||||
}
|
||||
|
||||
#entry:selected {
|
||||
color: @nord_cyan;
|
||||
background-color: @nord_cyan;
|
||||
}
|
||||
|
||||
#text:selected {
|
||||
color: @nord_2;
|
||||
background-color: @nord_cyan;
|
||||
}
|
||||
|
||||
#scroll {
|
||||
margin: -2px 0px;
|
||||
}
|
||||
@ -1,45 +0,0 @@
|
||||
/*
|
||||
Arc-Dark Color Scheme
|
||||
*/
|
||||
|
||||
@define-color highlight #5294e2;
|
||||
@define-color base1 #404552;
|
||||
@define-color base2 #40455;
|
||||
@define-color base3 #4b5160;
|
||||
|
||||
*{
|
||||
font-family: UbuntuMono;
|
||||
}
|
||||
|
||||
#window {
|
||||
border: 1px solid @highlight;
|
||||
margin: 0px 5px 0px 5px;
|
||||
}
|
||||
|
||||
#inner-box {
|
||||
background-color: @base2;
|
||||
}
|
||||
|
||||
#outer-box {
|
||||
margin: 5px;
|
||||
padding:10px;
|
||||
background-color: @base2;
|
||||
margin-top: -22px;
|
||||
}
|
||||
|
||||
#text {
|
||||
padding: 5px;
|
||||
color: white;
|
||||
}
|
||||
|
||||
#entry:nth-child(even) {
|
||||
background-color: @base1;
|
||||
}
|
||||
|
||||
#entry {
|
||||
background-color: @base3;
|
||||
}
|
||||
|
||||
#entry:selected {
|
||||
background-color: @highlight;
|
||||
}
|
||||
@ -1,119 +0,0 @@
|
||||
#!/bin/python3
|
||||
import json
|
||||
import subprocess
|
||||
from argparse import ArgumentParser
|
||||
|
||||
ENTER = "\n"
|
||||
|
||||
|
||||
def get_windows():
|
||||
|
||||
command = "swaymsg -t get_tree"
|
||||
process = subprocess.Popen(
|
||||
command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE
|
||||
)
|
||||
|
||||
process = subprocess.Popen(
|
||||
command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE
|
||||
)
|
||||
data = json.loads(process.communicate()[0])
|
||||
|
||||
# Select outputs that are active
|
||||
windows = []
|
||||
for output in data["nodes"]:
|
||||
|
||||
# The scratchpad (under __i3) is not supported
|
||||
if output.get("name") != "__i3" and output.get("type") == "output":
|
||||
workspaces = output.get("nodes", [])
|
||||
for ws in workspaces:
|
||||
if ws.get("type") == "workspace":
|
||||
windows.extend(extract_nodes_iterative(ws))
|
||||
return windows
|
||||
|
||||
|
||||
# Extracts all windows from a sway workspace json object
|
||||
def extract_nodes_iterative(workspace):
|
||||
all_nodes = []
|
||||
|
||||
floating_nodes = workspace.get("floating_nodes", [])
|
||||
|
||||
for floating_node in floating_nodes:
|
||||
all_nodes.append(floating_node)
|
||||
|
||||
nodes = workspace.get("nodes", [])
|
||||
|
||||
for node in nodes:
|
||||
|
||||
# Leaf node
|
||||
if not node.get("nodes"):
|
||||
all_nodes.append(node)
|
||||
# Nested node, handled iterative
|
||||
else:
|
||||
for inner_node in node.get("nodes"):
|
||||
nodes.append(inner_node)
|
||||
|
||||
return all_nodes
|
||||
|
||||
|
||||
# Returns an array of all windows
|
||||
def parse_windows(windows):
|
||||
return [window.get("name") for window in windows]
|
||||
|
||||
|
||||
# Returns a newline seperated UFT-8 encoded string of all windows for wofi
|
||||
def build_wofi_string(windows):
|
||||
return ENTER.join(windows).encode("UTF-8")
|
||||
|
||||
|
||||
# Executes wofi with the given input string
|
||||
def show_wofi(windows):
|
||||
|
||||
command = 'wofi -c ~/.config/wofi/menu -s ~/.config/wofi/style.css -p "Windows: " -d -i --hide-scroll'
|
||||
|
||||
process = subprocess.Popen(
|
||||
command, shell=True, stdin=subprocess.PIPE, stdout=subprocess.PIPE
|
||||
)
|
||||
return process.communicate(input=windows)[0]
|
||||
|
||||
|
||||
# Returns the sway window id of the window that was selected by the user inside wofi
|
||||
def parse_id(windows, parsed_windows, selected):
|
||||
if not selected:
|
||||
return None
|
||||
else:
|
||||
selected = (selected.decode("UTF-8"))[:-1] # Remove new line character
|
||||
window_index = int(
|
||||
parsed_windows.index(selected)
|
||||
) # Get index of selected window in the parsed window array
|
||||
return str(
|
||||
windows[window_index].get("id")
|
||||
) # Get sway window id based on the index
|
||||
|
||||
|
||||
# Switches the focus to the given id
|
||||
def switch_window(id):
|
||||
command = "swaymsg [con_id={}] focus".format(id)
|
||||
|
||||
process = subprocess.Popen(command, shell=True, stdout=subprocess.PIPE)
|
||||
process.communicate()[0]
|
||||
|
||||
|
||||
# Entry point
|
||||
if __name__ == "__main__":
|
||||
|
||||
parser = ArgumentParser(description="Wofi based window switcher")
|
||||
|
||||
windows = get_windows()
|
||||
|
||||
parsed_windows = parse_windows(windows)
|
||||
|
||||
wofi_string = build_wofi_string(parsed_windows)
|
||||
|
||||
selected = show_wofi(wofi_string)
|
||||
|
||||
# Otherwise no point in running
|
||||
if selected:
|
||||
|
||||
selected_id = parse_id(windows, parsed_windows, selected)
|
||||
|
||||
switch_window(selected_id)
|
||||
@ -1,338 +0,0 @@
|
||||
// Global
|
||||
{
|
||||
// "mode": "hide",
|
||||
"layer": "top",
|
||||
"position": "top",
|
||||
"margin-top": 3,
|
||||
"margin-left": 3,
|
||||
"margin-right": 3,
|
||||
"margin-bottom": 3,
|
||||
|
||||
// If height property would be not present, it'd be calculated dynamically
|
||||
// "height": 60,
|
||||
|
||||
"modules-left": [
|
||||
"custom/launcher",
|
||||
"hyprland/workspaces",
|
||||
"hyprland/window",
|
||||
],
|
||||
|
||||
"modules-center": [
|
||||
// "custom/signal",
|
||||
// "custom/steam",
|
||||
// "custom/spotify",
|
||||
// "custom/firefox",
|
||||
"custom/slack",
|
||||
"custom/files",
|
||||
"custom/vpn",
|
||||
],
|
||||
|
||||
"modules-right": [
|
||||
"clock",
|
||||
// "network", // using network applet in tray
|
||||
// "idle_inhibitor",
|
||||
"custom/storage",
|
||||
"memory",
|
||||
"cpu",
|
||||
"pulseaudio",
|
||||
"custom/keyboard-layout",
|
||||
"battery",
|
||||
"backlight",
|
||||
// "custom/neewer",
|
||||
"tray",
|
||||
//"custom/weather",
|
||||
"custom/power",
|
||||
],
|
||||
|
||||
// Modules
|
||||
|
||||
"idle_inhibitor": {
|
||||
"format": "{icon} ",
|
||||
"format-icons":{
|
||||
"activated": "",
|
||||
"deactivated": ""
|
||||
}
|
||||
},
|
||||
|
||||
"battery": {
|
||||
"states": {
|
||||
// "good": 95,
|
||||
"warning": 30,
|
||||
"critical": 15
|
||||
},
|
||||
"format": "{icon} {capacity}%",
|
||||
"format-charging": "{capacity}% ",
|
||||
"format-plugged": "{capacity}% ",
|
||||
// "format-good": "", // An empty format will hide the module
|
||||
// "format-full": "",
|
||||
"format-icons": ["", "", "", "", ""]
|
||||
},
|
||||
|
||||
"clock": {
|
||||
"interval": 1,
|
||||
// "format-alt": " {:%e %b %Y}", // Icon: calendar-alt
|
||||
"format": "{:%I:%M.%S %p}",
|
||||
"tooltip-format": "{:%e %B %Y}"
|
||||
},
|
||||
|
||||
"cpu": {
|
||||
"interval": 5,
|
||||
"format": " {usage}%", // Icon: microchip
|
||||
"states": {
|
||||
"warning": 70,
|
||||
"critical": 90,
|
||||
},
|
||||
"on-click": "ghostty -e 'htop'",
|
||||
},
|
||||
|
||||
"memory": {
|
||||
"interval": 5,
|
||||
"format": " {}%", // Icon: memory
|
||||
"on-click": "ghostty -e 'htop'",
|
||||
"states": {
|
||||
"warning": 70,
|
||||
"critical": 90
|
||||
}
|
||||
},
|
||||
|
||||
"network": {
|
||||
"interval": 5,
|
||||
"format-wifi": "", // Icon: wifi
|
||||
"format-ethernet": " {ifname}: {ipaddr}/{cidr}", // Icon: ethernet
|
||||
"format-disconnected": "⚠ Disconnected",
|
||||
"tooltip-format": "{essid} - {ifname}:{ipaddr} {bandwidthUpBytes} {bandwidthDownBytes}",
|
||||
"on-click": "ghostty -e 'nmtui'",
|
||||
},
|
||||
"network#vpn": {
|
||||
"interface": "tun0",
|
||||
"format": " {signalStrength}%",
|
||||
"format-disconnected": "⚠ Disconnected",
|
||||
"tooltip-format": "{essid} - {ifname}:{ipaddr} {bandwidthUpBytes} {bandwidthDownBytes}",
|
||||
},
|
||||
|
||||
"hyprland/window": {
|
||||
"format": "{}",
|
||||
"max-length": 60,
|
||||
"icon": true,
|
||||
"icon_size": 30,
|
||||
"rewrite": {
|
||||
// Firefox
|
||||
"(.*) — Mozilla Firefox": " $1",
|
||||
"(.*) - Mozilla Firefox": " $1",
|
||||
"Mozilla Firefox": " Firefox",
|
||||
|
||||
// Chrome/Chromium
|
||||
"(.*) - Google Chrome": " $1",
|
||||
"(.*) - Chromium": " $1",
|
||||
"Google Chrome": " Chrome",
|
||||
"Chromium": " Chromium",
|
||||
|
||||
// Terminal applications
|
||||
"(.*) - zsh": " $1",
|
||||
"(.*) - bash": " $1",
|
||||
"(.*) - fish": " $1",
|
||||
"ghostty": " Terminal",
|
||||
"kitty": " Terminal",
|
||||
"alacritty": " Terminal",
|
||||
"ghostty": " Terminal",
|
||||
|
||||
// Text editors and IDEs
|
||||
"(.*) - Visual Studio Code": " $1",
|
||||
"(.*) - Code": " $1",
|
||||
"(.*) - Vim": " $1",
|
||||
"(.*) - Neovim": " $1",
|
||||
"(.*) - Emacs": " $1",
|
||||
"Visual Studio Code": " VS Code",
|
||||
|
||||
// File managers
|
||||
"(.*)Nautilus": " Files: $1",
|
||||
"Files": " Files",
|
||||
"Thunar": " Files",
|
||||
"Dolphin": " Files",
|
||||
|
||||
// Communication apps
|
||||
"Slack (.*)": " $1",
|
||||
"Slack": " Slack",
|
||||
"Signal": " Signal",
|
||||
"Discord": " Discord",
|
||||
"Telegram": " Telegram",
|
||||
|
||||
// Media and entertainment
|
||||
"Spotify": " Spotify",
|
||||
"Steam": " Steam",
|
||||
"(.*) - YouTube": " $1",
|
||||
"VLC media player": " VLC",
|
||||
|
||||
// Development tools
|
||||
"(.*) - GitHub": " $1",
|
||||
"GitKraken": " GitKraken",
|
||||
"Postman": " Postman",
|
||||
|
||||
// System applications
|
||||
"System Monitor": " System Monitor",
|
||||
"Task Manager": " Task Manager",
|
||||
"Settings": " Settings",
|
||||
"Control Panel": " Settings",
|
||||
|
||||
// Office applications
|
||||
"(.*) - LibreOffice Writer": " $1",
|
||||
"(.*) - LibreOffice Calc": " $1",
|
||||
"(.*) - LibreOffice Impress": " $1",
|
||||
|
||||
// Remove common suffixes that don't add value
|
||||
"^(.*) - .*$": "$1",
|
||||
"^(.*) | .*$": "$1",
|
||||
|
||||
// Fallback for empty/unnamed windows
|
||||
"^$": "Desktop"
|
||||
}
|
||||
},
|
||||
|
||||
"hyprland/workspaces": {
|
||||
"disable-scroll": true,
|
||||
"disable-markup" : false,
|
||||
"all-outputs": true,
|
||||
"show-special": true,
|
||||
"special-visible-only": true,
|
||||
"format": " {icon} ",
|
||||
"format-icons": {
|
||||
"1": "",
|
||||
"2": "",
|
||||
"3": "",
|
||||
"4": "",
|
||||
"5": " 5",
|
||||
"6": " 6",
|
||||
"7": " 7",
|
||||
"8": " 8",
|
||||
"9": " 9",
|
||||
"music": "",
|
||||
"scratch": "",
|
||||
}
|
||||
},
|
||||
|
||||
"pulseaudio": {
|
||||
"scroll-step": 1, // %, can be a float
|
||||
"format": "{icon} {volume}%",
|
||||
"format-bluetooth": "{volume}% {icon} {format_source}",
|
||||
"format-bluetooth-muted": " {icon} {format_source}",
|
||||
"format-muted": " {format_source}",
|
||||
"format-source": "{volume}% ",
|
||||
"format-source-muted": "",
|
||||
"format-icons": {
|
||||
"headphone": ["", "", "", "", ""],
|
||||
"hands-free": "",
|
||||
"headset": "",
|
||||
"phone": "",
|
||||
"portable": "",
|
||||
"car": "",
|
||||
"default": ["", "", ""]
|
||||
},
|
||||
"on-click": "pavucontrol",
|
||||
"on-scroll-up": "pactl set-sink-volume @DEFAULT_SINK@ +2%",
|
||||
"on-scroll-down": "pactl set-sink-volume @DEFAULT_SINK@ -2%",
|
||||
},
|
||||
|
||||
// "custom/temp": {
|
||||
// "exec": "notify-send \"temp thing\"",
|
||||
// "interval": "once",
|
||||
// "signal": 8,
|
||||
// },
|
||||
|
||||
"tray": {
|
||||
"icon-size": 20,
|
||||
"spacing":10,
|
||||
},
|
||||
|
||||
"backlight": {
|
||||
"format": "{icon} {percent}%",
|
||||
"format-icons": ["", "", "", "", "", ""],
|
||||
"on-scroll-down": "brightnessctl -c backlight set 1%-",
|
||||
"on-scroll-up": "brightnessctl -c backlight set +1%",
|
||||
"min-brightness": 1
|
||||
},
|
||||
|
||||
// Add this configuration block
|
||||
"custom/neewer": {
|
||||
"format": "{}",
|
||||
"return-type": "json",
|
||||
"exec": "~/nixos/nate-work/dotfiles/waybar/scripts/waybar-neewer.sh status",
|
||||
"interval": 10,
|
||||
"on-click-middle": "~/nixos/nate-work/dotfiles/waybar/scripts/waybar-neewer.sh toggle",
|
||||
"on-click": "~/nixos/nate-work/dotfiles/waybar/scripts/waybar-neewer.sh decrease",
|
||||
"on-click-right": "~/nixos/nate-work/dotfiles/waybar/scripts/waybar-neewer.sh increase",
|
||||
"tooltip": true
|
||||
},
|
||||
|
||||
"custom/storage": {
|
||||
"format": "{icon} {percentage}%",
|
||||
"format-icons": {
|
||||
"default": "",
|
||||
"warning": "",
|
||||
"critical": "",
|
||||
},
|
||||
"exec": "usage=$(df / --output=pcent | tail -n1 | tr -d ' %'); if [ $usage -ge 90 ]; then class=\"critical\"; elif [ $usage -ge 75 ]; then class=\"warning\"; else class=\"default\"; fi; echo \"{\\\"percentage\\\":$usage,\\\"class\\\":\\\"$class\\\"}\"",
|
||||
"return-type": "json",
|
||||
"interval": 30,
|
||||
"tooltip-format": "Root filesystem: {percentage}% used",
|
||||
},
|
||||
|
||||
"custom/signal": {
|
||||
"format": " ",
|
||||
"on-click": "exec signal",
|
||||
"tooltip": false,
|
||||
},
|
||||
|
||||
"custom/steam": {
|
||||
"format": " ",
|
||||
"on-click": "exec steam",
|
||||
"tooltip": false,
|
||||
},
|
||||
|
||||
"custom/spotify": {
|
||||
"format": " ",
|
||||
"on-click": "exec flatpak run com.spotify.Client",
|
||||
"tooltip": false,
|
||||
},
|
||||
|
||||
"custom/firefox": {
|
||||
"format": " ",
|
||||
"on-click": "exec firefox",
|
||||
"tooltip": false,
|
||||
},
|
||||
|
||||
|
||||
"custom/slack": {
|
||||
"format": " ",
|
||||
"on-click": "slack",
|
||||
"tooltip": false,
|
||||
"exec if": "pgrep slack"
|
||||
},
|
||||
|
||||
|
||||
"custom/files": {
|
||||
"format": " ",
|
||||
"on-click": "exec nautilus",
|
||||
"tooltip": false,
|
||||
},
|
||||
|
||||
"custom/vpn": {
|
||||
"format": "{}",
|
||||
"return-type": "json",
|
||||
"exec": "~/.config/waybar/scripts/waybar-vpn.sh status",
|
||||
"interval": 5,
|
||||
"on-click": "~/.config/waybar/scripts/waybar-vpn.sh toggle",
|
||||
"tooltip": true
|
||||
},
|
||||
|
||||
"custom/launcher": {
|
||||
"format":" ",
|
||||
"on-click": "exec wofi -c ~/.config/wofi/config -I",
|
||||
"tooltip": false,
|
||||
},
|
||||
|
||||
"custom/power": {
|
||||
"format":"⏻",
|
||||
"on-click": "exec ~/.config/waybar/scripts/power-menu.sh",
|
||||
"tooltip": false,
|
||||
},
|
||||
}
|
||||
@ -1,16 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
entries="Default Colemak"
|
||||
|
||||
selected=$(printf '%s\n' $entries | wofi --conf=$HOME/.config/wofi/config.power --style=$HOME/.config/wofi/style.widgets.css | awk '{print tolower($1)}')
|
||||
|
||||
case $selected in
|
||||
default)
|
||||
swaymsg input type:keyboard xkb_layout "us"
|
||||
swaymsg input type:keyboard xkb_variant '""'
|
||||
;;
|
||||
colemak)
|
||||
swaymsg input type:keyboard xkb_layout "us"
|
||||
swaymsg input type:keyboard xkb_variant "colemak_dh"
|
||||
;;
|
||||
esac
|
||||
@ -1,231 +0,0 @@
|
||||
#!/usr/bin/env python3
|
||||
"""
|
||||
NEEWER FS230B LED Light Control SDK
|
||||
Based on reverse-engineered protocol from similar NEEWER models
|
||||
"""
|
||||
|
||||
import asyncio
|
||||
import struct
|
||||
from bleak import BleakClient, BleakScanner
|
||||
from typing import Optional, List, Tuple
|
||||
import logging
|
||||
|
||||
# NEEWER BLE Service/Characteristic UUIDs (based on RGB660 PRO reverse engineering)
|
||||
SERVICE_UUID = "69400001-b5a3-f393-e0a9-e50e-24dc-ca99"
|
||||
CHARACTERISTIC_UUID = "69400002-b5a3-f393-e0a9-e50e-24dc-ca99"
|
||||
|
||||
class NeewerFS230B:
|
||||
"""Control class for NEEWER FS230B LED Light"""
|
||||
|
||||
def __init__(self, mac_address: str = None):
|
||||
"""
|
||||
Initialize the NEEWER light controller
|
||||
|
||||
Args:
|
||||
mac_address: Bluetooth MAC address of the light. If None, will scan for devices.
|
||||
"""
|
||||
self.mac_address = mac_address
|
||||
self.client = None
|
||||
self.is_connected = False
|
||||
self.logger = logging.getLogger(__name__)
|
||||
|
||||
async def scan_for_devices(self, timeout: int = 10) -> List[Tuple[str, str]]:
|
||||
"""
|
||||
Scan for NEEWER devices
|
||||
|
||||
Returns:
|
||||
List of tuples containing (mac_address, device_name)
|
||||
"""
|
||||
devices = []
|
||||
scanner = BleakScanner()
|
||||
|
||||
self.logger.info(f"Scanning for NEEWER devices for {timeout} seconds...")
|
||||
discovered_devices = await scanner.discover(timeout=timeout)
|
||||
|
||||
for device in discovered_devices:
|
||||
# Look for NEEWER devices by name patterns
|
||||
if device.name and any(keyword in device.name.upper() for keyword in
|
||||
["NEEWER", "FS230", "NW"]):
|
||||
devices.append((device.address, device.name))
|
||||
self.logger.info(f"Found NEEWER device: {device.name} ({device.address})")
|
||||
|
||||
return devices
|
||||
|
||||
async def connect(self) -> bool:
|
||||
"""
|
||||
Connect to the NEEWER light
|
||||
|
||||
Returns:
|
||||
True if connected successfully, False otherwise
|
||||
"""
|
||||
if not self.mac_address:
|
||||
devices = await self.scan_for_devices()
|
||||
if not devices:
|
||||
self.logger.error("No NEEWER devices found")
|
||||
return False
|
||||
self.mac_address = devices[0][0]
|
||||
self.logger.info(f"Using first found device: {self.mac_address}")
|
||||
|
||||
try:
|
||||
self.client = BleakClient(self.mac_address)
|
||||
await self.client.connect()
|
||||
self.is_connected = True
|
||||
self.logger.info(f"Connected to NEEWER light at {self.mac_address}")
|
||||
return True
|
||||
except Exception as e:
|
||||
self.logger.error(f"Failed to connect: {e}")
|
||||
return False
|
||||
|
||||
async def disconnect(self):
|
||||
"""Disconnect from the light"""
|
||||
if self.client and self.is_connected:
|
||||
await self.client.disconnect()
|
||||
self.is_connected = False
|
||||
self.logger.info("Disconnected from NEEWER light")
|
||||
|
||||
def _calculate_checksum(self, data: List[int]) -> int:
|
||||
"""Calculate checksum for command (sum truncated to last byte)"""
|
||||
return sum(data) & 0xFF
|
||||
|
||||
async def _send_command(self, command: List[int]) -> bool:
|
||||
"""
|
||||
Send a command to the light
|
||||
|
||||
Args:
|
||||
command: List of integers representing the command bytes
|
||||
|
||||
Returns:
|
||||
True if command sent successfully
|
||||
"""
|
||||
if not self.is_connected or not self.client:
|
||||
self.logger.error("Not connected to device")
|
||||
return False
|
||||
|
||||
try:
|
||||
# Add checksum to command
|
||||
checksum = self._calculate_checksum(command)
|
||||
full_command = command + [checksum]
|
||||
|
||||
# Convert to bytes
|
||||
command_bytes = bytes(full_command)
|
||||
|
||||
self.logger.debug(f"Sending command: {command_bytes.hex()}")
|
||||
await self.client.write_gatt_char(CHARACTERISTIC_UUID, command_bytes)
|
||||
return True
|
||||
except Exception as e:
|
||||
self.logger.error(f"Failed to send command: {e}")
|
||||
return False
|
||||
|
||||
async def set_power(self, on: bool) -> bool:
|
||||
"""
|
||||
Turn the light on or off
|
||||
|
||||
Args:
|
||||
on: True to turn on, False to turn off
|
||||
|
||||
Returns:
|
||||
True if command sent successfully
|
||||
"""
|
||||
# Power command format: [0x78, 0x81, 0x01, on_off_byte]
|
||||
# On = 0x01, Off = 0x02
|
||||
command = [0x78, 0x81, 0x01, 0x01 if on else 0x02]
|
||||
return await self._send_command(command)
|
||||
|
||||
async def set_brightness_and_temperature(self, brightness: int, temperature: int) -> bool:
|
||||
"""
|
||||
Set brightness and color temperature
|
||||
|
||||
Args:
|
||||
brightness: 0-100 (percentage)
|
||||
temperature: 3200-5600 (Kelvin) for bi-color models
|
||||
|
||||
Returns:
|
||||
True if command sent successfully
|
||||
"""
|
||||
# Validate inputs
|
||||
brightness = max(0, min(100, brightness))
|
||||
temperature = max(3200, min(5600, temperature))
|
||||
|
||||
# Convert temperature to protocol value (3200K = 0x20, 5600K = 0x38)
|
||||
temp_value = int(((temperature - 3200) / (5600 - 3200)) * (0x38 - 0x20) + 0x20)
|
||||
|
||||
# CCT command format: [0x78, 0x87, 0x02, brightness, temp_value]
|
||||
command = [0x78, 0x87, 0x02, brightness, temp_value]
|
||||
return await self._send_command(command)
|
||||
|
||||
async def set_brightness(self, brightness: int) -> bool:
|
||||
"""
|
||||
Set brightness only (maintains current color temperature)
|
||||
|
||||
Args:
|
||||
brightness: 0-100 (percentage)
|
||||
|
||||
Returns:
|
||||
True if command sent successfully
|
||||
"""
|
||||
# Default to 5600K (daylight) if no temperature specified
|
||||
return await self.set_brightness_and_temperature(brightness, 5600)
|
||||
|
||||
|
||||
# CLI Interface
|
||||
async def main():
|
||||
"""Simple CLI for testing the SDK"""
|
||||
import argparse
|
||||
|
||||
parser = argparse.ArgumentParser(description="Control NEEWER FS230B LED Light")
|
||||
parser.add_argument("--mac", help="Bluetooth MAC address of the light")
|
||||
parser.add_argument("--scan", action="store_true", help="Scan for NEEWER devices")
|
||||
parser.add_argument("--on", action="store_true", help="Turn light on")
|
||||
parser.add_argument("--off", action="store_true", help="Turn light off")
|
||||
parser.add_argument("--brightness", type=int, help="Set brightness (0-100)")
|
||||
parser.add_argument("--temperature", type=int, help="Set color temperature (3200-5600K)")
|
||||
parser.add_argument("--verbose", "-v", action="store_true", help="Enable verbose logging")
|
||||
|
||||
args = parser.parse_args()
|
||||
|
||||
if args.verbose:
|
||||
logging.basicConfig(level=logging.DEBUG)
|
||||
else:
|
||||
logging.basicConfig(level=logging.INFO)
|
||||
|
||||
light = NeewerFS230B(args.mac)
|
||||
|
||||
if args.scan:
|
||||
devices = await light.scan_for_devices()
|
||||
if devices:
|
||||
print("Found NEEWER devices:")
|
||||
for mac, name in devices:
|
||||
print(f" {name}: {mac}")
|
||||
else:
|
||||
print("No NEEWER devices found")
|
||||
return
|
||||
|
||||
# Connect to the light
|
||||
if not await light.connect():
|
||||
print("Failed to connect to light")
|
||||
return
|
||||
|
||||
try:
|
||||
# Execute commands
|
||||
if args.on:
|
||||
success = await light.set_power(True)
|
||||
print(f"Turn on: {'Success' if success else 'Failed'}")
|
||||
|
||||
if args.off:
|
||||
success = await light.set_power(False)
|
||||
print(f"Turn off: {'Success' if success else 'Failed'}")
|
||||
|
||||
if args.brightness is not None:
|
||||
if args.temperature:
|
||||
success = await light.set_brightness_and_temperature(args.brightness, args.temperature)
|
||||
print(f"Set brightness {args.brightness}% and temperature {args.temperature}K: {'Success' if success else 'Failed'}")
|
||||
else:
|
||||
success = await light.set_brightness(args.brightness)
|
||||
print(f"Set brightness {args.brightness}%: {'Success' if success else 'Failed'}")
|
||||
|
||||
finally:
|
||||
await light.disconnect()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
asyncio.run(main())
|
||||
@ -1,16 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
entries="Lock Suspend Reboot Shutdown"
|
||||
|
||||
selected=$(printf '%s\n' $entries | wofi --conf=$HOME/.config/wofi/config.power --style=$HOME/.config/wofi/style.widgets.css | awk '{print tolower($1)}')
|
||||
|
||||
case $selected in
|
||||
lock)
|
||||
swaylock;;
|
||||
suspend)
|
||||
exec systemctl suspend;;
|
||||
reboot)
|
||||
exec systemctl reboot;;
|
||||
shutdown)
|
||||
exec systemctl poweroff -i;;
|
||||
esac
|
||||
@ -1,68 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
# vpn-proxy-toggle.sh
|
||||
|
||||
VM_USER="nate"
|
||||
VM_IP="192.168.122.241"
|
||||
SOCKS_PORT=1080
|
||||
PID_FILE="/tmp/vpn-socks.pid"
|
||||
|
||||
start_proxy() {
|
||||
# Check if already running
|
||||
if pgrep -f "ssh -D $SOCKS_PORT" > /dev/null; then
|
||||
echo "Proxy already running"
|
||||
return 1
|
||||
fi
|
||||
|
||||
ssh -D $SOCKS_PORT -f -N $VM_USER@$VM_IP
|
||||
|
||||
# Get the PID of the SSH process we just started
|
||||
sleep 0.5
|
||||
pgrep -f "ssh -D $SOCKS_PORT" > "$PID_FILE"
|
||||
|
||||
# Configure system proxy
|
||||
gsettings set org.gnome.system.proxy mode 'manual'
|
||||
gsettings set org.gnome.system.proxy.socks host 'localhost'
|
||||
gsettings set org.gnome.system.proxy.socks port $SOCKS_PORT
|
||||
|
||||
echo "VPN proxy started on localhost:$SOCKS_PORT"
|
||||
}
|
||||
|
||||
stop_proxy() {
|
||||
if ! pgrep -f "ssh -D $SOCKS_PORT" > /dev/null; then
|
||||
echo "Proxy not running"
|
||||
return 1
|
||||
fi
|
||||
|
||||
# Find and kill SSH process
|
||||
pkill -f "ssh -D $SOCKS_PORT"
|
||||
rm -f "$PID_FILE"
|
||||
|
||||
# Disable system proxy
|
||||
gsettings set org.gnome.system.proxy mode 'none'
|
||||
|
||||
echo "VPN proxy stopped"
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
start_proxy
|
||||
;;
|
||||
stop)
|
||||
stop_proxy
|
||||
;;
|
||||
restart)
|
||||
stop_proxy
|
||||
start_proxy
|
||||
;;
|
||||
status)
|
||||
if pgrep -f "ssh -D $SOCKS_PORT" > /dev/null; then
|
||||
echo "Proxy running on localhost:$SOCKS_PORT"
|
||||
else
|
||||
echo "Proxy not running"
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|restart|status}"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
@ -1,99 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
NEEWER_SDK_PATH="./nate-work/dotfiles/waybar/scripts/neweer_light.py"
|
||||
NEEWER_MAC="CB:33:40:DF:63:44"
|
||||
STATE_FILE="$HOME/.cache/neewer_light_state"
|
||||
BRIGHTNESS_FILE="$HOME/.cache/neewer_brightness"
|
||||
|
||||
# Function to get current brightness from cache
|
||||
get_brightness() {
|
||||
if [ -f "$BRIGHTNESS_FILE" ]; then
|
||||
cat "$BRIGHTNESS_FILE"
|
||||
else
|
||||
echo "20" # Default brightness
|
||||
fi
|
||||
}
|
||||
|
||||
# Function to save brightness to cache
|
||||
save_brightness() {
|
||||
echo "$1" > "$BRIGHTNESS_FILE"
|
||||
}
|
||||
|
||||
# Function to get current power state
|
||||
get_power_state() {
|
||||
if [ -f "$STATE_FILE" ]; then
|
||||
cat "$STATE_FILE"
|
||||
else
|
||||
echo "off" # Default state
|
||||
fi
|
||||
}
|
||||
|
||||
# Function to save power state
|
||||
save_power_state() {
|
||||
echo "$1" > "$STATE_FILE"
|
||||
}
|
||||
|
||||
# Function to execute neewer command
|
||||
execute_neewer() {
|
||||
local cmd="$1"
|
||||
if [ -n "$NEEWER_MAC" ]; then
|
||||
python3 "$NEEWER_SDK_PATH" --mac "$NEEWER_MAC" $cmd
|
||||
else
|
||||
python3 "$NEEWER_SDK_PATH" $cmd
|
||||
fi
|
||||
}
|
||||
|
||||
# Main function for waybar output
|
||||
waybar_output() {
|
||||
local state=$(get_power_state)
|
||||
local brightness=$(get_brightness)
|
||||
|
||||
if [ "$state" = "on" ]; then
|
||||
echo "{\"text\":\" ${brightness}%\",\"class\":\"on\",\"tooltip\":\"NEEWER Light: ON (${brightness}%)\"}"
|
||||
else
|
||||
echo "{\"text\":\" OFF\",\"class\":\"off\",\"tooltip\":\"NEEWER Light: OFF\"}"
|
||||
fi
|
||||
}
|
||||
|
||||
# Handle different commands
|
||||
case "$1" in
|
||||
"toggle")
|
||||
state=$(get_power_state)
|
||||
if [ "$state" = "on" ]; then
|
||||
execute_neewer "--off" && save_power_state "off"
|
||||
else
|
||||
execute_neewer "--on" && save_power_state "on"
|
||||
fi
|
||||
;;
|
||||
"on")
|
||||
execute_neewer "--on" && save_power_state "on"
|
||||
;;
|
||||
"off")
|
||||
execute_neewer "--off" && save_power_state "off"
|
||||
;;
|
||||
"brightness")
|
||||
if [ -n "$2" ]; then
|
||||
brightness="$2"
|
||||
execute_neewer "--brightness $brightness" && save_brightness "$brightness"
|
||||
fi
|
||||
;;
|
||||
"increase")
|
||||
current=$(get_brightness)
|
||||
new_brightness=$((current + 10))
|
||||
if [ $new_brightness -gt 100 ]; then
|
||||
new_brightness=100
|
||||
fi
|
||||
execute_neewer "--brightness $new_brightness" && save_brightness "$new_brightness"
|
||||
;;
|
||||
"decrease")
|
||||
current=$(get_brightness)
|
||||
new_brightness=$((current - 10))
|
||||
if [ $new_brightness -lt 0 ]; then
|
||||
new_brightness=0
|
||||
fi
|
||||
execute_neewer "--brightness $new_brightness" && save_brightness "$new_brightness"
|
||||
;;
|
||||
"status"|*)
|
||||
waybar_output
|
||||
;;
|
||||
esac
|
||||
@ -1,32 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
PID_FILE="/tmp/vpn-socks.pid"
|
||||
VPN_SCRIPT="$HOME/.config/waybar/scripts/vpn.sh"
|
||||
|
||||
get_status() {
|
||||
if pgrep -f "ssh -D 1080" > /dev/null 2>&1; then
|
||||
echo '{"text": " ", "class": "connected", "tooltip": "VPN Connected (Click to disconnect)"}'
|
||||
else
|
||||
echo '{"text": " ", "class": "disconnected", "tooltip": "VPN Disconnected (Click to connect)"}'
|
||||
fi
|
||||
}
|
||||
|
||||
toggle() {
|
||||
if pgrep -f "ssh -D 1080" > /dev/null 2>&1; then
|
||||
"$VPN_SCRIPT" stop
|
||||
else
|
||||
"$VPN_SCRIPT" start
|
||||
fi
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
status)
|
||||
get_status
|
||||
;;
|
||||
toggle)
|
||||
toggle
|
||||
;;
|
||||
*)
|
||||
get_status
|
||||
;;
|
||||
esac
|
||||
@ -1,345 +0,0 @@
|
||||
/* =============================================================================
|
||||
*
|
||||
* Waybar configuration
|
||||
*
|
||||
* Configuration reference: https://github.com/Alexays/Waybar/wiki/Configuration
|
||||
*
|
||||
* =========================================================================== */
|
||||
|
||||
@define-color rosewater #f4dbd6;
|
||||
@define-color flamingo #f0c6c6;
|
||||
@define-color pink #f5bde6;
|
||||
@define-color mauve #c6a0f6;
|
||||
@define-color red #ed8796;
|
||||
@define-color maroon #ee99a0;
|
||||
@define-color peach #f5a97f;
|
||||
@define-color yellow #eed49f;
|
||||
@define-color green #a6da95;
|
||||
@define-color teal #8bd5ca;
|
||||
@define-color sky #91d7e3;
|
||||
@define-color sapphire #7dc4e4;
|
||||
@define-color blue #8aadf4;
|
||||
@define-color lavender #b7bdf8;
|
||||
@define-color text #cad3f5;
|
||||
@define-color subtext1 #b8c0e0;
|
||||
@define-color subtext0 #a5adcb;
|
||||
@define-color overlay2 #939ab7;
|
||||
@define-color overlay1 #8087a2;
|
||||
@define-color overlay0 #6e738d;
|
||||
@define-color surface2 #5b6078;
|
||||
@define-color surface1 #494d64;
|
||||
@define-color surface0 #363a4f;
|
||||
@define-color base #24273a;
|
||||
@define-color mantle #1e2030;
|
||||
@define-color crust #181926;
|
||||
|
||||
|
||||
/* -----------------------------------------------------------------------------
|
||||
* Keyframes
|
||||
* -------------------------------------------------------------------------- */
|
||||
@keyframes blink-warning {
|
||||
70% {
|
||||
color: @overlay0;
|
||||
}
|
||||
|
||||
to {
|
||||
color: @overlay0;
|
||||
background-color: @crust;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes blink-critical {
|
||||
70% {
|
||||
color: @overlay2;
|
||||
}
|
||||
|
||||
to {
|
||||
color: @overlay2;
|
||||
background-color: @base;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* -----------------------------------------------------------------------------
|
||||
* Base styles
|
||||
* -------------------------------------------------------------------------- */
|
||||
/* Reset all styles */
|
||||
* {
|
||||
border: none;
|
||||
border-radius: 0;
|
||||
min-height: 40px;
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
/* The whole bar */
|
||||
#waybar {
|
||||
background: transparent;
|
||||
background-color: transparent;
|
||||
font-family: Overpass Nerd Font;
|
||||
font-size: 22px;
|
||||
color: @text;
|
||||
}
|
||||
|
||||
#taskbar {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
#taskbar button {
|
||||
padding-left: 3px;
|
||||
padding-right: 3px;
|
||||
margin-left: 3px;
|
||||
margin-right: 3px;
|
||||
/* color: transparent; */
|
||||
border-bottom: 2px solid;
|
||||
}
|
||||
|
||||
#taskbar button.active {
|
||||
color: @green;
|
||||
}
|
||||
|
||||
.modules-left,
|
||||
.modules-right,
|
||||
.modules-center {
|
||||
/* margin: 8px 8px 1px 8px; */
|
||||
background: transparent;
|
||||
/* color: @; */
|
||||
background-color: @base;
|
||||
border-radius: 25px;
|
||||
padding: 0px 10px 0px 10px;
|
||||
border-style: solid;
|
||||
border-width: 3px;
|
||||
border-color: @surface0;
|
||||
}
|
||||
|
||||
/* Add gaps for middle module so they space out and dont touch */
|
||||
.modules-center {
|
||||
margin: 0px 100px;
|
||||
}
|
||||
|
||||
/* Every modules */
|
||||
#backlight,
|
||||
#battery,
|
||||
#clock,
|
||||
#cpu,
|
||||
#custom-storage,
|
||||
#custom-keyboard-layout,
|
||||
#custom-PBPbattery,
|
||||
#custom-weather,
|
||||
#idle_inhibitor,
|
||||
#memory,
|
||||
#mode,
|
||||
#network,
|
||||
#pulseaudio,
|
||||
#temperature,
|
||||
#tray {
|
||||
padding: 0.5rem 0.6rem;
|
||||
margin: 1px 0px;
|
||||
}
|
||||
|
||||
#clock {
|
||||
margin-left: 5px;
|
||||
margin-right: 5px;
|
||||
min-width: 140px;
|
||||
}
|
||||
|
||||
#backlight,
|
||||
#battery,
|
||||
#cpu,
|
||||
#custom-storage,
|
||||
#memory,
|
||||
#network,
|
||||
#pulseaudio,
|
||||
#temperature {
|
||||
min-width: 90px;
|
||||
}
|
||||
|
||||
|
||||
/* -----------------------------------------------------------------------------
|
||||
* Modules styles
|
||||
* -------------------------------------------------------------------------- */
|
||||
|
||||
#battery {
|
||||
animation-timing-function: linear;
|
||||
animation-iteration-count: infinite;
|
||||
animation-direction: alternate;
|
||||
}
|
||||
|
||||
#battery.warning,
|
||||
#custom-storage.warning {
|
||||
color: @flamingo;
|
||||
}
|
||||
|
||||
#battery.critical,
|
||||
#custom-storage.critical {
|
||||
color: @red;
|
||||
}
|
||||
|
||||
#battery.warning.discharging {
|
||||
animation-name: blink-warning;
|
||||
animation-duration: 3s;
|
||||
}
|
||||
|
||||
#battery.critical.discharging {
|
||||
animation-name: blink-critical;
|
||||
animation-duration: 2s;
|
||||
}
|
||||
|
||||
#cpu.warning {
|
||||
color: @flamingo;
|
||||
}
|
||||
|
||||
#cpu.critical {
|
||||
color: @red;
|
||||
}
|
||||
|
||||
#memory {
|
||||
animation-timing-function: linear;
|
||||
animation-iteration-count: infinite;
|
||||
animation-direction: alternate;
|
||||
}
|
||||
|
||||
#memory.warning {
|
||||
color: @flamingo;
|
||||
}
|
||||
|
||||
#memory.critical {
|
||||
color: @red;
|
||||
animation-name: blink-critical;
|
||||
animation-duration: 2s;
|
||||
padding-left: 5px;
|
||||
padding-right: 5px;
|
||||
}
|
||||
|
||||
#mode {
|
||||
background: @overlay0;
|
||||
border-bottom: 3px transparent;
|
||||
color: @text;
|
||||
margin-left: 5px;
|
||||
margin-right: 5px;
|
||||
border-radius: 20px;
|
||||
}
|
||||
|
||||
#network.disconnected {
|
||||
color: @flamingo;
|
||||
}
|
||||
|
||||
#pulseaudio {
|
||||
padding-top: 6px;
|
||||
}
|
||||
|
||||
#pulseaudio.muted {
|
||||
color: @sky;
|
||||
}
|
||||
|
||||
#temperature.critical {
|
||||
color: @red;
|
||||
}
|
||||
|
||||
#window {
|
||||
font-weight: bold;
|
||||
margin-left: 20px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
#workspaces {
|
||||
font-size: 24px;
|
||||
}
|
||||
|
||||
#workspaces button {
|
||||
/* border-bottom: 3px solid transparent; */
|
||||
margin-bottom: 0px;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
#custom-launcher {
|
||||
color: @lavenderblush;
|
||||
}
|
||||
|
||||
/* @define-color rosewater #f4dbd6; */
|
||||
/* @define-color flamingo #f0c6c6; */
|
||||
/* @define-color pink #f5bde6; */
|
||||
/* @define-color mauve #c6a0f6; */
|
||||
/* @define-color red #ed8796; */
|
||||
/* @define-color maroon #ee99a0; */
|
||||
/* @define-color peach #f5a97f; */
|
||||
/* @define-color yellow #eed49f; */
|
||||
/* @define-color green #a6da95; */
|
||||
/* @define-color teal #8bd5ca; */
|
||||
/* @define-color sky #91d7e3; */
|
||||
/* @define-color sapphire #7dc4e4; */
|
||||
/* @define-color blue #8aadf4; */
|
||||
/* @define-color lavender #b7bdf8; */
|
||||
|
||||
|
||||
#custom-signal {
|
||||
color: @lavender;
|
||||
padding: 0px 5px 0px 5px;
|
||||
}
|
||||
|
||||
#custom-steam {
|
||||
color: @teal;
|
||||
padding: 0px 5px 0px 5px;
|
||||
}
|
||||
|
||||
#custom-spotify {
|
||||
color: @green;
|
||||
padding: 0px 5px 0px 5px;
|
||||
}
|
||||
|
||||
#custom-firefox {
|
||||
color: @yellow;
|
||||
padding: 0px 5px 0px 5px;
|
||||
}
|
||||
|
||||
#custom-slack {
|
||||
color: @peach;
|
||||
padding: 0px 5px 0px 5px;
|
||||
}
|
||||
|
||||
#custom-files {
|
||||
color: @pink;
|
||||
padding: 0px 5px 0px 5px;
|
||||
}
|
||||
|
||||
#custom-pomo {
|
||||
color: @red;
|
||||
padding: 0px 5px 0px 5px;
|
||||
}
|
||||
|
||||
#custom-vpn {
|
||||
color: @lavender;
|
||||
padding: 0px 5px 0px 5px;
|
||||
}
|
||||
|
||||
#wiggle {
|
||||
animation-name: blink-warning;
|
||||
}
|
||||
|
||||
#workspaces button.active {
|
||||
border-bottom: 3px solid @lavender;
|
||||
color: @green;
|
||||
}
|
||||
|
||||
#workspaces button.urgent {
|
||||
border-color: @lavender;
|
||||
color: @yellow;
|
||||
}
|
||||
|
||||
#custom-power {
|
||||
margin-left: 15px;
|
||||
margin-right: 15px;
|
||||
font-size: 20px;
|
||||
color: @flamingo;
|
||||
}
|
||||
|
||||
#custom-launcher {
|
||||
font-size: 24px;
|
||||
margin-left: 15px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
#backlight.icon {
|
||||
padding-right: 1px;
|
||||
font-size: 20px;
|
||||
}
|
||||
@ -6,48 +6,56 @@
|
||||
unstable = import inputs.nixpkgs-unstable { system = "x86_64-linux"; config.allowUnfree = true; };
|
||||
in
|
||||
{
|
||||
# nixpkgs.overlays = [
|
||||
# overlay-unstable
|
||||
# ];
|
||||
|
||||
imports = [
|
||||
../../../shared/modules/apps/firefox/firefox.nix
|
||||
../../../shared/modules/apps/ghostty.nix
|
||||
../../../shared/modules/apps/helix.nix
|
||||
../../../shared/modules/home-manager/programs.nix
|
||||
../../../shared/modules/home-manager/git-autosync.nix
|
||||
../niri/niri_home.nix
|
||||
../vpn-proxy/vpn-proxy.nix
|
||||
];
|
||||
|
||||
catppuccin = {
|
||||
enable = true;
|
||||
flavor = "macchiato";
|
||||
accent = "lavender";
|
||||
cursors.enable = false;
|
||||
kvantum.enable = true;
|
||||
zsh-syntax-highlighting.enable = true;
|
||||
mako.enable = false;
|
||||
};
|
||||
|
||||
|
||||
home.username = userName;
|
||||
home.homeDirectory = "/home/${userName}";
|
||||
|
||||
programs.home-manager.enable = true;
|
||||
home.stateVersion = "23.11"; # Please read the comment before changing.
|
||||
|
||||
# The home.packages option allows you to install Nix packages into your
|
||||
# environment.
|
||||
# Stylix auto-theming - applies to all programs.<name>.enable apps
|
||||
stylix.autoEnable = true;
|
||||
|
||||
# Enable shared modules
|
||||
firefoxApp.enable = true;
|
||||
|
||||
ghosttyApp.enable = true;
|
||||
helixApp.enable = true;
|
||||
sharedPrograms.enable = true;
|
||||
fonts.fontconfig.enable = true;
|
||||
|
||||
# Enable VPN proxy script
|
||||
vpnProxy.enable = true;
|
||||
|
||||
# Git autosync for star-command
|
||||
services.git-autosync = {
|
||||
enable = true;
|
||||
repos.star-command = {
|
||||
path = "/home/${userName}/source/star-command";
|
||||
gitName = fullName;
|
||||
gitEmail = email;
|
||||
};
|
||||
};
|
||||
|
||||
nirihome = {
|
||||
enable = true;
|
||||
homePackages = with pkgs; [
|
||||
homePackages = [];
|
||||
};
|
||||
|
||||
# Additional user packages
|
||||
# Note: Programs with Stylix theming are in shared modules
|
||||
home.packages = with pkgs; [
|
||||
#
|
||||
# Dev Tools
|
||||
#
|
||||
helix
|
||||
vscode-fhs
|
||||
unstable.docker_25
|
||||
docker-compose
|
||||
@ -94,13 +102,11 @@
|
||||
nfs-utils
|
||||
|
||||
#
|
||||
# Better Unix
|
||||
# Unix tools
|
||||
#
|
||||
bat
|
||||
duf
|
||||
dust
|
||||
fd
|
||||
fzf
|
||||
lsd
|
||||
lsof
|
||||
ripgrep
|
||||
@ -115,7 +121,6 @@
|
||||
# Photo / Video
|
||||
#
|
||||
imv
|
||||
mpv
|
||||
ffmpeg
|
||||
audacity
|
||||
yt-dlp
|
||||
@ -137,25 +142,18 @@
|
||||
obs-studio
|
||||
gnome-disk-utility
|
||||
hugo
|
||||
# unstable.davinci-resolve-studio
|
||||
|
||||
#
|
||||
# Style
|
||||
# Style (Qt plugin for Stylix)
|
||||
#
|
||||
catppuccin-gtk
|
||||
catppuccin-kvantum
|
||||
libsForQt5.qtstyleplugin-kvantum
|
||||
libsForQt5.qt5ct
|
||||
kdePackages.qtstyleplugin-kvantum
|
||||
kdePackages.qt6ct
|
||||
# Install fonts
|
||||
lato
|
||||
# Additional fonts (main fonts managed by Stylix)
|
||||
unstable.nerd-fonts.hurmit
|
||||
unstable.nerd-fonts.overpass
|
||||
unstable.nerd-fonts.monaspace
|
||||
monaspace
|
||||
];
|
||||
};
|
||||
|
||||
# enable saving ssh secrets (needed for go mod installing private packages)
|
||||
services.gnome-keyring.enable = true;
|
||||
@ -164,11 +162,9 @@
|
||||
services.mpris-proxy.enable = true;
|
||||
|
||||
home.sessionVariables = {
|
||||
# BAT_THEME="Catppuccin Macchiato";
|
||||
EDITOR = "hx";
|
||||
XCURSOR_THEME = "Bibata-Modern-Classic";
|
||||
XCURSOR_SIZE = "24";
|
||||
HYPRCURSOR_THEME = "Bibata-Modern-Classic";
|
||||
# For electron apps
|
||||
NIXOS_OZONE_WL = "1";
|
||||
};
|
||||
|
||||
# Git setup
|
||||
@ -272,37 +268,7 @@
|
||||
};
|
||||
};
|
||||
|
||||
qt = {
|
||||
enable = true;
|
||||
platformTheme.name = "kvantum";
|
||||
style = {
|
||||
name = "kvantum";
|
||||
package = pkgs.catppuccin-kvantum.override {
|
||||
accent = "lavender";
|
||||
variant = "macchiato";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
gtk = {
|
||||
enable = true;
|
||||
# icons
|
||||
iconTheme = {
|
||||
package = pkgs.catppuccin-papirus-folders;
|
||||
name = "Papirus-Dark";
|
||||
};
|
||||
# gtk theme
|
||||
theme = {
|
||||
name = "catppuccin-macchiato-lavender-compact+rimless";
|
||||
package = pkgs.catppuccin-gtk.override {
|
||||
accents = [ "lavender" ];
|
||||
size = "compact";
|
||||
tweaks = [ "rimless" ];
|
||||
variant = "macchiato";
|
||||
};
|
||||
};
|
||||
# cursor defined in hypr-home.nix
|
||||
};
|
||||
# Stylix handles Qt and GTK theming
|
||||
|
||||
home.file = lib.mkMerge [
|
||||
# Shared dotfiles
|
||||
@ -311,7 +277,7 @@
|
||||
in
|
||||
if builtins.pathExists sharedDotfilesPath then
|
||||
builtins.listToAttrs (map (name: {
|
||||
name = "${config.xdg.configHome}/${name}";
|
||||
name = ".config/${name}";
|
||||
value = { source = lib.mkDefault (sharedDotfilesPath + "/${name}"); };
|
||||
}) (builtins.attrNames (builtins.readDir sharedDotfilesPath)))
|
||||
else {})
|
||||
@ -321,7 +287,7 @@
|
||||
in
|
||||
if builtins.pathExists localDotfilesPath && builtins.readDir localDotfilesPath != {} then
|
||||
builtins.listToAttrs (map (name: {
|
||||
name = "${config.xdg.configHome}/${name}";
|
||||
name = ".config/${name}";
|
||||
value = { source = localDotfilesPath + "/${name}"; };
|
||||
}) (builtins.attrNames (builtins.readDir localDotfilesPath)))
|
||||
else {})
|
||||
@ -331,22 +297,6 @@
|
||||
# Active linked dotfiles
|
||||
"hypr".source = config.lib.file.mkOutOfStoreSymlink "/home/nate/nixos/nate-work/linked-dotfiles/hypr";
|
||||
"niri".source = config.lib.file.mkOutOfStoreSymlink "/home/nate/nixos/nate-work/linked-dotfiles/niri";
|
||||
"waybar".source = config.lib.file.mkOutOfStoreSymlink "/home/nate/nixos/nate-work/linked-dotfiles/waybar";
|
||||
# Shared
|
||||
"helix".source = config.lib.file.mkOutOfStoreSymlink "/home/nate/nixos/shared/linked-dotfiles/helix";
|
||||
|
||||
# Theme files
|
||||
"gtk-4.0/assets".source = "${config.gtk.theme.package}/share/themes/${config.gtk.theme.name}/gtk-4.0/assets";
|
||||
"gtk-4.0/gtk.css".source = "${config.gtk.theme.package}/share/themes/${config.gtk.theme.name}/gtk-4.0/gtk.css";
|
||||
"gtk-4.0/gtk-dark.css".source = "${config.gtk.theme.package}/share/themes/${config.gtk.theme.name}/gtk-4.0/gtk-dark.css";
|
||||
"Kvantum/kvantum.kvconfig".source = (pkgs.formats.ini {}).generate "kvantum.kvconfig" {
|
||||
General.theme = "catppuccin-macchiato-lavender";
|
||||
# waybar is now managed by shared/modules/home-manager/waybar.nix via waybarConfig.enable
|
||||
};
|
||||
};
|
||||
# home.file.".icons/default/index.theme".text = ''
|
||||
# [icon theme]
|
||||
# Inherits=Catppuccin-Macchiato-Lavender-Cursors
|
||||
# '';
|
||||
|
||||
home.stateVersion = "23.11"; # Please read the comment before changing.
|
||||
}
|
||||
|
||||
@ -17,9 +17,6 @@ in
|
||||
|
||||
config = lib.mkIf config.hypr.enable {
|
||||
|
||||
catppuccin.enable = true;
|
||||
catppuccin.flavor = "macchiato";
|
||||
catppuccin.accent = "lavender";
|
||||
programs.hyprland.enable = true;
|
||||
programs.hyprland.withUWSM = true;
|
||||
# programs.hyprland.package = unstable.hyprland;
|
||||
|
||||
@ -1,5 +1,9 @@
|
||||
{ inputs, lib, config, pkgs, ... }:
|
||||
{
|
||||
imports = [
|
||||
../../../shared/modules/home-manager/waybar.nix
|
||||
];
|
||||
|
||||
options.nirihome = {
|
||||
enable = lib.mkEnableOption "Enable niri home config";
|
||||
homePackages = lib.mkOption {
|
||||
@ -19,21 +23,16 @@
|
||||
XDG_CURRENT_DESKTOP = "niri";
|
||||
};
|
||||
|
||||
home.pointerCursor = {
|
||||
gtk.enable = true;
|
||||
x11.enable = true;
|
||||
name = "Bibata-Modern-Classic";
|
||||
package = pkgs.bibata-cursors;
|
||||
size = 32;
|
||||
};
|
||||
# Cursor is managed by Stylix (stylix.cursor in nate-work/default.nix)
|
||||
|
||||
# Waybar with Stylix theming
|
||||
waybarConfig.enable = true;
|
||||
|
||||
home.packages = with pkgs; lib.lists.flatten [
|
||||
[
|
||||
### niri packages
|
||||
swaybg
|
||||
swaylock-effects
|
||||
waybar
|
||||
wofi
|
||||
# Etc
|
||||
gopsuinfo # For system stats in panel
|
||||
wl-clipboard # System clipboard
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
fullName = "Nate Anderson";
|
||||
email = "n8r@tuta.io";
|
||||
hostName = "winmax";
|
||||
desktop = "sway";
|
||||
desktop = "niri";
|
||||
gaming = true;
|
||||
in
|
||||
{
|
||||
@ -20,9 +20,80 @@
|
||||
installGaming = gaming;
|
||||
};
|
||||
|
||||
# Stylix theming - auto-generate color scheme from wallpaper
|
||||
stylix = {
|
||||
enable = true;
|
||||
image = ../shared/modules/services/wallpapers/Dark/FSO-Dark.jpg;
|
||||
polarity = "dark";
|
||||
|
||||
# System-wide cursor
|
||||
cursor = {
|
||||
package = pkgs.bibata-cursors;
|
||||
name = "Bibata-Modern-Classic";
|
||||
size = 32;
|
||||
};
|
||||
|
||||
# Fonts
|
||||
fonts = {
|
||||
serif = {
|
||||
package = pkgs.lato;
|
||||
name = "Lato";
|
||||
};
|
||||
sansSerif = {
|
||||
package = pkgs.lato;
|
||||
name = "Lato";
|
||||
};
|
||||
monospace = {
|
||||
package = pkgs.maple-mono.NF;
|
||||
name = "Maple Mono NF";
|
||||
};
|
||||
emoji = {
|
||||
package = pkgs.noto-fonts-color-emoji;
|
||||
name = "Noto Color Emoji";
|
||||
};
|
||||
sizes = {
|
||||
applications = 12;
|
||||
desktop = 10;
|
||||
popups = 10;
|
||||
terminal = 11;
|
||||
};
|
||||
};
|
||||
|
||||
# Let plymouth use its own theme
|
||||
targets.plymouth.enable = false;
|
||||
};
|
||||
|
||||
# Limit the number of generations to keep
|
||||
boot.loader.systemd-boot.configurationLimit = 5;
|
||||
|
||||
# Systemd initrd for faster boot
|
||||
boot.initrd.systemd.enable = true;
|
||||
|
||||
# Plymouth boot animation
|
||||
boot.plymouth = {
|
||||
enable = true;
|
||||
theme = "rings";
|
||||
themePackages = with pkgs; [
|
||||
(adi1090x-plymouth-themes.override {
|
||||
selected_themes = [ "rings" ];
|
||||
})
|
||||
];
|
||||
};
|
||||
|
||||
# Silent boot
|
||||
boot.consoleLogLevel = 0;
|
||||
boot.initrd.verbose = false;
|
||||
boot.kernelParams = [
|
||||
"quiet"
|
||||
"splash"
|
||||
"boot.shell_on_fail"
|
||||
"loglevel=3"
|
||||
"rd.systemd.show_status=false"
|
||||
"rd.udev.log_level=3"
|
||||
"udev.log_priority=3"
|
||||
];
|
||||
boot.loader.timeout = 0;
|
||||
|
||||
# Perform garbage collection weekly to maintain low disk usage
|
||||
nix.gc = {
|
||||
automatic = true;
|
||||
@ -31,9 +102,5 @@
|
||||
};
|
||||
|
||||
# Optimize storage
|
||||
# You can also manually optimize the store via:
|
||||
# nix-store --optimise
|
||||
# Refer to the following link for more details:
|
||||
# https://nixos.org/manual/nix/stable/command-ref/conf-file.html#conf-auto-optimise-store
|
||||
nix.settings.auto-optimise-store = true;
|
||||
}
|
||||
|
||||
@ -1,13 +1,13 @@
|
||||
{ config, lib, inputs, outputs, pkgs, timeZone, system, ... }:
|
||||
let
|
||||
supportedDesktops = [ "sway" ];
|
||||
supportedDesktops = [ "sway" "niri" ];
|
||||
supportedDesktopsStr = lib.strings.concatStringsSep ", " supportedDesktops;
|
||||
deskCfg = config.deskCfg;
|
||||
in
|
||||
{
|
||||
options.deskCfg = {
|
||||
de = lib.mkOption {
|
||||
default = "sway";
|
||||
default = "niri";
|
||||
type = lib.types.str;
|
||||
description = "Desktop Environment";
|
||||
};
|
||||
@ -29,9 +29,8 @@ in
|
||||
imports = [
|
||||
modules/user/main_user.nix
|
||||
modules/sway/sway_conf.nix
|
||||
modules/niri/niri_conf.nix
|
||||
../shared/modules/services/motu-m4-combined.nix
|
||||
|
||||
# inputs.nur.hmModules.nur
|
||||
];
|
||||
|
||||
config = {
|
||||
@ -54,7 +53,6 @@ in
|
||||
# Use the systemd-boot EFI boot loader.
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
# boot.plymouth.enable = true;
|
||||
|
||||
networking.hostName = deskCfg.hostName; # Define your hostname.
|
||||
networking.networkmanager.enable = true; # Easiest to use and most distros use this by default.
|
||||
@ -68,12 +66,20 @@ in
|
||||
};
|
||||
|
||||
swaywm = {
|
||||
enable = true;
|
||||
enable = deskCfg.de == "sway";
|
||||
useNonFree = true;
|
||||
installGaming = deskCfg.installGaming;
|
||||
systemPackages = [];
|
||||
};
|
||||
|
||||
niriwm = {
|
||||
enable = deskCfg.de == "niri";
|
||||
useNonFree = true;
|
||||
installGaming = deskCfg.installGaming;
|
||||
user = deskCfg.userName;
|
||||
systemPackages = [];
|
||||
};
|
||||
|
||||
services.motu-m4-combined = {
|
||||
enable = true;
|
||||
user = deskCfg.userName;
|
||||
|
||||
@ -4,76 +4,67 @@
|
||||
fullName = "Nathan Anderson";
|
||||
email = "n8r@tuta.io";
|
||||
unstable = import inputs.nixpkgs-unstable { system = "x86_64-linux"; config.allowUnfree = true; };
|
||||
# oldstable = import inputs.nixpkgs-23 { system = "x86_64-linux"; config.allowUnfree = true; };
|
||||
# davinciDesktop = pkgs.makeDesktopItem {
|
||||
# name = "davinci-resolve-studio";
|
||||
# desktopName = "Davinci Resolve Studio";
|
||||
# exec = "${oldstable.davinci-resolve-studio}";
|
||||
# };
|
||||
# overlay-unstable = final: prev: {
|
||||
# unstable = inputs.nixpkgs-unstable.legacyPackages.x86_64-linux;
|
||||
# };
|
||||
# overlay-oldstable = final: prev: {
|
||||
# pkgs23 = inputs.nixpkgs-23.legacyPackages.x86_64-linux;
|
||||
# };
|
||||
# overlay-unstable = final: prev: {
|
||||
# # unstable = inputs.nixpkgs-unstable.legacyPackages.x86_64-linux;
|
||||
# unstable = import inputs.nixpkgs-unstable {
|
||||
# system = "x86_64-linux";
|
||||
# config = {
|
||||
# allowUnfreePredicate = (pkg: true);
|
||||
# allowUnfree = true;
|
||||
# };
|
||||
# };
|
||||
# };
|
||||
in
|
||||
{
|
||||
# nixpkgs.overlays = [
|
||||
# overlay-unstable
|
||||
# ];
|
||||
|
||||
imports = [
|
||||
../../../shared/modules/apps/firefox/firefox.nix
|
||||
../../../shared/modules/apps/ghostty.nix
|
||||
../../../shared/modules/apps/helix.nix
|
||||
../../../shared/modules/home-manager/programs.nix
|
||||
../../../shared/modules/home-manager/git-autosync.nix
|
||||
../niri/niri_home.nix
|
||||
];
|
||||
|
||||
home.username = userName;
|
||||
home.homeDirectory = "/home/${userName}";
|
||||
|
||||
programs.home-manager.enable = true;
|
||||
|
||||
home.stateVersion = "23.11"; # Please read the comment before changing.
|
||||
|
||||
# The home.packages option allows you to install Nix packages into your
|
||||
# environment.
|
||||
firefoxApp.enable = true;
|
||||
# Stylix auto-theming - applies to all programs.<name>.enable apps
|
||||
stylix.autoEnable = true;
|
||||
|
||||
# Enable shared modules
|
||||
firefoxApp.enable = true;
|
||||
ghosttyApp.enable = true;
|
||||
helixApp.enable = true;
|
||||
sharedPrograms.enable = true;
|
||||
fonts.fontconfig.enable = true;
|
||||
|
||||
# Git autosync for star-command
|
||||
services.git-autosync = {
|
||||
enable = true;
|
||||
repos.star-command = {
|
||||
path = "/home/${userName}/source/star-command";
|
||||
gitName = fullName;
|
||||
gitEmail = email;
|
||||
};
|
||||
};
|
||||
|
||||
nirihome = {
|
||||
enable = true;
|
||||
homePackages = [];
|
||||
};
|
||||
|
||||
# Additional user packages
|
||||
# Note: Programs with Stylix theming are in shared modules
|
||||
home.packages = with pkgs; [
|
||||
# nur.repos.crazazy.js.eslint
|
||||
#
|
||||
# Dev Tools
|
||||
#
|
||||
helix
|
||||
docker
|
||||
unstable.godot
|
||||
jq
|
||||
### LSP's
|
||||
nil # Nix LSP
|
||||
nodePackages_latest.bash-language-server
|
||||
vscode-langservers-extracted # provides eslint, markdown, json, css, and html lsp
|
||||
python311Packages.python-lsp-server
|
||||
|
||||
# zls
|
||||
### Misc
|
||||
# android-udev-rules
|
||||
# android-tools
|
||||
# sdkmanager
|
||||
python3
|
||||
unstable.opencode
|
||||
unstable.claude-code
|
||||
usbutils
|
||||
openscad
|
||||
### LSP's
|
||||
nil # Nix LSP
|
||||
nodePackages_latest.bash-language-server
|
||||
vscode-langservers-extracted # provides eslint, markdown, json, css, and html lsp
|
||||
python313Packages.python-lsp-server
|
||||
|
||||
#
|
||||
# Gaming
|
||||
@ -83,18 +74,15 @@
|
||||
wine-wayland
|
||||
|
||||
#
|
||||
# Better Unix
|
||||
# Unix tools
|
||||
#
|
||||
bat
|
||||
duf
|
||||
dust
|
||||
fd
|
||||
fzf
|
||||
lsd
|
||||
ripgrep
|
||||
gtop
|
||||
htop
|
||||
# Normies
|
||||
unzip
|
||||
|
||||
#
|
||||
@ -102,14 +90,9 @@
|
||||
#
|
||||
unstable.davinci-resolve-studio
|
||||
obs-studio
|
||||
# davinciDesktop
|
||||
imv
|
||||
mpv
|
||||
ffmpeg
|
||||
|
||||
#
|
||||
# Communication
|
||||
#
|
||||
#
|
||||
# Other
|
||||
#
|
||||
@ -117,13 +100,11 @@
|
||||
simple-scan
|
||||
|
||||
#
|
||||
# Style
|
||||
# Style (Qt plugin for Stylix)
|
||||
#
|
||||
catppuccin-kvantum
|
||||
libsForQt5.qtstyleplugin-kvantum
|
||||
libsForQt5.qt5ct
|
||||
# Install fonts
|
||||
lato
|
||||
# Additional fonts (main fonts managed by Stylix)
|
||||
unstable.nerd-fonts.hurmit
|
||||
unstable.nerd-fonts.overpass
|
||||
recursive
|
||||
@ -153,19 +134,8 @@
|
||||
];
|
||||
|
||||
xdg.configFile = {
|
||||
# Active linked dotfiles
|
||||
"hypr".source = config.lib.file.mkOutOfStoreSymlink "/home/nate/nixos/nate-work/linked-dotfiles/hypr";
|
||||
"waybar".source = config.lib.file.mkOutOfStoreSymlink "/home/nate/nixos/nate-work/linked-dotfiles/waybar";
|
||||
# Shared
|
||||
"helix".source = config.lib.file.mkOutOfStoreSymlink "/home/nate/nixos/shared/linked-dotfiles/helix";
|
||||
|
||||
# Theme files
|
||||
"gtk-4.0/assets".source = "${config.gtk.theme.package}/share/themes/${config.gtk.theme.name}/gtk-4.0/assets";
|
||||
"gtk-4.0/gtk.css".source = "${config.gtk.theme.package}/share/themes/${config.gtk.theme.name}/gtk-4.0/gtk.css";
|
||||
"gtk-4.0/gtk-dark.css".source = "${config.gtk.theme.package}/share/themes/${config.gtk.theme.name}/gtk-4.0/gtk-dark.css";
|
||||
"Kvantum/kvantum.kvconfig".source = (pkgs.formats.ini {}).generate "kvantum.kvconfig" {
|
||||
General.theme = "catppuccin-macchiato-lavender";
|
||||
};
|
||||
# Active linked dotfiles - use frame12's niri config as it's the most up-to-date
|
||||
"niri".source = config.lib.file.mkOutOfStoreSymlink "/home/nate/nixos/frame12/linked-dotfiles/niri";
|
||||
};
|
||||
|
||||
# Configure default applications for opening links
|
||||
@ -191,11 +161,25 @@
|
||||
# Enable bluetooth headphone controls
|
||||
services.mpris-proxy.enable = true;
|
||||
|
||||
# SwayOSD - on-screen display for volume, brightness, caps lock
|
||||
services.swayosd = {
|
||||
enable = true;
|
||||
topMargin = 0.9;
|
||||
};
|
||||
|
||||
# SwayNC - notification center (Stylix auto-themes this)
|
||||
services.swaync = {
|
||||
enable = true;
|
||||
settings = {
|
||||
positionX = "center";
|
||||
positionY = "top";
|
||||
notification-window-width = 800;
|
||||
};
|
||||
};
|
||||
|
||||
home.sessionVariables = {
|
||||
# MANPAGER="sh -c 'col -bx | bat -l man -p'";
|
||||
BAT_THEME="Catppuccin Macchiato";
|
||||
EDITOR = "hx";
|
||||
XDG_CURRENT_DESKTOP="sway";
|
||||
# For electron apps
|
||||
NIXOS_OZONE_WL = "1";
|
||||
};
|
||||
|
||||
@ -209,7 +193,6 @@
|
||||
merge = { conflictStyle="zdiff3"; };
|
||||
pull = { ff = "only"; };
|
||||
push = { autoSetupRemote="true"; };
|
||||
# Vasion rewrite rule
|
||||
url = {
|
||||
"git@github.com:" = {
|
||||
insteadOf = "https://github.com/";
|
||||
@ -236,6 +219,7 @@
|
||||
|
||||
bash.enable = true;
|
||||
};
|
||||
|
||||
# Zsh setup
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
@ -266,51 +250,18 @@
|
||||
lt="lsd --tree --depth=2";
|
||||
cat="bat --paging=never";
|
||||
rm="rm -i";
|
||||
adaptiveoff="swaymsg 'output * adaptive_sync off'";
|
||||
adaptiveon="swaymsg 'output * adaptive_sync on'";
|
||||
};
|
||||
};
|
||||
|
||||
qt = {
|
||||
syntaxHighlighting = {
|
||||
enable = true;
|
||||
platformTheme.name = "qtct";
|
||||
style.name = "kvantum";
|
||||
};
|
||||
};
|
||||
|
||||
gtk = {
|
||||
# Stylix handles Qt and GTK theming
|
||||
|
||||
services.wlsunset = {
|
||||
enable = true;
|
||||
cursorTheme = {
|
||||
package = pkgs.catppuccin-cursors.macchiatoLavender;
|
||||
name = "catppuccin-macchiato-lavender-cursors";
|
||||
sunrise = "07:00";
|
||||
sunset = "17:00";
|
||||
temperature.night = 3500;
|
||||
};
|
||||
iconTheme = {
|
||||
package = pkgs.catppuccin-papirus-folders;
|
||||
name = "Papirus-Dark";
|
||||
};
|
||||
theme = {
|
||||
name = "catppuccin-macchiato-lavender-compact+rimless";
|
||||
package = pkgs.catppuccin-gtk.override {
|
||||
accents = [ "lavender" ];
|
||||
size = "compact";
|
||||
tweaks = [ "rimless" ];
|
||||
variant = "macchiato";
|
||||
};
|
||||
};
|
||||
};
|
||||
# Symlink in gtk and kvantum theme to ~/.config
|
||||
# xdg.configFile = {
|
||||
# "gtk-4.0/assets".source = "${config.gtk.theme.package}/share/themes/${config.gtk.theme.name}/gtk-4.0/assets";
|
||||
# "gtk-4.0/gtk.css".source = "${config.gtk.theme.package}/share/themes/${config.gtk.theme.name}/gtk-4.0/gtk.css";
|
||||
# "gtk-4.0/gtk-dark.css".source = "${config.gtk.theme.package}/share/themes/${config.gtk.theme.name}/gtk-4.0/gtk-dark.css";
|
||||
# "Kvantum/kvantum.kvconfig".text = ''
|
||||
# [General]
|
||||
# theme=Catppuccin-Frappe-Blue
|
||||
# '';
|
||||
# "Kvantum/Catppuccin-Frappe-Blue".source = "${pkgs.catppuccin-kvantum}/share/Kvantum/Catppuccin-Frappe-Blue";
|
||||
# };
|
||||
|
||||
# home.file.".icons/default/index.theme".text = ''
|
||||
# [icon theme]
|
||||
# Inherits=Catppuccin-Macchiato-Lavender-Cursors
|
||||
# '';
|
||||
}
|
||||
|
||||
287
nate/modules/niri/niri_conf.nix
Normal file
287
nate/modules/niri/niri_conf.nix
Normal file
@ -0,0 +1,287 @@
|
||||
{
|
||||
inputs,
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
userName,
|
||||
...
|
||||
}:
|
||||
let
|
||||
unstable = import inputs.nixpkgs-unstable {
|
||||
system = "x86_64-linux";
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
in
|
||||
{
|
||||
options.niriwm = {
|
||||
enable = lib.mkEnableOption "Enable niri window manager.";
|
||||
useNonFree = lib.mkOption {
|
||||
default = false;
|
||||
example = true;
|
||||
description = "Whether to enable non-free software in the niri config";
|
||||
};
|
||||
installGaming = lib.mkOption {
|
||||
default = false;
|
||||
example = true;
|
||||
description = "Whether to install gaming software on the system.";
|
||||
};
|
||||
systemPackages = lib.mkOption {
|
||||
default = [ ];
|
||||
description = "Add any additional packages desired. Merged with niri defaults.";
|
||||
};
|
||||
user = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
};
|
||||
};
|
||||
|
||||
###
|
||||
## Configuration
|
||||
###
|
||||
config = lib.mkIf config.niriwm.enable {
|
||||
|
||||
nixpkgs.config.allowUnfree = config.niriwm.useNonFree;
|
||||
|
||||
###
|
||||
## XDG portal setup
|
||||
###
|
||||
xdg.portal = {
|
||||
config = {
|
||||
common = {
|
||||
default = [
|
||||
"wlr"
|
||||
];
|
||||
};
|
||||
};
|
||||
extraPortals = with pkgs; [
|
||||
xdg-desktop-portal-gnome
|
||||
];
|
||||
wlr.enable = true;
|
||||
enable = true;
|
||||
};
|
||||
xdg.sounds.enable = true;
|
||||
|
||||
###
|
||||
## System Packages
|
||||
###
|
||||
environment.systemPackages =
|
||||
with pkgs;
|
||||
lib.lists.flatten [
|
||||
[
|
||||
bash
|
||||
egl-wayland
|
||||
git
|
||||
glib # gsettings
|
||||
grim
|
||||
kanshi
|
||||
libnotify
|
||||
lxqt.lxqt-policykit
|
||||
man-pages
|
||||
man-pages-posix
|
||||
nautilus
|
||||
networkmanagerapplet
|
||||
pavucontrol
|
||||
slurp
|
||||
swaylock
|
||||
swayosd
|
||||
syncthingtray
|
||||
unstable.ghostty
|
||||
unstable.xwayland-satellite
|
||||
wdisplays
|
||||
wl-clipboard
|
||||
xdg-utils
|
||||
zsh
|
||||
]
|
||||
config.niriwm.systemPackages
|
||||
];
|
||||
environment.variables.QT_STYLE_OVERRIDE = "kvantum";
|
||||
environment.sessionVariables = {
|
||||
# use wayland
|
||||
MOZ_ENABLE_WAYLAND = "1";
|
||||
T_QPA_PLATFORM = "wayland";
|
||||
GDK_BACKEND = "wayland";
|
||||
WLR_NO_HARDWARE_CURSORS = "1";
|
||||
ELECTRON_OZONE_PLATFORM_HINT = "auto";
|
||||
NIXOS_OZONE_WL = "1";
|
||||
};
|
||||
|
||||
# adds additional man pages
|
||||
documentation.dev.enable = true;
|
||||
|
||||
programs.steam = lib.mkIf config.niriwm.installGaming {
|
||||
enable = true;
|
||||
remotePlay.openFirewall = true;
|
||||
gamescopeSession.enable = true;
|
||||
};
|
||||
programs.gamemode = {
|
||||
enable = true;
|
||||
settings = {
|
||||
general = {
|
||||
reaper_freq = 5;
|
||||
desiredgov = "performance";
|
||||
softrealtime = "auto";
|
||||
};
|
||||
};
|
||||
};
|
||||
programs.kdeconnect.enable = true;
|
||||
programs.niri.enable = true;
|
||||
programs.regreet.enable = true;
|
||||
programs.xfconf.enable = true;
|
||||
programs.zsh.enable = true;
|
||||
programs.ssh.startAgent = false; # Using GNOME Keyring's gcr-ssh-agent instead
|
||||
programs.adb.enable = true;
|
||||
|
||||
# For nautilus
|
||||
services.gnome.sushi.enable = true;
|
||||
programs.nautilus-open-any-terminal = {
|
||||
enable = true;
|
||||
terminal = "ghostty";
|
||||
};
|
||||
|
||||
services.syncthing = {
|
||||
enable = true;
|
||||
dataDir = "/home/${config.niriwm.user}/.syncthing";
|
||||
openDefaultPorts = true;
|
||||
user = config.niriwm.user;
|
||||
};
|
||||
systemd.services.syncthing.environment.STNODEFAULTFOLDER = "true"; # Don't create default ~/Sync folder
|
||||
|
||||
# Set zsh as the default shell system-wide
|
||||
users.defaultUserShell = pkgs.zsh;
|
||||
environment.shells = with pkgs; [
|
||||
zsh
|
||||
bash
|
||||
];
|
||||
|
||||
###
|
||||
## Services
|
||||
###
|
||||
services.blueman.enable = true;
|
||||
services.gvfs.enable = true; # file manager mount, trash, etc
|
||||
services.tumbler.enable = true; # thunar thumbnails
|
||||
services.openssh.enable = true;
|
||||
services.dbus.enable = true;
|
||||
services.gnome.gnome-keyring.enable = true;
|
||||
services.flatpak.enable = true;
|
||||
services.usbmuxd.enable = true;
|
||||
services.tailscale = {
|
||||
enable = true;
|
||||
openFirewall = true;
|
||||
};
|
||||
|
||||
# For yubioath desktop
|
||||
services.pcscd.enable = true;
|
||||
|
||||
# Printing
|
||||
services.printing = {
|
||||
enable = true;
|
||||
browsing = true;
|
||||
drivers = [ pkgs.brlaser ];
|
||||
};
|
||||
|
||||
services.avahi = {
|
||||
enable = true;
|
||||
nssmdns4 = true;
|
||||
openFirewall = true;
|
||||
};
|
||||
|
||||
networking.firewall = {
|
||||
enable = true;
|
||||
allowedTCPPorts = [ 8080 8081 ];
|
||||
};
|
||||
|
||||
# Audio - Modern PipeWire setup
|
||||
services.pulseaudio.enable = false;
|
||||
security.rtkit.enable = true;
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
audio.enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
wireplumber.enable = true;
|
||||
wireplumber.extraConfig = {
|
||||
"wireplumber.settings" = {
|
||||
bluetooth.autoswitch-to-headset-profile = false;
|
||||
};
|
||||
bluetoothEnhancements = {
|
||||
"monitor.bluez.properties" = {
|
||||
"bluez5.enable-sbc-xq" = true;
|
||||
"bluez5.enable-msbc" = true;
|
||||
"bluez5.enable-hw-volume" = true;
|
||||
"bluez5.roles" = [
|
||||
"a2dp_sink"
|
||||
"a2dp_source"
|
||||
"bap_sink"
|
||||
"bap_source"
|
||||
"hfp_hf"
|
||||
"hfp_ag"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
###
|
||||
## Misc
|
||||
###
|
||||
# Necessary for home-manager niri setup
|
||||
security.polkit.enable = true;
|
||||
|
||||
# Keyring setup
|
||||
security.pam.services.greetd.enableGnomeKeyring = true;
|
||||
security.pam.services.login.enableGnomeKeyring = true;
|
||||
|
||||
hardware.bluetooth = {
|
||||
enable = true;
|
||||
powerOnBoot = true;
|
||||
settings = {
|
||||
General = {
|
||||
Name = "Nate-WinMax";
|
||||
ControllerMode = "dual";
|
||||
FastConnectable = "true";
|
||||
Experimental = "true";
|
||||
Privacy = "device";
|
||||
JustWorksRepairing = "always";
|
||||
Class = "0x000100";
|
||||
};
|
||||
Policy = {
|
||||
AutoEnable = "true";
|
||||
};
|
||||
LE = {
|
||||
EnableAdvMonInterleaveScan = 1;
|
||||
};
|
||||
};
|
||||
};
|
||||
hardware.xpadneo.enable = true;
|
||||
|
||||
# Hardware scanning support
|
||||
hardware.sane = {
|
||||
enable = true;
|
||||
brscan5.enable = true;
|
||||
};
|
||||
|
||||
virtualisation.docker.enable = true;
|
||||
|
||||
# udev rules
|
||||
services.udev.extraRules = ''
|
||||
# For betaflight configurator
|
||||
# DFU (Internal bootloader for STM32 and AT32 MCUs)
|
||||
SUBSYSTEM=="usb", ATTRS{idVendor}=="2e3c", ATTRS{idProduct}=="df11", MODE="0664", GROUP="dialout"
|
||||
SUBSYSTEM=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="df11", MODE="0664", GROUP="dialout"
|
||||
'';
|
||||
|
||||
# AMD GPU setup (WinMax uses AMD)
|
||||
services.xserver.videoDrivers = [ "amdgpu" ];
|
||||
# Enable HIP for ROCm
|
||||
systemd.tmpfiles.rules = [
|
||||
"L+ /opt/rocm/hip - - - - ${pkgs.rocmPackages.clr}"
|
||||
];
|
||||
hardware.graphics = {
|
||||
enable = true;
|
||||
enable32Bit = true;
|
||||
extraPackages = with pkgs; [
|
||||
rocmPackages.clr.icd
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
63
nate/modules/niri/niri_home.nix
Normal file
63
nate/modules/niri/niri_home.nix
Normal file
@ -0,0 +1,63 @@
|
||||
{ inputs, lib, config, pkgs, ... }:
|
||||
{
|
||||
imports = [
|
||||
../../../shared/modules/home-manager/waybar.nix
|
||||
];
|
||||
|
||||
options.nirihome = {
|
||||
enable = lib.mkEnableOption "Enable niri home config";
|
||||
homePackages = lib.mkOption {
|
||||
default = [];
|
||||
description = "Add any additional packages desired. Merged with niri defaults.";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf config.nirihome.enable {
|
||||
# Note: We don't use wayland.windowManager.niri in home-manager
|
||||
# because we manage the niri config through dotfiles.
|
||||
# The system-level module enables niri via programs.niri.enable
|
||||
|
||||
# Import systemd variables for niri
|
||||
systemd.user.sessionVariables = {
|
||||
WAYLAND_DISPLAY = "wayland-1";
|
||||
XDG_CURRENT_DESKTOP = "niri";
|
||||
};
|
||||
|
||||
# Cursor is managed by Stylix (stylix.cursor in nate/default.nix)
|
||||
|
||||
# Waybar with Stylix theming
|
||||
waybarConfig.enable = true;
|
||||
|
||||
home.packages = with pkgs; lib.lists.flatten [
|
||||
[
|
||||
### niri packages
|
||||
swaybg
|
||||
swaylock-effects
|
||||
# Etc
|
||||
gopsuinfo # For system stats in panel
|
||||
wl-clipboard # System clipboard
|
||||
brightnessctl
|
||||
wev
|
||||
wdisplays
|
||||
# Notifs
|
||||
libnotify
|
||||
swaynotificationcenter
|
||||
# Tray Applets
|
||||
networkmanagerapplet
|
||||
pavucontrol
|
||||
syncthingtray
|
||||
tailscale-systray
|
||||
# include portals here for flatpak
|
||||
xdg-desktop-portal-gnome
|
||||
xdg-desktop-portal-gtk
|
||||
]
|
||||
config.nirihome.homePackages
|
||||
];
|
||||
programs.cava = {
|
||||
enable = true;
|
||||
settings = {
|
||||
smoothing.noise_reduction = 55;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@ -233,7 +233,7 @@
|
||||
#
|
||||
bat
|
||||
duf
|
||||
du-dust
|
||||
dust
|
||||
fd
|
||||
fzf
|
||||
lsd
|
||||
@ -300,9 +300,9 @@
|
||||
# Git setup
|
||||
programs.git = {
|
||||
enable = true;
|
||||
userEmail = email;
|
||||
userName = fullName;
|
||||
extraConfig = {
|
||||
settings = {
|
||||
user.name = fullName;
|
||||
user.email = email;
|
||||
include = { path = "${config.xdg.configHome}/macchiato.gitconfig"; };
|
||||
init = { defaultBranch = "main"; };
|
||||
pull = { ff = "only"; };
|
||||
@ -310,10 +310,14 @@
|
||||
push = { autoSetupRemote="true"; };
|
||||
delta = { features = "Catppuccin Macchiato"; };
|
||||
};
|
||||
delta.enable = true;
|
||||
};
|
||||
|
||||
programs = {
|
||||
delta = {
|
||||
enable = true;
|
||||
enableGitIntegration = true;
|
||||
};
|
||||
|
||||
direnv = {
|
||||
enable = true;
|
||||
enableZshIntegration = true; # see note on other shells below
|
||||
|
||||
@ -1,6 +1,9 @@
|
||||
{lib, config, pkgs, inputs, ...}:
|
||||
{lib, config, pkgs, inputs, options, ...}:
|
||||
let
|
||||
cfg = config.firefoxApp;
|
||||
# Check if stylix home-manager module is loaded by checking for the firefox target option
|
||||
# Only check options (not config) to avoid infinite recursion during module evaluation
|
||||
hasStylixFirefox = (options ? stylix) && (options.stylix ? targets) && (options.stylix.targets ? firefox);
|
||||
in
|
||||
{
|
||||
# imports = [
|
||||
@ -10,10 +13,9 @@ in
|
||||
options.firefoxApp = {
|
||||
enable = lib.mkEnableOption "enable firefox browser";
|
||||
};
|
||||
config = lib.mkIf cfg.enable {
|
||||
# Tell Stylix which Firefox profile to theme
|
||||
stylix.targets.firefox.profileNames = [ "default" ];
|
||||
|
||||
config = lib.mkIf cfg.enable (lib.mkMerge ([
|
||||
# Firefox configuration
|
||||
{
|
||||
programs.firefox = {
|
||||
# Add pipewire support
|
||||
# package = (pkgs.wrapFirefox (pkgs.firefox-unwrapped.override { pipewireSupport = true;}) {});
|
||||
@ -112,5 +114,10 @@ in
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
] ++ lib.optional hasStylixFirefox {
|
||||
# Stylix integration (only if stylix module is loaded)
|
||||
# Uses mkIf to check autoEnable at runtime, avoiding infinite recursion
|
||||
stylix.targets.firefox.profileNames = lib.mkIf config.stylix.autoEnable [ "default" ];
|
||||
}));
|
||||
}
|
||||
|
||||
44
shared/modules/apps/ghostty.nix
Normal file
44
shared/modules/apps/ghostty.nix
Normal file
@ -0,0 +1,44 @@
|
||||
{lib, config, ...}:
|
||||
let
|
||||
cfg = config.ghosttyApp;
|
||||
in
|
||||
{
|
||||
options.ghosttyApp = {
|
||||
enable = lib.mkEnableOption "enable ghostty terminal";
|
||||
|
||||
fontFamily = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "Maple Mono NF";
|
||||
description = "Font family to use in ghostty";
|
||||
};
|
||||
|
||||
enableLigatures = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = true;
|
||||
description = "Enable font ligatures in ghostty";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
programs.ghostty = {
|
||||
enable = true;
|
||||
settings = {
|
||||
font-family = cfg.fontFamily;
|
||||
|
||||
# Ligatures - Maple Mono NF has full ligature support
|
||||
font-feature = lib.mkIf cfg.enableLigatures [
|
||||
"+calt" # contextual alternates
|
||||
"+liga" # standard ligatures
|
||||
];
|
||||
|
||||
window-padding-x = 4;
|
||||
window-padding-y = 4;
|
||||
|
||||
keybind = [
|
||||
"ctrl+shift+plus=increase_font_size:1"
|
||||
"shift+enter=text:\\n"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
367
shared/modules/apps/helix.nix
Normal file
367
shared/modules/apps/helix.nix
Normal file
@ -0,0 +1,367 @@
|
||||
{lib, config, ...}:
|
||||
let
|
||||
cfg = config.helixApp;
|
||||
in
|
||||
{
|
||||
options.helixApp = {
|
||||
enable = lib.mkEnableOption "enable helix editor";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
# Let Stylix auto-theme helix
|
||||
stylix.targets.helix.enable = true;
|
||||
|
||||
programs.helix = {
|
||||
enable = true;
|
||||
|
||||
# Stylix sets the theme, but we override syntax tokens for minimal highlighting
|
||||
# Philosophy: Only keywords, strings, comments, numbers get color - rest is plain text
|
||||
themes.stylix = {
|
||||
# Inherit Stylix's base theme (UI, palette, etc.)
|
||||
inherits = "stylix";
|
||||
|
||||
# Minimal syntax highlighting - only 4 categories get color
|
||||
# Comments - stand out
|
||||
"comment" = { fg = "yellow"; modifiers = ["italic"]; };
|
||||
|
||||
# Keywords - highlighted and italic
|
||||
"keyword" = { fg = "magenta"; modifiers = ["italic"]; };
|
||||
"keyword.control" = { fg = "magenta"; modifiers = ["italic"]; };
|
||||
"keyword.directive" = { fg = "magenta"; modifiers = ["italic"]; };
|
||||
"keyword.function" = { fg = "magenta"; modifiers = ["italic"]; };
|
||||
"keyword.operator" = { fg = "magenta"; modifiers = ["italic"]; };
|
||||
"keyword.return" = { fg = "magenta"; modifiers = ["italic"]; };
|
||||
"keyword.storage" = { fg = "magenta"; modifiers = ["italic"]; };
|
||||
|
||||
# Strings - highlighted
|
||||
"string" = "green";
|
||||
"string.regexp" = "red";
|
||||
"string.special" = "green";
|
||||
|
||||
# Numbers/constants - highlighted
|
||||
"constant.numeric" = "red";
|
||||
"constant.builtin" = "red";
|
||||
"constant.character.escape" = "red";
|
||||
|
||||
# Functions remain plain text
|
||||
"function" = "text";
|
||||
"function.builtin" = "text";
|
||||
"function.method" = "text";
|
||||
"function.macro" = "text";
|
||||
|
||||
# Variables remain plain text
|
||||
"variable" = "text";
|
||||
"variable.builtin" = "text";
|
||||
"variable.parameter" = "text";
|
||||
"variable.other.member" = "text";
|
||||
|
||||
# Types get subtle highlight
|
||||
"type" = { fg = "cyan"; modifiers = ["italic"]; };
|
||||
"type.builtin" = "cyan";
|
||||
|
||||
# Top-level definitions get accent
|
||||
"function.definition" = { fg = "text"; modifiers = ["bold"]; };
|
||||
"type.definition" = { fg = "text"; modifiers = ["bold"]; };
|
||||
|
||||
# Everything else plain
|
||||
"constructor" = "text";
|
||||
"attribute" = "text";
|
||||
"label" = "text";
|
||||
"namespace" = "text";
|
||||
"tag" = "text";
|
||||
|
||||
# Punctuation slightly dimmed
|
||||
"punctuation" = { fg = "text"; modifiers = ["dim"]; };
|
||||
"punctuation.bracket" = { fg = "text"; modifiers = ["dim"]; };
|
||||
"punctuation.delimiter" = { fg = "text"; modifiers = ["dim"]; };
|
||||
"punctuation.special" = { fg = "text"; modifiers = ["dim"]; };
|
||||
"operator" = { fg = "text"; modifiers = ["dim"]; };
|
||||
|
||||
# Markup
|
||||
"markup.heading" = { fg = "cyan"; modifiers = ["bold"]; };
|
||||
"markup.list" = "magenta";
|
||||
"markup.bold" = { modifiers = ["bold"]; };
|
||||
"markup.italic" = { modifiers = ["italic"]; };
|
||||
"markup.strikethrough" = { modifiers = ["crossed_out"]; };
|
||||
"markup.link.url" = { fg = "blue"; modifiers = ["underlined"]; };
|
||||
"markup.link.text" = "magenta";
|
||||
"markup.quote" = "green";
|
||||
"markup.raw" = "green";
|
||||
};
|
||||
|
||||
settings = {
|
||||
keys.normal = {
|
||||
# Navigation (Colemak-DH)
|
||||
n = "move_char_left";
|
||||
i = "move_visual_line_down";
|
||||
e = "move_visual_line_up";
|
||||
o = "move_char_right";
|
||||
"S-tab" = "jump_backward";
|
||||
I = [ "page_cursor_half_down" "align_view_center" ];
|
||||
E = [ "page_cursor_half_up" "align_view_center" ];
|
||||
|
||||
# Modes
|
||||
h = "insert_mode";
|
||||
H = "insert_at_line_start";
|
||||
l = "open_below";
|
||||
L = "open_above";
|
||||
|
||||
# Search
|
||||
k = "search_next";
|
||||
K = "search_prev";
|
||||
|
||||
# Selection
|
||||
C-s = "split_selection_on_newline";
|
||||
C-minus = "merge_selections";
|
||||
C-_ = "merge_consecutive_selections";
|
||||
"C-;" = "flip_selections";
|
||||
"C-:" = "ensure_selections_forward";
|
||||
"C-," = "remove_primary_selection";
|
||||
C-c = "change_selection_noyank";
|
||||
C-d = "delete_selection_noyank";
|
||||
"C-(" = "rotate_selection_contents_backward";
|
||||
"C-)" = "rotate_selection_contents_forward";
|
||||
C-x = "shrink_to_line_bounds";
|
||||
C-J = "join_selections_space";
|
||||
C-K = "remove_selections";
|
||||
C-o = "expand_selection";
|
||||
C-i = "shrink_selection";
|
||||
C-p = "select_prev_sibling";
|
||||
C-n = "select_next_sibling";
|
||||
|
||||
# Misc
|
||||
"C-/" = "toggle_comments";
|
||||
"@" = ":append-output git config get user.email";
|
||||
|
||||
space = {
|
||||
B = ":sh git log -n 5 --format='format:%%h (%%an: %%ar) %%s' --no-patch -L%{cursor_line},+1:%{buffer_name}";
|
||||
x = ":write-buffer-close";
|
||||
X = ":write-quit-all";
|
||||
o = ":config-open";
|
||||
h = "hover";
|
||||
k = "select_references_to_symbol_under_cursor";
|
||||
};
|
||||
|
||||
g = {
|
||||
"/" = "goto_next_buffer";
|
||||
h = "goto_previous_buffer";
|
||||
n = [ "collapse_selection" "extend_to_line_start" ];
|
||||
o = [ "collapse_selection" "extend_to_line_end" ];
|
||||
e = "move_line_up";
|
||||
i = "move_line_down";
|
||||
l = "goto_last_line";
|
||||
p = "no_op";
|
||||
k = "no_op";
|
||||
j = "no_op";
|
||||
};
|
||||
|
||||
m.m = [ "select_mode" "match_brackets" "normal_mode" ];
|
||||
|
||||
"C-w" = {
|
||||
h = "hsplit";
|
||||
C-h = "hsplit";
|
||||
n = "jump_view_left";
|
||||
C-n = "jump_view_left";
|
||||
i = "jump_view_down";
|
||||
I = "swap_view_down";
|
||||
C-i = "jump_view_down";
|
||||
e = "jump_view_up";
|
||||
E = "swap_view_up";
|
||||
C-e = "jump_view_up";
|
||||
o = "jump_view_right";
|
||||
O = "swap_view_right";
|
||||
C-o = "jump_view_right";
|
||||
# Remove old
|
||||
s = "no_op";
|
||||
C-s = "no_op";
|
||||
H = "no_op";
|
||||
j = "no_op";
|
||||
J = "no_op";
|
||||
C-j = "no_op";
|
||||
k = "no_op";
|
||||
K = "no_op";
|
||||
C-k = "no_op";
|
||||
l = "no_op";
|
||||
L = "no_op";
|
||||
C-l = "no_op";
|
||||
};
|
||||
};
|
||||
|
||||
keys.select = {
|
||||
n = "extend_char_left";
|
||||
i = "extend_line_down";
|
||||
e = "extend_line_up";
|
||||
o = "extend_char_right";
|
||||
I = [ "page_cursor_half_down" "align_view_center" ];
|
||||
E = [ "page_cursor_half_up" "align_view_center" ];
|
||||
|
||||
g = {
|
||||
"/" = "goto_next_buffer";
|
||||
h = "goto_previous_buffer";
|
||||
n = "goto_line_start";
|
||||
o = "goto_line_end";
|
||||
e = "move_line_up";
|
||||
i = "move_line_down";
|
||||
l = "goto_last_line";
|
||||
p = "no_op";
|
||||
k = "no_op";
|
||||
j = "no_op";
|
||||
};
|
||||
};
|
||||
|
||||
editor = {
|
||||
auto-format = true;
|
||||
auto-save = true;
|
||||
bufferline = "always";
|
||||
color-modes = true;
|
||||
completion-timeout = 5;
|
||||
cursorcolumn = true;
|
||||
cursorline = true;
|
||||
indent-heuristic = "tree-sitter";
|
||||
line-number = "relative";
|
||||
rulers = [ 120 ];
|
||||
text-width = 120;
|
||||
end-of-line-diagnostics = "hint";
|
||||
|
||||
cursor-shape = {
|
||||
insert = "bar";
|
||||
normal = "block";
|
||||
select = "underline";
|
||||
};
|
||||
|
||||
file-picker.hidden = false;
|
||||
|
||||
indent-guides.render = true;
|
||||
|
||||
inline-diagnostics = {
|
||||
cursor-line = "warning";
|
||||
other-lines = "disable";
|
||||
prefix-len = 5;
|
||||
max-diagnostics = 1;
|
||||
max-wrap = 30;
|
||||
};
|
||||
|
||||
lsp = {
|
||||
display-messages = true;
|
||||
display-inlay-hints = true;
|
||||
};
|
||||
|
||||
soft-wrap = {
|
||||
enable = true;
|
||||
max-wrap = 30;
|
||||
};
|
||||
|
||||
statusline = {
|
||||
left = [ "mode" "file-modification-indicator" "spinner" "version-control" ];
|
||||
center = [ "file-name" ];
|
||||
right = [ "diagnostics" "selections" "register" "position" "file-encoding" ];
|
||||
mode.normal = "Normal";
|
||||
mode.insert = "Insert";
|
||||
mode.select = "Select";
|
||||
};
|
||||
|
||||
whitespace.render = {
|
||||
space = "all";
|
||||
tab = "all";
|
||||
tabpad = "all";
|
||||
newline = "none";
|
||||
nbsp = "none";
|
||||
};
|
||||
|
||||
whitespace.characters = {
|
||||
space = " ";
|
||||
tab = "⇀";
|
||||
tabpad = " ";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
languages = {
|
||||
language = [
|
||||
{
|
||||
name = "go";
|
||||
debugger = {
|
||||
name = "go";
|
||||
transport = "tcp";
|
||||
command = "dlv";
|
||||
args = [ "connect" ];
|
||||
port-arg = "127.0.0.1:2345";
|
||||
templates = [{
|
||||
name = "connect";
|
||||
request = "launch";
|
||||
completion = [];
|
||||
args = {};
|
||||
}];
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "markdown";
|
||||
language-servers = [ "marksman" ];
|
||||
}
|
||||
{
|
||||
name = "dart";
|
||||
formatter = { command = "dart"; args = [ "format" "-l" "120" ]; };
|
||||
language-servers = [ "dart" ];
|
||||
}
|
||||
{
|
||||
name = "nix";
|
||||
language-servers = [ "nil" ];
|
||||
}
|
||||
{
|
||||
name = "zig";
|
||||
language-servers = [ "zls" ];
|
||||
debugger = {
|
||||
name = "codelldb-dap";
|
||||
transport = "tcp";
|
||||
command = "codelldb";
|
||||
args = [];
|
||||
port-arg = "--port {}";
|
||||
templates = [
|
||||
{
|
||||
name = "launch";
|
||||
request = "launch";
|
||||
completion = [{ name = "binary"; completion = "filename"; }];
|
||||
args = { console = "internalConsole"; program = "{0}"; };
|
||||
}
|
||||
{
|
||||
name = "attach";
|
||||
request = "attach";
|
||||
completion = [ "pid" ];
|
||||
args = { console = "internalConsole"; pid = "{0}"; };
|
||||
}
|
||||
{
|
||||
name = "gdbserver attach";
|
||||
request = "attach";
|
||||
completion = [
|
||||
{ name = "lldb connect url"; default = "connect://localhost:3333"; }
|
||||
{ name = "file"; completion = "filename"; }
|
||||
"pid"
|
||||
];
|
||||
args = {
|
||||
console = "internalConsole";
|
||||
attachCommands = [
|
||||
"platform select remote-gdb-server"
|
||||
"platform connect {0}"
|
||||
"file {1}"
|
||||
"attach {2}"
|
||||
];
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "cyano";
|
||||
scope = "source.cyo";
|
||||
file-types = [ "cyo" ];
|
||||
language-servers = [ "ltex-ls" ];
|
||||
}
|
||||
];
|
||||
|
||||
language-server.ltex-ls = {
|
||||
command = "ltex-ls";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
63
shared/modules/home-manager/programs.nix
Normal file
63
shared/modules/home-manager/programs.nix
Normal file
@ -0,0 +1,63 @@
|
||||
{config, lib, ...}:
|
||||
let
|
||||
cfg = config.sharedPrograms;
|
||||
in
|
||||
{
|
||||
options.sharedPrograms = {
|
||||
enable = lib.mkEnableOption "enable all basic programs with Stylix auto-theming";
|
||||
|
||||
bat.enable = lib.mkEnableOption "enable bat (cat replacement)";
|
||||
fzf.enable = lib.mkEnableOption "enable fzf (fuzzy finder)";
|
||||
btop.enable = lib.mkEnableOption "enable btop (system monitor)";
|
||||
mpv.enable = lib.mkEnableOption "enable mpv (media player)";
|
||||
wofi.enable = lib.mkEnableOption "enable wofi (application launcher)";
|
||||
foot.enable = lib.mkEnableOption "enable foot (terminal emulator)";
|
||||
};
|
||||
|
||||
config = lib.mkMerge [
|
||||
# When sharedPrograms.enable is true, enable all programs
|
||||
(lib.mkIf cfg.enable {
|
||||
sharedPrograms.bat.enable = lib.mkDefault true;
|
||||
sharedPrograms.fzf.enable = lib.mkDefault true;
|
||||
sharedPrograms.btop.enable = lib.mkDefault true;
|
||||
sharedPrograms.mpv.enable = lib.mkDefault true;
|
||||
sharedPrograms.wofi.enable = lib.mkDefault true;
|
||||
sharedPrograms.foot.enable = lib.mkDefault true;
|
||||
})
|
||||
|
||||
# Individual program configurations
|
||||
(lib.mkIf cfg.bat.enable {
|
||||
programs.bat.enable = true;
|
||||
})
|
||||
|
||||
(lib.mkIf cfg.fzf.enable {
|
||||
programs.fzf = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
};
|
||||
})
|
||||
|
||||
(lib.mkIf cfg.btop.enable {
|
||||
programs.btop.enable = true;
|
||||
})
|
||||
|
||||
(lib.mkIf cfg.mpv.enable {
|
||||
programs.mpv.enable = true;
|
||||
})
|
||||
|
||||
(lib.mkIf cfg.wofi.enable {
|
||||
programs.wofi.enable = true;
|
||||
})
|
||||
|
||||
(lib.mkIf cfg.foot.enable {
|
||||
programs.foot = {
|
||||
enable = true;
|
||||
settings = {
|
||||
main = {
|
||||
pad = "4x4";
|
||||
};
|
||||
};
|
||||
};
|
||||
})
|
||||
];
|
||||
}
|
||||
BIN
shared/modules/services/wallpapers/Dark/FSO-Dark.jpg
Normal file
BIN
shared/modules/services/wallpapers/Dark/FSO-Dark.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.4 MiB |
BIN
shared/modules/services/wallpapers/Dark/IU-Dark.jpg
Normal file
BIN
shared/modules/services/wallpapers/Dark/IU-Dark.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.7 MiB |
Loading…
Reference in New Issue
Block a user