mirror of
https://github.com/RGBCube/ncc
synced 2025-07-28 10:37:44 +00:00
Start refactor
This commit is contained in:
parent
99b7ccfadb
commit
06cce18e72
155 changed files with 2139 additions and 3738 deletions
50
modules/linux/hyprland/dunst.nix
Normal file
50
modules/linux/hyprland/dunst.nix
Normal file
|
@ -0,0 +1,50 @@
|
|||
{ config, lib, ... }: let
|
||||
inherit (lib) merge mkIf;
|
||||
in merge <| mkIf config.isDesktop {
|
||||
home-manager.sharedModules = [{
|
||||
services.dunst = with config.theme.withHashtag; enabled {
|
||||
iconTheme = icons;
|
||||
|
||||
settings.global = {
|
||||
width = "(300, 900)";
|
||||
|
||||
dmenu = "fuzzel --dmenu";
|
||||
|
||||
corner_radius = cornerRadius;
|
||||
gap_size = margin;
|
||||
horizontal_padding = padding;
|
||||
padding = padding;
|
||||
|
||||
frame_color = base0A;
|
||||
frame_width = borderWidth;
|
||||
separator_color = "frame";
|
||||
|
||||
background = base00;
|
||||
foreground = base05;
|
||||
|
||||
alignment = "center";
|
||||
font = "${font.sans.name} ${toString font.size.normal}";
|
||||
|
||||
min_icon_size = 64;
|
||||
|
||||
offset = "0x${toString margin}";
|
||||
origin = "top-center";
|
||||
};
|
||||
|
||||
settings.urgency_low = {
|
||||
frame_color = base0A;
|
||||
timeout = 5;
|
||||
};
|
||||
|
||||
settings.urgency_normal = {
|
||||
frame_color = base09;
|
||||
timeout = 10;
|
||||
};
|
||||
|
||||
settings.urgency_critical = {
|
||||
frame_color = base08;
|
||||
timeout = 15;
|
||||
};
|
||||
};
|
||||
}];
|
||||
}
|
1849
modules/linux/hyprland/emojis.txt
Normal file
1849
modules/linux/hyprland/emojis.txt
Normal file
File diff suppressed because it is too large
Load diff
61
modules/linux/hyprland/fuzzel.nix
Normal file
61
modules/linux/hyprland/fuzzel.nix
Normal file
|
@ -0,0 +1,61 @@
|
|||
{ config, lib, ... }: let
|
||||
inherit (lib) enabled mapAttrs merge mkIf replaceStrings;
|
||||
in merge <| mkIf config.isDesktop {
|
||||
home-manager.sharedNodules = [{
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
bindl = [(replaceStrings [ "\n;" "\n" ] [ ";" "" ] ''
|
||||
, XF86PowerOff, exec,
|
||||
pkill fuzzel;
|
||||
echo -en "Suspend\0icon\x1fsystem-suspend\nHibernate\0icon\x1fsystem-suspend-hibernate-alt2\nPower Off\0icon\x1fsystem-shutdown\nReboot\0icon\x1fsystem-reboot"
|
||||
| fuzzel --dmenu
|
||||
| tr --delete " "
|
||||
| tr '[:upper:]' '[:lower:]'
|
||||
| ifne xargs systemctl
|
||||
'')];
|
||||
|
||||
bind = [
|
||||
"SUPER , SPACE, exec, pkill fuzzel; fuzzel"
|
||||
"SUPER , E , exec, pkill fuzzel; cat ${./emojis.txt} | fuzzel --no-fuzzy --dmenu | cut -d ' ' -f 1 | tr -d '\\n' | wl-copy"
|
||||
"SUPER+ALT, E , exec, pkill fuzzel; cat ${./emojis.txt} | fuzzel --no-fuzzy --dmenu | cut -d ' ' -f 1 | tr -d '\\n' | wtype -"
|
||||
"SUPER , V , exec, pkill fuzzel; cliphist list | fuzzel --dmenu | cliphist decode | wl-copy"
|
||||
];
|
||||
};
|
||||
|
||||
services.cliphist = enabled {
|
||||
extraOptions = [ "-max-items" "1000" ];
|
||||
};
|
||||
|
||||
programs.fuzzel = with config.theme; enabled {
|
||||
settings.main = {
|
||||
dpi-aware = false;
|
||||
font = "${font.sans.name}:size=${toString font.size.big}";
|
||||
icon-theme = icons.name;
|
||||
|
||||
layer = "overlay";
|
||||
prompt = ''"❯ "'';
|
||||
|
||||
terminal = "ghostty -e";
|
||||
|
||||
tabs = 4;
|
||||
|
||||
horizontal-pad = padding;
|
||||
vertical-pad = padding;
|
||||
inner-pad = padding;
|
||||
};
|
||||
|
||||
settings.colors = mapAttrs (_: color: color + "FF") {
|
||||
background = base00;
|
||||
text = base05;
|
||||
match = base0A;
|
||||
selection = base05;
|
||||
selection-text = base00;
|
||||
border = base0A;
|
||||
};
|
||||
|
||||
settings.border = {
|
||||
radius = cornerRadius;
|
||||
width = borderWidth;
|
||||
};
|
||||
};
|
||||
}];
|
||||
}
|
16
modules/linux/hyprland/gammastep.nix
Normal file
16
modules/linux/hyprland/gammastep.nix
Normal file
|
@ -0,0 +1,16 @@
|
|||
{ config, lib, ... }: let
|
||||
inherit (lib) enabled merge mkIf;
|
||||
in merge <| mkIf config.isDesktop {
|
||||
services.geoclue2 = enabled {
|
||||
appConfig.gammstep = {
|
||||
isAllowed = true;
|
||||
isSystem = false;
|
||||
};
|
||||
};
|
||||
|
||||
home-manager.sharedModules = [{
|
||||
services.gammastep = enabled {
|
||||
provider = "geoclue2";
|
||||
};
|
||||
}];
|
||||
}
|
243
modules/linux/hyprland/hyprland.nix
Normal file
243
modules/linux/hyprland/hyprland.nix
Normal file
|
@ -0,0 +1,243 @@
|
|||
{ config, lib, pkgs, ... }: let
|
||||
inherit (lib) enabled merge mkIf flatten range;
|
||||
in merge <| mkIf config.isDesktop {
|
||||
hardware.graphics = enabled;
|
||||
|
||||
services.logind.powerKey = "ignore";
|
||||
|
||||
xdg.portal = enabled {
|
||||
config.common.default = "*";
|
||||
|
||||
extraPortals = with pkgs; [
|
||||
xdg-desktop-portal-hyprland
|
||||
];
|
||||
|
||||
configPackages = with pkgs; [
|
||||
hyprland
|
||||
];
|
||||
};
|
||||
|
||||
programs.xwayland = enabled;
|
||||
|
||||
environment.systemPackages = [
|
||||
pkgs.brightnessctl
|
||||
pkgs.grim
|
||||
# pkgs.hyprpicker
|
||||
pkgs.slurp
|
||||
pkgs.swappy
|
||||
pkgs.swaybg
|
||||
pkgs.wl-clipboard
|
||||
pkgs.wtype
|
||||
pkgs.xdg-utils
|
||||
pkgs.xwaylandvideobridge
|
||||
];
|
||||
|
||||
home-manager.sharedModules = [{
|
||||
xdg.configFile."xkb/symbols/tr-swapped-i".text = ''
|
||||
default partial
|
||||
xkb_symbols "basic" {
|
||||
include "tr(basic)"
|
||||
|
||||
name[Group1]="Turkish (i and ı swapped)";
|
||||
|
||||
key <AC11> { type[group1] = "FOUR_LEVEL_SEMIALPHABETIC", [ idotless, Iabovedot, paragraph , none ]};
|
||||
key <AD08> { type[group1] = "FOUR_LEVEL_SEMIALPHABETIC", [ i , I , apostrophe, dead_caron ]};
|
||||
};
|
||||
'';
|
||||
|
||||
wayland.windowManager.hyprland = enabled {
|
||||
systemd = enabled {
|
||||
enableXdgAutostart = true;
|
||||
};
|
||||
|
||||
# plugins = with pkgs; [ hyprcursors ];
|
||||
|
||||
# settings.plugin.dynamic-cursors = {
|
||||
# mode = "rotate";
|
||||
|
||||
# shake = {
|
||||
# threshold = 3;
|
||||
|
||||
# effects = true;
|
||||
# nearest = false;
|
||||
# };
|
||||
# };
|
||||
|
||||
settings = {
|
||||
monitor = [ ", preferred, auto, 1.5" ];
|
||||
|
||||
windowrule = [ "noinitialfocus" ];
|
||||
windowrulev2 = [ "workspace special silent, initialclass:^(xwaylandvideobridge)$" ];
|
||||
|
||||
exec = [ "pkill swaybg; swaybg --image ${./wallpaper.png}" ];
|
||||
|
||||
bindle = [
|
||||
", XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+ --limit 1.5"
|
||||
", XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-"
|
||||
|
||||
", XF86MonBrightnessUp , exec, brightnessctl set 5%+"
|
||||
", XF86MonBrightnessDown, exec, brightnessctl set --min-value=0 5%-"
|
||||
|
||||
"SUPER, Prior, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+ --limit 1.5"
|
||||
"SUPER, Next , exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-"
|
||||
|
||||
"SUPER, Home, exec, brightnessctl set 5%+"
|
||||
"SUPER, End , exec, brightnessctl set --min-value=0 5%-"
|
||||
];
|
||||
|
||||
bindl = [
|
||||
", XF86AudioMute , exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"
|
||||
", XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle"
|
||||
|
||||
"SUPER+ALT, Insert, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"
|
||||
"SUPER+ALT, Delete, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle"
|
||||
];
|
||||
|
||||
bindm = [
|
||||
"SUPER, mouse:272, movewindow"
|
||||
"SUPER, mouse:274, movewindow"
|
||||
"SUPER, mouse:273, resizewindow"
|
||||
];
|
||||
|
||||
binde = [
|
||||
"SUPER, left , movefocus, l"
|
||||
"SUPER, down , movefocus, d"
|
||||
"SUPER, up , movefocus, u"
|
||||
"SUPER, right, movefocus, r"
|
||||
|
||||
"SUPER, h, movefocus, l"
|
||||
"SUPER, j, movefocus, d"
|
||||
"SUPER, k, movefocus, u"
|
||||
"SUPER, l, movefocus, r"
|
||||
|
||||
"SUPER+CTRL, left , resizeactive, -100 0"
|
||||
"SUPER+CTRL, down , resizeactive, 0 100"
|
||||
"SUPER+CTRL, up , resizeactive, 0 -100"
|
||||
"SUPER+CTRL, right, resizeactive, 100 0"
|
||||
|
||||
"SUPER+CTRL, h, resizeactive, -100 0"
|
||||
"SUPER+CTRL, j, resizeactive, 0 100"
|
||||
"SUPER+CTRL, k, resizeactive, 0 -100"
|
||||
"SUPER+CTRL, l, resizeactive, 100 0"
|
||||
];
|
||||
|
||||
bind = flatten [
|
||||
"SUPER , TAB, workspace, e+1"
|
||||
"SUPER+ALT, TAB, workspace, e-1"
|
||||
|
||||
"SUPER, mouse_up, workspace, e+1"
|
||||
"SUPER, mouse_down, workspace, e-1"
|
||||
|
||||
(map (n: [
|
||||
"SUPER , ${toString n}, workspace , ${toString n}"
|
||||
"SUPER+ALT, ${toString n}, movetoworkspacesilent, ${toString n}"
|
||||
]) <| range 1 9)
|
||||
"SUPER , 0, workspace , 10"
|
||||
"SUPER+ALT, 0, movetoworkspacesilent, 10"
|
||||
|
||||
"SUPER+ALT, left , movewindow, l"
|
||||
"SUPER+ALT, down , movewindow, d"
|
||||
"SUPER+ALT, up , movewindow, u"
|
||||
"SUPER+ALT, right, movewindow, r"
|
||||
|
||||
"SUPER+ALT, h, movewindow, l"
|
||||
"SUPER+ALT, j, movewindow, d"
|
||||
"SUPER+ALT, k, movewindow, u"
|
||||
"SUPER+ALT, l, movewindow, r"
|
||||
|
||||
"SUPER , Q, killactive"
|
||||
"SUPER , F, fullscreen"
|
||||
"SUPER+ALT, F, togglefloating"
|
||||
|
||||
"SUPER+ALT, RETURN, exec, kitty"
|
||||
"SUPER , RETURN, exec, ghostty --gtk-single-instance=true"
|
||||
"SUPER , W , exec, firefox"
|
||||
"SUPER , D , exec, discord"
|
||||
"SUPER , Z , exec, zulip"
|
||||
"SUPER , M , exec, thunderbird"
|
||||
"SUPER , T , exec, thunar"
|
||||
# "SUPER , C , exec, hyprpicker --autocopy"
|
||||
|
||||
" , PRINT, exec, pkill grim; grim -g \"$(slurp -w 0)\" - | swappy -f - -o - | wl-copy --type image/png"
|
||||
"ALT, PRINT, exec, pkill grim; grim - | swappy -f - -o - | wl-copy --type image/png"
|
||||
];
|
||||
|
||||
general = with config.theme; {
|
||||
gaps_in = margin / 2;
|
||||
gaps_out = margin;
|
||||
border_size = borderWidth;
|
||||
|
||||
"col.active_border" = "0xFF${base0A}";
|
||||
"col.nogroup_border_active" = "0xFF${base0A}";
|
||||
|
||||
"col.inactive_border" = "0xFF${base01}";
|
||||
"col.nogroup_border" = "0xFF${base01}";
|
||||
|
||||
resize_on_border = true;
|
||||
};
|
||||
|
||||
decoration = {
|
||||
drop_shadow = false;
|
||||
rounding = config.theme.cornerRadius;
|
||||
|
||||
blur.enabled = false;
|
||||
};
|
||||
|
||||
input = {
|
||||
follow_mouse = 1;
|
||||
|
||||
kb_layout = "tr-swapped-i";
|
||||
|
||||
repeat_delay = 400;
|
||||
repeat_rate = 100;
|
||||
|
||||
touchpad = {
|
||||
clickfinger_behavior = true;
|
||||
drag_lock = true;
|
||||
|
||||
natural_scroll = true;
|
||||
scroll_factor = 0.7;
|
||||
};
|
||||
};
|
||||
|
||||
gestures.workspace_swipe = true;
|
||||
|
||||
animations = {
|
||||
bezier = [ "material_decelerate, 0.05, 0.7, 0.1, 1" ];
|
||||
|
||||
animation = [
|
||||
"border , 1, 2, material_decelerate"
|
||||
"fade , 1, 2, material_decelerate"
|
||||
"layers , 1, 2, material_decelerate"
|
||||
"windows , 1, 2, material_decelerate, popin 80%"
|
||||
"workspaces, 1, 2, material_decelerate"
|
||||
];
|
||||
};
|
||||
|
||||
misc = {
|
||||
animate_manual_resizes = true;
|
||||
|
||||
background_color = config.theme.with0x.base00;
|
||||
disable_hyprland_logo = true;
|
||||
disable_splash_rendering = true;
|
||||
|
||||
key_press_enables_dpms = true;
|
||||
mouse_move_enables_dpms = true;
|
||||
};
|
||||
|
||||
cursor = {
|
||||
hide_on_key_press = true;
|
||||
inactive_timeout = 10;
|
||||
no_warps = true;
|
||||
};
|
||||
|
||||
dwindle = {
|
||||
preserve_split = true;
|
||||
smart_resizing = false;
|
||||
};
|
||||
|
||||
debug.error_position = 1;
|
||||
};
|
||||
};
|
||||
}];
|
||||
}
|
144
modules/linux/hyprland/waybar.nix
Normal file
144
modules/linux/hyprland/waybar.nix
Normal file
|
@ -0,0 +1,144 @@
|
|||
{ config, lib, ... }: let
|
||||
inherit (lib) enabled merge mkIf;
|
||||
in merge <| mkIf config.isDesktop {
|
||||
home-manager.sharedModules = [{
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
exec = [ "pkill --signal SIGUSR2 waybar" ];
|
||||
bind = [ "SUPER, B, exec, pkill --signal SIGUSR1 waybar" ];
|
||||
};
|
||||
|
||||
programs.waybar = with config.theme.withHashtag; enabled {
|
||||
systemd = enabled;
|
||||
|
||||
settings = [{
|
||||
layer = "top";
|
||||
height = 2 * cornerRadius;
|
||||
|
||||
margin-right = margin;
|
||||
margin-left = margin;
|
||||
margin-top = margin;
|
||||
|
||||
modules-left = [ "hyprland/workspaces" ];
|
||||
|
||||
"hyprland/workspaces" = {
|
||||
format = "{icon}";
|
||||
format-icons.default = "";
|
||||
format-icons.active = "";
|
||||
|
||||
persistent-workspaces."*" = 10;
|
||||
};
|
||||
|
||||
modules-center = [
|
||||
"hyprland/window"
|
||||
];
|
||||
|
||||
"hyprland/window" = {
|
||||
separate-outputs = true;
|
||||
|
||||
rewrite."(.*) - Discord" = " $1";
|
||||
rewrite."(.*) — Mozilla Firefox" = " $1";
|
||||
rewrite."(.*) — nu" = " $1";
|
||||
};
|
||||
|
||||
modules-right = [ "tray" "pulseaudio" "backlight" "cpu" "memory" "network" "battery" "clock" ];
|
||||
|
||||
tray = {
|
||||
reverse-direction = true;
|
||||
spacing = 5;
|
||||
};
|
||||
|
||||
pulseaudio = {
|
||||
format = "{format_source} {icon} {volume}%";
|
||||
format-muted = "{format_source} ";
|
||||
|
||||
format-bluetooth = "{format_source} {volume}%";
|
||||
format-bluetooth-muted = "{format_source} ";
|
||||
|
||||
format-source = "";
|
||||
format-source-muted = "";
|
||||
|
||||
format-icons.default = [ "" "" "" ];
|
||||
};
|
||||
|
||||
backlight = {
|
||||
format = "{icon} {percent}%";
|
||||
format-icons = [ "" "" "" "" "" "" "" "" "" ];
|
||||
};
|
||||
|
||||
cpu.format = " {usage}%";
|
||||
memory.format = " {}%";
|
||||
|
||||
network = {
|
||||
format-disconnected = " ";
|
||||
format-ethernet = " {ipaddr}/{cidr}";
|
||||
format-linked = " {ifname} (No IP)";
|
||||
format-wifi = " {signalStrength}%";
|
||||
};
|
||||
|
||||
battery = {
|
||||
format = "{icon} {capacity}%";
|
||||
format-charging = " {capacity}%";
|
||||
format-plugged = " {capacity}%";
|
||||
|
||||
format-icons = [ "" "" "" "" "" "" "" "" "" "" ];
|
||||
|
||||
states.warning = 30;
|
||||
states.critical = 15;
|
||||
};
|
||||
|
||||
clock.tooltip-format = "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>";
|
||||
}];
|
||||
|
||||
style = ''
|
||||
* {
|
||||
border: none;
|
||||
border-radius: ${toString cornerRadius}px;
|
||||
font-family: "${font.sans.name}";
|
||||
}
|
||||
|
||||
.modules-right {
|
||||
margin-right: ${toString padding}px;
|
||||
}
|
||||
|
||||
#waybar {
|
||||
background: ${base00};
|
||||
color: ${base05};
|
||||
}
|
||||
|
||||
#workspaces button:nth-child(1) { color: ${base08}; }
|
||||
#workspaces button:nth-child(2) { color: ${base09}; }
|
||||
#workspaces button:nth-child(3) { color: ${base0A}; }
|
||||
#workspaces button:nth-child(4) { color: ${base0B}; }
|
||||
#workspaces button:nth-child(5) { color: ${base0C}; }
|
||||
#workspaces button:nth-child(6) { color: ${base0D}; }
|
||||
#workspaces button:nth-child(7) { color: ${base0E}; }
|
||||
#workspaces button:nth-child(8) { color: ${base0F}; }
|
||||
#workspaces button:nth-child(9) { color: ${base04}; }
|
||||
#workspaces button:nth-child(10) { color: ${base06}; }
|
||||
|
||||
#workspaces button.empty {
|
||||
color: ${base02};
|
||||
}
|
||||
|
||||
#tray, #pulseaudio, #backlight, #cpu, #memory, #network, #battery, #clock {
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
||||
@keyframes blink {
|
||||
to {
|
||||
color: ${base05};
|
||||
}
|
||||
}
|
||||
|
||||
#battery.critical:not(.charging) {
|
||||
animation-direction: alternate;
|
||||
animation-duration: 0.5s;
|
||||
animation-iteration-count: infinite;
|
||||
animation-name: blink;
|
||||
animation-timing-function: linear;
|
||||
color: ${base08};
|
||||
}
|
||||
'';
|
||||
};
|
||||
}];
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue