1
0
forked from extern/zaneyos

Fixed polkit, fixed wallpaper script, and more improvements so far!

This commit is contained in:
Tyler Kelley 2024-01-19 02:55:01 -06:00
parent dca4d03495
commit 85c2e0e8c0
4 changed files with 183 additions and 212 deletions

View File

@ -1,208 +1,169 @@
{ pkgs, config, browser, ... }: { pkgs, config, lib, browser, deviceProfile, ... }:
{ let
home.file.".config/hypr/hyprland.conf".text = '' theme = config.colorScheme.colors;
in with lib; {
# monitor=[monitor-name],[resolution@framerate],[pos-x,y],[scale factor],transform,[rotation] wayland.windowManager.hyprland = {
# Rotation Degrees Shorthand enable = true;
# normal (no transforms) -> 0 xwayland.enable = true;
# 90 degrees -> 1 systemd.enable = true;
# 180 degrees -> 2 extraConfig = let
# 270 degrees -> 3 modifier = "SUPER";
# flipped -> 4 in concatStrings [ ''
# flipped + 90 degrees -> 5 monitor=,highres,auto,1
# flipped + 180 degrees -> 6 windowrule = float, ^(steam)$
# flipped + 270 degrees -> 7 windowrule = center, ^(steam)$
monitor=,highres,auto,1 # Automatic Configuration windowrule = size 1080 900, ^(steam)$
general {
windowrule = float, ^(steam)$ gaps_in = 6
windowrule = center, ^(steam)$ gaps_out = 8
windowrule = size 1080 900, ^(steam)$ border_size = 2
col.active_border = rgba(${theme.base0C}ff) rgba(${theme.base0D}ff) 45deg
input { col.inactive_border = rgba(${theme.base00}cc) rgba(${theme.base01}cc) 45deg
kb_layout = us layout = dwindle
kb_options=caps:super resize_on_border = true
follow_mouse = 1 }
input {
touchpad { kb_layout = us
natural_scroll = false kb_options=caps:super
} follow_mouse = 1
touchpad {
sensitivity = 0 # -1.0 - 1.0, 0 means no modification. natural_scroll = false
} }
sensitivity = 0 # -1.0 - 1.0, 0 means no modification.
gestures { }
workspace_swipe = true env = NIXOS_OZONE_WL, 1
workspace_swipe_fingers = 3 env = NIXPKGS_ALLOW_UNFREE, 1
} env = XDG_CURRENT_DESKTOP, Hyprland
env = XDG_SESSION_TYPE, wayland
# Ensure Mouse or Keyboard Inputs Turn On Displays env = XDG_SESSION_DESKTOP, Hyprland
misc { env = GDK_BACKEND, wayland
mouse_move_enables_dpms = true env = CLUTTER_BACKEND, wayland
key_press_enables_dpms = false env = SDL_VIDEODRIVER, x11
} env = XCURSOR_SIZE, 24
env = XCURSOR_THEME, Bibata-Modern-Ice
animations { env = QT_QPA_PLATFORM, wayland
enabled = yes env = QT_WAYLAND_DISABLE_WINDOWDECORATION, 1
env = QT_AUTO_SCREEN_SCALE_FACTOR, 1
# Define Settings For Animation Bezier Curve env = MOZ_ENABLE_WAYLAND, 1
bezier = wind, 0.05, 0.9, 0.1, 1.05 ${if deviceProfile == "vm" then ''
bezier = winIn, 0.1, 1.1, 0.1, 1.1 env = WLR_NO_HARDWARE_CURSORS,1
bezier = winOut, 0.3, -0.3, 0, 1 env = WLR_RENDERER_ALLOW_SOFTWARE,1
bezier = liner, 1, 1, 1, 1 '' else ''
''}
animation = windows, 1, 6, wind, slide gestures {
animation = windowsIn, 1, 6, winIn, slide workspace_swipe = true
animation = windowsOut, 1, 5, winOut, slide workspace_swipe_fingers = 3
animation = windowsMove, 1, 5, wind, slide }
animation = border, 1, 1, liner misc {
animation = borderangle, 1, 30, liner, loop mouse_move_enables_dpms = true
animation = fade, 1, 10, default key_press_enables_dpms = false
animation = workspaces, 1, 5, wind }
} animations {
enabled = yes
# Set Environment Variables bezier = wind, 0.05, 0.9, 0.1, 1.05
env = NIXOS_OZONE_WL, 1 bezier = winIn, 0.1, 1.1, 0.1, 1.1
env = NIXPKGS_ALLOW_UNFREE, 1 bezier = winOut, 0.3, -0.3, 0, 1
env = XDG_CURRENT_DESKTOP, Hyprland bezier = liner, 1, 1, 1, 1
env = XDG_SESSION_TYPE, wayland animation = windows, 1, 6, wind, slide
env = XDG_SESSION_DESKTOP, Hyprland animation = windowsIn, 1, 6, winIn, slide
env = GDK_BACKEND, wayland animation = windowsOut, 1, 5, winOut, slide
env = CLUTTER_BACKEND, wayland animation = windowsMove, 1, 5, wind, slide
env = SDL_VIDEODRIVER, x11 animation = border, 1, 1, liner
env = XCURSOR_SIZE, 24 animation = borderangle, 1, 30, liner, loop
env = XCURSOR_THEME, Bibata-Modern-Ice animation = fade, 1, 10, default
env = QT_QPA_PLATFORM, wayland animation = workspaces, 1, 5, wind
env = QT_WAYLAND_DISABLE_WINDOWDECORATION, 1 }
env = QT_AUTO_SCREEN_SCALE_FACTOR, 1 decoration {
env = MOZ_ENABLE_WAYLAND, 1 rounding = 10
#env = WLR_NO_HARDWARE_CURSORS,1 drop_shadow = false
#env = WLR_RENDERER_ALLOW_SOFTWARE,1 blur {
enabled = true
exec-once = $POLKIT_BIN size = 5
exec-once = dbus-update-activation-environment --systemd --all passes = 3
exec-once = systemctl --user import-environment QT_QPA_PLATFORMTHEME WAYLAND_DISPLAY XDG_CURRENT_DESKTOP new_optimizations = on
exec-once = hyprctl setcursor Bibata-Modern-Ice 24 ignore_opacity = on
exec-once = swww init }
exec-once = waybar }
exec-once = swaync exec-once = $POLKIT_BIN
exec-once = wallsetter exec-once = dbus-update-activation-environment --systemd --all
exec-once = swayidle -w timeout 150 'hyprctl dispatch dpms off' resume 'hyprctl dispatch dpms on' exec-once = systemctl --user import-environment QT_QPA_PLATFORMTHEME WAYLAND_DISPLAY XDG_CURRENT_DESKTOP
exec-once = hyprctl setcursor Bibata-Modern-Ice 24
$mainMod = SUPER exec-once = swww init
# Sound Control Keybinds exec-once = waybar
bind = , XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+ exec-once = swaync
bind = , XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%- exec-once = wallsetter
bind = , XF86AudioMute, exec, pactl set-sink-mute @DEFAULT_SINK@ toggle exec-once = swayidle -w timeout 150 'hyprctl dispatch dpms off' resume 'hyprctl dispatch dpms on'
bind = , XF86AudioMicMute, exec, pactl set-source-mute @DEFAULT_SOURCE@ toggle dwindle {
# Brightness Control Keybinds pseudotile = true
bind = , XF86MonBrightnessDown, exec, brightnessctl set 5%- preserve_split = true
bind = , XF86MonBrightnessUp, exec, brightnessctl set +5% }
# System Application Keybinds master {
bind = $mainMod, Return, exec, kitty new_is_master = true
bind = $mainMod SHIFT, Return, exec, rofi -show drun }
bind = $mainMod SHIFT, W, exec, kitty -e amfora bind = ${modifier},Return,exec,kitty
bind = $mainMod SHIFT, S, exec, web-search bind = ${modifier}SHIFT,Return,exec,rofi -show drun
bind = $mainMod, W, exec, ${browser} bind = ${modifier}SHIFT,W,exec,kitty -e amfora
bind = $mainMod, E, exec, emopicker9000 bind = ${modifier}SHIFT,S,exec,web-search
bind = $mainMod, S, exec, grim -g "$(slurp)" bind = ${modifier},W,exec,${browser}
bind = $mainMod, D, exec, discord bind = ${modifier},E,exec,emopicker9000
bind = $mainMod, O, exec, obs bind = ${modifier},S,exec,grim -g "$(slurp)"
bind = $mainMod, G, exec, gimp bind = ${modifier},D,exec,discord
bind = $mainMod SHIFT, G, exec, godot4 bind = ${modifier},O,exec,obs
bind = $mainMod, T, exec, thunar bind = ${modifier},G,exec,gimp
bind = $mainMod, M, exec, ario bind = ${modifier}SHIFT,G,exec,godot4
# OBS Global Keybinds bind = ${modifier},T,exec,thunar
bind = ALT, F1, pass, ^(com\.obsproject\.Studio)$ bind = ${modifier},M,exec,ario
bind = ALT, F2, pass, ^(com\.obsproject\.Studio)$ bind = ${modifier},Q,killactive,
bind = ALT, F3, pass, ^(com\.obsproject\.Studio)$ bind = ${modifier},P,pseudo,
bind = ALT, F4, pass, ^(com\.obsproject\.Studio)$ bind = ${modifier}SHIFT,I,togglesplit,
bind = ALT, F5, pass, ^(com\.obsproject\.Studio)$ bind = ${modifier},F,fullscreen,
# Hyprland Keybinds bind = ${modifier}SHIFT,F,togglefloating,
bind = $mainMod, Q, killactive, bind = ${modifier}SHIFT,C,exit,
bind = $mainMod, P, pseudo, # dwindle bind = ${modifier}SHIFT,left,movewindow,l
bind = $mainMod SHIFT, I, togglesplit, # dwindle bind = ${modifier}SHIFT,right,movewindow,r
bind = $mainMod, F, fullscreen, bind = ${modifier}SHIFT,up,movewindow,u
bind = $mainMod SHIFT, F, togglefloating, bind = ${modifier}SHIFT,down,movewindow,d
bind = $mainMod SHIFT, C, exit, bind = ${modifier}SHIFT,h,movewindow,l
# Move window with mainMod + shift + arrow keys bind = ${modifier}SHIFT,l,movewindow,r
bind = $mainMod SHIFT, left, movewindow, l bind = ${modifier}SHIFT,k,movewindow,u
bind = $mainMod SHIFT, right, movewindow, r bind = ${modifier}SHIFT,j,movewindow,d
bind = $mainMod SHIFT, up, movewindow, u bind = ${modifier},left,movefocus,l
bind = $mainMod SHIFT, down, movewindow, d bind = ${modifier},right,movefocus,r
bind = $mainMod SHIFT, h, movewindow, l bind = ${modifier},up,movefocus,u
bind = $mainMod SHIFT, l, movewindow, r bind = ${modifier},down,movefocus,d
bind = $mainMod SHIFT, k, movewindow, u bind = ${modifier},h,movefocus,l
bind = $mainMod SHIFT, j, movewindow, d bind = ${modifier},l,movefocus,r
# Move focus with mainMod + arrow keys bind = ${modifier},k,movefocus,u
bind = $mainMod, left, movefocus, l bind = ${modifier},j,movefocus,d
bind = $mainMod, right, movefocus, r bind = ${modifier},1,workspace,1
bind = $mainMod, up, movefocus, u bind = ${modifier},2,workspace,2
bind = $mainMod, down, movefocus, d bind = ${modifier},3,workspace,3
bind = $mainMod, h, movefocus, l bind = ${modifier},4,workspace,4
bind = $mainMod, l, movefocus, r bind = ${modifier},5,workspace,5
bind = $mainMod, k, movefocus, u bind = ${modifier},6,workspace,6
bind = $mainMod, j, movefocus, d bind = ${modifier},7,workspace,7
# Switch workspaces with mainMod + [0-6] bind = ${modifier},8,workspace,8
bind = $mainMod, 1, workspace, 1 bind = ${modifier},9,workspace,9
bind = $mainMod, 2, workspace, 2 bind = ${modifier},0,workspace,10
bind = $mainMod, 3, workspace, 3 bind = ${modifier}SHIFT,1,movetoworkspace,1
bind = $mainMod, 4, workspace, 4 bind = ${modifier}SHIFT,2,movetoworkspace,2
bind = $mainMod, 5, workspace, 5 bind = ${modifier}SHIFT,3,movetoworkspace,3
bind = $mainMod, 6, workspace, 6 bind = ${modifier}SHIFT,4,movetoworkspace,4
bind = $mainMod, 7, workspace, 7 bind = ${modifier}SHIFT,5,movetoworkspace,5
bind = $mainMod, 8, workspace, 8 bind = ${modifier}SHIFT,6,movetoworkspace,6
bind = $mainMod, 9, workspace, 9 bind = ${modifier}SHIFT,7,movetoworkspace,7
bind = $mainMod, 0, workspace, 10 bind = ${modifier}SHIFT,8,movetoworkspace,8
# Move active window to a workspace with mainMod + SHIFT + [0-6] bind = ${modifier}SHIFT,9,movetoworkspace,9
bind = $mainMod SHIFT, 1, movetoworkspace, 1 bind = ${modifier}SHIFT,0,movetoworkspace,10
bind = $mainMod SHIFT, 2, movetoworkspace, 2 bind = ${modifier},mouse_down,workspace, e+1
bind = $mainMod SHIFT, 3, movetoworkspace, 3 bind = ${modifier},mouse_up,workspace, e-1
bind = $mainMod SHIFT, 4, movetoworkspace, 4 bindm = ${modifier},mouse:272,movewindow
bind = $mainMod SHIFT, 5, movetoworkspace, 5 bindm = ${modifier},mouse:273,resizewindow
bind = $mainMod SHIFT, 6, movetoworkspace, 6 bind = ,XF86AudioRaiseVolume,exec,wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+
bind = $mainMod SHIFT, 7, movetoworkspace, 7 bind = ,XF86AudioLowerVolume,exec,wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-
bind = $mainMod SHIFT, 8, movetoworkspace, 8 bind = ,XF86MonBrightnessDown,exec,brightnessctl set 5%-
bind = $mainMod SHIFT, 9, movetoworkspace, 9 bind = ,XF86MonBrightnessUp,exec,brightnessctl set +5%
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
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
}
master {
new_is_master = true
}
general {
gaps_in = 4
gaps_out = 8
border_size = 3
col.active_border = rgba(${config.colorScheme.colors.base0C}ff) rgba(${config.colorScheme.colors.base0D}ff) 45deg
col.inactive_border = rgba(${config.colorScheme.colors.base00}cc) rgba(${config.colorScheme.colors.base01}cc) 45deg
layout = dwindle
resize_on_border = true
}
decoration {
rounding = 10
drop_shadow = false
blur {
enabled = true
size = 5
passes = 3
new_optimizations = on
ignore_opacity = on
}
}
'';
} }

