From 5306f3995b11ead641234c05fa22e29c4b507d30 Mon Sep 17 00:00:00 2001 From: Your Name Date: Tue, 20 Feb 2024 23:06:31 +0300 Subject: [PATCH] updates$$$ --- configuration.nix | 113 ++++- home.nix | 31 +- programs/hypr/default.nix | 584 ++++++++++++++++++------- programs/hypr/hyprland-environment.nix | 22 +- theme.nix | 90 ++++ 5 files changed, 658 insertions(+), 182 deletions(-) create mode 100755 theme.nix diff --git a/configuration.nix b/configuration.nix index a9a2c50..83dbb71 100644 --- a/configuration.nix +++ b/configuration.nix @@ -47,9 +47,51 @@ done ) ''; - boot.kernelParams = [ "rtc_cmos.use_acpi_alarm=1" "ideapad_laptop.allow_v4_dytc=1" ]; + boot.kernelParams = [ + "rtc_cmos.use_acpi_alarm=1" + "ideapad_laptop.allow_v4_dytc=1" + "amd_pstate=active" + "initcall_blacklist=acpi_cpufreq_init" + "nowatchdog" + "amd_pstate.shared_mem=1" + ]; + boot.kernelModules = [ "amd-pstate" "acpi_call" ]; boot.loader.efi.canTouchEfiVariables = true; + powerManagement.enable = true; + services.power-profiles-daemon.enable = false; + #powerManagement.powertop.enable = true; + services.tlp = { + enable = true; + settings = { + CPU_SCALING_GOVERNOR_ON_AC = "powersave"; + CPU_SCALING_GOVERNOR_ON_BAT = "powersave"; + + CPU_ENERGY_PERF_POLICY_ON_BAT = "power"; + CPU_ENERGY_PERF_POLICY_ON_AC = "balance_performance"; + + CPU_MIN_PERF_ON_AC = 0; + CPU_MAX_PERF_ON_AC = 100; + CPU_MIN_PERF_ON_BAT = 0; + CPU_MAX_PERF_ON_BAT = 20; + CPU_SCALING_MAX_FREQ_ON_BAT = 1600000; + + PLATFORM_PROFILE_ON_AC="balanced"; + PLATFORM_PROFILE_ON_BAT="low-power"; + + #Trubo boost disable + CPU_BOOST_ON_AC=1; + CPU_BOOST_ON_BAT=0; + CPU_HWP_DYN_BOOST_ON_AC=1; + CPU_HWP_DYN_BOOST_ON_BAT=0; + + #Optional helps save long term battery health + #START_CHARGE_THRESH_BAT0 = 40; # 40 and bellow it starts to charge + #STOP_CHARGE_THRESH_BAT0 = 80; # 80 and above it stops charging + + }; +}; + programs.firejail.enable = true; security.wrappers = { @@ -84,14 +126,14 @@ i18n.defaultLocale = "en_US.UTF-8"; i18n.extraLocaleSettings = { - LC_ADDRESS = "ru_RU.UTF-8"; - LC_IDENTIFICATION = "ru_RU.UTF-8"; - LC_MEASUREMENT = "ru_RU.UTF-8"; - LC_MONETARY = "ru_RU.UTF-8"; - LC_NAME = "ru_RU.UTF-8"; - LC_NUMERIC = "ru_RU.UTF-8"; - LC_PAPER = "ru_RU.UTF-8"; - LC_TELEPHONE = "ru_RU.UTF-8"; + #LC_ADDRESS = "ru_RU.UTF-8"; + #LC_IDENTIFICATION = "ru_RU.UTF-8"; + #LC_MEASUREMENT = "ru_RU.UTF-8"; + #LC_MONETARY = "ru_RU.UTF-8"; + #LC_NAME = "ru_RU.UTF-8"; + #LC_NUMERIC = "ru_RU.UTF-8"; + #LC_PAPER = "ru_RU.UTF-8"; + #LC_TELEPHONE = "ru_RU.UTF-8"; LC_TIME = "ru_RU.UTF-8"; }; @@ -100,12 +142,62 @@ # Enable the GNOME Desktop Environment. services.xserver.displayManager.gdm.enable = true; - services.xserver.desktopManager.gnome.enable = true; + services.xserver.desktopManager.gnome.enable = true; + #services.xserver.displayManager.sessionPackages = [ pkgs.gnome.gnome-session.sessions ]; #gnome without deps, remove gnome.enable + + # Configure keymap in X11 services.xserver = { layout = "us"; xkbVariant = ""; + excludePackages = [ pkgs.xterm ]; + }; + + services.gnome = { + gnome-browser-connector.enable = false; + gnome-initial-setup.enable = false; + gnome-online-accounts.enable = false; + }; + + services.udev.packages = [ pkgs.gnome.gnome-settings-daemon ]; + + programs.dconf.enable = true; + + environment = { + #systemPackages = [ pkgs.gnome.dconf-editor pkgs.gnome.networkmanager-openconnect ] ++ [ + # pkgs.alacritty # pkgs.gnome-console + # #pkgs.firefox # pkgs.gnome.epiphany + #]; + + gnome.excludePackages = [ + #pkgs.gnome-connections + #pkgs.gnome-console + pkgs.gnome-text-editor + pkgs.gnome-tour + #pkgs.gnome.adwaita-icon-theme + pkgs.gnome.epiphany # browser + #pkgs.gnome.evince # pdf + office files + #pkgs.gnome.file-roller #archive explorer + pkgs.gnome.geary + pkgs.gnome.gnome-backgrounds + pkgs.gnome.gnome-calendar + pkgs.gnome.gnome-characters + pkgs.gnome.gnome-clocks + pkgs.gnome.gnome-contacts + pkgs.gnome.gnome-font-viewer + pkgs.gnome.gnome-logs + pkgs.gnome.gnome-maps + pkgs.gnome.gnome-music + #pkgs.gnome.gnome-themes-extra + pkgs.gnome.gnome-weather + #pkgs.gnome.nautilus + pkgs.gnome.simple-scan + pkgs.gnome.sushi + pkgs.gnome.totem + pkgs.gnome.yelp + pkgs.orca + ]; }; virtualisation = { @@ -165,6 +257,7 @@ # $ nix search wget environment.systemPackages = with pkgs; [ linuxKernel.packages.linux_zen.acpi_call + linuxKernel.packages.linux_zen.cpupower gnomeExtensions.appindicator gnomeExtensions.activate-window-by-title gnomeExtensions.unite diff --git a/home.nix b/home.nix index 810ad1f..9a16971 100644 --- a/home.nix +++ b/home.nix @@ -18,6 +18,7 @@ ./programs #./scripts #./themes + ./theme.nix ]; programs.vscode = { @@ -26,14 +27,9 @@ }; home.packages = (with pkgs; [ - git + git firefox rustdesk - #unstable.firefox - #unstable.curl - #unstable.egl-wayland - unstable.chromium - unstable.foot wl-clipboard wl-clipboard-x11 (callPackage ./audiorelay.nix {}) @@ -61,13 +57,24 @@ })) #discord + + ]) ++ (with unstable; [ + xfce.thunar + btop + htop + chromium + foot + kitty + alacritty +# ]); - ]) ++ (with pkgs.gnome; [ - nautilus - zenity - gnome-tweaks - eog - gedit +# ]) ++ (with pkgs.gnome; [ +# gnome-terminal +# nautilus +# zenity +# gnome-tweaks +# eog +# gedit ]); dconf.settings = { diff --git a/programs/hypr/default.nix b/programs/hypr/default.nix index 7999a04..741a1bd 100644 --- a/programs/hypr/default.nix +++ b/programs/hypr/default.nix @@ -13,186 +13,472 @@ #test later systemd.user.targets.hyprland-session.Unit.Wants = [ "xdg-desktop-autostart.target" ]; wayland.windowManager.hyprland = { enable = true; - systemdIntegration = true; + systemd.enable = true; #nvidiaPatches = true; extraConfig = '' + + # Setup monitors + # Setup monitors + # See https://wiki.hyprland.org/Configuring/Monitors/ + #monitor=,preferred,auto,1.066667 + #monitor=,preferred,90,1.066667 + monitor=eDP-1,preferred,auto,1 + #monitor=eDP-1,preferred,auto,1.066667 + #source = ~/.config/hypr/monitors.conf + #source = ~/.config/hypr/workspaces.conf - # Monitor - monitor=DP-1,1920x1080@165,auto,1 + # Dual monitor example on G15 Strix + # eDP-1 is the built in monitor while DP-1 is external + # Both monitors here are at 1440 and 165Hz + # DP-1 is on the left and eDP-1 is on the right + #monitor=DP-1,2560x1440@165,0x0,1 + #monitor=eDP-1,2560x1440@165,2560x0,1 - # Fix slow startup - exec systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP - exec dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY XDG_CURRENT_DESKTOP + # See https://wiki.hyprland.org/Configuring/Keywords/ for more - # Autostart + # Execute your favorite apps at launch + exec-once = ~/.config/hypr/xdg-ausl-hyprland + exec-once = dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP + exec-once = systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP + exec-once = /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 + exec-once = swww init + exec-once = sh -c "sleep 1 && swww clear" + #exec-once = swww img Downloads/PC\ Wallpapers/gifpixel/rooftop.gif + #exec-once = mpvpaper '*' -o "video-scale-y=1.1 --gpu-context=wayland --vo=gpu --hwdec=vaapi-copy" videowork/bgloop.webm - exec-once = hyprctl setcursor Bibata-Modern-Classic 24 - exec-once = dunst + exec-once = waybar + #exec-once = ags - source = /home/enzo/.config/hypr/colors - exec = pkill waybar & sleep 0.5 && waybar - exec-once = swww init & sleep 0.5 && exec wallpaper_random - # exec-once = wallpaper_random + #exec = /usr/bin/hyprland-per-window-layout + exec-once = blueman-applet + exec-once = nm-applet --indicator + exec-once = wl-paste --watch cliphist store + #exec = ~/.config/HyprV/hyprv_util setbg + exec-once = pypr - # Set en layout at startup + exec-once = foot -s + exec-once = thunar --daemon + exec-once = swayidle -d + exec-once = hyprctl setcursor Bibata-Modern-Classic 16 - # Input config - input { - kb_layout = br,us - kb_variant = - kb_model = - kb_options = - kb_rules = + exec-once=dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP + exec-once=systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP - follow_mouse = 1 + env = NIX_REMOTE,daemon + exec-once = export XDG_DATA_DIRS=$HOME/.nix-profile/share:$XDG_DATA_DIRS - touchpad { - natural_scroll = false + #env = QT_QPA_PLATFORMTHEME,qt5ct + env = QT_AUTO_SCREEN_SCALE_FACTOR,1 + env = QT_QPA_PLATFORM,wayland;xcb + env = QT_WAYLAND_DISABLE_WINDOWDECORATION,1 + + #env = GTK_THEME,Catppuccin-Macchiato-Rosewater-dark:dark + #env = GTK_THEME,Catppuccin-Macchiato-Rosewater-dark:light + env = GDK_BACKEND,wayland,x11 + + env = XDG_CURRENT_DESKTOP,Hyprland + env = XDG_SESSION_TYPE,wayland + env = XDG_SESSION_DESKTOP,Hyprland + + + + + # For all categories, see https://wiki.hyprland.org/Configuring/Variables/ + input { + kb_layout = us,ru + kb_variant = + kb_model = + kb_options=grp:caps_toggle + kb_rules = + + + + follow_mouse = 1 + mouse_refocus = false + + touchpad { + natural_scroll = no + #disable_while_typing = false + } + + sensitivity = 0 # -1.0 - 1.0, 0 means no modification. } - sensitivity = 0 # -1.0 - 1.0, 0 means no modification. - } + general { + # See https://wiki.hyprland.org/Configuring/Variables/ for more - general { + gaps_in = 0 + gaps_out = 0 + border_size = 1 + no_border_on_floating = true + cursor_inactive_timeout = 3 + #no_cursor_warps = true + + #col.active_border = rgba(7287fdee) rgba(179299ee) 45deg + col.active_border = rgba(7287fdee) + #col.active_border=rgb(cdd6f4) + col.inactive_border = rgba(595959aa) - gaps_in = 5 - gaps_out = 20 - border_size = 2 - col.active_border = rgba(33ccffee) rgba(00ff99ee) 45deg - col.inactive_border = rgba(595959aa) + layout = dwindle + #layout = master + } - layout = dwindle - } + Binds { + scroll_event_delay = 0 + workspace_back_and_forth = true + workspace_center_on = 1 + } - decoration { + XWayland { + force_zero_scaling = true + } - rounding = 10 - blur = true - blur_size = 3 - blur_passes = 1 - blur_new_optimizations = true + misc { + disable_hyprland_logo = yes + focus_on_activate = yes + #key_press_enables_dpms = true - drop_shadow = true - shadow_range = 4 - shadow_render_power = 3 - col.shadow = rgba(1a1a1aee) - } + # Whether Hyprland should focus an app that requests to be focused + focus_on_activate = true - animations { - enabled = yes - - bezier = ease,0.4,0.02,0.21,1 - - animation = windows, 1, 3.5, ease, slide - animation = windowsOut, 1, 3.5, ease, slide - animation = border, 1, 6, default - animation = fade, 1, 3, ease - animation = workspaces, 1, 3.5, ease - } - - dwindle { - pseudotile = yes - preserve_split = yes - } - - master { - new_is_master = yes - } - - gestures { - workspace_swipe = false - } - - # Example windowrule v1 - # windowrule = float, ^(kitty)$ - # Example windowrule v2 - # windowrulev2 = float,class:^(kitty)$,title:^(kitty)$ - - windowrule=float,^(kitty)$ - windowrule=float,^(pavucontrol)$ - windowrule=center,^(kitty)$ - windowrule=float,^(blueman-manager)$ - windowrule=size 600 500,^(kitty)$ - windowrule=size 934 525,^(mpv)$ - windowrule=float,^(mpv)$ - windowrule=center,^(mpv)$ - #windowrule=pin,^(firefox)$ - - $mainMod = SUPER - bind = $mainMod, G, fullscreen, + #config autoreload + #disable_autoreload = true + #no_vfr = false + #render_ahead_of_time = yes + new_window_takes_over_fullscreen = 2 + no_direct_scanout = false + } - #bind = $mainMod, RETURN, exec, cool-retro-term-zsh - bind = $mainMod, RETURN, exec, kitty - bind = $mainMod, B, exec, opera --no-sandbox - bind = $mainMod, L, exec, firefox - bind = $mainMod, Q, killactive, - bind = $mainMod, M, exit, - bind = $mainMod, F, exec, nautilus - bind = $mainMod, V, togglefloating, - bind = $mainMod, w, exec, wofi --show drun - bind = $mainMod, R, exec, rofiWindow - bind = $mainMod, P, pseudo, # dwindle - bind = $mainMod, J, togglesplit, # dwindle - # Switch Keyboard Layouts - bind = $mainMod, SPACE, exec, hyprctl switchxkblayout teclado-gamer-husky-blizzard next + decoration { + # See https://wiki.hyprland.org/Configuring/Variables/ for more - bind = , Print, exec, grim -g "$(slurp)" - | wl-copy - bind = SHIFT, Print, exec, grim -g "$(slurp)" + rounding = 5 + + blur { + enabled = true + size = 7 + passes = 4 + new_optimizations = true + } - # Functional keybinds - bind =,XF86AudioMicMute,exec,pamixer --default-source -t - bind =,XF86MonBrightnessDown,exec,light -U 20 - bind =,XF86MonBrightnessUp,exec,light -A 20 - bind =,XF86AudioMute,exec,pamixer -t - bind =,XF86AudioLowerVolume,exec,pamixer -d 10 - bind =,XF86AudioRaiseVolume,exec,pamixer -i 10 - bind =,XF86AudioPlay,exec,playerctl play-pause - bind =,XF86AudioPause,exec,playerctl play-pause + blurls = lockscreen - # to switch between windows in a floating workspace - bind = SUPER,Tab,cyclenext, - bind = SUPER,Tab,bringactivetotop, + drop_shadow = yes + shadow_range = 4 + shadow_render_power = 3 + col.shadow = rgba(1a1a1aee) + } - # 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 + animations { + enabled = yes - # 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 + # Some default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more + bezier = myBezier, 0.10, 0.9, 0.1, 1.05 - # 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 + animation = windows, 1, 7, myBezier, slide + animation = windowsOut, 1, 7, myBezier, slide + animation = border, 1, 10, default + animation = fade, 1, 7, default + animation = workspaces, 1, 6, default + } - # Scroll through existing workspaces with mainMod + scroll - bind = $mainMod, mouse_down, workspace, e+1 - bind = $mainMod, mouse_up, workspace, e-1 + dwindle { + # See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more + pseudotile = yes # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below + preserve_split = yes # you probably want this + #force_split = 2 + permanent_direction_override = true + smart_split = false + no_gaps_when_only = 1 + } + + master { + # See https://wiki.hyprland.org/Configuring/Master-Layout/ for more + new_is_master = false + no_gaps_when_only = 1 + allow_small_split = true + } + + gestures { + # See https://wiki.hyprland.org/Configuring/Variables/ for more + #workspace_swipe_direction_lock = off + workspace_swipe = true + workspace_swipe_fingers = 3 + workspace_swipe_cancel_ratio = 0.15 + } + + # Example per-device config + # See https://wiki.hyprland.org/Configuring/Keywords/#executing for more + device:epic mouse V1 { + sensitivity = -0.5 + } + + # Example windowrule v1 + #windowrule = float, ^(kitty)$ + windowrule = float,^(pavucontrol)$ + windowrule = float,^(blueman-manager)$ + windowrule = float,^(nm-connection-editor)$ + #windowrule = float,^(chromium)$ + windowrule = float,^(thunar)$ + windowrule = float, title:^(btop)$ + windowrule = float, title:^(update-sys)$ + + # Example windowrule v2 + # windowrulev2 = float,class:^(kitty)$,title:^(kitty)$ + # See https://wiki.hyprland.org/Configuring/Window-Rules/ for more + # rules below would make the specific app transparent + windowrulev2 = opacity 0.8 0.8,class:^(kitty)$ + windowrulev2 = animation popin,class:^(kitty)$,title:^(update-sys)$ + windowrulev2 = animation popin,class:^(thunar)$ + #windowrulev2 = opacity 0.8 0.8,class:^(thunar)$ + #windowrulev2 = opacity 0.8 0.8,class:^(VSCodium)$ + #windowrulev2 = animation popin,class:^(chromium)$ + windowrulev2 = move cursor -3% -105%,class:^(wofi)$ + windowrulev2 = noanim,class:^(wofi)$ + windowrulev2 = opacity 0.8 0.6,class:^(wofi)$ + #sway-launcher + windowrulev2 = float,class:^(kitty)$,title:^(sway-launcher-desktop)$ + windowrulev2 = noanim,class:^(kitty)$,title:^(sway-launcher-desktop)$ + windowrulev2 = stayfocused,class:^(kitty)$,title:^(sway-launcher-desktop)$ + #windowrulev2 = float,class:^(wezterm)$,title:^(sway-launcher-desktop)$ + #windowrulev2 = noanim,class:^(wezterm)$,title:^(sway-launcher-desktop)$ + #windowrulev2 = stayfocused,class:^(wezterm)$,title:^(sway-launcher-desktop)$ + windowrulev2 = float,class:^(swlauncher)$ + windowrulev2 = noanim,class:^(swlauncher)$ + windowrulev2 = stayfocused,class:^(swlauncher)$ + windowrulev2 = center,class:^(swlauncher)$ + windowrulev2 = size 28% 50%,class:^(swlauncher)$ + + windowrulev2 = float,class:^(clipmanager)$ + windowrulev2 = noanim,class:^(clipmanager)$ + windowrulev2 = stayfocused,class:^(clipmanager)$ + windowrulev2 = center,class:^(clipmanager)$ + windowrulev2 = size 60% 45%,class:^(clipmanager)$ + + #foot clipboard-manager + windowrulev2 = float,title:^(clipboard_manager)$ + windowrulev2 = noanim,title:^(clipboard_manager)$ + windowrulev2 = stayfocused,title:^(clipboard_manager)$ + windowrulev2 = center,title:^(clipboard_manager)$ + windowrulev2 = size 45% 45%,title:^(clipboard_manager)$ + + #foot applauncher app_launcher + windowrulev2 = float,title:^(app_launcher)$ + windowrulev2 = noanim,title:^(app_launcher)$ + windowrulev2 = stayfocused,title:^(app_launcher)$ + windowrulev2 = center,title:^(app_launcher)$ + windowrulev2 = size 28% 50%,title:^(app_launcher)$ + + #foot emoji_manager + windowrulev2 = float,title:^(emoji_manager)$ + windowrulev2 = noanim,title:^(emoji_manager)$ + windowrulev2 = stayfocused,title:^(emoji_manager)$ + windowrulev2 = center,title:^(emoji_manager)$ + windowrulev2 = size 35% 50%,title:^(emoji_manager)$ + + windowrulev2 = noanim,class:^(__screenshoter)$ + windowrulev2 = float,class:^(__screenshoter)$ + + #steam + windowrulev2 = stayfocused, title:^()$,class:^(steam)$ + windowrulev2 = minsize 1 1, title:^()$,class:^(steam)$ + windowrulev2 = noblur, class:^(steam)$ + windowrulev2 = noshadow, class:^(steam)$ + + windowrule = noblur,^(firefox)$ # disables blur for firefox + + #layerrules + #layerrule = noanim, swaync-notification-window + + # See https://wiki.hyprland.org/Configuring/Keywords/ for more + $mainMod = SUPER + + bind = $mainMod, G, exec, /home/delta/.config/hypr/changeLayout.sh + #master layout + bind = $mainMod, I, layoutmsg, addmaster + bind = $mainMod SHIFT, I, layoutmsg, removemaster + bind = $mainMod, U, layoutmsg, orientationleft + bind = $mainMod SHIFT, U, layoutmsg, orientationright + bind = $mainMod, Y, layoutmsg, orientationcenter + bind = $mainMod, O, layoutmsg, swapwithmaster + + #dwindle layout + bind = $mainMod, I, layoutmsg, preselect d + bind = $mainMod, O, layoutmsg, preselect n + bind = $mainMod, U, togglesplit + + # Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more + #bind = $mainMod, Q, exec, kitty #open the terminal + bind = $mainMod, RETURN, exec, footclient #open the terminal + bind = $mainMod SHIFT, RETURN, exec, alacritty #open the terminal + bind = $mainMod, Q, exec, wezterm #open the terminal + #bind = $mainMod, Q, exec, alacritty #open the terminal + bind = $mainMod SHIFT, Q, exec, alacritty #open the terminal + bind = $mainMod CONTROL, Q, exec, wezterm start #--always-new-process #open the terminal + + bind = $mainMod, F1, exec, ~/.config/hypr/gamemode.sh + env = HYPRGAPSMODE + bind = $mainMod, F2, exec, ~/.config/hypr/gapsmode.sh + + bind = $mainMod, B, exec, swaync-client --toggle-panel # notify center + bind = ALT, B, exec, swaync-client --close-latest # close lathest notify + + bind = $mainMod, F4, killactive, # close the active window + bind = $mainMod, TAB, killactive, # close the active window + bind = $mainMod SHIFT, TAB, killactive, # close the active window + bind = $mainMod, Escape, exec, /home/delta/scripts/swaylock # Lock the screen + bind = $mainMod, M, exec, wlogout --protocol layer-shell # show the logout window + bind = $mainMod SHIFT, M, exit, # Exit Hyprland all together no (force quit Hyprland) + bind = $mainMod, E, exec, thunar # Show the graphical file browser + bind = $mainMod, V, togglefloating, # Allow a window to float + #bind = $mainMod, SPACE, exec, wofi # Show the graphical app launcher + #bind = $mainMod, SPACE, exec, kitty /usr/bin/ + her-desktop # Show the graphical app launcher + #bind = $mainMod, SPACE, exec, alacritty --class=swlauncher -e /usr/bin/sway-launcher-desktop #& hyprctl switchxkblayout at-translated-set-2-keyboard 0# Show the graphical app launcher + #bind = $mainMod, SPACE, exec, footclient --title=app_launcher sh -c "TERMINAL=footclient sway-launcher-desktop" & hyprctl switchxkblayout at-translated-set-2-keyboard 0# Show the graphical app launcher + bind = $mainMod, SPACE, exec, anyrun & hyprctl switchxkblayout at-translated-set-2-keyboard 0# Show the graphical app launcher + bind = $mainMod SHIFT, SPACE, exec, footclient --title=app_launcher sh -c "TERMINAL=footclient sway-launcher-desktop" & hyprctl switchxkblayout at-translated-set-2-keyboard 0# Show the graphical app launcher + + #bind = $mainMod CONTROL, SPACE, swapactiveworkspaces # Swaps the active workspaces between two monitors + bind = ALT, SPACE, exec, pypr shift_monitors +1 # K R A S I V O + + + + bind = $mainMod, P, pseudo, # dwindle + #bind = $mainMod, J, togglesplit, # dwindle + #bind = $mainMod, S, exec, grim -g "$(slurp)" - | tee >(swappy -f -) | wl-copy # take a screenshot + bind = $mainMod, S, exec, hyprshot -m region --clipboard-only -s # take a screenshot + bind = $mainMod, Print, exec, /home/delta/scripts/screenshoter.sh # take a screenshot + bind = ,Print , exec, wl-paste | swappy -f - # take a screenshot + #bind = $mainMod, S, exec, /home/delta/screenshoter.sh # take a screenshot + #bind = $mainMod, S, exec, hyprshot -m output -s -c --clipboard-only # take a screenshot + #bind = ALT, V, exec, cliphist list | wofi -dmenu | cliphist decode | wl-copy # open clipboard manager + #bind = ALT, V, exec, cliphist list | /home/delta/scripts/fzfmenu | cliphist decode | wl-copy # open clipboard manager + bind = ALT, V, exec, cliphist list | /home/delta/scripts/fzfmenuft | cliphist decode | wl-copy && wtype -M ctrl v -m ctrl # open clipboard manager + bind = $mainMod, R, exec, footclient --title=emoji_manager sh -c "~/scripts/shmoji/shmoji fzf | wl-copy" & hyprctl switchxkblayout at-translated-set-2-keyboard 0 + #bind = $mainMod, T, exec, ~/.config/HyprV/hyprv_util vswitch # switch HyprV version + bind = $mainMod, X, togglesplit, # dwindle + bind = $mainMod, C, fullscreen, 1 # fs + bind = $mainMod SHIFT, C, fullscreen, 0 # fs + bind = $mainMod, F, fakefullscreen # fs + bind = $mainMod CONTROL, C, fakefullscreen # fs + #bind = $mainMod, Z, maximize, # fs + + # 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 + + bind = $mainMod, H, movefocus, l + bind = $mainMod, J, movefocus, d + bind = $mainMod, K, movefocus, u + bind = $mainMod, L, movefocus, r + + #bind = $mainMod, shift H, movefocus, l + bind = $mainMod SHIFT, J, workspace, e-1 + bind = $mainMod SHIFT, K, workspace, e+1 + #bind = $mainMod, L, movefocus, r + + # 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 + + # Move active window silently to a workspace with mainMod + CONTROL + [0-9] + bind = $mainMod CONTROL, 1, movetoworkspacesilent, 1 + bind = $mainMod CONTROL, 2, movetoworkspacesilent, 2 + bind = $mainMod CONTROL, 3, movetoworkspacesilent, 3 + bind = $mainMod CONTROL, 4, movetoworkspacesilent, 4 + bind = $mainMod CONTROL, 5, movetoworkspacesilent, 5 + bind = $mainMod CONTROL, 6, movetoworkspacesilent, 6 + bind = $mainMod CONTROL, 7, movetoworkspacesilent, 7 + bind = $mainMod CONTROL, 8, movetoworkspacesilent, 8 + bind = $mainMod CONTROL, 9, movetoworkspacesilent, 9 + bind = $mainMod CONTROL, 0, movetoworkspacesilent, 10 + + # Scroll through existing workspaces with mainMod + scroll + bind = $mainMod, mouse_down, workspace, e+1 + bind = $mainMod, mouse_up, workspace, e-1 + + bind = $mainMod, bracketright, workspace, e+1 + bind = $mainMod, bracketleft, workspace, e-1 + + # Scroll through windows workspaces with mainMod + scroll + bind = $mainMod SHIFT, mouse_down, cyclenext + bind = $mainMod SHIFT, mouse_up, cyclenext, prev + + # Move/resize windows with mainMod + LMB/RMB and dragging + bindm = $mainMod, mouse:272, movewindow + bindm = $mainMod, mouse:273, resizewindow + + #Move/resize windows with arrowkeys + binde = $mainMod CTRL, right, resizeactive, 10 0 + binde = $mainMod CTRL, left, resizeactive, -10 0 + binde = $mainMod CTRL, up, resizeactive, 0 -10 + binde = $mainMod CTRL, down, resizeactive, 0 10 + + #Move windows between grid with hjkl + bind = $mainMod CTRL, h, movewindow, l + bind = $mainMod CTRL, j, movewindow, d + bind = $mainMod CTRL, k, movewindow, u + bind = $mainMod CTRL, l, movewindow, r + + # Move grid window between grid with arrows + bind = $mainMod SHIFT, left, movewindow, l + bind = $mainMod SHIFT, right, movewindow, r + bind = $mainMod SHIFT, up, movewindow, u + bind = $mainMod SHIFT, down, movewindow, d + + #bind = $mainMod SHIFT, H, swapwindow, left + #bind = $mainMod SHIFT, J, swapwindow, down + #bind = $mainMod SHIFT, K, swapwindow, up + #bind = $mainMod SHIFT, L, swapwindow, right + + + # Move floating window wsad-like (change to vim keybinds later) + binde = $mainMod SHIFT CTRL, H, moveactive, -30 0 + binde = $mainMod SHIFT CTRL, J, moveactive, 0 30 + binde = $mainMod SHIFT CTRL, K, moveactive, 0 -30 + binde = $mainMod SHIFT CTRL, L, moveactive, 30 0 + + # Move grid window between grid + #bind = $mainMod SHIFT, A, movewindow, l + #bind = $mainMod SHIFT, D, movewindow, r + #bind = $mainMod SHIFT, W, movewindow, u + #bind = $mainMod SHIFT, S, movewindow, d + + #bind = $mainMod SHIFT, H, movewindow, l + #bind = $mainMod SHIFT, J, movewindow, d + #bind = $mainMod SHIFT, K, movewindow, u + #bind = $mainMod SHIFT, L, movewindow, r + + # Source a file (multi-file configs) + # source = ~/.config/hypr/myColors.conf + source = ~/.config/hypr/media-binds.conf + source = ~/.config/hypr/env_var.conf - # Move/resize windows with mainMod + LMB/RMB and dragging - bindm = $mainMod, mouse:272, movewindow - bindm = $mainMod, mouse:273, resizewindow - bindm = ALT, mouse:272, resizewindow ''; }; diff --git a/programs/hypr/hyprland-environment.nix b/programs/hypr/hyprland-environment.nix index 8018f92..1ea4e1b 100644 --- a/programs/hypr/hyprland-environment.nix +++ b/programs/hypr/hyprland-environment.nix @@ -3,21 +3,21 @@ { home = { sessionVariables = { - EDITOR = "lvim"; - BROWSER = "librewolf"; - TERMINAL = "kitty"; - GBM_BACKEND= "nvidia-drm"; - __GLX_VENDOR_LIBRARY_NAME= "nvidia"; - LIBVA_DRIVER_NAME= "nvidia"; # hardware acceleration + #EDITOR = "lvim"; + #BROWSER = "librewolf"; + #TERMINAL = "kitty"; + #GBM_BACKEND= "nvidia-drm"; + #__GLX_VENDOR_LIBRARY_NAME= "nvidia"; + #LIBVA_DRIVER_NAME= "nvidia"; # hardware acceleration __GL_VRR_ALLOWED="1"; - WLR_NO_HARDWARE_CURSORS = "1"; - WLR_RENDERER_ALLOW_SOFTWARE = "1"; + #WLR_NO_HARDWARE_CURSORS = "1"; + #WLR_RENDERER_ALLOW_SOFTWARE = "1"; CLUTTER_BACKEND = "wayland"; WLR_RENDERER = "vulkan"; - XDG_CURRENT_DESKTOP = "Hyprland"; - XDG_SESSION_DESKTOP = "Hyprland"; - XDG_SESSION_TYPE = "wayland"; + #XDG_CURRENT_DESKTOP = "Hyprland"; + #XDG_SESSION_DESKTOP = "Hyprland"; + #XDG_SESSION_TYPE = "wayland"; }; }; } diff --git a/theme.nix b/theme.nix new file mode 100755 index 0000000..ab65a7a --- /dev/null +++ b/theme.nix @@ -0,0 +1,90 @@ +{ pkgs, inputs, ... }: +let + moreWaita = pkgs.stdenv.mkDerivation { + name = "MoreWaita"; + src = inputs.more-waita; + installPhase = '' + mkdir -p $out/share/icons + mv * $out/share/icons + ''; + }; + + nerdfonts = (pkgs.nerdfonts.override { fonts = [ + #"Ubuntu" + #"UbuntuMono" + #"CascadiaCode" + #"FantasqueSansMono" + #"FiraCode" + #"Mononoki" + "Iosevka" + ]; }); + + #cursor-theme = "Qogir"; + #cursor-package = pkgs.qogir-icon-theme; +in +{ + home = { + packages = with pkgs; [ + font-awesome + papirus-icon-theme + qogir-icon-theme + whitesur-icon-theme + colloid-icon-theme + adw-gtk3 + nerdfonts + moreWaita + ]; + #sessionVariables.XCURSOR_THEME = cursor-theme; + #pointerCursor = { + # package = cursor-package; + # name = cursor-theme; + # size = 24; + # gtk.enable = true; + #}; + file = { + ".local/share/fonts" = { + recursive = true; + source = "${nerdfonts}/share/fonts/truetype/NerdFonts"; + }; + ".fonts" = { + recursive = true; + source = "${nerdfonts}/share/fonts/truetype/NerdFonts"; + }; + ".config/gtk-4.0/gtk.css" = { + text = '' + window.messagedialog .response-area > button, + window.dialog.message .dialog-action-area > button, + .background.csd{ + border-radius: 0; + } + ''; + }; + ".local/share/icons/MoreWaita" = { + source = "${moreWaita}/share/icons"; + }; + }; + }; + + gtk = { + enable = true; + font.name = "Iosevka Malie"; + theme.name = "Adwaita-dark"; + #cursorTheme = { + # name = cursor-theme; + # package = cursor-package; + #}; + iconTheme.name = "Papirus-Dark"; + gtk3.extraCss = '' + headerbar, .titlebar, + .csd:not(.popup):not(tooltip):not(messagedialog) decoration{ + border-radius: 0; + } + ''; + }; + + qt = { + enable = true; + platformTheme = "gtk"; + #style.name = "kvantum-dark"; + }; +}