mirror of
https://github.com/henrysipp/omarchy-nix.git
synced 2026-06-23 17:30:00 -05:00
Format project with official nixfmt formatter (#21)
* Set nix official formatter for the flake * format the entire project
This commit is contained in:
@@ -2,7 +2,8 @@
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
exec-once = [
|
||||
# "hypridle & mako & waybar & fcitx5"
|
||||
|
||||
@@ -2,103 +2,103 @@
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
cfg = config.omarchy;
|
||||
in {
|
||||
in
|
||||
{
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
bind =
|
||||
cfg.quick_app_bindings
|
||||
++ [
|
||||
"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"
|
||||
bind = cfg.quick_app_bindings ++ [
|
||||
"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,"
|
||||
"SUPER, Backspace, killactive,"
|
||||
"SUPER, W, killactive,"
|
||||
"SUPER, Backspace, killactive,"
|
||||
|
||||
# End active session
|
||||
"SUPER, ESCAPE, exec, hyprlock"
|
||||
"SUPER SHIFT, ESCAPE, exit,"
|
||||
"SUPER CTRL, ESCAPE, exec, reboot"
|
||||
"SUPER SHIFT CTRL, ESCAPE, exec, systemctl poweroff"
|
||||
"SUPER, K, exec, ~/.local/share/omarchy/bin/omarchy-show-keybindings"
|
||||
# End active session
|
||||
"SUPER, ESCAPE, exec, hyprlock"
|
||||
"SUPER SHIFT, ESCAPE, exit,"
|
||||
"SUPER CTRL, ESCAPE, exec, reboot"
|
||||
"SUPER SHIFT CTRL, ESCAPE, exec, systemctl poweroff"
|
||||
"SUPER, K, exec, ~/.local/share/omarchy/bin/omarchy-show-keybindings"
|
||||
|
||||
# Control tiling
|
||||
"SUPER, J, togglesplit, # dwindle"
|
||||
"SUPER, P, pseudo, # dwindle"
|
||||
"SUPER, V, togglefloating,"
|
||||
"SUPER SHIFT, Plus, fullscreen,"
|
||||
# Control tiling
|
||||
"SUPER, J, togglesplit, # dwindle"
|
||||
"SUPER, P, pseudo, # dwindle"
|
||||
"SUPER, V, togglefloating,"
|
||||
"SUPER SHIFT, Plus, fullscreen,"
|
||||
|
||||
# Move focus with mainMod + arrow keys
|
||||
"SUPER, left, movefocus, l"
|
||||
"SUPER, right, movefocus, r"
|
||||
"SUPER, up, movefocus, u"
|
||||
"SUPER, down, movefocus, d"
|
||||
# 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"
|
||||
|
||||
"SUPER, comma, workspace, -1"
|
||||
"SUPER, period, workspace, +1"
|
||||
# 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"
|
||||
"SUPER, comma, workspace, -1"
|
||||
"SUPER, period, workspace, +1"
|
||||
|
||||
# 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"
|
||||
# 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"
|
||||
|
||||
# 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"
|
||||
# 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"
|
||||
|
||||
# Scroll through existing workspaces with mainMod + scroll
|
||||
"SUPER, mouse_down, workspace, e+1"
|
||||
"SUPER, mouse_up, workspace, e-1"
|
||||
# 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"
|
||||
|
||||
# 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"
|
||||
# Scroll through existing workspaces with mainMod + scroll
|
||||
"SUPER, mouse_down, workspace, e+1"
|
||||
"SUPER, mouse_up, workspace, e-1"
|
||||
|
||||
# Super workspace floating layer
|
||||
"SUPER, S, togglespecialworkspace, magic"
|
||||
"SUPER SHIFT, S, movetoworkspace, special:magic"
|
||||
# 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"
|
||||
|
||||
# Screenshots
|
||||
", PRINT, exec, hyprshot -m region"
|
||||
"SHIFT, PRINT, exec, hyprshot -m window"
|
||||
"CTRL, PRINT, exec, hyprshot -m output"
|
||||
# Super workspace floating layer
|
||||
"SUPER, S, togglespecialworkspace, magic"
|
||||
"SUPER SHIFT, S, movetoworkspace, special:magic"
|
||||
|
||||
# Color picker
|
||||
"SUPER, PRINT, exec, hyprpicker -a"
|
||||
# Screenshots
|
||||
", PRINT, exec, hyprshot -m region"
|
||||
"SHIFT, PRINT, exec, hyprshot -m window"
|
||||
"CTRL, PRINT, exec, hyprshot -m output"
|
||||
|
||||
# Clipse
|
||||
"CTRL SUPER, V, exec, ghostty --class clipse -e clipse"
|
||||
];
|
||||
# Color picker
|
||||
"SUPER, PRINT, exec, hyprpicker -a"
|
||||
|
||||
# Clipse
|
||||
"CTRL SUPER, V, exec, ghostty --class clipse -e clipse"
|
||||
];
|
||||
|
||||
bindm = [
|
||||
# Move/resize windows with mainMod + LMB/RMB and dragging
|
||||
|
||||
@@ -3,9 +3,11 @@
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
cfg = config.omarchy;
|
||||
in {
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
./autostart.nix
|
||||
./bindings.nix
|
||||
|
||||
@@ -2,9 +2,10 @@
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
osConfig ? {},
|
||||
osConfig ? { },
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
cfg = config.omarchy;
|
||||
hasNvidiaDrivers = builtins.elem "nvidia" osConfig.services.xserver.videoDrivers;
|
||||
nvidiaEnv = [
|
||||
@@ -12,47 +13,46 @@
|
||||
"LIBVA_DRIVER_NAME,nvidia"
|
||||
"__GLX_VENDOR_LIBRARY_NAME,nvidia"
|
||||
];
|
||||
in {
|
||||
in
|
||||
{
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
# Environment variables
|
||||
env =
|
||||
(lib.optionals hasNvidiaDrivers nvidiaEnv)
|
||||
++ [
|
||||
"GDK_SCALE,${toString cfg.scale}"
|
||||
env = (lib.optionals hasNvidiaDrivers nvidiaEnv) ++ [
|
||||
"GDK_SCALE,${toString cfg.scale}"
|
||||
|
||||
# Cursor size
|
||||
"XCURSOR_SIZE,24"
|
||||
"HYPRCURSOR_SIZE,24"
|
||||
# Cursor size
|
||||
"XCURSOR_SIZE,24"
|
||||
"HYPRCURSOR_SIZE,24"
|
||||
|
||||
# Cursor theme
|
||||
"XCURSOR_THEME,Adwaita"
|
||||
"HYPRCURSOR_THEME,Adwaita"
|
||||
# Cursor theme
|
||||
"XCURSOR_THEME,Adwaita"
|
||||
"HYPRCURSOR_THEME,Adwaita"
|
||||
|
||||
# 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"
|
||||
# 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 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"
|
||||
# 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"
|
||||
"EDITOR,nvim"
|
||||
|
||||
# GTK theme
|
||||
"GTK_THEME,${if cfg.theme == "generated_light" then "Adwaita" else "Adwaita:dark"}"
|
||||
# Use XCompose file
|
||||
"XCOMPOSEFILE,~/.XCompose"
|
||||
"EDITOR,nvim"
|
||||
|
||||
# Podman compatibility. Probably need to add cfg.env?
|
||||
# "DOCKER_HOST,unix://$XDG_RUNTIME_DIR/podman/podman.sock"
|
||||
];
|
||||
# GTK theme
|
||||
"GTK_THEME,${if cfg.theme == "generated_light" then "Adwaita" else "Adwaita:dark"}"
|
||||
|
||||
# Podman compatibility. Probably need to add cfg.env?
|
||||
# "DOCKER_HOST,unix://$XDG_RUNTIME_DIR/podman/podman.sock"
|
||||
];
|
||||
|
||||
xwayland = {
|
||||
force_zero_scaling = true;
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
# Environment variables
|
||||
# https://wiki.hyprland.org/Configuring/Variables/#input
|
||||
|
||||
@@ -2,13 +2,18 @@
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
hexToRgba = hex: alpha: let
|
||||
in "rgba(${hex}${alpha})";
|
||||
}:
|
||||
let
|
||||
hexToRgba =
|
||||
hex: alpha:
|
||||
let
|
||||
in
|
||||
"rgba(${hex}${alpha})";
|
||||
|
||||
inactiveBorder = hexToRgba config.colorScheme.palette.base09 "aa";
|
||||
activeBorder = hexToRgba config.colorScheme.palette.base0D "aa";
|
||||
in {
|
||||
in
|
||||
{
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
general = {
|
||||
gaps_in = 5;
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
windowrule = [
|
||||
# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more
|
||||
|
||||
Reference in New Issue
Block a user