View File

@ -1,8 +1,16 @@
{ pkgs, config, ... }: { pkgs, config, wallpaperDir,
wallpaperGit, username, ... }:
{ {
# system.userActivationScripts = { system.activationScripts = {
# swayncReloader.text = '' gitwallpapers.text = ''
# ''; if [ -d ${wallpaperDir} ]; then
# }; cd ${wallpaperDir}
${pkgs.git}/bin/git pull
else
${pkgs.git}/bin/git clone ${wallpaperGit} ${wallpaperDir}
chown -R ${username}:users ${wallpaperDir}
fi
'';
};
} }

View File

@ -20,7 +20,7 @@
gitEmail = "tylerzanekelley@gmail.com"; gitEmail = "tylerzanekelley@gmail.com";
theLocale = "en_US.UTF-8"; theLocale = "en_US.UTF-8";
theTimezone = "America/Chicago"; theTimezone = "America/Chicago";
theme = "catppuccin-latte"; theme = "catppuccin-mocha";
browser = "firefox"; browser = "firefox";
wallpaperGit = "https://gitlab.com/Zaney/my-wallpapers.git"; wallpaperGit = "https://gitlab.com/Zaney/my-wallpapers.git";
wallpaperDir = "/home/${username}/Pictures/Wallpapers"; wallpaperDir = "/home/${username}/Pictures/Wallpapers";

View File

@ -15,6 +15,8 @@
# Import Program Configurations # Import Program Configurations
imports = [ imports = [
inputs.nix-colors.homeManagerModules.default inputs.nix-colors.homeManagerModules.default
inputs.hyprland.homeManagerModules.default
# Enable &/ Configure Programs # Enable &/ Configure Programs
./config/home/waybar.nix ./config/home/waybar.nix
./config/home/swaync.nix ./config/home/swaync.nix