forked from Shinonome/omarchy-nix
Initial commit
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
exec-once = [
|
||||
# "hypridle & mako & waybar & fcitx5"
|
||||
# "waybar"
|
||||
# "swaybg -i ~/.config/omarchy/current/background -m fill"
|
||||
"systemctl --user start hyprpolkitagent"
|
||||
"wl-clip-persist --clipboard regular & clipse -listen"
|
||||
|
||||
# "dropbox-cli start" # Uncomment to run Dropbox
|
||||
];
|
||||
|
||||
exec = [
|
||||
"pkill -SIGUSR2 waybar || waybar"
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,123 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
cfg = config.omarchy;
|
||||
in {
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
bind =
|
||||
cfg.quickAppBindings
|
||||
++ [
|
||||
# Start default apps
|
||||
|
||||
"SUPER, space, exec, wofi --show drun --sort-order=alphabetical"
|
||||
"SUPER SHIFT, SPACE, exec, pkill -SIGUSR1 waybar"
|
||||
# "SUPER CTRL, SPACE, exec, ~/.local/share/omarchy/bin/swaybg-next"
|
||||
# "SUPER SHIFT CTRL, SPACE, exec, ~/.local/share/omarchy/bin/omarchy-theme-next"
|
||||
|
||||
"SUPER, W, killactive,"
|
||||
|
||||
# End active session
|
||||
"SUPER, ESCAPE, exec, hyprlock"
|
||||
"SUPER SHIFT, ESCAPE, exit,"
|
||||
"SUPER CTRL, ESCAPE, exec, reboot"
|
||||
"SUPER SHIFT CTRL, ESCAPE, exec, systemctl poweroff"
|
||||
|
||||
# Control tiling
|
||||
"SUPER, J, togglesplit, # dwindle"
|
||||
"SUPER, P, pseudo, # dwindle"
|
||||
"SUPER, V, togglefloating,"
|
||||
|
||||
# Move focus with mainMod + arrow keys
|
||||
"SUPER, left, movefocus, l"
|
||||
"SUPER, right, movefocus, r"
|
||||
"SUPER, up, movefocus, u"
|
||||
"SUPER, down, movefocus, d"
|
||||
|
||||
# Switch workspaces with mainMod + [0-9]
|
||||
"SUPER, 1, workspace, 1"
|
||||
"SUPER, 2, workspace, 2"
|
||||
"SUPER, 3, workspace, 3"
|
||||
"SUPER, 4, workspace, 4"
|
||||
"SUPER, 5, workspace, 5"
|
||||
"SUPER, 6, workspace, 6"
|
||||
"SUPER, 7, workspace, 7"
|
||||
"SUPER, 8, workspace, 8"
|
||||
"SUPER, 9, workspace, 9"
|
||||
"SUPER, 0, workspace, 10"
|
||||
|
||||
# Move active window to a workspace with mainMod + SHIFT + [0-9]
|
||||
"SUPER SHIFT, 1, movetoworkspace, 1"
|
||||
"SUPER SHIFT, 2, movetoworkspace, 2"
|
||||
"SUPER SHIFT, 3, movetoworkspace, 3"
|
||||
"SUPER SHIFT, 4, movetoworkspace, 4"
|
||||
"SUPER SHIFT, 5, movetoworkspace, 5"
|
||||
"SUPER SHIFT, 6, movetoworkspace, 6"
|
||||
"SUPER SHIFT, 7, movetoworkspace, 7"
|
||||
"SUPER SHIFT, 8, movetoworkspace, 8"
|
||||
"SUPER SHIFT, 9, movetoworkspace, 9"
|
||||
"SUPER SHIFT, 0, movetoworkspace, 10"
|
||||
|
||||
# Swap active window with the one next to it with mainMod + SHIFT + arrow keys
|
||||
"SUPER SHIFT, left, swapwindow, l"
|
||||
"SUPER SHIFT, right, swapwindow, r"
|
||||
"SUPER SHIFT, up, swapwindow, u"
|
||||
"SUPER SHIFT, down, swapwindow, d"
|
||||
|
||||
# Resize active window
|
||||
"SUPER, minus, resizeactive, -100 0"
|
||||
"SUPER, equal, resizeactive, 100 0"
|
||||
"SUPER SHIFT, minus, resizeactive, 0 -100"
|
||||
"SUPER SHIFT, equal, resizeactive, 0 100"
|
||||
|
||||
# Scroll through existing workspaces with mainMod + scroll
|
||||
"SUPER, mouse_down, workspace, e+1"
|
||||
"SUPER, mouse_up, workspace, e-1"
|
||||
|
||||
# Control Apple Display brightness
|
||||
"CTRL, F1, exec, ~/.local/share/omarchy/bin/apple-display-brightness -5000"
|
||||
"CTRL, F2, exec, ~/.local/share/omarchy/bin/apple-display-brightness +5000"
|
||||
"SHIFT CTRL, F2, exec, ~/.local/share/omarchy/bin/apple-display-brightness +60000"
|
||||
|
||||
# Super workspace floating layer
|
||||
"SUPER, S, togglespecialworkspace, magic"
|
||||
"SUPER SHIFT, S, movetoworkspace, special:magic"
|
||||
|
||||
# Screenshots
|
||||
", PRINT, exec, hyprshot -m region"
|
||||
"SHIFT, PRINT, exec, hyprshot -m window"
|
||||
"CTRL, PRINT, exec, hyprshot -m output"
|
||||
|
||||
# Color picker
|
||||
"SUPER, PRINT, exec, hyprpicker -a"
|
||||
|
||||
# Clipse
|
||||
"CTRL SUPER, V, exec, alacritty --class clipse -e clipse"
|
||||
];
|
||||
|
||||
bindm = [
|
||||
# Move/resize windows with mainMod + LMB/RMB and dragging
|
||||
"SUPER, mouse:272, movewindow"
|
||||
"SUPER, mouse:273, resizewindow"
|
||||
];
|
||||
|
||||
bindel = [
|
||||
# Laptop multimedia keys for volume and LCD brightness
|
||||
",XF86AudioRaiseVolume, exec, wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+"
|
||||
",XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-"
|
||||
",XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"
|
||||
",XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle"
|
||||
",XF86MonBrightnessUp, exec, brightnessctl -e4 -n2 set 5%+"
|
||||
",XF86MonBrightnessDown, exec, brightnessctl -e4 -n2 set 5%-"
|
||||
];
|
||||
|
||||
bindl = [
|
||||
# Requires playerctl
|
||||
", XF86AudioNext, exec, playerctl next"
|
||||
", XF86AudioPause, exec, playerctl play-pause"
|
||||
", XF86AudioPlay, exec, playerctl play-pause"
|
||||
", XF86AudioPrev, exec, playerctl previous"
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
./autostart.nix
|
||||
./bindings.nix
|
||||
./envs.nix
|
||||
./looknfeel.nix
|
||||
./windows.nix
|
||||
];
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
# Default applications
|
||||
"$terminal" = "alacritty";
|
||||
"$fileManager" = "nautilus --new-window";
|
||||
"$browser" = "chromium --new-window --ozone-platform=wayland";
|
||||
"$music" = "spotify";
|
||||
"$passwordManager" = "1password";
|
||||
"$messenger" = "signal-desktop";
|
||||
"$webapp" = "$browser --app";
|
||||
|
||||
# Environment variables
|
||||
env = [
|
||||
"GDK_SCALE,2" # Change to 1 if on a 1x display
|
||||
# Uncomment if running NVIDIA GPU:
|
||||
# "NVD_BACKEND,direct"
|
||||
# "LIBVA_DRIVER_NAME,nvidia"
|
||||
# "__GLX_VENDOR_LIBRARY_NAME,nvidia"
|
||||
];
|
||||
|
||||
# Extra bindings
|
||||
bind = [
|
||||
"SUPER, A, exec, $webapp=https://chatgpt.com"
|
||||
"SUPER SHIFT, A, exec, $webapp=https://grok.com"
|
||||
"SUPER, C, exec, $webapp=https://app.hey.com/calendar/weeks/"
|
||||
"SUPER, E, exec, $webapp=https://app.hey.com"
|
||||
"SUPER, Y, exec, $webapp=https://youtube.com/"
|
||||
"SUPER SHIFT, G, exec, $webapp=https://web.whatsapp.com/"
|
||||
"SUPER, X, exec, $webapp=https://x.com/"
|
||||
"SUPER SHIFT, X, exec, $webapp=https://x.com/compose/post"
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
# Environment variables
|
||||
env = [
|
||||
"GDK_SCALE,2" # Change to 1 if on a 1x display
|
||||
# Uncomment if running NVIDIA GPU:
|
||||
# "NVD_BACKEND,direct"
|
||||
# "LIBVA_DRIVER_NAME,nvidia"
|
||||
# "__GLX_VENDOR_LIBRARY_NAME,nvidia"
|
||||
|
||||
# Cursor size
|
||||
"XCURSOR_SIZE,24"
|
||||
"HYPRCURSOR_SIZE,24"
|
||||
|
||||
# Cursor theme
|
||||
"XCURSOR_THEME,Bibata-Modern-Classic"
|
||||
"HYPRCURSOR_THEME,Bibata-Modern-Classic"
|
||||
|
||||
# Force all apps to use Wayland
|
||||
"GDK_BACKEND,wayland"
|
||||
"QT_QPA_PLATFORM,wayland"
|
||||
"QT_STYLE_OVERRIDE,kvantum"
|
||||
"SDL_VIDEODRIVER,wayland"
|
||||
"MOZ_ENABLE_WAYLAND,1"
|
||||
"ELECTRON_OZONE_PLATFORM_HINT,wayland"
|
||||
"OZONE_PLATFORM,wayland"
|
||||
|
||||
# Make Chromium use XCompose and all Wayland
|
||||
"CHROMIUM_FLAGS,\"--enable-features=UseOzonePlatform --ozone-platform=wayland --gtk-version=4\""
|
||||
|
||||
# Make .desktop files available for wofi
|
||||
"XDG_DATA_DIRS,$XDG_DATA_DIRS:$HOME/.nix-profile/share:/nix/var/nix/profiles/default/share"
|
||||
|
||||
# Use XCompose file
|
||||
"XCOMPOSEFILE,~/.XCompose"
|
||||
];
|
||||
|
||||
xwayland = {
|
||||
force_zero_scaling = true;
|
||||
};
|
||||
|
||||
# Don't show update on first launch
|
||||
ecosystem = {
|
||||
no_update_news = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
# Environment variables
|
||||
# https://wiki.hyprland.org/Configuring/Variables/#input
|
||||
input = {
|
||||
kb_layout = us;
|
||||
# kb_variant =
|
||||
# kb_model =
|
||||
kb_options = compose:caps;
|
||||
# kb_rules =
|
||||
|
||||
follow_mouse = 1;
|
||||
|
||||
sensitivity = 0; # -1.0 - 1.0, 0 means no modification.
|
||||
|
||||
touchpad = {
|
||||
natural_scroll = false;
|
||||
};
|
||||
};
|
||||
|
||||
# https://wiki.hyprland.org/Configuring/Variables/#gestures
|
||||
gestures = {
|
||||
workspace_swipe = false;
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,125 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
cfg = config.omarchy;
|
||||
themes = import ../../themes.nix;
|
||||
theme = themes.${cfg.theme};
|
||||
|
||||
# Convert hex color to rgba format for hyprland
|
||||
hexToRgba = hex: alpha: let
|
||||
cleanHex = builtins.substring 1 6 hex; # Remove the # prefix
|
||||
in "rgba(${cleanHex}${alpha})";
|
||||
|
||||
# Special handling for tokyo-night gradient
|
||||
activeBorder =
|
||||
if cfg.theme == "tokyo-night"
|
||||
then "${hexToRgba theme.accent "ee"} ${hexToRgba theme.success "ee"} 45deg"
|
||||
else hexToRgba theme.foreground "ff";
|
||||
in {
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
# Refer to https://wiki.hyprland.org/Configuring/Variables/
|
||||
|
||||
# https://wiki.hyprland.org/Configuring/Variables/#general
|
||||
general = {
|
||||
gaps_in = 5;
|
||||
gaps_out = 10;
|
||||
|
||||
border_size = 2;
|
||||
|
||||
# https://wiki.hyprland.org/Configuring/Variables/#variable-types for info about colors
|
||||
"col.active_border" = activeBorder;
|
||||
"col.inactive_border" = hexToRgba theme.surface_variant "aa";
|
||||
|
||||
# Set to true enable resizing windows by clicking and dragging on borders and gaps
|
||||
resize_on_border = false;
|
||||
|
||||
# Please see https://wiki.hyprland.org/Configuring/Tearing/ before you turn this on
|
||||
allow_tearing = false;
|
||||
|
||||
layout = "dwindle";
|
||||
};
|
||||
|
||||
# https://wiki.hyprland.org/Configuring/Variables/#decoration
|
||||
decoration = {
|
||||
rounding = 0;
|
||||
|
||||
shadow = {
|
||||
enabled = true;
|
||||
range = 2;
|
||||
render_power = 3;
|
||||
color = hexToRgba theme.background "ee";
|
||||
};
|
||||
|
||||
# https://wiki.hyprland.org/Configuring/Variables/#blur
|
||||
blur = {
|
||||
enabled = true;
|
||||
size = 3;
|
||||
passes = 1;
|
||||
|
||||
vibrancy = 0.1696;
|
||||
};
|
||||
};
|
||||
|
||||
# https://wiki.hyprland.org/Configuring/Variables/#animations
|
||||
animations = {
|
||||
enabled = true; # yes, please :)
|
||||
|
||||
# Default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more
|
||||
|
||||
bezier = [
|
||||
"easeOutQuint,0.23,1,0.32,1"
|
||||
"easeInOutCubic,0.65,0.05,0.36,1"
|
||||
"linear,0,0,1,1"
|
||||
"almostLinear,0.5,0.5,0.75,1.0"
|
||||
"quick,0.15,0,0.1,1"
|
||||
];
|
||||
|
||||
animation = [
|
||||
"global, 1, 10, default"
|
||||
"border, 1, 5.39, easeOutQuint"
|
||||
"windows, 1, 4.79, easeOutQuint"
|
||||
"windowsIn, 1, 4.1, easeOutQuint, popin 87%"
|
||||
"windowsOut, 1, 1.49, linear, popin 87%"
|
||||
"fadeIn, 1, 1.73, almostLinear"
|
||||
"fadeOut, 1, 1.46, almostLinear"
|
||||
"fade, 1, 3.03, quick"
|
||||
"layers, 1, 3.81, easeOutQuint"
|
||||
"layersIn, 1, 4, easeOutQuint, fade"
|
||||
"layersOut, 1, 1.5, linear, fade"
|
||||
"fadeLayersIn, 1, 1.79, almostLinear"
|
||||
"fadeLayersOut, 1, 1.39, almostLinear"
|
||||
"workspaces, 0, 0, ease"
|
||||
];
|
||||
};
|
||||
|
||||
# Ref https://wiki.hyprland.org/Configuring/Workspace-Rules/
|
||||
# "Smart gaps" / "No gaps when only"
|
||||
# uncomment all if you wish to use that.
|
||||
# workspace = w[tv1], gapsout:0, gapsin:0
|
||||
# workspace = f[1], gapsout:0, gapsin:0
|
||||
# windowrule = bordersize 0, floating:0, onworkspace:w[tv1]
|
||||
# windowrule = rounding 0, floating:0, onworkspace:w[tv1]
|
||||
# windowrule = bordersize 0, floating:0, onworkspace:f[1]
|
||||
# windowrule = rounding 0, floating:0, onworkspace:f[1]
|
||||
|
||||
# See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more
|
||||
dwindle = {
|
||||
pseudotile = true; # Master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
|
||||
preserve_split = true; # You probably want this
|
||||
force_split = 2; # Always split on the right
|
||||
};
|
||||
|
||||
# See https://wiki.hyprland.org/Configuring/Master-Layout/ for more
|
||||
master = {
|
||||
new_status = "master";
|
||||
};
|
||||
|
||||
# https://wiki.hyprland.org/Configuring/Variables/#misc
|
||||
misc = {
|
||||
disable_hyprland_logo = true;
|
||||
disable_splash_rendering = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
windowrule = [
|
||||
# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more
|
||||
"suppressevent maximize, class:.*"
|
||||
|
||||
# Force chromium into a tile to deal with --app bug
|
||||
"tile, class:^(chromium)$"
|
||||
|
||||
# Just dash of opacity
|
||||
"opacity 0.97 0.9, class:.*"
|
||||
"opacity 1 0.97, class:^(chromium|google-chrome|google-chrome-unstable)$"
|
||||
"opacity 0.97 0.9, initialClass:^(chrome-.*-Default)$ # web apps"
|
||||
"opacity 1 1, initialClass:^(chrome-youtube.*-Default)$ # Youtube"
|
||||
"opacity 1 1, class:^(zoom|vlc|org.kde.kdenlive|com.obsproject.Studio)$"
|
||||
|
||||
# Fix some dragging issues with XWayland
|
||||
"nofocus,class:^$,title:^$,xwayland:1,floating:1,fullscreen:0,pinned:0"
|
||||
|
||||
# Proper background blur for wofi
|
||||
|
||||
# Float in the middle for clipse clipboard manager
|
||||
"float, class:(clipse)"
|
||||
"size 622 652, class:(clipse)"
|
||||
"stayfocused, class:(clipse)"
|
||||
];
|
||||
|
||||
layerrule = [
|
||||
"blur,wofi"
|
||||
];
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user