fixed themeing and added more of the omarchy features going for a vm test now

This commit is contained in:
theArctesian
2025-09-24 19:19:22 -07:00
parent eb5f9ef7da
commit a8795b9d82
50 changed files with 6876 additions and 171 deletions
+21 -6
View File
@@ -6,6 +6,11 @@ let
cfg = config.omnixy.desktop;
in
{
imports = [
./hyprland/autostart.nix
./hyprland/bindings.nix
./hyprland/idle.nix
];
options.omnixy.desktop = {
enable = mkEnableOption "OmniXY Hyprland desktop environment";
@@ -33,6 +38,12 @@ in
default = null;
description = "Path to wallpaper image (optional)";
};
idleSuspend = mkOption {
type = types.bool;
default = false;
description = "Enable system suspend after idle timeout";
};
};
config = mkIf (cfg.enable or true) {
@@ -184,14 +195,18 @@ in
sensitivity = 0 # -1.0 - 1.0, 0 means no modification
}
# Include modular configuration files
source = /etc/omnixy/hyprland/theme.conf
source = /etc/omnixy/hyprland/autostart.conf
source = /etc/omnixy/hyprland/bindings.conf
source = /etc/omnixy/hyprland/hypridle.conf
# General configuration
general {
gaps_in = 5
gaps_out = 10
border_size = 2
col.active_border = rgba(7aa2f7ee) rgba(c4a7e7ee) 45deg
col.inactive_border = rgba(595959aa)
# Colors are defined in theme.conf
layout = dwindle
allow_tearing = false
}
@@ -211,7 +226,7 @@ in
drop_shadow = true
shadow_range = 20
shadow_render_power = 3
col.shadow = rgba(1a1a1aee)
# Shadow color is defined in theme.conf
dim_inactive = false
dim_strength = 0.1
@@ -294,8 +309,8 @@ in
bind = $mainMod, Return, exec, ${cfg.defaultTerminal}
bind = $mainMod, B, exec, ${cfg.defaultBrowser}
bind = $mainMod, E, exec, nautilus
bind = $mainMod, R, exec, walker
bind = $mainMod, D, exec, walker
bind = $mainMod SHIFT, D, exec, wofi --show drun
bind = $mainMod, V, exec, cliphist list | wofi --dmenu | cliphist decode | wl-copy
# Window management
@@ -349,7 +364,7 @@ in
bind = $mainMod, mouse_up, workspace, e-1
# Resize mode
bind = $mainMod, R, submap, resize
bind = $mainMod ALT, R, submap, resize
submap = resize
binde = , h, resizeactive, -10 0
binde = , l, resizeactive, 10 0
+73
View File
@@ -0,0 +1,73 @@
{ config, pkgs, lib, ... }:
# Hyprland autostart configuration for OmniXY
# Handles application startup and initialization
with lib;
let
cfg = config.omnixy.desktop;
omnixy = import ../../helpers.nix { inherit config pkgs lib; };
in
{
config = mkIf (cfg.enable or true) {
# Create autostart configuration
environment.etc."omnixy/hyprland/autostart.conf".text = ''
# OmniXY Autostart Configuration
# Applications and services to start with Hyprland
# Essential services
exec-once = waybar
exec-once = mako
exec-once = swww init
exec-once = nm-applet --indicator
exec-once = blueman-applet
# Wallpaper setup
${optionalString (cfg.wallpaper != null) ''exec = swww img ${toString cfg.wallpaper} --transition-type wipe''}
# Clipboard management
exec-once = wl-paste --type text --watch cliphist store
exec-once = wl-paste --type image --watch cliphist store
# Authentication agent
exec-once = ${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1
# Audio setup
${optionalString (omnixy.isEnabled "media") ''
exec-once = easyeffects --gapplication-service
''}
# Gaming-specific autostart
${optionalString (omnixy.isEnabled "gaming") ''
exec-once = mangohud
exec-once = gamemode
''}
# Development-specific autostart
${optionalString (omnixy.isEnabled "coding") ''
exec-once = ${pkgs.vscode}/bin/code --no-sandbox
''}
# Communication apps
${optionalString (omnixy.isEnabled "communication") ''
exec-once = discord --start-minimized
exec-once = slack --start-minimized
''}
# System monitoring (optional)
${optionalString (omnixy.isEnabled "media" || omnixy.isEnabled "gaming") ''
exec-once = ${pkgs.btop}/bin/btop --utf-force
''}
# Screenshots directory
exec-once = mkdir -p ~/Pictures/Screenshots
# Idle management
exec-once = hypridle
# OSD for volume/brightness
exec-once = swayosd-server
'';
};
}
+184
View File
@@ -0,0 +1,184 @@
{ config, pkgs, lib, ... }:
# Hyprland keybindings configuration for OmniXY
# Comprehensive keyboard shortcuts for productivity
with lib;
let
cfg = config.omnixy.desktop;
omnixy = import ../../helpers.nix { inherit config pkgs lib; };
in
{
config = mkIf (cfg.enable or true) {
# Create keybindings configuration
environment.etc."omnixy/hyprland/bindings.conf".text = ''
# OmniXY Hyprland Keybindings
# Comprehensive keyboard shortcuts
# Variables for commonly used applications
$terminal = ${cfg.defaultTerminal or "ghostty"}
$browser = ${cfg.defaultBrowser or "firefox"}
$filemanager = thunar
$menu = walker
# Modifier keys
$mainMod = SUPER
# Window management
bind = $mainMod, Q, killactive
bind = $mainMod, M, exit
bind = $mainMod, V, togglefloating
bind = $mainMod, P, pseudo # dwindle
bind = $mainMod, J, togglesplit # dwindle
bind = $mainMod, F, fullscreen
# Application launches
bind = $mainMod, Return, exec, $terminal
bind = $mainMod, E, exec, $filemanager
bind = $mainMod, R, exec, $menu
bind = $mainMod, B, exec, $browser
# Development shortcuts
${optionalString (omnixy.isEnabled "coding") ''
bind = $mainMod, C, exec, code
bind = $mainMod SHIFT, C, exec, $terminal -e nvim
bind = $mainMod, G, exec, $terminal -e lazygit
bind = $mainMod SHIFT, G, exec, github-desktop
''}
# Communication shortcuts
${optionalString (omnixy.isEnabled "communication") ''
bind = $mainMod, D, exec, discord
bind = $mainMod SHIFT, D, exec, slack
bind = $mainMod, T, exec, telegram-desktop
''}
# Media shortcuts
${optionalString (omnixy.isEnabled "media") ''
bind = $mainMod, S, exec, spotify
bind = $mainMod SHIFT, S, exec, $terminal -e cmus
bind = $mainMod, I, exec, imv
bind = $mainMod SHIFT, I, exec, gimp
''}
# Move focus with mainMod + arrow keys
bind = $mainMod, left, movefocus, l
bind = $mainMod, right, movefocus, r
bind = $mainMod, up, movefocus, u
bind = $mainMod, down, movefocus, d
# Move focus with mainMod + vim keys
bind = $mainMod, h, movefocus, l
bind = $mainMod, l, movefocus, r
bind = $mainMod, k, movefocus, u
bind = $mainMod, j, movefocus, d
# Move windows with mainMod + SHIFT + arrow keys
bind = $mainMod SHIFT, left, movewindow, l
bind = $mainMod SHIFT, right, movewindow, r
bind = $mainMod SHIFT, up, movewindow, u
bind = $mainMod SHIFT, down, movewindow, d
# Move windows with mainMod + SHIFT + vim keys
bind = $mainMod SHIFT, h, movewindow, l
bind = $mainMod SHIFT, l, movewindow, r
bind = $mainMod SHIFT, k, movewindow, u
bind = $mainMod SHIFT, j, movewindow, d
# Switch workspaces with mainMod + [0-9]
bind = $mainMod, 1, workspace, 1
bind = $mainMod, 2, workspace, 2
bind = $mainMod, 3, workspace, 3
bind = $mainMod, 4, workspace, 4
bind = $mainMod, 5, workspace, 5
bind = $mainMod, 6, workspace, 6
bind = $mainMod, 7, workspace, 7
bind = $mainMod, 8, workspace, 8
bind = $mainMod, 9, workspace, 9
bind = $mainMod, 0, workspace, 10
# Move active window to a workspace with mainMod + SHIFT + [0-9]
bind = $mainMod SHIFT, 1, movetoworkspace, 1
bind = $mainMod SHIFT, 2, movetoworkspace, 2
bind = $mainMod SHIFT, 3, movetoworkspace, 3
bind = $mainMod SHIFT, 4, movetoworkspace, 4
bind = $mainMod SHIFT, 5, movetoworkspace, 5
bind = $mainMod SHIFT, 6, movetoworkspace, 6
bind = $mainMod SHIFT, 7, movetoworkspace, 7
bind = $mainMod SHIFT, 8, movetoworkspace, 8
bind = $mainMod SHIFT, 9, movetoworkspace, 9
bind = $mainMod SHIFT, 0, movetoworkspace, 10
# Scroll through existing workspaces with mainMod + scroll
bind = $mainMod, mouse_down, workspace, e+1
bind = $mainMod, mouse_up, workspace, e-1
# Move/resize windows with mainMod + LMB/RMB and dragging
bindm = $mainMod, mouse:272, movewindow
bindm = $mainMod, mouse:273, resizewindow
# Resize windows
bind = $mainMod CTRL, left, resizeactive, -50 0
bind = $mainMod CTRL, right, resizeactive, 50 0
bind = $mainMod CTRL, up, resizeactive, 0 -50
bind = $mainMod CTRL, down, resizeactive, 0 50
# Resize windows with vim keys
bind = $mainMod CTRL, h, resizeactive, -50 0
bind = $mainMod CTRL, l, resizeactive, 50 0
bind = $mainMod CTRL, k, resizeactive, 0 -50
bind = $mainMod CTRL, j, resizeactive, 0 50
# Screenshots
bind = , Print, exec, grim -g "$(slurp)" ~/Pictures/Screenshots/$(date +'screenshot_%Y-%m-%d-%H%M%S.png')
bind = SHIFT, Print, exec, grim ~/Pictures/Screenshots/$(date +'screenshot_%Y-%m-%d-%H%M%S.png')
bind = $mainMod, Print, exec, grim -g "$(slurp)" - | wl-copy
# Screen recording
bind = $mainMod SHIFT, R, exec, wf-recorder -g "$(slurp)" -f ~/Videos/recording_$(date +'%Y-%m-%d-%H%M%S.mp4')
# Media keys
bindl = , XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+
bindl = , XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-
bindl = , XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle
bindl = , XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle
# Brightness keys
bindl = , XF86MonBrightnessUp, exec, brightnessctl set 10%+
bindl = , XF86MonBrightnessDown, exec, brightnessctl set 10%-
# Media player keys
bindl = , XF86AudioPlay, exec, playerctl play-pause
bindl = , XF86AudioNext, exec, playerctl next
bindl = , XF86AudioPrev, exec, playerctl previous
# Lock screen
bind = $mainMod, L, exec, hyprlock
# System controls
bind = $mainMod SHIFT, Q, exec, wlogout
bind = $mainMod ALT, R, exec, systemctl --user restart waybar
bind = $mainMod ALT, W, exec, killall waybar && waybar
# Clipboard management
bind = $mainMod, Y, exec, cliphist list | walker --dmenu | cliphist decode | wl-copy
# Color picker
bind = $mainMod SHIFT, C, exec, hyprpicker -a
# Special workspace (scratchpad)
bind = $mainMod, S, togglespecialworkspace, magic
bind = $mainMod SHIFT, S, movetoworkspace, special:magic
# Game mode toggle
${optionalString (omnixy.isEnabled "gaming") ''
bind = $mainMod, F1, exec, gamemoderun
''}
# Theme cycling (if multiple wallpapers available)
bind = $mainMod ALT, T, exec, omnixy-theme-bg-next
bind = $mainMod ALT SHIFT, T, exec, omnixy-theme-next
'';
};
}
+197
View File
@@ -0,0 +1,197 @@
{ config, pkgs, lib, ... }:
# Hyprland idle management configuration for OmniXY
# Handles screen locking, power management, and idle behavior
with lib;
let
cfg = config.omnixy.desktop;
omnixy = import ../../helpers.nix { inherit config pkgs lib; };
in
{
config = mkIf (cfg.enable or true) {
# Install required packages
environment.systemPackages = with pkgs; [
hypridle
hyprlock
hyprpicker
brightnessctl
];
# Create hypridle configuration
environment.etc."omnixy/hyprland/hypridle.conf".text = ''
# OmniXY Idle Management Configuration
general {
# Avoid starting multiple hyprlock instances
lock_cmd = pidof hyprlock || hyprlock
# Lock before suspend
before_sleep_cmd = loginctl lock-session
# Lock when lid is closed
before_sleep_cmd = hyprlock
# Unlock when lid is opened
after_sleep_cmd = hyprctl dispatch dpms on
}
# Dim screen after 5 minutes
listener {
timeout = 300
on-timeout = brightnessctl -s set 10%
on-resume = brightnessctl -r
}
# Lock screen after 10 minutes
listener {
timeout = 600
on-timeout = loginctl lock-session
}
# Turn off screen after 15 minutes
listener {
timeout = 900
on-timeout = hyprctl dispatch dpms off
on-resume = hyprctl dispatch dpms on
}
# Suspend system after 30 minutes (optional - can be disabled)
${optionalString (cfg.idleSuspend or false) ''
listener {
timeout = 1800
on-timeout = systemctl suspend
}
''}
'';
# Create hyprlock configuration
environment.etc."omnixy/hyprland/hyprlock.conf".text = ''
# OmniXY Screen Lock Configuration
general {
disable_loading_bar = true
grace = 5
hide_cursor = false
no_fade_in = false
}
background {
monitor =
path = ${if cfg.wallpaper != null then toString cfg.wallpaper else "~/Pictures/wallpaper.jpg"}
blur_passes = 3
blur_size = 8
noise = 0.0117
contrast = 0.8916
brightness = 0.8172
vibrancy = 0.1696
vibrancy_darkness = 0.0
}
# User avatar
image {
monitor =
path = ~/.face
size = 150
rounding = -1
border_size = 4
border_color = rgb(221, 221, 221)
rotate = 0
reload_time = -1
reload_cmd =
position = 0, 200
halign = center
valign = center
}
# Current time
label {
monitor =
text = cmd[update:30000] echo "$TIME"
color = rgba(200, 200, 200, 1.0)
font_size = 55
font_family = JetBrainsMono Nerd Font
position = -100, -40
halign = right
valign = bottom
shadow_passes = 5
shadow_size = 10
}
# Date
label {
monitor =
text = cmd[update:43200000] echo "$(date +"%A, %d %B %Y")"
color = rgba(200, 200, 200, 1.0)
font_size = 25
font_family = JetBrainsMono Nerd Font
position = -100, -150
halign = right
valign = bottom
shadow_passes = 5
shadow_size = 10
}
# Password input field
input-field {
monitor =
size = 200, 50
outline_thickness = 3
dots_size = 0.33
dots_spacing = 0.15
dots_center = false
dots_rounding = -1
outer_color = rgb(151515)
inner_color = rgb(200, 200, 200)
font_color = rgb(10, 10, 10)
fade_on_empty = true
fade_timeout = 1000
placeholder_text = <i>Input Password...</i>
hide_input = false
rounding = -1
check_color = rgb(204, 136, 34)
fail_color = rgb(204, 34, 34)
fail_text = <i>$FAIL <b>($ATTEMPTS)</b></i>
fail_timeout = 2000
fail_transitions = 300
capslock_color = -1
numlock_color = -1
bothlock_color = -1
invert_numlock = false
swap_font_color = false
position = 0, -20
halign = center
valign = center
}
# User name
label {
monitor =
text = ${config.omnixy.user or "user"}
color = rgba(200, 200, 200, 1.0)
font_size = 20
font_family = JetBrainsMono Nerd Font
position = 0, 80
halign = center
valign = center
shadow_passes = 5
shadow_size = 10
}
# System info
label {
monitor =
text = cmd[update:60000] echo "$(uname -n)"
color = rgba(200, 200, 200, 0.8)
font_size = 16
font_family = JetBrainsMono Nerd Font
position = 100, 40
halign = left
valign = bottom
shadow_passes = 5
shadow_size = 10
}
'';
};
}