Initial
This commit is contained in:
commit
24a865004a
94 changed files with 6074 additions and 0 deletions
15
modules/home/bat.nix
Normal file
15
modules/home/bat.nix
Normal file
|
@ -0,0 +1,15 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
programs.bat = {
|
||||
enable = true;
|
||||
config = {
|
||||
pager = "less -FR";
|
||||
};
|
||||
extraPackages = with pkgs.bat-extras; [
|
||||
batman
|
||||
batpipe
|
||||
batgrep
|
||||
];
|
||||
};
|
||||
}
|
24
modules/home/btop.nix
Normal file
24
modules/home/btop.nix
Normal file
|
@ -0,0 +1,24 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
programs.btop = {
|
||||
enable = true;
|
||||
package = pkgs.btop.override {
|
||||
rocmSupport = true;
|
||||
cudaSupport = true;
|
||||
};
|
||||
settings = {
|
||||
vim_keys = true;
|
||||
rounded_corners = true;
|
||||
proc_tree = true;
|
||||
show_gpu_info = "on";
|
||||
show_uptime = true;
|
||||
show_coretemp = true;
|
||||
cpu_sensor = "auto";
|
||||
show_disks = true;
|
||||
only_physical = true;
|
||||
io_mode = true;
|
||||
io_graph_combined = false;
|
||||
};
|
||||
};
|
||||
}
|
26
modules/home/cava.nix
Normal file
26
modules/home/cava.nix
Normal file
|
@ -0,0 +1,26 @@
|
|||
{ config, ... }:
|
||||
|
||||
{
|
||||
programs.cava = {
|
||||
enable = true;
|
||||
settings = {
|
||||
general = {
|
||||
bar_spacing = 1;
|
||||
bar_width = 2;
|
||||
frame_rate = 60;
|
||||
};
|
||||
color = {
|
||||
# Rose pine
|
||||
background = "'#191724'";
|
||||
gradient = 1;
|
||||
gradient_count = 6;
|
||||
gradient_color_1 = "'#31748f'";
|
||||
gradient_color_2 = "'#9ccfd8'";
|
||||
gradient_color_3 = "'#c4a7e7'";
|
||||
gradient_color_4 = "'#ebbcba'";
|
||||
gradient_color_5 = "'#f6c177'";
|
||||
gradient_color_6 = "'#eb6f92'";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
31
modules/home/default.nix
Normal file
31
modules/home/default.nix
Normal file
|
@ -0,0 +1,31 @@
|
|||
{ host, ... }:
|
||||
let
|
||||
inherit (import ../../hosts/${host}/variables.nix) waybarChoice;
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
waybarChoice
|
||||
./bat.nix
|
||||
./gh.nix
|
||||
./hyprland
|
||||
./qt.nix
|
||||
./stylix.nix
|
||||
./xdg.nix
|
||||
./btop.nix
|
||||
./git.nix
|
||||
./kitty.nix
|
||||
./rofi
|
||||
./swappy.nix
|
||||
./zsh
|
||||
./cava.nix
|
||||
./gtk.nix
|
||||
./macchina.nix
|
||||
./wlogout
|
||||
./cava.nix
|
||||
./mako.nix
|
||||
./scripts
|
||||
./emoji.nix
|
||||
./htop.nix
|
||||
./zed.nix
|
||||
];
|
||||
}
|
1856
modules/home/emoji.nix
Normal file
1856
modules/home/emoji.nix
Normal file
File diff suppressed because it is too large
Load diff
7
modules/home/gh.nix
Normal file
7
modules/home/gh.nix
Normal file
|
@ -0,0 +1,7 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
programs = {
|
||||
gh.enable = true;
|
||||
};
|
||||
}
|
11
modules/home/git.nix
Normal file
11
modules/home/git.nix
Normal file
|
@ -0,0 +1,11 @@
|
|||
{ host, ... }:
|
||||
let
|
||||
inherit (import ../../hosts/${host}/variables.nix) gitUsername gitEmail;
|
||||
in
|
||||
{
|
||||
programs.git = {
|
||||
enable = true;
|
||||
userName = "${gitUsername}";
|
||||
userEmail = "${gitEmail}";
|
||||
};
|
||||
}
|
17
modules/home/gtk.nix
Normal file
17
modules/home/gtk.nix
Normal file
|
@ -0,0 +1,17 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
gtk = {
|
||||
iconTheme = {
|
||||
name = "Papirus-Dark";
|
||||
package = pkgs.papirus-icon-theme;
|
||||
};
|
||||
gtk3.extraConfig = {
|
||||
gtk-application-prefer-dark-theme = 1;
|
||||
};
|
||||
gtk4.extraConfig = {
|
||||
gtk-application-prefer-dark-theme = 1;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
44
modules/home/htop.nix
Normal file
44
modules/home/htop.nix
Normal file
|
@ -0,0 +1,44 @@
|
|||
{ config, ... }:
|
||||
|
||||
{
|
||||
programs.htop = {
|
||||
enable = true;
|
||||
settings =
|
||||
{
|
||||
color_scheme = 6;
|
||||
cpu_count_from_one = 0;
|
||||
delay = 15;
|
||||
fields = with config.lib.htop.fields; [
|
||||
PID
|
||||
USER
|
||||
PRIORITY
|
||||
NICE
|
||||
M_SIZE
|
||||
M_RESIDENT
|
||||
M_SHARE
|
||||
STATE
|
||||
PERCENT_CPU
|
||||
PERCENT_MEM
|
||||
TIME
|
||||
COMM
|
||||
];
|
||||
highlight_base_name = 1;
|
||||
highlight_megabytes = 1;
|
||||
highlight_threads = 1;
|
||||
}
|
||||
// (with config.lib.htop;
|
||||
leftMeters [
|
||||
(bar "AllCPUs2")
|
||||
(bar "Memory")
|
||||
(bar "Swap")
|
||||
(text "Zram")
|
||||
])
|
||||
// (with config.lib.htop;
|
||||
rightMeters [
|
||||
(text "Tasks")
|
||||
(text "LoadAverage")
|
||||
(text "Uptime")
|
||||
(text "Systemd")
|
||||
]);
|
||||
};
|
||||
}
|
27
modules/home/hyprland/animations-def.nix
Normal file
27
modules/home/hyprland/animations-def.nix
Normal file
|
@ -0,0 +1,27 @@
|
|||
{ host, ... }:
|
||||
let
|
||||
inherit (import ../../../hosts/${host}/variables.nix);
|
||||
in
|
||||
{
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
animations = {
|
||||
enabled = true;
|
||||
bezier = [
|
||||
"wind, -1.05, 0.9, 0.1, 1.05"
|
||||
"winIn, -1.1, 1.1, 0.1, 1.1"
|
||||
"winOut, -1.3, -0.3, 0, 1"
|
||||
"liner, 0, 1, 1, 1"
|
||||
];
|
||||
animation = [
|
||||
"windows, 0, 6, wind, slide"
|
||||
"windowsIn, 0, 6, winIn, slide"
|
||||
"windowsOut, 0, 5, winOut, slide"
|
||||
"windowsMove, 0, 5, wind, slide"
|
||||
"border, 0, 1, liner"
|
||||
"fade, 0, 10, default"
|
||||
"workspaces, 0, 5, wind"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
31
modules/home/hyprland/animations-dynamic.nix
Normal file
31
modules/home/hyprland/animations-dynamic.nix
Normal file
|
@ -0,0 +1,31 @@
|
|||
{ host, ... }:
|
||||
let
|
||||
inherit (import ../../../hosts/${host}/variables.nix);
|
||||
in
|
||||
{
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
# name "Dynamic"
|
||||
# credit https://github.com/mylinuxforwork/dotfiles
|
||||
animations = [
|
||||
enabled = true;
|
||||
bezier = [
|
||||
"wind, 0.05, 0.9, 0.1, 1.05"
|
||||
"winIn, 0.1, 1.1, 0.1, 1.1"
|
||||
"winOut, 0.3, -0.3, 0, 1"
|
||||
"liner, 1, 1, 1, 1"
|
||||
];
|
||||
animation = [
|
||||
"windows, 1, 6, wind, slide"
|
||||
"windowsIn, 1, 6, winIn, slide"
|
||||
"windowsOut, 1, 5, winOut, slide"
|
||||
"windowsMove, 1, 5, wind, slide"
|
||||
"border, 1, 1, liner"
|
||||
"borderangle, 1, 30, liner, loop"
|
||||
"fade, 1, 10, default"
|
||||
"workspaces, 1, 5, wind"
|
||||
];
|
||||
];
|
||||
|
||||
};
|
||||
}
|
||||
|
43
modules/home/hyprland/animations-end4.nix
Normal file
43
modules/home/hyprland/animations-end4.nix
Normal file
|
@ -0,0 +1,43 @@
|
|||
{ host, ... }:
|
||||
let
|
||||
inherit (import ../../../hosts/${host}/variables.nix);
|
||||
in
|
||||
{
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
# Name: END-4
|
||||
# Credit: END-4 project https://github.com/end-4/dots-hyprland
|
||||
animations = {
|
||||
enabled = true;
|
||||
bezier = [
|
||||
"linear, 0, 0, 1, 1"
|
||||
"md3_standard, 0.2, 0, 0, 1"
|
||||
"md3_decel, 0.05, 0.7, 0.1, 1"
|
||||
"md3_accel, 0.3, 0, 0.8, 0.15"
|
||||
"overshot, 0.05, 0.9, 0.1, 1.1"
|
||||
"crazyshot, 0.1, 1.5, 0.76, 0.92 "
|
||||
"hyprnostretch, 0.05, 0.9, 0.1, 1.0"
|
||||
"menu_decel, 0.1, 1, 0, 1"
|
||||
"menu_accel, 0.38, 0.04, 1, 0.07"
|
||||
"easeInOutCirc, 0.85, 0, 0.15, 1"
|
||||
"easeOutCirc, 0, 0.55, 0.45, 1"
|
||||
"easeOutExpo, 0.16, 1, 0.3, 1"
|
||||
"softAcDecel, 0.26, 0.26, 0.15, 1"
|
||||
"md2, 0.4, 0, 0.2, 1 # use with .2s duration"
|
||||
];
|
||||
animation = [
|
||||
"windows, 1, 3, md3_decel, popin 60%"
|
||||
"windowsIn, 1, 3, md3_decel, popin 60%"
|
||||
"windowsOut, 1, 3, md3_accel, popin 60%"
|
||||
"border, 1, 10, default"
|
||||
"fade, 1, 3, md3_decel"
|
||||
"layersIn, 1, 3, menu_decel, slide"
|
||||
"layersOut, 1, 1.6, menu_accel"
|
||||
"fadeLayersIn, 1, 2, menu_decel"
|
||||
"fadeLayersOut, 1, 4.5, menu_accel"
|
||||
"workspaces, 1, 7, menu_decel, slide"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
|
76
modules/home/hyprland/binds.nix
Normal file
76
modules/home/hyprland/binds.nix
Normal file
|
@ -0,0 +1,76 @@
|
|||
{ host, ... }:
|
||||
let
|
||||
inherit
|
||||
(import ../../../hosts/${host}/variables.nix)
|
||||
browser
|
||||
terminal
|
||||
;
|
||||
in
|
||||
{
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
bind = [
|
||||
"$modifier,Return,exec,${terminal}"
|
||||
"$modifier,K,exec,list-keybinds"
|
||||
"$modifier SHIFT,Return,exec,rofi-launcher"
|
||||
"$modifier ALT,W,exec,centerwindow"
|
||||
"$modifier,W,exec,${browser}"
|
||||
"$modifier,Y,exec,thunar"
|
||||
"$modifier,S,exec,screenshotit"
|
||||
"$modifier,D,exec,vesktop"
|
||||
"$modifier,C,exec,hyprpicker -a"
|
||||
"$modifier,Q,killactive,"
|
||||
"$modifier,F,fullscreen,"
|
||||
"$modifier,V,togglefloating,"
|
||||
"$modifier,L,exec,hyprlock --immediate -q"
|
||||
"$modifier SHIFT,M,exit,"
|
||||
"$modifier SHIFT,left,movewindow,l"
|
||||
"$modifier SHIFT,right,movewindow,r"
|
||||
"$modifier SHIFT,up,movewindow,u"
|
||||
"$modifier SHIFT,down,movewindow,d"
|
||||
"$modifier ALT, left, swapwindow,l"
|
||||
"$modifier ALT, right, swapwindow,r"
|
||||
"$modifier ALT, up, swapwindow,u"
|
||||
"$modifier ALT, down, swapwindow,d"
|
||||
"$modifier,left,movefocus,l"
|
||||
"$modifier,right,movefocus,r"
|
||||
"$modifier,up,movefocus,u"
|
||||
"$modifier,down,movefocus,d"
|
||||
"$modifier,1,workspace,1"
|
||||
"$modifier,2,workspace,2"
|
||||
"$modifier,3,workspace,3"
|
||||
"$modifier,4,workspace,4"
|
||||
"$modifier,5,workspace,5"
|
||||
"$modifier,6,workspace,6"
|
||||
"$modifier,7,workspace,7"
|
||||
"$modifier,8,workspace,8"
|
||||
"$modifier,9,workspace,9"
|
||||
"$modifier,0,workspace,10"
|
||||
"$modifier SHIFT,1,movetoworkspace,1"
|
||||
"$modifier SHIFT,2,movetoworkspace,2"
|
||||
"$modifier SHIFT,3,movetoworkspace,3"
|
||||
"$modifier SHIFT,4,movetoworkspace,4"
|
||||
"$modifier SHIFT,5,movetoworkspace,5"
|
||||
"$modifier SHIFT,6,movetoworkspace,6"
|
||||
"$modifier SHIFT,7,movetoworkspace,7"
|
||||
"$modifier SHIFT,8,movetoworkspace,8"
|
||||
"$modifier SHIFT,9,movetoworkspace,9"
|
||||
"$modifier SHIFT,0,movetoworkspace,10"
|
||||
"$modifier CONTROL,right,workspace,e+1"
|
||||
"$modifier CONTROL,left,workspace,e-1"
|
||||
"$modifier,mouse_down,workspace, e+1"
|
||||
"$modifier,mouse_up,workspace, e-1"
|
||||
"ALT,Tab,cyclenext"
|
||||
"ALT,Tab,bringactivetotop"
|
||||
",XF86AudioRaiseVolume,exec,volumeup"
|
||||
",XF86AudioLowerVolume,exec,volumedown"
|
||||
",XF86AudioMute,exec,volumemute"
|
||||
",XF86MonBrightnessDown,exec,brightnessctl set 5%-"
|
||||
",XF86MonBrightnessUp,exec,brightnessctl set +5%"
|
||||
];
|
||||
|
||||
bindm = [
|
||||
"$modifier, mouse:272, movewindow"
|
||||
"$modifier, mouse:273, resizewindow"
|
||||
];
|
||||
};
|
||||
}
|
13
modules/home/hyprland/default.nix
Normal file
13
modules/home/hyprland/default.nix
Normal file
|
@ -0,0 +1,13 @@
|
|||
{ imports, host, ... }:
|
||||
let
|
||||
inherit (import ../../../hosts/${host}/variables.nix) animChoice;
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
animChoice
|
||||
./binds.nix
|
||||
./hyprland.nix
|
||||
./hyprlock.nix
|
||||
./windowrules.nix
|
||||
];
|
||||
}
|
161
modules/home/hyprland/hyprland.nix
Normal file
161
modules/home/hyprland/hyprland.nix
Normal file
|
@ -0,0 +1,161 @@
|
|||
{ host, profile, config, pkgs, ... }:
|
||||
let
|
||||
inherit
|
||||
(import ../../../hosts/${host}/variables.nix)
|
||||
extraMonitorSettings
|
||||
keyboardLayout
|
||||
stylixImage
|
||||
;
|
||||
in
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
swww
|
||||
grim
|
||||
slurp
|
||||
wl-clipboard
|
||||
swappy
|
||||
hyprpolkitagent
|
||||
hyprland-qtutils
|
||||
];
|
||||
systemd.user.targets.hyprland-session.Unit.Wants = [
|
||||
"xdg-desktop-autostart.target"
|
||||
];
|
||||
home.file = {
|
||||
"Pictures/Wallpapers" = {
|
||||
source = ../../../wallpapers;
|
||||
recursive = true;
|
||||
};
|
||||
};
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
package = pkgs.hyprland;
|
||||
systemd = {
|
||||
enable = true;
|
||||
enableXdgAutostart = true;
|
||||
variables = [ "--all" ];
|
||||
};
|
||||
xwayland.enable = true;
|
||||
settings = {
|
||||
exec-once = [
|
||||
"dbus-update-activation-environment --all --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP"
|
||||
"systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP"
|
||||
"systemctl --user start hyprpolkitagent"
|
||||
"killall -q swww; sleep .5 && swww init"
|
||||
"killall -q waybar; sleep .5 && waybar"
|
||||
"nm-applet --indicator"
|
||||
"sleep 1.5 && swww img ${stylixImage}"
|
||||
];
|
||||
|
||||
input = {
|
||||
kb_layout = "${keyboardLayout}";
|
||||
numlock_by_default = true;
|
||||
repeat_delay = 300;
|
||||
follow_mouse = 1;
|
||||
float_switch_override_focus = 0;
|
||||
sensitivity = -0.5;
|
||||
touchpad = {
|
||||
natural_scroll = true;
|
||||
disable_while_typing = true;
|
||||
scroll_factor = 0.8;
|
||||
};
|
||||
};
|
||||
|
||||
gestures = {
|
||||
workspace_swipe = 1;
|
||||
workspace_swipe_fingers = 3;
|
||||
workspace_swipe_distance = 500;
|
||||
workspace_swipe_invert = 1;
|
||||
workspace_swipe_min_speed_to_force = 30;
|
||||
workspace_swipe_cancel_ratio = 0.5;
|
||||
workspace_swipe_create_new = 1;
|
||||
workspace_swipe_forever = 1;
|
||||
};
|
||||
|
||||
general = {
|
||||
"$modifier" = "SUPER";
|
||||
layout = "dwindle";
|
||||
gaps_in = 6;
|
||||
gaps_out = 8;
|
||||
border_size = 2;
|
||||
resize_on_border = true;
|
||||
"col.active_border" = "rgb(${config.lib.stylix.colors.base08}) rgb(${config.lib.stylix.colors.base0C}) 45deg";
|
||||
"col.inactive_border" = "rgb(${config.lib.stylix.colors.base01})";
|
||||
};
|
||||
|
||||
misc = {
|
||||
layers_hog_keyboard_focus = true;
|
||||
initial_workspace_tracking = 0;
|
||||
disable_hyprland_logo = true;
|
||||
disable_splash_rendering = true;
|
||||
#disable_swallow = false;
|
||||
};
|
||||
|
||||
dwindle = {
|
||||
pseudotile = true;
|
||||
preserve_split = true;
|
||||
};
|
||||
|
||||
decoration = {
|
||||
rounding = 10;
|
||||
blur = {
|
||||
enabled = true;
|
||||
size = 5;
|
||||
passes = 3;
|
||||
ignore_opacity = false;
|
||||
new_optimizations = true;
|
||||
};
|
||||
shadow = {
|
||||
enabled = true;
|
||||
range = 4;
|
||||
render_power = 3;
|
||||
color = "rgba(1a1a1aee)";
|
||||
};
|
||||
};
|
||||
|
||||
cursor = {
|
||||
sync_gsettings_theme = true;
|
||||
no_hardware_cursors = 1;
|
||||
enable_hyprcursor = false;
|
||||
warp_on_change_workspace = 2;
|
||||
no_warps = true;
|
||||
};
|
||||
|
||||
render = {
|
||||
explicit_sync = 1; # 1 = disable
|
||||
explicit_sync_kms = 1;
|
||||
direct_scanout = 0;
|
||||
};
|
||||
|
||||
master = {
|
||||
new_status = "master";
|
||||
new_on_top = 1;
|
||||
mfact = 0.5;
|
||||
};
|
||||
|
||||
env = [
|
||||
"NIXOS_OZONE_WL, 1"
|
||||
"NIXPKGS_ALLOW_UNFREE, 1"
|
||||
"XDG_CURRENT_DESKTOP, Hyprland"
|
||||
"XDG_SESSION_TYPE, wayland"
|
||||
"XDG_SESSION_DESKTOP, Hyprland"
|
||||
"GDK_BACKEND, wayland, x11"
|
||||
"CLUTTER_BACKEND, wayland"
|
||||
"QT_QPA_PLATFORM=wayland;xcb"
|
||||
"QT_WAYLAND_DISABLE_WINDOWDECORATION, 1"
|
||||
"QT_AUTO_SCREEN_SCALE_FACTOR, 1"
|
||||
"SDL_VIDEODRIVER, wayland"
|
||||
"MOZ_ENABLE_WAYLAND, 1"
|
||||
"AQ_DRM_DEVICES,/dev/dri/card0:/dev/dri/card1"#,/dev/dri/card1:/dev/dri/card0"
|
||||
"GDK_SCALE,1"
|
||||
"QT_SCALE_FACTOR,1"
|
||||
"EDITOR,vim"
|
||||
"WLR_NO_HARDWARE_CURSORS,1"
|
||||
]; #++ (if profile == "nvidia" || profile == "nvidia-laptop" then [ "LIBVA_DRIVER_NAME,nvidia" "__GLX_VENDOR_LIBRARY_NAME,nvidia" ] else []); #++ (if profile == "nvidia" || profile == "nvidia-laptop" then [ "LIBVA_DRIVER_NAME,nvidia" "GBM_BACKEND,nvidia-drm" "WLR_DRM_NO_ATOMIC,1" "__GLX_VENDOR_LIBRARY_NAME,nvidia" "__NV_PRIME_RENDER_OFFLOAD,1" "__VK_LAYER_NV_optimus,NVIDIA_onky" "WLR_NO_HARDWARE_CURSORS,1" "WLR_RENDERER_ALLOW_SOFTWARE,1" "MOZ_DISABLE_RDD_SANDBOX,1" "EGL_PLATFORM,wayland" ] else []);
|
||||
};
|
||||
|
||||
extraConfig = if extraMonitorSettings == "" then "monitor=,preferred,auto,auto" else "${extraMonitorSettings}";
|
||||
#extraConfig = "opengl { nvidia_anti_flicker=false }";
|
||||
#extraConfig = "" + (if extraMonitorSettings == "" then "monitor=,preferred,auto,auto" else "${extraMonitorSettings}") + (if profile == "nvidia" || profile == "nvidia-laptop" then "opengl { nvidia_anti_flicker=false }" else "");
|
||||
#extraConfig = "" + (if extraMonitorSettings == "" then "monitor=,preferred,auto,auto" else "${extraMonitorSettings}") + (if profile == "nvidia" || profile == "nvidia-laptop" then "cursor { no_hardware_cursors = true }" else "");
|
||||
};
|
||||
}
|
39
modules/home/hyprland/hyprlock.nix
Normal file
39
modules/home/hyprland/hyprlock.nix
Normal file
|
@ -0,0 +1,39 @@
|
|||
{ username, ... }:
|
||||
|
||||
{
|
||||
programs.hyprlock = {
|
||||
enable = true;
|
||||
settings = {
|
||||
general = {
|
||||
disable_loading_bar = true;
|
||||
grace = 10;
|
||||
hide_cursor = true;
|
||||
#no_fade_in = false;
|
||||
};
|
||||
background = [
|
||||
{
|
||||
path = "/home/${username}/Pictures/Wallpapers/hyprlock.jpg";
|
||||
blur_passes = 3;
|
||||
blur_size = 8;
|
||||
}
|
||||
];
|
||||
input-field = [
|
||||
{
|
||||
size = "200, 50";
|
||||
position = "0, -80";
|
||||
monitor = "";
|
||||
dots_center = true;
|
||||
fade_on_empty = false;
|
||||
font_color = "rgb(CFE6F4)";
|
||||
inner_color = "rgb(657DC2)";
|
||||
outer_color = "rgb(0D0E15)";
|
||||
outline_thickness = 5;
|
||||
placeholder_text = "Password...";
|
||||
shadow_passes = 2;
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
|
75
modules/home/hyprland/windowrules.nix
Normal file
75
modules/home/hyprland/windowrules.nix
Normal file
|
@ -0,0 +1,75 @@
|
|||
{ host, ... }:
|
||||
let
|
||||
inherit (import ../../../hosts/${host}/variables.nix) extraMonitorSettings;
|
||||
in
|
||||
{
|
||||
wayland.windowManager.hyprland = {
|
||||
settings = {
|
||||
windowrulev2 = [
|
||||
"tag +file-manager, class:^([Tt]hunar|org.gnome.Nautilus|[Pp]cmanfm-qt)$"
|
||||
"tag +terminal, class:^(Alacritty|kitty|kitty-dropterm)$"
|
||||
"tag +browser, class:^(Brave-browser(-beta|-dev|-unstable)?)$"
|
||||
"tag +browser, class:^([Ff]irefox|org.mozilla.firefox|[Ff]irefox-esr)$"
|
||||
"tag +browser, class:^([Gg]oogle-chrome(-beta|-dev|-unstable)?)$"
|
||||
"tag +browser, class:^([Tt]horium-browser|[Cc]achy-browser)$"
|
||||
"tag +projects, class:^(codium|codium-url-handler|VSCodium)$"
|
||||
"tag +projects, class:^(VSCode|code-url-handler)$"
|
||||
"tag +projects, class:^(zed)$"
|
||||
"tag +im, class:^([Dd]iscord|[Ww]ebCord|[Vv]esktop)$"
|
||||
"tag +games, class:^(gamescope)$"
|
||||
"tag +games, class:^(steam_app_\d+)$"
|
||||
"tag +gamestore, class:^([Ss]team)$"
|
||||
"tag +gamestore, title:^([Ll]utris)$"
|
||||
"tag +settings, class:^([Rr]ofi)$"
|
||||
"tag +settings, class:^(file-roller|org.gnome.FileRoller)$"
|
||||
"tag +settings, class:^(nm-applet|nm-connection-editor|blueman-manager)$"
|
||||
"tag +settings, class:(xdg-desktop-portal-gtk)"
|
||||
"move 72% 7%,title:^(Picture-in-Picture)$"
|
||||
"center, title:^(Authentication Required)$"
|
||||
"center, class:([Tt]hunar), title:negative:(.*[Tt]hunar.*)"
|
||||
"idleinhibit fullscreen, class:^(*)$"
|
||||
"idleinhibit fullscreen, title:^(*)$"
|
||||
"idleinhibit fullscreen, fullscreen:1"
|
||||
"float, tag:settings*"
|
||||
"float, title:^(Picture-in-Picture)$"
|
||||
"float, title:^(Authentication Required)$"
|
||||
"float, class:(codium|codium-url-handler|VSCodium), title:negative:(.*codium.*|.*VSCodium.*)"
|
||||
"float, class:^([Ss]team)$, title:negative:^([Ss]team)$"
|
||||
"float, initialTitle:(Add Folder to Workspace)"
|
||||
"float, initialTitle:(Open Files)"
|
||||
"float, initialTitle:(wants to save)"
|
||||
"size 70% 60%, initialTitle:(Open Files)"
|
||||
"size 70% 60%, initialTitle:(Add Folder to Workspace)"
|
||||
"size 70% 70%, tag:settings*"
|
||||
"pin, title:^(Picture-in-Picture)$"
|
||||
"keepaspectratio, title:^(Picture-in-Picture)$"
|
||||
"noblur, tag:games*"
|
||||
"fullscreen, tag:games*"
|
||||
];
|
||||
|
||||
#env = [
|
||||
# "NIXOS_OZONE_WL, 1"
|
||||
# "NIXPKGS_ALLOW_UNFREE, 1"
|
||||
# "XDG_CURRENT_DESKTOP, Hyprland"
|
||||
# "XDG_SESSION_TYPE, wayland"
|
||||
# "XDG_SESSION_DESKTOP, Hyprland"
|
||||
# "GDK_BACKEND, wayland, x11"
|
||||
# "CLUTTER_BACKEND, wayland"
|
||||
# "QT_QPA_PLATFORM=wayland;xcb"
|
||||
# "QT_WAYLAND_DISABLE_WINDOWDECORATION, 1"
|
||||
# "QT_AUTO_SCREEN_SCALE_FACTOR, 1"
|
||||
# "SDL_VIDEODRIVER, x11"
|
||||
# "MOZ_ENABLE_WAYLAND, 1"
|
||||
# "AQ_DRM_DEVICES,/dev/dri/card1:/dev/dri/card0"
|
||||
# "GDK_SCALE,1"
|
||||
# "QT_SCALE_FACTOR,1"
|
||||
# "EDITOR,vim"
|
||||
#];
|
||||
};
|
||||
|
||||
#extraConfig = "
|
||||
# monitor=,preferred,auto,auto
|
||||
# ${extraMonitorSettings}
|
||||
#";
|
||||
};
|
||||
}
|
78
modules/home/kitty.nix
Normal file
78
modules/home/kitty.nix
Normal file
|
@ -0,0 +1,78 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
programs.kitty = {
|
||||
enable = true;
|
||||
package = pkgs.kitty;
|
||||
settings = {
|
||||
font_size = 12;
|
||||
wheel_scroll_min_lines = 1;
|
||||
window_padding_width = 4;
|
||||
confirm_os_window_close = 0;
|
||||
scrollback_lines = 10000;
|
||||
enable_audio_bell = false;
|
||||
mouse_hide_wait = 60;
|
||||
cursor_trail = 1;
|
||||
tab_fade = 1;
|
||||
active_tab_font_style = "bold";
|
||||
inactive_tab_font_style = "bold";
|
||||
tab_bar_edge = "top";
|
||||
tab_bar_margin_width = 0;
|
||||
tab_bar_style = "powerline";
|
||||
#tab_bar_style = "fade";
|
||||
enabled_layouts = "splits";
|
||||
themeFile = "rose-pine";
|
||||
};
|
||||
extraConfig = ''
|
||||
|
||||
# Clipboard
|
||||
map ctrl+shift+v paste_from_selection
|
||||
map shift+insert paste_from_selection
|
||||
|
||||
# Scrolling
|
||||
map ctrl+shift+up scroll_line_up
|
||||
map ctrl+shift+down scroll_line_down
|
||||
map ctrl+shift+k scroll_line_up
|
||||
map ctrl+shift+j scroll_line_down
|
||||
map ctrl+shift+page_up scroll_page_up
|
||||
map ctrl+shift+page_down scroll_page_down
|
||||
map ctrl+shift+home scroll_home
|
||||
map ctrl+shift+end scroll_end
|
||||
map ctrl+shift+h show_scrollback
|
||||
|
||||
# Window management
|
||||
map alt+n new_window_with_cwd #open in current dir
|
||||
#map alt+n new_os_window #opens term in $HOME
|
||||
map alt+w close_window
|
||||
map ctrl+shift+enter launch --location=hsplit
|
||||
map ctrl+shift+s launch --location=vsplit
|
||||
map ctrl+shift+] next_window
|
||||
map ctrl+shift+[ previous_window
|
||||
map ctrl+shift+f move_window_forward
|
||||
map ctrl+shift+b move_window_backward
|
||||
map ctrl+shift+` move_window_to_top
|
||||
map ctrl+shift+1 first_window
|
||||
map ctrl+shift+2 second_window
|
||||
map ctrl+shift+3 third_window
|
||||
map ctrl+shift+4 fourth_window
|
||||
map ctrl+shift+5 fifth_window
|
||||
map ctrl+shift+6 sixth_window
|
||||
map ctrl+shift+7 seventh_window
|
||||
map ctrl+shift+8 eighth_window
|
||||
map ctrl+shift+9 ninth_window # Tab management
|
||||
map ctrl+shift+0 tenth_window
|
||||
map ctrl+shift+right next_tab
|
||||
map ctrl+shift+left previous_tab
|
||||
map ctrl+shift+t new_tab
|
||||
map ctrl+shift+q close_tab
|
||||
map ctrl+shift+l next_layout
|
||||
map ctrl+shift+. move_tab_forward
|
||||
map ctrl+shift+, move_tab_backward
|
||||
|
||||
# Miscellaneous
|
||||
map ctrl+shift+up increase_font_size
|
||||
map ctrl+shift+down decrease_font_size
|
||||
map ctrl+shift+backspace restore_font_size
|
||||
'';
|
||||
};
|
||||
}
|
50
modules/home/macchina.nix
Normal file
50
modules/home/macchina.nix
Normal file
|
@ -0,0 +1,50 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
home.file = {
|
||||
".config/macchina/macchina.toml".text = ''
|
||||
interface = "wlan0"
|
||||
long_uptime = true
|
||||
long_shell = false
|
||||
long_kernel = false
|
||||
current_shell = true
|
||||
physical_cores = true
|
||||
theme = "rose-pine"
|
||||
show = ["Host", "Kernel", "Distribution", "Packages", "Terminal", "Shell", "Processor", "ProcessorLoad", "Memory", "Battery"]
|
||||
'';
|
||||
".config/macchina/themes/rose-pine.toml".text = ''
|
||||
spacing = 2
|
||||
padding = 0
|
||||
hide_ascii = true
|
||||
separator = "➝"
|
||||
key_color = "red"
|
||||
separator_color = "red"
|
||||
|
||||
[palette]
|
||||
type = "Dark"
|
||||
visible = false
|
||||
glyph = " ⬤ "
|
||||
|
||||
[box]
|
||||
title = " Swordfish "
|
||||
border = "flat"
|
||||
visible = true
|
||||
|
||||
[randomize]
|
||||
key_color = false
|
||||
separator_color = false
|
||||
|
||||
[keys]
|
||||
host = " Host"
|
||||
kernel = " Kernel"
|
||||
distro = " Distro"
|
||||
packages = " Packages"
|
||||
terminal = " Terminal"
|
||||
shell = " Shell"
|
||||
cpu = " CPU"
|
||||
cpu_load = " CPU %"
|
||||
memory = " Memory %"
|
||||
battery = " Battery %"
|
||||
'';
|
||||
};
|
||||
}
|
16
modules/home/mako.nix
Normal file
16
modules/home/mako.nix
Normal file
|
@ -0,0 +1,16 @@
|
|||
{ pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
services = {
|
||||
mako = {
|
||||
enable = true;
|
||||
anchor = "bottom-center";
|
||||
defaultTimeout = 5000;
|
||||
maxVisible = 5;
|
||||
backgroundColor = lib.mkForce "#26233a";
|
||||
textColor = lib.mkForce "#e0def4";
|
||||
borderColor = lib.mkForce "#524f67";
|
||||
progressColor = lib.mkForce "over #31748f";
|
||||
};
|
||||
};
|
||||
}
|
7
modules/home/qt.nix
Normal file
7
modules/home/qt.nix
Normal file
|
@ -0,0 +1,7 @@
|
|||
_:
|
||||
|
||||
{
|
||||
qt = {
|
||||
enable = true;
|
||||
};
|
||||
}
|
51
modules/home/rofi/config-long.nix
Normal file
51
modules/home/rofi/config-long.nix
Normal file
|
@ -0,0 +1,51 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
home.file.".config/rofi/config-long.rasi".text = ''
|
||||
@import "~/.config/rofi/config.rasi"
|
||||
window {
|
||||
width: 750px;
|
||||
border-radius: 20px;
|
||||
}
|
||||
mainbox {
|
||||
orientation: vertical;
|
||||
children: [ "inputbar", "listbox" ];
|
||||
}
|
||||
inputbar {
|
||||
padding: 75px 40px;
|
||||
background-color: transparent;
|
||||
background-image: url("~/Pictures/Wallpapers/rofi.jpg", width);
|
||||
text-color: @foreground;
|
||||
children: [ "textbox-prompt-colon", "entry" ];
|
||||
}
|
||||
textbox-prompt-colon {
|
||||
padding: 12px 20px;
|
||||
border-radius: 100%;
|
||||
background-color: @bg-alt;
|
||||
text-color: @foreground;
|
||||
}
|
||||
entry {
|
||||
expand: true;
|
||||
padding: 12px 16px;
|
||||
border-radius: 100%;
|
||||
background-color: @bg-alt;
|
||||
text-color: @foreground;
|
||||
}
|
||||
button {
|
||||
padding: 12px;
|
||||
border-radius: 100%;
|
||||
}
|
||||
element {
|
||||
spacing: 10px;
|
||||
padding: 12px;
|
||||
border-radius: 100%;
|
||||
}
|
||||
textbox {
|
||||
padding: 12px;
|
||||
border-radius: 100%;
|
||||
}
|
||||
error-message {
|
||||
border-radius: 0px;
|
||||
}
|
||||
'';
|
||||
}
|
8
modules/home/rofi/default.nix
Normal file
8
modules/home/rofi/default.nix
Normal file
|
@ -0,0 +1,8 @@
|
|||
{ imports, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./config-long.nix
|
||||
./rofi.nix
|
||||
];
|
||||
}
|
206
modules/home/rofi/rofi.nix
Normal file
206
modules/home/rofi/rofi.nix
Normal file
|
@ -0,0 +1,206 @@
|
|||
{ pkgs, config, ... }:
|
||||
|
||||
{
|
||||
programs = {
|
||||
rofi = {
|
||||
enable = true;
|
||||
package = pkgs.rofi-wayland;
|
||||
extraConfig = {
|
||||
modi = "drun,filebrowser,run";
|
||||
show-icons = true;
|
||||
icon-theme = "Papirus";
|
||||
font = "JetBrainsMono Nerd Font Mono 12";
|
||||
drun-display-format = "{icon} {name}";
|
||||
display-drun = " Apps";
|
||||
display-run = " Run";
|
||||
display-filebrowser = " File";
|
||||
};
|
||||
theme = let
|
||||
inherit (config.lib.formats.rasi) mkLiteral;
|
||||
in {
|
||||
"*" = {
|
||||
bg = mkLiteral "#${config.stylix.base16Scheme.base00}";
|
||||
bg-alt = mkLiteral "#${config.stylix.base16Scheme.base09}";
|
||||
foreground = mkLiteral "#${config.stylix.base16Scheme.base01}";
|
||||
selected = mkLiteral "#${config.stylix.base16Scheme.base08}";
|
||||
active = mkLiteral "#${config.stylix.base16Scheme.base0B}";
|
||||
text-selected = mkLiteral "#${config.stylix.base16Scheme.base00}";
|
||||
text-color = mkLiteral "#${config.stylix.base16Scheme.base05}";
|
||||
border-color = mkLiteral "#${config.stylix.base16Scheme.base0F}";
|
||||
urgent = mkLiteral "#${config.stylix.base16Scheme.base0E}";
|
||||
};
|
||||
"window" = {
|
||||
transparency = "real";
|
||||
width = mkLiteral "1000px";
|
||||
location = mkLiteral "center";
|
||||
anchor = mkLiteral "center";
|
||||
fullscreen = false;
|
||||
x-offset = mkLiteral "0px";
|
||||
y-offset = mkLiteral "0px";
|
||||
cursor = "default";
|
||||
enabled = true;
|
||||
border-radius = mkLiteral "15px";
|
||||
background-color = mkLiteral "@bg";
|
||||
};
|
||||
"mainbox" = {
|
||||
enabled = true;
|
||||
spacing = mkLiteral "0px";
|
||||
orientation = mkLiteral "horizontal";
|
||||
children = map mkLiteral [
|
||||
"imagebox"
|
||||
"listbox"
|
||||
];
|
||||
background-color = mkLiteral "transparent";
|
||||
};
|
||||
"imagebox" = {
|
||||
padding = mkLiteral "20px";
|
||||
background-color = mkLiteral "transparent";
|
||||
background-image = mkLiteral ''url("~/Pictures/Wallpapers/rofi.jpg", height)'';
|
||||
orientation = mkLiteral "vertical";
|
||||
children = map mkLiteral [
|
||||
"inputbar"
|
||||
"dummy"
|
||||
"mode-switcher"
|
||||
];
|
||||
};
|
||||
"listbox" = {
|
||||
spacing = mkLiteral "20px";
|
||||
padding = mkLiteral "20px";
|
||||
background-color = mkLiteral "transparent";
|
||||
orientation = mkLiteral "vertical";
|
||||
children = map mkLiteral [
|
||||
"message"
|
||||
"listview"
|
||||
];
|
||||
};
|
||||
"dummy" = {
|
||||
background-color = mkLiteral "transparent";
|
||||
};
|
||||
"inputbar" = {
|
||||
enabled = true;
|
||||
spacing = mkLiteral "10px";
|
||||
padding = mkLiteral "10px";
|
||||
border-radius = mkLiteral "10px";
|
||||
background-color = mkLiteral "@bg-alt";
|
||||
text-color = mkLiteral "@foreground";
|
||||
children = map mkLiteral [
|
||||
"textbox-prompt-colon"
|
||||
"entry"
|
||||
];
|
||||
};
|
||||
"textbox-prompt-colon" = {
|
||||
enabled = true;
|
||||
expand = false;
|
||||
str = "";
|
||||
background-color = mkLiteral "inherit";
|
||||
text-color = mkLiteral "inherit";
|
||||
};
|
||||
"entry" = {
|
||||
enabled = true;
|
||||
background-color = mkLiteral "inherit";
|
||||
text-color = mkLiteral "inherit";
|
||||
cursor = mkLiteral "text";
|
||||
placeholder = "Search";
|
||||
placeholder-color = mkLiteral "inherit";
|
||||
};
|
||||
"mode-switcher" = {
|
||||
enabled = true;
|
||||
spacing = mkLiteral "20px";
|
||||
background-color = mkLiteral "transparent";
|
||||
text-color = mkLiteral "@foreground";
|
||||
};
|
||||
"button" = {
|
||||
padding = mkLiteral "15px";
|
||||
border-radius = mkLiteral "10px";
|
||||
background-color = mkLiteral "@bg-alt";
|
||||
text-color = mkLiteral "inherit";
|
||||
cursor = mkLiteral "pointer";
|
||||
};
|
||||
"button selected" = {
|
||||
background-color = mkLiteral "@selected";
|
||||
text-color = mkLiteral "@foreground";
|
||||
};
|
||||
"listview" = {
|
||||
enabled = true;
|
||||
columns = 1;
|
||||
lines = 8;
|
||||
cycle = true;
|
||||
dynamic = true;
|
||||
scrollbar = false;
|
||||
layout = mkLiteral "vertical";
|
||||
reverse = false;
|
||||
fixed-height = true;
|
||||
fixed-columns = true;
|
||||
spacing = mkLiteral "10px";
|
||||
background-color = mkLiteral "transparent";
|
||||
text-color = mkLiteral "@foreground";
|
||||
cursor = "default";
|
||||
};
|
||||
"element" = {
|
||||
enabled = true;
|
||||
spacing = mkLiteral "15px";
|
||||
padding = mkLiteral "8px";
|
||||
border-radius = mkLiteral "10px";
|
||||
background-color = mkLiteral "transparent";
|
||||
text-color = mkLiteral "@text-color";
|
||||
cursor = mkLiteral "pointer";
|
||||
};
|
||||
"element normal.normal" = {
|
||||
background-color = mkLiteral "inherit";
|
||||
text-color = mkLiteral "@text-color";
|
||||
};
|
||||
"element normal.urgent" = {
|
||||
background-color = mkLiteral "@urgent";
|
||||
text-color = mkLiteral "@text-color";
|
||||
};
|
||||
"element normal.active" = {
|
||||
background-color = mkLiteral "inherit";
|
||||
text-color = mkLiteral "@text-color";
|
||||
};
|
||||
"element selected.normal" = {
|
||||
background-color = mkLiteral "@selected";
|
||||
text-color = mkLiteral "@foreground";
|
||||
};
|
||||
"element selected.urgent" = {
|
||||
background-color = mkLiteral "@urgent";
|
||||
text-color = mkLiteral "@text-selected";
|
||||
};
|
||||
"element selected.active" = {
|
||||
background-color = mkLiteral "@urgent";
|
||||
text-color = mkLiteral "@text-selected";
|
||||
};
|
||||
"element-icon" = {
|
||||
background-color = mkLiteral "transparent";
|
||||
text-color = mkLiteral "inherit";
|
||||
size = mkLiteral "36px";
|
||||
cursor = mkLiteral "inherit";
|
||||
};
|
||||
"element-text" = {
|
||||
background-color = mkLiteral "transparent";
|
||||
text-color = mkLiteral "inherit";
|
||||
cursor = mkLiteral "inherit";
|
||||
vertical-align = mkLiteral "0.5";
|
||||
horizontal-align = mkLiteral "0.0";
|
||||
};
|
||||
"message" = {
|
||||
background-color = mkLiteral "transparent";
|
||||
};
|
||||
"textbox" = {
|
||||
padding = mkLiteral "15px";
|
||||
border-radius = mkLiteral "10px";
|
||||
background-color = mkLiteral "@bg-alt";
|
||||
text-color = mkLiteral "@foreground";
|
||||
vertical-align = mkLiteral "0.5";
|
||||
horizontal-align = mkLiteral "0.0";
|
||||
};
|
||||
"error-message" = {
|
||||
padding = mkLiteral "15px";
|
||||
border-radius = mkLiteral "20px";
|
||||
background-color = mkLiteral "@bg";
|
||||
text-color = mkLiteral "@foreground";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
13
modules/home/scripts/default.nix
Normal file
13
modules/home/scripts/default.nix
Normal file
|
@ -0,0 +1,13 @@
|
|||
{ pkgs, username, ... }:
|
||||
|
||||
{
|
||||
home.packages = [
|
||||
(import ./keybinds.nix { inherit pkgs; })
|
||||
(import ./rofi-launcher.nix { inherit pkgs; })
|
||||
(import ./screenshotit.nix { inherit pkgs; })
|
||||
(import ./volumeup.nix { inherit pkgs; })
|
||||
(import ./volumedown.nix { inherit pkgs; })
|
||||
(import ./volumemute.nix { inherit pkgs; })
|
||||
(import ./nvidia-offload.nix { inherit pkgs; })
|
||||
];
|
||||
}
|
18
modules/home/scripts/keybinds.nix
Normal file
18
modules/home/scripts/keybinds.nix
Normal file
|
@ -0,0 +1,18 @@
|
|||
{ pkgs }:
|
||||
|
||||
pkgs.writeShellScriptBin "list-keybinds" ''
|
||||
# check if rofi is already running
|
||||
if pidof rofi > /dev/null; then
|
||||
pkill rofi
|
||||
fi
|
||||
|
||||
msg='☣️ NOTE ☣️: Clicking with Mouse or Pressing ENTER will have NO function'
|
||||
keybinds=$(cat ~/.config/hypr/hyprland.conf | grep -E '^bind')
|
||||
|
||||
# replace #modifier with SUPER in the displayed keybinds for rofi
|
||||
display_keybinds=$(echo "$keybinds" | sed 's/\$modifier/SUPER/g')
|
||||
|
||||
# use rofi to display the keybinds with the modified content
|
||||
echo "$display_keybinds" | rofi -dmenu -i -config ~/.config/rofi/config-long.rasi -mesg "$msg"
|
||||
|
||||
''
|
9
modules/home/scripts/nvidia-offload.nix
Normal file
9
modules/home/scripts/nvidia-offload.nix
Normal file
|
@ -0,0 +1,9 @@
|
|||
{ pkgs }:
|
||||
|
||||
pkgs.writeShellScriptBin "nvidia-offload" ''
|
||||
export __NV_PRIME_RENDER_OFFLOAD=1
|
||||
export __NV_PRIME_RENDER_OFFLOAD_PROVIDER=NVIDIA-GO
|
||||
export __GLX_VENDOR_LIBRARY_NAME=nvidia
|
||||
export __VK_LAYER_NV_optimus=NVIDIA_only
|
||||
exec "$@"
|
||||
''
|
10
modules/home/scripts/rofi-launcher.nix
Normal file
10
modules/home/scripts/rofi-launcher.nix
Normal file
|
@ -0,0 +1,10 @@
|
|||
{ pkgs }:
|
||||
|
||||
pkgs.writeShellScriptBin "rofi-launcher" ''
|
||||
# check if rofi is already running
|
||||
if pidof rofi > /dev/null; then
|
||||
pkill rofi
|
||||
fi
|
||||
rofi -show drun
|
||||
''
|
||||
|
5
modules/home/scripts/screenshotit.nix
Normal file
5
modules/home/scripts/screenshotit.nix
Normal file
|
@ -0,0 +1,5 @@
|
|||
{ pkgs }:
|
||||
|
||||
pkgs.writeShellScriptBin "screenshotit" ''
|
||||
grim -g "$(slurp)" - | swappy -f -
|
||||
''
|
6
modules/home/scripts/volumedown.nix
Normal file
6
modules/home/scripts/volumedown.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
{ pkgs }:
|
||||
|
||||
pkgs.writeShellScriptBin "volumedown" ''
|
||||
wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-
|
||||
notify-send -t 1250 "$(wpctl get-volume @DEFAULT_AUDIO_SINK@)"
|
||||
''
|
6
modules/home/scripts/volumemute.nix
Normal file
6
modules/home/scripts/volumemute.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
{ pkgs }:
|
||||
|
||||
pkgs.writeShellScriptBin "volumemute" ''
|
||||
wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle
|
||||
notify-send -t 1250 "$(wpctl get-volume @DEFAULT_AUDIO_SINK@)"
|
||||
''
|
6
modules/home/scripts/volumeup.nix
Normal file
6
modules/home/scripts/volumeup.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
{ pkgs }:
|
||||
|
||||
pkgs.writeShellScriptBin "volumeup" ''
|
||||
wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+
|
||||
notify-send -t 1250 "$(wpctl get-volume @DEFAULT_AUDIO_SINK@)"
|
||||
''
|
8
modules/home/starship.nix
Normal file
8
modules/home/starship.nix
Normal file
|
@ -0,0 +1,8 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
programs.starship = {
|
||||
enable = false;
|
||||
package = pkgs.starship;
|
||||
};
|
||||
}
|
12
modules/home/stylix.nix
Normal file
12
modules/home/stylix.nix
Normal file
|
@ -0,0 +1,12 @@
|
|||
_:
|
||||
|
||||
{
|
||||
stylix.targets = {
|
||||
waybar.enable = false;
|
||||
rofi.enable = false;
|
||||
hyprland.enable = false;
|
||||
hyprlock.enable = false;
|
||||
kitty.enable = true;
|
||||
qt.enable = true;
|
||||
};
|
||||
}
|
19
modules/home/swappy.nix
Normal file
19
modules/home/swappy.nix
Normal file
|
@ -0,0 +1,19 @@
|
|||
{ username, ... }:
|
||||
|
||||
{
|
||||
home.file = {
|
||||
".config/swappy/config".text = ''
|
||||
[Default]
|
||||
save_dir=/home/${username}/Pictures/Screenshots
|
||||
save_filename_format=swappy-%Y%m%d-%H%M%S.png
|
||||
show_panel=false
|
||||
line_size=5
|
||||
text_size=20
|
||||
text_font=Ubuntu
|
||||
paint_mode=brush
|
||||
early_exit=true
|
||||
fill_shape=false
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
270
modules/home/waybar/waybar-curved.nix
Normal file
270
modules/home/waybar/waybar-curved.nix
Normal file
|
@ -0,0 +1,270 @@
|
|||
{ pkgs, lib, host, config, ... }:
|
||||
let
|
||||
betterTransition = "all 0.3s cubic-bezier(.55,-0.68,.48,1.682)";
|
||||
in
|
||||
with lib; {
|
||||
# Configure & Theme Waybar
|
||||
programs.waybar = {
|
||||
enable = true;
|
||||
package = pkgs.waybar;
|
||||
settings = [
|
||||
{
|
||||
layer = "top";
|
||||
position = "top";
|
||||
modules-center = ["hyprland/workspaces"];
|
||||
modules-left = [
|
||||
"custom/startmenu"
|
||||
"hyprland/window"
|
||||
"pulseaudio"
|
||||
"cpu"
|
||||
"memory"
|
||||
"idle_inhibitor"
|
||||
];
|
||||
modules-right = [
|
||||
"custom/hyprbindings"
|
||||
"custom/notification"
|
||||
"custom/exit"
|
||||
"battery"
|
||||
"tray"
|
||||
"clock"
|
||||
];
|
||||
|
||||
"hyprland/workspaces" = {
|
||||
format = "{name}";
|
||||
format-icons = {
|
||||
default = " ";
|
||||
active = " ";
|
||||
urgent = " ";
|
||||
};
|
||||
on-scroll-up = "hyprctl dispatch workspace e+1";
|
||||
on-scroll-down = "hyprctl dispatch workspace e-1";
|
||||
};
|
||||
"clock" = {
|
||||
format = '' {:L%H:%M}'';
|
||||
tooltip = true;
|
||||
tooltip-format = "<big>{:%A, %d.%B %Y }</big>\n<tt><small>{calendar}</small></tt>";
|
||||
};
|
||||
"hyprland/window" = {
|
||||
max-length = 22;
|
||||
separate-outputs = false;
|
||||
rewrite = {
|
||||
"" = " 🙈 No Windows? ";
|
||||
};
|
||||
};
|
||||
"memory" = {
|
||||
interval = 5;
|
||||
format = " {}%";
|
||||
tooltip = true;
|
||||
};
|
||||
"cpu" = {
|
||||
interval = 5;
|
||||
format = " {usage:2}%";
|
||||
tooltip = true;
|
||||
};
|
||||
"disk" = {
|
||||
format = " {free}";
|
||||
tooltip = true;
|
||||
};
|
||||
"network" = {
|
||||
format-icons = [
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
];
|
||||
format-ethernet = " {bandwidthDownOctets}";
|
||||
format-wifi = "{icon} {signalStrength}%";
|
||||
format-disconnected = "";
|
||||
tooltip = false;
|
||||
};
|
||||
"tray" = {
|
||||
spacing = 12;
|
||||
};
|
||||
"pulseaudio" = {
|
||||
format = "{icon} {volume}% {format_source}";
|
||||
format-bluetooth = "{volume}% {icon} {format_source}";
|
||||
format-bluetooth-muted = " {icon} {format_source}";
|
||||
format-muted = " {format_source}";
|
||||
format-source = " {volume}%";
|
||||
format-source-muted = "";
|
||||
format-icons = {
|
||||
headphone = "";
|
||||
hands-free = "";
|
||||
headset = "";
|
||||
phone = "";
|
||||
portable = "";
|
||||
car = "";
|
||||
default = [
|
||||
""
|
||||
""
|
||||
""
|
||||
];
|
||||
};
|
||||
on-click = "sleep 0.1 && pavucontrol";
|
||||
};
|
||||
"custom/exit" = {
|
||||
tooltip = false;
|
||||
format = "";
|
||||
on-click = "sleep 0.1 && wlogout";
|
||||
};
|
||||
"custom/startmenu" = {
|
||||
tooltip = false;
|
||||
format = "";
|
||||
# exec = "rofi -show drun";
|
||||
on-click = "sleep 0.1 && rofi-launcher";
|
||||
};
|
||||
"custom/hyprbindings" = {
|
||||
tooltip = false;
|
||||
format = "";
|
||||
on-click = "sleep 0.1 && list-keybinds";
|
||||
};
|
||||
"idle_inhibitor" = {
|
||||
format = "{icon}";
|
||||
format-icons = {
|
||||
activated = "";
|
||||
deactivated = "";
|
||||
};
|
||||
tooltip = "true";
|
||||
};
|
||||
"custom/notification" = {
|
||||
tooltip = false;
|
||||
format = "{icon} {}";
|
||||
format-icons = {
|
||||
notification = "<span foreground='red'><sup></sup></span>";
|
||||
none = "";
|
||||
dnd-notification = "<span foreground='red'><sup></sup></span>";
|
||||
dnd-none = "";
|
||||
inhibited-notification = "<span foreground='red'><sup></sup></span>";
|
||||
inhibited-none = "";
|
||||
dnd-inhibited-notification = "<span foreground='red'><sup></sup></span>";
|
||||
dnd-inhibited-none = "";
|
||||
};
|
||||
return-type = "json";
|
||||
exec-if = "which swaync-client";
|
||||
exec = "swaync-client -swb";
|
||||
on-click = "sleep 0.1 && task-waybar";
|
||||
escape = true;
|
||||
};
|
||||
"battery" = {
|
||||
states = {
|
||||
warning = 30;
|
||||
critical = 15;
|
||||
};
|
||||
format = "{icon} {capacity}%";
|
||||
format-charging = " {capacity}%";
|
||||
format-plugged = " {capacity}%";
|
||||
format-icons = [
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
];
|
||||
on-click = "";
|
||||
tooltip = false;
|
||||
};
|
||||
}
|
||||
];
|
||||
style = concatStrings [
|
||||
''
|
||||
* {
|
||||
font-family: JetBrainsMono Nerd Font Mono;
|
||||
font-size: 16px;
|
||||
border-radius: 0px;
|
||||
border: none;
|
||||
min-height: 0px;
|
||||
}
|
||||
window#waybar {
|
||||
background: rgba(0,0,0,0);
|
||||
}
|
||||
#workspaces {
|
||||
color: #${config.lib.stylix.colors.base00};
|
||||
background: #${config.lib.stylix.colors.base01};
|
||||
margin: 4px 4px;
|
||||
padding: 5px 5px;
|
||||
border-radius: 16px;
|
||||
}
|
||||
#workspaces button {
|
||||
font-weight: bold;
|
||||
padding: 0px 5px;
|
||||
margin: 0px 3px;
|
||||
border-radius: 16px;
|
||||
color: #${config.lib.stylix.colors.base00};
|
||||
background: linear-gradient(45deg, #${config.lib.stylix.colors.base08}, #${config.lib.stylix.colors.base0D});
|
||||
opacity: 0.5;
|
||||
transition: ${betterTransition};
|
||||
}
|
||||
#workspaces button.active {
|
||||
font-weight: bold;
|
||||
padding: 0px 5px;
|
||||
margin: 0px 3px;
|
||||
border-radius: 16px;
|
||||
color: #${config.lib.stylix.colors.base00};
|
||||
background: linear-gradient(45deg, #${config.lib.stylix.colors.base08}, #${config.lib.stylix.colors.base0D});
|
||||
transition: ${betterTransition};
|
||||
opacity: 1.0;
|
||||
min-width: 40px;
|
||||
}
|
||||
#workspaces button:hover {
|
||||
font-weight: bold;
|
||||
border-radius: 16px;
|
||||
color: #${config.lib.stylix.colors.base00};
|
||||
background: linear-gradient(45deg, #${config.lib.stylix.colors.base08}, #${config.lib.stylix.colors.base0D});
|
||||
opacity: 0.8;
|
||||
transition: ${betterTransition};
|
||||
}
|
||||
tooltip {
|
||||
background: #${config.lib.stylix.colors.base00};
|
||||
border: 1px solid #${config.lib.stylix.colors.base08};
|
||||
border-radius: 12px;
|
||||
}
|
||||
tooltip label {
|
||||
color: #${config.lib.stylix.colors.base08};
|
||||
}
|
||||
#window, #pulseaudio, #cpu, #memory, #idle_inhibitor {
|
||||
font-weight: bold;
|
||||
margin: 4px 0px;
|
||||
margin-left: 7px;
|
||||
padding: 0px 18px;
|
||||
background: #${config.lib.stylix.colors.base04};
|
||||
color: #${config.lib.stylix.colors.base00};
|
||||
border-radius: 24px 10px 24px 10px;
|
||||
}
|
||||
#custom-startmenu {
|
||||
color: #${config.lib.stylix.colors.base0B};
|
||||
background: #${config.lib.stylix.colors.base02};
|
||||
font-size: 28px;
|
||||
margin: 0px;
|
||||
padding: 0px 30px 0px 15px;
|
||||
border-radius: 0px 0px 40px 0px;
|
||||
}
|
||||
#custom-hyprbindings, #network, #battery,
|
||||
#custom-notification, #tray, #custom-exit {
|
||||
font-weight: bold;
|
||||
background: #${config.lib.stylix.colors.base0F};
|
||||
color: #${config.lib.stylix.colors.base00};
|
||||
margin: 4px 0px;
|
||||
margin-right: 7px;
|
||||
border-radius: 10px 24px 10px 24px;
|
||||
padding: 0px 18px;
|
||||
}
|
||||
#clock {
|
||||
font-weight: bold;
|
||||
color: #0D0E15;
|
||||
background: linear-gradient(90deg, #${config.lib.stylix.colors.base0E}, #${config.lib.stylix.colors.base0C});
|
||||
margin: 0px;
|
||||
padding: 0px 15px 0px 30px;
|
||||
border-radius: 0px 0px 0px 40px;
|
||||
}
|
||||
''
|
||||
];
|
||||
};
|
||||
}
|
||||
|
||||
|
274
modules/home/waybar/waybar-ddubs.nix
Normal file
274
modules/home/waybar/waybar-ddubs.nix
Normal file
|
@ -0,0 +1,274 @@
|
|||
{ pkgs, lib, host, config, ... }:
|
||||
let
|
||||
betterTransition = "all 0.3s cubic-bezier(.55,-0.68,.48,1.682)";
|
||||
in
|
||||
with lib; {
|
||||
# Configure & Theme Waybar
|
||||
programs.waybar = {
|
||||
enable = true;
|
||||
package = pkgs.waybar;
|
||||
settings = [
|
||||
{
|
||||
layer = "top";
|
||||
position = "top";
|
||||
modules-center = ["hyprland/workspaces"];
|
||||
modules-left = [
|
||||
"custom/startmenu"
|
||||
"hyprland/window"
|
||||
"pulseaudio"
|
||||
"cpu"
|
||||
"memory"
|
||||
"idle_inhibitor"
|
||||
];
|
||||
modules-right = [
|
||||
"custom/hyprbindings"
|
||||
"custom/notification"
|
||||
"custom/exit"
|
||||
"battery"
|
||||
"tray"
|
||||
"clock"
|
||||
];
|
||||
|
||||
"hyprland/workspaces" = {
|
||||
format = "{name}";
|
||||
format-icons = {
|
||||
default = " ";
|
||||
active = " ";
|
||||
urgent = " ";
|
||||
};
|
||||
on-scroll-up = "hyprctl dispatch workspace e+1";
|
||||
on-scroll-down = "hyprctl dispatch workspace e-1";
|
||||
};
|
||||
"clock" = {
|
||||
format = '' {:L%H:%M}'';
|
||||
tooltip = true;
|
||||
tooltip-format = "<big>{:%A, %d.%B %Y }</big>\n<tt><small>{calendar}</small></tt>";
|
||||
};
|
||||
"hyprland/window" = {
|
||||
max-length = 22;
|
||||
separate-outputs = false;
|
||||
rewrite = {
|
||||
"" = " 🙈 No Windows? ";
|
||||
};
|
||||
};
|
||||
"memory" = {
|
||||
interval = 5;
|
||||
format = " {}%";
|
||||
tooltip = true;
|
||||
};
|
||||
"cpu" = {
|
||||
interval = 5;
|
||||
format = " {usage:2}%";
|
||||
tooltip = true;
|
||||
};
|
||||
"disk" = {
|
||||
format = " {free}";
|
||||
tooltip = true;
|
||||
};
|
||||
"network" = {
|
||||
format-icons = [
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
];
|
||||
format-ethernet = " {bandwidthDownOctets}";
|
||||
format-wifi = "{icon} {signalStrength}%";
|
||||
format-disconnected = "";
|
||||
tooltip = false;
|
||||
};
|
||||
"tray" = {
|
||||
spacing = 12;
|
||||
};
|
||||
"pulseaudio" = {
|
||||
format = "{icon} {volume}% {format_source}";
|
||||
format-bluetooth = "{volume}% {icon} {format_source}";
|
||||
format-bluetooth-muted = " {icon} {format_source}";
|
||||
format-muted = " {format_source}";
|
||||
format-source = " {volume}%";
|
||||
format-source-muted = "";
|
||||
format-icons = {
|
||||
headphone = "";
|
||||
hands-free = "";
|
||||
headset = "";
|
||||
phone = "";
|
||||
portable = "";
|
||||
car = "";
|
||||
default = [
|
||||
""
|
||||
""
|
||||
""
|
||||
];
|
||||
};
|
||||
on-click = "sleep 0.1 && pavucontrol";
|
||||
};
|
||||
"custom/exit" = {
|
||||
tooltip = false;
|
||||
format = "";
|
||||
on-click = "sleep 0.1 && wlogout";
|
||||
};
|
||||
"custom/startmenu" = {
|
||||
tooltip = false;
|
||||
format = "";
|
||||
# exec = "rofi -show drun";
|
||||
#on-click = "sleep 0.1 && rofi-launcher";
|
||||
on-click = "sleep 0.1 && nwg-drawer -mb 200 -mt 200 -mr 200 -ml 200";
|
||||
};
|
||||
"custom/hyprbindings" = {
|
||||
tooltip = false;
|
||||
format = "";
|
||||
on-click = "sleep 0.1 && list-keybinds";
|
||||
};
|
||||
"idle_inhibitor" = {
|
||||
format = "{icon}";
|
||||
format-icons = {
|
||||
activated = "";
|
||||
deactivated = "";
|
||||
};
|
||||
tooltip = "true";
|
||||
};
|
||||
"custom/notification" = {
|
||||
tooltip = false;
|
||||
format = "{icon} {}";
|
||||
format-icons = {
|
||||
notification = "<span foreground='red'><sup></sup></span>";
|
||||
none = "";
|
||||
dnd-notification = "<span foreground='red'><sup></sup></span>";
|
||||
dnd-none = "";
|
||||
inhibited-notification = "<span foreground='red'><sup></sup></span>";
|
||||
inhibited-none = "";
|
||||
dnd-inhibited-notification = "<span foreground='red'><sup></sup></span>";
|
||||
dnd-inhibited-none = "";
|
||||
};
|
||||
return-type = "json";
|
||||
exec-if = "which swaync-client";
|
||||
exec = "swaync-client -swb";
|
||||
on-click = "sleep 0.1 && task-waybar";
|
||||
escape = true;
|
||||
};
|
||||
"battery" = {
|
||||
states = {
|
||||
warning = 30;
|
||||
critical = 15;
|
||||
};
|
||||
format = "{icon} {capacity}%";
|
||||
format-charging = " {capacity}%";
|
||||
format-plugged = " {capacity}%";
|
||||
format-icons = [
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
];
|
||||
on-click = "";
|
||||
tooltip = false;
|
||||
};
|
||||
}
|
||||
];
|
||||
style = concatStrings [
|
||||
''
|
||||
* {
|
||||
font-family: JetBrainsMono Nerd Font Mono;
|
||||
font-size: 18px;
|
||||
border-radius: 0px;
|
||||
border: none;
|
||||
min-height: 0px;
|
||||
}
|
||||
window#waybar {
|
||||
background: rgba(0,0,0,0);
|
||||
}
|
||||
#workspaces {
|
||||
color: #${config.lib.stylix.colors.base00};
|
||||
background: #${config.lib.stylix.colors.base01};
|
||||
margin: 4px 4px;
|
||||
padding: 5px 5px;
|
||||
border-radius: 16px;
|
||||
}
|
||||
#workspaces button {
|
||||
font-weight: bold;
|
||||
padding: 0px 5px;
|
||||
margin: 0px 3px;
|
||||
border-radius: 16px;
|
||||
color: #${config.lib.stylix.colors.base00};
|
||||
background: linear-gradient(45deg, #${config.lib.stylix.colors.base08}, #${config.lib.stylix.colors.base0D});
|
||||
opacity: 0.5;
|
||||
transition: ${betterTransition};
|
||||
}
|
||||
#workspaces button.active {
|
||||
font-weight: bold;
|
||||
padding: 0px 5px;
|
||||
margin: 0px 3px;
|
||||
border-radius: 16px;
|
||||
color: #${config.lib.stylix.colors.base00};
|
||||
background: linear-gradient(45deg, #${config.lib.stylix.colors.base08}, #${config.lib.stylix.colors.base0D});
|
||||
transition: ${betterTransition};
|
||||
opacity: 1.0;
|
||||
min-width: 40px;
|
||||
}
|
||||
#workspaces button:hover {
|
||||
font-weight: bold;
|
||||
border-radius: 16px;
|
||||
color: #${config.lib.stylix.colors.base00};
|
||||
background: linear-gradient(45deg, #${config.lib.stylix.colors.base08}, #${config.lib.stylix.colors.base0D});
|
||||
opacity: 0.8;
|
||||
transition: ${betterTransition};
|
||||
}
|
||||
tooltip {
|
||||
background: #${config.lib.stylix.colors.base00};
|
||||
border: 1px solid #${config.lib.stylix.colors.base08};
|
||||
border-radius: 12px;
|
||||
}
|
||||
tooltip label {
|
||||
color: #${config.lib.stylix.colors.base08};
|
||||
}
|
||||
#window, #pulseaudio, #cpu, #memory, #idle_inhibitor {
|
||||
font-weight: bold;
|
||||
margin: 4px 0px;
|
||||
margin-left: 7px;
|
||||
padding: 0px 18px;
|
||||
background: #${config.lib.stylix.colors.base00};
|
||||
color: #${config.lib.stylix.colors.base08};
|
||||
border-radius: 8px 8px 8px 8px;
|
||||
}
|
||||
#idle_inhibitor {
|
||||
font-size: 28px;
|
||||
}
|
||||
#custom-startmenu {
|
||||
color: #${config.lib.stylix.colors.base0B};
|
||||
background: #${config.lib.stylix.colors.base02};
|
||||
font-size: 22px;
|
||||
margin: 0px;
|
||||
padding: 0px 5px 0px 5px;
|
||||
border-radius: 16px 16px 16px 16px;
|
||||
}
|
||||
#custom-hyprbindings, #network, #battery,
|
||||
#custom-notification, #tray, #custom-exit {
|
||||
/* font-weight: bold; */
|
||||
font-size: 20px;
|
||||
background: #${config.lib.stylix.colors.base00};
|
||||
color: #${config.lib.stylix.colors.base08};
|
||||
margin: 4px 0px;
|
||||
margin-right: 7px;
|
||||
border-radius: 8px 8px 8px 8px;
|
||||
padding: 0px 18px;
|
||||
}
|
||||
#clock {
|
||||
font-weight: bold;
|
||||
font-size: 16px;
|
||||
color: #0D0E15;
|
||||
background: linear-gradient(90deg, #${config.lib.stylix.colors.base0B}, #${config.lib.stylix.colors.base02});
|
||||
margin: 0px;
|
||||
padding: 0px 5px 0px 5px;
|
||||
border-radius: 16px 16px 16px 16px;
|
||||
}
|
||||
''
|
||||
];
|
||||
};
|
||||
}
|
294
modules/home/waybar/waybar-simple.nix
Normal file
294
modules/home/waybar/waybar-simple.nix
Normal file
|
@ -0,0 +1,294 @@
|
|||
{ pkgs, lib, host, config, ... }:
|
||||
|
||||
with lib; {
|
||||
# Configure & Theme Waybar
|
||||
programs.waybar = {
|
||||
enable = true;
|
||||
package = pkgs.waybar;
|
||||
settings = [
|
||||
{
|
||||
layer = "top";
|
||||
position = "top";
|
||||
modules-center = ["hyprland/workspaces"];
|
||||
modules-left = [
|
||||
"custom/startmenu"
|
||||
"custom/arrow6"
|
||||
"pulseaudio"
|
||||
"cpu"
|
||||
"memory"
|
||||
"idle_inhibitor"
|
||||
"custom/arrow7"
|
||||
"hyprland/window"
|
||||
];
|
||||
modules-right = [
|
||||
"custom/arrow4"
|
||||
"custom/hyprbindings"
|
||||
"custom/arrow3"
|
||||
"custom/notification"
|
||||
"custom/arrow3"
|
||||
"custom/exit"
|
||||
"battery"
|
||||
"custom/arrow2"
|
||||
"tray"
|
||||
"custom/arrow1"
|
||||
"clock"
|
||||
];
|
||||
|
||||
"hyprland/workspaces" = {
|
||||
format = "{name}";
|
||||
format-icons = {
|
||||
default = " ";
|
||||
active = " ";
|
||||
urgent = " ";
|
||||
};
|
||||
on-scroll-up = "hyprctl dispatch workspace e+1";
|
||||
on-scroll-down = "hyprctl dispatch workspace e-1";
|
||||
};
|
||||
"clock" = {
|
||||
format = '' {:L%H:%M}'';
|
||||
tooltip = true;
|
||||
tooltip-format = "<big>{:%A, %d.%B %Y }</big>\n<tt><small>{calendar}</small></tt>";
|
||||
};
|
||||
"hyprland/window" = {
|
||||
max-length = 22;
|
||||
separate-outputs = false;
|
||||
};
|
||||
"memory" = {
|
||||
interval = 5;
|
||||
format = " {}%";
|
||||
tooltip = true;
|
||||
};
|
||||
"cpu" = {
|
||||
interval = 5;
|
||||
format = " {usage:2}%";
|
||||
tooltip = true;
|
||||
};
|
||||
"disk" = {
|
||||
format = " {free}";
|
||||
tooltip = true;
|
||||
};
|
||||
"network" = {
|
||||
format-icons = [
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
];
|
||||
format-ethernet = " {bandwidthDownOctets}";
|
||||
format-wifi = "{icon} {signalStrength}%";
|
||||
format-disconnected = "";
|
||||
tooltip = false;
|
||||
};
|
||||
"tray" = {
|
||||
spacing = 12;
|
||||
};
|
||||
"pulseaudio" = {
|
||||
format = "{icon} {volume}% {format_source}";
|
||||
format-bluetooth = "{volume}% {icon} {format_source}";
|
||||
format-bluetooth-muted = " {icon} {format_source}";
|
||||
format-muted = " {format_source}";
|
||||
format-source = " {volume}%";
|
||||
format-source-muted = "";
|
||||
format-icons = {
|
||||
headphone = "";
|
||||
hands-free = "";
|
||||
headset = "";
|
||||
phone = "";
|
||||
portable = "";
|
||||
car = "";
|
||||
default = [
|
||||
""
|
||||
""
|
||||
""
|
||||
];
|
||||
};
|
||||
on-click = "sleep 0.1 && pavucontrol";
|
||||
};
|
||||
"custom/exit" = {
|
||||
tooltip = false;
|
||||
format = "";
|
||||
on-click = "sleep 0.1 && wlogout";
|
||||
};
|
||||
"custom/startmenu" = {
|
||||
tooltip = false;
|
||||
format = "";
|
||||
on-click = "sleep 0.1 && rofi-launcher";
|
||||
};
|
||||
"custom/hyprbindings" = {
|
||||
tooltip = false;
|
||||
format = "";
|
||||
on-click = "sleep 0.1 && list-keybinds";
|
||||
};
|
||||
"idle_inhibitor" = {
|
||||
format = "{icon}";
|
||||
format-icons = {
|
||||
activated = "";
|
||||
deactivated = "";
|
||||
};
|
||||
tooltip = "true";
|
||||
};
|
||||
"custom/notification" = {
|
||||
tooltip = false;
|
||||
format = "{icon} {}";
|
||||
format-icons = {
|
||||
notification = "<span foreground='red'><sup></sup></span>";
|
||||
none = "";
|
||||
dnd-notification = "<span foreground='red'><sup></sup></span>";
|
||||
dnd-none = "";
|
||||
inhibited-notification = "<span foreground='red'><sup></sup></span>";
|
||||
inhibited-none = "";
|
||||
dnd-inhibited-notification = "<span foreground='red'><sup></sup></span>";
|
||||
dnd-inhibited-none = "";
|
||||
};
|
||||
return-type = "json";
|
||||
exec-if = "which swaync-client";
|
||||
exec = "swaync-client -swb";
|
||||
on-click = "sleep 0.1 && task-waybar";
|
||||
escape = true;
|
||||
};
|
||||
"battery" = {
|
||||
states = {
|
||||
warning = 30;
|
||||
critical = 15;
|
||||
};
|
||||
format = "{icon} {capacity}%";
|
||||
format-charging = " {capacity}%";
|
||||
format-plugged = " {capacity}%";
|
||||
format-icons = [
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
];
|
||||
on-click = "";
|
||||
tooltip = false;
|
||||
};
|
||||
"custom/arrow1" = {
|
||||
format = "";
|
||||
};
|
||||
"custom/arrow2" = {
|
||||
format = "";
|
||||
};
|
||||
"custom/arrow3" = {
|
||||
format = "";
|
||||
};
|
||||
"custom/arrow4" = {
|
||||
format = "";
|
||||
};
|
||||
"custom/arrow5" = {
|
||||
format = "";
|
||||
};
|
||||
"custom/arrow6" = {
|
||||
format = "";
|
||||
};
|
||||
"custom/arrow7" = {
|
||||
format = "";
|
||||
};
|
||||
}
|
||||
];
|
||||
style = concatStrings [
|
||||
''
|
||||
* {
|
||||
font-family: JetBrainsMono Nerd Font Mono;
|
||||
font-size: 14px;
|
||||
border-radius: 0px;
|
||||
border: none;
|
||||
min-height: 0px;
|
||||
}
|
||||
window#waybar {
|
||||
background: #${config.lib.stylix.colors.base00};
|
||||
color: #${config.lib.stylix.colors.base05};
|
||||
}
|
||||
#workspaces button {
|
||||
padding: 0px 5px;
|
||||
background: transparent;
|
||||
color: #${config.lib.stylix.colors.base04};
|
||||
}
|
||||
#workspaces button.active {
|
||||
color: #${config.lib.stylix.colors.base08};
|
||||
}
|
||||
#workspaces button:hover {
|
||||
color: #${config.lib.stylix.colors.base08};
|
||||
}
|
||||
tooltip {
|
||||
background: #${config.lib.stylix.colors.base00};
|
||||
border: 1px solid #${config.lib.stylix.colors.base05};
|
||||
border-radius: 12px;
|
||||
}
|
||||
tooltip label {
|
||||
color: #${config.lib.stylix.colors.base05};
|
||||
}
|
||||
#window {
|
||||
padding: 0px 10px;
|
||||
}
|
||||
#pulseaudio, #cpu, #memory, #idle_inhibitor {
|
||||
padding: 0px 10px;
|
||||
background: #${config.lib.stylix.colors.base04};
|
||||
color: #${config.lib.stylix.colors.base00};
|
||||
}
|
||||
#custom-startmenu {
|
||||
color: #${config.lib.stylix.colors.base02};
|
||||
padding: 0px 14px;
|
||||
font-size: 20px;
|
||||
background: #${config.lib.stylix.colors.base0B};
|
||||
}
|
||||
#custom-hyprbindings, #network, #battery,
|
||||
#custom-notification, #custom-exit {
|
||||
background: #${config.lib.stylix.colors.base0F};
|
||||
color: #${config.lib.stylix.colors.base00};
|
||||
padding: 0px 10px;
|
||||
}
|
||||
#tray {
|
||||
background: #${config.lib.stylix.colors.base02};
|
||||
color: #${config.lib.stylix.colors.base00};
|
||||
padding: 0px 10px;
|
||||
}
|
||||
#clock {
|
||||
font-weight: bold;
|
||||
padding: 0px 10px;
|
||||
color: #${config.lib.stylix.colors.base00};
|
||||
background: #${config.lib.stylix.colors.base0E};
|
||||
}
|
||||
#custom-arrow1 {
|
||||
font-size: 24px;
|
||||
color: #${config.lib.stylix.colors.base0E};
|
||||
background: #${config.lib.stylix.colors.base02};
|
||||
}
|
||||
#custom-arrow2 {
|
||||
font-size: 24px;
|
||||
color: #${config.lib.stylix.colors.base02};
|
||||
background: #${config.lib.stylix.colors.base0F};
|
||||
}
|
||||
#custom-arrow3 {
|
||||
font-size: 24px;
|
||||
color: #${config.lib.stylix.colors.base00};
|
||||
background: #${config.lib.stylix.colors.base0F};
|
||||
}
|
||||
#custom-arrow4 {
|
||||
font-size: 24px;
|
||||
color: #${config.lib.stylix.colors.base0F};
|
||||
background: transparent;
|
||||
}
|
||||
#custom-arrow6 {
|
||||
font-size: 24px;
|
||||
color: #${config.lib.stylix.colors.base0B};
|
||||
background: #${config.lib.stylix.colors.base04};
|
||||
}
|
||||
#custom-arrow7 {
|
||||
font-size: 24px;
|
||||
color: #${config.lib.stylix.colors.base04};
|
||||
background: transparent;
|
||||
}
|
||||
''
|
||||
];
|
||||
};
|
||||
}
|
||||
|
||||
|
108
modules/home/wlogout/default.nix
Normal file
108
modules/home/wlogout/default.nix
Normal file
|
@ -0,0 +1,108 @@
|
|||
{ config, ... }:
|
||||
|
||||
{
|
||||
programs.wlogout = {
|
||||
enable = true;
|
||||
layout = [
|
||||
{
|
||||
label = "shutdown";
|
||||
action = "sleep 1; systemctl poweroff";
|
||||
text = "Shutdown";
|
||||
keybind = "s";
|
||||
}
|
||||
{
|
||||
"label" = "reboot";
|
||||
"action" = "sleep 1; systemctl reboot";
|
||||
"text" = "Reboot";
|
||||
"keybind" = "r";
|
||||
}
|
||||
{
|
||||
"label" = "logout";
|
||||
"action" = "sleep 1; hyprctl dispatch exit";
|
||||
"text" = "Exit";
|
||||
"keybind" = "e";
|
||||
}
|
||||
{
|
||||
"label" = "suspend";
|
||||
"action" = "sleep 1; systemctl suspend";
|
||||
"text" = "Suspend";
|
||||
"keybind" = "u";
|
||||
}
|
||||
{
|
||||
"label" = "lock";
|
||||
"action" = "sleep 1; hyprlock";
|
||||
"text" = "Lock";
|
||||
"keybind" = "l";
|
||||
}
|
||||
{
|
||||
"label" = "hibernate";
|
||||
"action" = "sleep 1; systemctl hibernate";
|
||||
"text" = "Hibernate";
|
||||
"keybind" = "h";
|
||||
}
|
||||
];
|
||||
style = ''
|
||||
* {
|
||||
font-family: "JetBrainsMono NF", FontAwesome, sans-serif;
|
||||
background-image: none;
|
||||
transition: 20ms;
|
||||
}
|
||||
window {
|
||||
background-color: rgba(12, 12, 12, 0.1);
|
||||
}
|
||||
button {
|
||||
color: #${config.lib.stylix.colors.base05};
|
||||
font-size:20px;
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
background-size: 25%;
|
||||
border-style: solid;
|
||||
background-color: rgba(12, 12, 12, 0.3);
|
||||
border: 3px solid #${config.lib.stylix.colors.base05};
|
||||
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
|
||||
}
|
||||
button:focus,
|
||||
button:active,
|
||||
button:hover {
|
||||
color: #${config.lib.stylix.colors.base0B};
|
||||
background-color: rgba(12, 12, 12, 0.5);
|
||||
border: 3px solid #${config.lib.stylix.colors.base0B};
|
||||
}
|
||||
#logout {
|
||||
margin: 10px;
|
||||
border-radius: 20px;
|
||||
background-image: image(url("icons/logout.png"));
|
||||
}
|
||||
#suspend {
|
||||
margin: 10px;
|
||||
border-radius: 20px;
|
||||
background-image: image(url("icons/suspend.png"));
|
||||
}
|
||||
#shutdown {
|
||||
margin: 10px;
|
||||
border-radius: 20px;
|
||||
background-image: image(url("icons/shutdown.png"));
|
||||
}
|
||||
#reboot {
|
||||
margin: 10px;
|
||||
border-radius: 20px;
|
||||
background-image: image(url("icons/reboot.png"));
|
||||
}
|
||||
#lock {
|
||||
margin: 10px;
|
||||
border-radius: 20px;
|
||||
background-image: image(url("icons/lock.png"));
|
||||
}
|
||||
#hibernate {
|
||||
margin: 10px;
|
||||
border-radius: 20px;
|
||||
background-image: image(url("icons/hibernate.png"));
|
||||
}
|
||||
'';
|
||||
};
|
||||
home.file.".config/wlogout/icons" = {
|
||||
source = ./icons;
|
||||
recursive = true;
|
||||
};
|
||||
}
|
||||
|
BIN
modules/home/wlogout/icons/hibernate.png
Normal file
BIN
modules/home/wlogout/icons/hibernate.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.6 KiB |
BIN
modules/home/wlogout/icons/lock.png
Normal file
BIN
modules/home/wlogout/icons/lock.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.9 KiB |
BIN
modules/home/wlogout/icons/logout.png
Normal file
BIN
modules/home/wlogout/icons/logout.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.6 KiB |
BIN
modules/home/wlogout/icons/reboot.png
Normal file
BIN
modules/home/wlogout/icons/reboot.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.9 KiB |
BIN
modules/home/wlogout/icons/shutdown.png
Normal file
BIN
modules/home/wlogout/icons/shutdown.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4 KiB |
BIN
modules/home/wlogout/icons/suspend.png
Normal file
BIN
modules/home/wlogout/icons/suspend.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.4 KiB |
16
modules/home/xdg.nix
Normal file
16
modules/home/xdg.nix
Normal file
|
@ -0,0 +1,16 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
xdg = {
|
||||
enable = true;
|
||||
mime.enable = true;
|
||||
mimeApps = {
|
||||
enable = true;
|
||||
};
|
||||
portal = {
|
||||
enable = true;
|
||||
extraPortals = with pkgs; [ xdg-desktop-portal-hyprland ];
|
||||
configPackages = with pkgs; [ hyprland ];
|
||||
};
|
||||
};
|
||||
}
|
136
modules/home/zed.nix
Normal file
136
modules/home/zed.nix
Normal file
|
@ -0,0 +1,136 @@
|
|||
{ lib, ... }:
|
||||
|
||||
{
|
||||
programs.zed-editor = {
|
||||
enable = true;
|
||||
extensions = [ "nix" "luau" "toml" "rose-pine-theme" ];
|
||||
|
||||
userSettings = lib.mkForce {
|
||||
telemetry = {
|
||||
diagnostics = false;
|
||||
metrics = false;
|
||||
};
|
||||
|
||||
assistant = {
|
||||
enabled = false;
|
||||
version = "2";
|
||||
};
|
||||
|
||||
features = {
|
||||
inline_completion_provider = "none";
|
||||
copilot = false;
|
||||
};
|
||||
|
||||
project_panel = {
|
||||
dock = "right";
|
||||
};
|
||||
|
||||
inlay_hints = {
|
||||
enabled = true;
|
||||
show_type_hints = false;
|
||||
show_parameter_hints = true;
|
||||
};
|
||||
|
||||
ui_font_size = 16;
|
||||
ui_font_family = "JetBrainsMono Nerd Font";
|
||||
buffer_font_size = 16;
|
||||
buffer_font_family = "JetBrainsMono Nerd Font";
|
||||
|
||||
theme = {
|
||||
mode = "system";
|
||||
light = "One Light";
|
||||
dark = "Rosé Pine";
|
||||
};
|
||||
|
||||
vim_mode = false;
|
||||
base_keymap = "VSCode";
|
||||
|
||||
auto_update = false;
|
||||
hour_format = "hour24";
|
||||
|
||||
terminal = {
|
||||
alternate_scroll = "on";
|
||||
blinking = "terminal_controlled";
|
||||
copy_on_select = false;
|
||||
dock = "bottom";
|
||||
detect_venv = "off";
|
||||
env = {};
|
||||
font_family = null;
|
||||
font_features = null;
|
||||
font_size = null;
|
||||
line_height = "comfortable";
|
||||
option_as_meta = false;
|
||||
button = true;
|
||||
shell = "system";
|
||||
toolbar = {
|
||||
breadcrumbs = true;
|
||||
};
|
||||
working_directory = "current_project_directory";
|
||||
};
|
||||
|
||||
lsp = {
|
||||
rust-analyzer = {
|
||||
binary = {
|
||||
path_lookup = true;
|
||||
};
|
||||
};
|
||||
|
||||
nix = {
|
||||
binary = {
|
||||
path_lookup = true;
|
||||
};
|
||||
};
|
||||
|
||||
luau-lsp = {
|
||||
settings = {
|
||||
luau-lsp = {
|
||||
completion = {
|
||||
autocompleteEnd = true;
|
||||
imports = {
|
||||
enabled = true;
|
||||
separateGroupsWithLine = true;
|
||||
suggestServices = true;
|
||||
suggestRequires = false;
|
||||
};
|
||||
};
|
||||
require = {
|
||||
mode = "relativeToFile";
|
||||
};
|
||||
inlayHints = {
|
||||
parameterNames = "all";
|
||||
};
|
||||
};
|
||||
ext = {
|
||||
roblox = {
|
||||
enabled = false;
|
||||
security_level = "roblox_script";
|
||||
};
|
||||
fflags = {
|
||||
enable_new_solver = true;
|
||||
};
|
||||
binary = {
|
||||
ignore_system_version = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
languages = {
|
||||
Luau = {
|
||||
formatter = {
|
||||
external = {
|
||||
command = "stylua";
|
||||
arguments = [ "--respect-ignores" "-" ];
|
||||
};
|
||||
};
|
||||
format_on_save = "on";
|
||||
};
|
||||
};
|
||||
|
||||
file_types = {
|
||||
Luau = [ "lua" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
52
modules/home/zsh/default.nix
Normal file
52
modules/home/zsh/default.nix
Normal file
|
@ -0,0 +1,52 @@
|
|||
{ profile, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./zshrc-personal.nix
|
||||
];
|
||||
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
autosuggestion.enable = true;
|
||||
syntaxHighlighting.enable = true;
|
||||
|
||||
oh-my-zsh = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
plugins = [
|
||||
{
|
||||
name = "powerlevel10k";
|
||||
src = pkgs.zsh-powerlevel10k;
|
||||
file = "share/zsh-powerlevel10k/powerlevel10k.zsh-theme";
|
||||
}
|
||||
{
|
||||
name = "powerlevel10k-config";
|
||||
src = lib.cleanSource ./p10k-config;
|
||||
file = "p10k.zsh";
|
||||
}
|
||||
];
|
||||
|
||||
initExtra = ''
|
||||
bindkey "\eh" backward-word
|
||||
bindkey "\ej" down-line-or-history
|
||||
bindkey "\ek" up-line-or-history
|
||||
bindkey "\el" forward-word
|
||||
if [ -f $HOME/.zshrc-personal ]; then
|
||||
source $HOME/.zshrc-personal
|
||||
fi
|
||||
'';
|
||||
|
||||
shellAliases = {
|
||||
ncg = "nix-collect-garbage --delete-old && sudo nix-collect-garbage -d && sudo /run/current-system/bin/switch-to-configuration boot";
|
||||
cat = "bat";
|
||||
man = "batman";
|
||||
ls = "eza --icons --group-directories-first -1";
|
||||
ll = "eza --icons -lh --group-directories-first -1 --no-user --long";
|
||||
la = "eza --icons -lah --group-directories-first -1";
|
||||
tree = "eza --icons --tree --group-directories-first";
|
||||
fr = "rm -f ~/.config/mimeapps.list.backup && nh os switch --hostname ${profile}";
|
||||
fu = "nh os switch --hostname ${profile} --update";
|
||||
};
|
||||
};
|
||||
}
|
199
modules/home/zsh/p10k-config/p10k.zsh
Normal file
199
modules/home/zsh/p10k-config/p10k.zsh
Normal file
|
@ -0,0 +1,199 @@
|
|||
# Generated by Powerlevel10k configuration wizard on 2025-03-29 at 00:45 CET.
|
||||
# Based on romkatv/powerlevel10k/config/p10k-pure.zsh.
|
||||
# Wizard options: nerdfont-v3 + powerline, small icons, pure, original, 24h time,
|
||||
# 2 lines, sparse, transient_prompt, instant_prompt=verbose.
|
||||
# Type `p10k configure` to generate another config.
|
||||
#
|
||||
# Config file for Powerlevel10k with the style of Pure (https://github.com/sindresorhus/pure).
|
||||
#
|
||||
# Differences from Pure:
|
||||
#
|
||||
# - Git:
|
||||
# - `@c4d3ec2c` instead of something like `v1.4.0~11` when in detached HEAD state.
|
||||
# - No automatic `git fetch` (the same as in Pure with `PURE_GIT_PULL=0`).
|
||||
#
|
||||
# Apart from the differences listed above, the replication of Pure prompt is exact. This includes
|
||||
# even the questionable parts. For example, just like in Pure, there is no indication of Git status
|
||||
# being stale; prompt symbol is the same in command, visual and overwrite vi modes; when prompt
|
||||
# doesn't fit on one line, it wraps around with no attempt to shorten it.
|
||||
#
|
||||
# If you like the general style of Pure but not particularly attached to all its quirks, type
|
||||
# `p10k configure` and pick "Lean" style. This will give you slick minimalist prompt while taking
|
||||
# advantage of Powerlevel10k features that aren't present in Pure.
|
||||
|
||||
# Temporarily change options.
|
||||
'builtin' 'local' '-a' 'p10k_config_opts'
|
||||
[[ ! -o 'aliases' ]] || p10k_config_opts+=('aliases')
|
||||
[[ ! -o 'sh_glob' ]] || p10k_config_opts+=('sh_glob')
|
||||
[[ ! -o 'no_brace_expand' ]] || p10k_config_opts+=('no_brace_expand')
|
||||
'builtin' 'setopt' 'no_aliases' 'no_sh_glob' 'brace_expand'
|
||||
|
||||
() {
|
||||
emulate -L zsh -o extended_glob
|
||||
|
||||
# Unset all configuration options.
|
||||
unset -m '(POWERLEVEL9K_*|DEFAULT_USER)~POWERLEVEL9K_GITSTATUS_DIR'
|
||||
|
||||
# Zsh >= 5.1 is required.
|
||||
[[ $ZSH_VERSION == (5.<1->*|<6->.*) ]] || return
|
||||
|
||||
# Prompt colors.
|
||||
local grey='242'
|
||||
local red='1'
|
||||
local yellow='3'
|
||||
local blue='4'
|
||||
local magenta='5'
|
||||
local cyan='6'
|
||||
local white='7'
|
||||
|
||||
# Left prompt segments.
|
||||
typeset -g POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(
|
||||
# =========================[ Line #1 ]=========================
|
||||
context # user@host
|
||||
dir # current directory
|
||||
vcs # git status
|
||||
command_execution_time # previous command duration
|
||||
# =========================[ Line #2 ]=========================
|
||||
newline # \n
|
||||
virtualenv # python virtual environment
|
||||
prompt_char # prompt symbol
|
||||
)
|
||||
|
||||
# Right prompt segments.
|
||||
typeset -g POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(
|
||||
# =========================[ Line #1 ]=========================
|
||||
# command_execution_time # previous command duration
|
||||
# virtualenv # python virtual environment
|
||||
# context # user@host
|
||||
time # current time
|
||||
# =========================[ Line #2 ]=========================
|
||||
newline # \n
|
||||
)
|
||||
|
||||
# Basic style options that define the overall prompt look.
|
||||
typeset -g POWERLEVEL9K_BACKGROUND= # transparent background
|
||||
typeset -g POWERLEVEL9K_{LEFT,RIGHT}_{LEFT,RIGHT}_WHITESPACE= # no surrounding whitespace
|
||||
typeset -g POWERLEVEL9K_{LEFT,RIGHT}_SUBSEGMENT_SEPARATOR=' ' # separate segments with a space
|
||||
typeset -g POWERLEVEL9K_{LEFT,RIGHT}_SEGMENT_SEPARATOR= # no end-of-line symbol
|
||||
typeset -g POWERLEVEL9K_VISUAL_IDENTIFIER_EXPANSION= # no segment icons
|
||||
|
||||
# Add an empty line before each prompt except the first. This doesn't emulate the bug
|
||||
# in Pure that makes prompt drift down whenever you use the Alt-C binding from fzf or similar.
|
||||
typeset -g POWERLEVEL9K_PROMPT_ADD_NEWLINE=true
|
||||
|
||||
# Magenta prompt symbol if the last command succeeded.
|
||||
typeset -g POWERLEVEL9K_PROMPT_CHAR_OK_{VIINS,VICMD,VIVIS}_FOREGROUND=$magenta
|
||||
# Red prompt symbol if the last command failed.
|
||||
typeset -g POWERLEVEL9K_PROMPT_CHAR_ERROR_{VIINS,VICMD,VIVIS}_FOREGROUND=$red
|
||||
# Default prompt symbol.
|
||||
typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIINS_CONTENT_EXPANSION='❯'
|
||||
# Prompt symbol in command vi mode.
|
||||
typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VICMD_CONTENT_EXPANSION='❮'
|
||||
# Prompt symbol in visual vi mode is the same as in command mode.
|
||||
typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIVIS_CONTENT_EXPANSION='❮'
|
||||
# Prompt symbol in overwrite vi mode is the same as in command mode.
|
||||
typeset -g POWERLEVEL9K_PROMPT_CHAR_OVERWRITE_STATE=false
|
||||
|
||||
# Grey Python Virtual Environment.
|
||||
typeset -g POWERLEVEL9K_VIRTUALENV_FOREGROUND=$grey
|
||||
# Don't show Python version.
|
||||
typeset -g POWERLEVEL9K_VIRTUALENV_SHOW_PYTHON_VERSION=false
|
||||
typeset -g POWERLEVEL9K_VIRTUALENV_{LEFT,RIGHT}_DELIMITER=
|
||||
|
||||
# Blue current directory.
|
||||
typeset -g POWERLEVEL9K_DIR_FOREGROUND=$blue
|
||||
|
||||
# Context format when root: user@host. The first part white, the rest grey.
|
||||
typeset -g POWERLEVEL9K_CONTEXT_ROOT_TEMPLATE="%F{$white}%n%f%F{$grey}@%m%f"
|
||||
# Context format when not root: user@host. The whole thing grey.
|
||||
typeset -g POWERLEVEL9K_CONTEXT_TEMPLATE="%F{$grey}%n@%m%f"
|
||||
# Don't show context unless root or in SSH.
|
||||
typeset -g POWERLEVEL9K_CONTEXT_{DEFAULT,SUDO}_CONTENT_EXPANSION=
|
||||
|
||||
# Show previous command duration only if it's >= 5s.
|
||||
typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_THRESHOLD=5
|
||||
# Don't show fractional seconds. Thus, 7s rather than 7.3s.
|
||||
typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_PRECISION=0
|
||||
# Duration format: 1d 2h 3m 4s.
|
||||
typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_FORMAT='d h m s'
|
||||
# Yellow previous command duration.
|
||||
typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_FOREGROUND=$yellow
|
||||
|
||||
# Grey Git prompt. This makes stale prompts indistinguishable from up-to-date ones.
|
||||
typeset -g POWERLEVEL9K_VCS_FOREGROUND=$grey
|
||||
|
||||
# Disable async loading indicator to make directories that aren't Git repositories
|
||||
# indistinguishable from large Git repositories without known state.
|
||||
typeset -g POWERLEVEL9K_VCS_LOADING_TEXT=
|
||||
|
||||
# Don't wait for Git status even for a millisecond, so that prompt always updates
|
||||
# asynchronously when Git state changes.
|
||||
typeset -g POWERLEVEL9K_VCS_MAX_SYNC_LATENCY_SECONDS=0
|
||||
|
||||
# Cyan ahead/behind arrows.
|
||||
typeset -g POWERLEVEL9K_VCS_{INCOMING,OUTGOING}_CHANGESFORMAT_FOREGROUND=$cyan
|
||||
# Don't show remote branch, current tag or stashes.
|
||||
typeset -g POWERLEVEL9K_VCS_GIT_HOOKS=(vcs-detect-changes git-untracked git-aheadbehind)
|
||||
# Don't show the branch icon.
|
||||
typeset -g POWERLEVEL9K_VCS_BRANCH_ICON=
|
||||
# When in detached HEAD state, show @commit where branch normally goes.
|
||||
typeset -g POWERLEVEL9K_VCS_COMMIT_ICON='@'
|
||||
# Don't show staged, unstaged, untracked indicators.
|
||||
typeset -g POWERLEVEL9K_VCS_{STAGED,UNSTAGED,UNTRACKED}_ICON=
|
||||
# Show '*' when there are staged, unstaged or untracked files.
|
||||
typeset -g POWERLEVEL9K_VCS_DIRTY_ICON='*'
|
||||
# Show '⇣' if local branch is behind remote.
|
||||
typeset -g POWERLEVEL9K_VCS_INCOMING_CHANGES_ICON=':⇣'
|
||||
# Show '⇡' if local branch is ahead of remote.
|
||||
typeset -g POWERLEVEL9K_VCS_OUTGOING_CHANGES_ICON=':⇡'
|
||||
# Don't show the number of commits next to the ahead/behind arrows.
|
||||
typeset -g POWERLEVEL9K_VCS_{COMMITS_AHEAD,COMMITS_BEHIND}_MAX_NUM=1
|
||||
# Remove space between '⇣' and '⇡' and all trailing spaces.
|
||||
typeset -g POWERLEVEL9K_VCS_CONTENT_EXPANSION='${${${P9K_CONTENT/⇣* :⇡/⇣⇡}// }//:/ }'
|
||||
|
||||
# Grey current time.
|
||||
typeset -g POWERLEVEL9K_TIME_FOREGROUND=$grey
|
||||
# Format for the current time: 09:51:02. See `man 3 strftime`.
|
||||
typeset -g POWERLEVEL9K_TIME_FORMAT='%D{%H:%M:%S}'
|
||||
# If set to true, time will update when you hit enter. This way prompts for the past
|
||||
# commands will contain the start times of their commands rather than the end times of
|
||||
# their preceding commands.
|
||||
typeset -g POWERLEVEL9K_TIME_UPDATE_ON_COMMAND=false
|
||||
|
||||
# Transient prompt works similarly to the builtin transient_rprompt option. It trims down prompt
|
||||
# when accepting a command line. Supported values:
|
||||
#
|
||||
# - off: Don't change prompt when accepting a command line.
|
||||
# - always: Trim down prompt when accepting a command line.
|
||||
# - same-dir: Trim down prompt when accepting a command line unless this is the first command
|
||||
# typed after changing current working directory.
|
||||
typeset -g POWERLEVEL9K_TRANSIENT_PROMPT=always
|
||||
|
||||
# Instant prompt mode.
|
||||
#
|
||||
# - off: Disable instant prompt. Choose this if you've tried instant prompt and found
|
||||
# it incompatible with your zsh configuration files.
|
||||
# - quiet: Enable instant prompt and don't print warnings when detecting console output
|
||||
# during zsh initialization. Choose this if you've read and understood
|
||||
# https://github.com/romkatv/powerlevel10k#instant-prompt.
|
||||
# - verbose: Enable instant prompt and print a warning when detecting console output during
|
||||
# zsh initialization. Choose this if you've never tried instant prompt, haven't
|
||||
# seen the warning, or if you are unsure what this all means.
|
||||
typeset -g POWERLEVEL9K_INSTANT_PROMPT=verbose
|
||||
|
||||
# Hot reload allows you to change POWERLEVEL9K options after Powerlevel10k has been initialized.
|
||||
# For example, you can type POWERLEVEL9K_BACKGROUND=red and see your prompt turn red. Hot reload
|
||||
# can slow down prompt by 1-2 milliseconds, so it's better to keep it turned off unless you
|
||||
# really need it.
|
||||
typeset -g POWERLEVEL9K_DISABLE_HOT_RELOAD=true
|
||||
|
||||
# If p10k is already loaded, reload configuration.
|
||||
# This works even with POWERLEVEL9K_DISABLE_HOT_RELOAD=true.
|
||||
(( ! $+functions[p10k] )) || p10k reload
|
||||
}
|
||||
|
||||
# Tell `p10k configure` which file it should overwrite.
|
||||
typeset -g POWERLEVEL9K_CONFIG_FILE=${${(%):-%x}:a}
|
||||
|
||||
(( ${#p10k_config_opts} )) && setopt ${p10k_config_opts[@]}
|
||||
'builtin' 'unset' 'p10k_config_opts'
|
20
modules/home/zsh/zshrc-personal.nix
Normal file
20
modules/home/zsh/zshrc-personal.nix
Normal file
|
@ -0,0 +1,20 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
home.packages = with pkgs; [ zsh ];
|
||||
|
||||
home.file."./.zshrc-personal".text = ''
|
||||
|
||||
# This file allows you to define your own aliases, functions, etc
|
||||
# below are just some examples of what you can use this file for
|
||||
|
||||
#!/usr/bin/env zsh
|
||||
# Set defaults
|
||||
|
||||
export EDITOR="vim"
|
||||
export VISUAL="zeditor"
|
||||
|
||||
export PATH=$PATH:''${CARGO_HOME:-~/.cargo}/bin
|
||||
export PATH=$PATH:''${RUSTUP_HOME:-~/.rustup}/toolchains/stable-x86_64-unknown-linux-gnu/bin/
|
||||
'';
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue