summaryrefslogtreecommitdiff
path: root/unmoved-modules/home-manager/hypr
diff options
context:
space:
mode:
Diffstat (limited to 'unmoved-modules/home-manager/hypr')
-rw-r--r--unmoved-modules/home-manager/hypr/autostart.nix14
-rw-r--r--unmoved-modules/home-manager/hypr/binds.nix94
-rw-r--r--unmoved-modules/home-manager/hypr/camdenyards.jpgbin0 -> 2850041 bytes
-rw-r--r--unmoved-modules/home-manager/hypr/decoration.nix28
-rw-r--r--unmoved-modules/home-manager/hypr/default.nix140
-rw-r--r--unmoved-modules/home-manager/hypr/hypridle.nix26
-rw-r--r--unmoved-modules/home-manager/hypr/hyprlock.nix46
-rw-r--r--unmoved-modules/home-manager/hypr/hyprpaper.nix26
-rw-r--r--unmoved-modules/home-manager/hypr/input.nix38
-rw-r--r--unmoved-modules/home-manager/hypr/pyprland.toml12
-rw-r--r--unmoved-modules/home-manager/hypr/rofi-hyprland.nix23
-rw-r--r--unmoved-modules/home-manager/hypr/swaync.nix13
-rw-r--r--unmoved-modules/home-manager/hypr/waybar-hyprland.nix128
13 files changed, 588 insertions, 0 deletions
diff --git a/unmoved-modules/home-manager/hypr/autostart.nix b/unmoved-modules/home-manager/hypr/autostart.nix
new file mode 100644
index 0000000..048afcc
--- /dev/null
+++ b/unmoved-modules/home-manager/hypr/autostart.nix
@@ -0,0 +1,14 @@
+{ config, lib, inputs, ... }:
+
+# very broken, fix later
+
+{
+ config = lib.mkIf config.hyprland.enable {
+ wayland.windowManager.hyprland.settings = {
+ exec-once = [
+ "[workspace 1 silent] zen-browser"
+ "[workspace 7 silent] equibop"
+ ];
+ };
+ };
+}
diff --git a/unmoved-modules/home-manager/hypr/binds.nix b/unmoved-modules/home-manager/hypr/binds.nix
new file mode 100644
index 0000000..00cc3ce
--- /dev/null
+++ b/unmoved-modules/home-manager/hypr/binds.nix
@@ -0,0 +1,94 @@
+{ config, lib, ... }:
+
+{
+ config = lib.mkIf config.hyprland.enable {
+ wayland.windowManager.hyprland.settings.binds = {
+ "$mod" = "SUPER";
+ "$term" = "kitty";
+ "$filem" = "kitty yazi";
+
+ bind = [
+ "$mod SHIFT, K, exec, hyprlock"
+ "$mod, P, exec, hyprpicker"
+ # "$mod, RETURN, exec, pypr toggle kitty"
+
+ "$mod, F1, exec, rofi -show drun"
+ "$mod, F2, exec, $term"
+ "$mod, F3, exec, $filem"
+ "$mod, F4, killactive,"
+ "$mod SHIFT, F4, exec, hyprctl kill"
+
+ "$mod, F, fullscreen"
+ "$mod, T, togglefloating"
+
+ "$mod, 1, workspace, 1"
+ "$mod, 2, workspace, 2"
+ "$mod, 3, workspace, 3"
+ "$mod, 4, workspace, 4"
+ "$mod, 5, workspace, 5"
+ "$mod, 6, workspace, 6"
+ "$mod, 7, workspace, 7"
+ "$mod, 8, workspace, 8"
+ "$mod, 9, workspace, 9"
+ "$mod, 0, workspace, 10"
+
+ "$mod SHIFT, 1, movetoworkspace, 1"
+ "$mod SHIFT, 2, movetoworkspace, 2"
+ "$mod SHIFT, 3, movetoworkspace, 3"
+ "$mod SHIFT, 4, movetoworkspace, 4"
+ "$mod SHIFT, 5, movetoworkspace, 5"
+ "$mod SHIFT, 6, movetoworkspace, 6"
+ "$mod SHIFT, 7, movetoworkspace, 7"
+ "$mod SHIFT, 8, movetoworkspace, 8"
+ "$mod SHIFT, 9, movetoworkspace, 9"
+ "$mod SHIFT, 0, movetoworkspace, 10"
+
+ "$mod, H, movefocus, l"
+ "$mod, J, movefocus, d"
+ "$mod, K, movefocus, u"
+ "$mod, L, movefocus, r"
+
+ "$mod SHIFT, c, exec, xsel -bc"
+
+ "$mod, C, exec, rofi -show calc"
+
+ ", PRINT, exec, hyprshot -m region -o ~/Documents/screenshots"
+ "SHIFT, PRINT, exec, hyprshot -m region --clipboard-only"
+
+ "$mod SHIFT CTRL ALT, L, exec, xdg-open https://linkedin.com" # important bind
+ ];
+
+ bindm = [
+ "$mod, mouse:272, movewindow"
+ "$mod, mouse:273, resizewindow"
+ "$mod SHIFT, mouse:272, resizewindow"
+ ];
+
+ bindl = [
+ ", XF86AudioPrev, exec, playerctl --player=Feishin previous"
+ ", XF86AudioNext, exec, playerctl --player=Feishin next"
+ ", XF86AudioPause, exec, playerctl --player=Feishin play-pause"
+ ", XF86AudioPlay, exec, playerctl --player=Feishin play-pause"
+ "$mod, XF86AudioPrev, exec, playerctl --player=Feishin loop none"
+ "$mod, XF86AudioPause, exec, playerctl --player=Feishin loop playlist"
+ "$mod, XF86AudioPlay, exec, playerctl --player=Feishin loop playlist"
+ "$mod, XF86AudioNext, exec, playerctl --player=Feishin loop track"
+ "$mod, XF86AudioStop, exec, playerctl --player=Feishin shuffle toggle"
+ ", XF86AudioStop, exec, playerctl -a stop"
+
+ "$mod SHIFT, L, exec, hyprctl dispatch dpms toggle"
+ ",switch:Lid Switch, exec, pidof hyprlock || hyprlock"
+
+ "$mod, M, exit,"
+ ];
+
+ bindel = [
+ "$mod,XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+"
+ "$mod,XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-"
+ ",XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"
+ ", XF86MonBrightnessUp, exec, brightnessctl set 10%+"
+ ", XF86MonBrightnessDown, exec, brightnessctl set 10%-"
+ ];
+ };
+ };
+}
diff --git a/unmoved-modules/home-manager/hypr/camdenyards.jpg b/unmoved-modules/home-manager/hypr/camdenyards.jpg
new file mode 100644
index 0000000..4601318
--- /dev/null
+++ b/unmoved-modules/home-manager/hypr/camdenyards.jpg
Binary files differ
diff --git a/unmoved-modules/home-manager/hypr/decoration.nix b/unmoved-modules/home-manager/hypr/decoration.nix
new file mode 100644
index 0000000..e9d5dfe
--- /dev/null
+++ b/unmoved-modules/home-manager/hypr/decoration.nix
@@ -0,0 +1,28 @@
+{ config, lib, inputs, ... }:
+
+{
+ config = lib.mkIf config.hyprland.enable {
+ wayland.windowManager.hyprland.settings = {
+ decoration = {
+ rounding = 0;
+ };
+
+ animations = {
+ enabled = false;
+ };
+
+ workspace = [
+ "w[tv1], gapsout:0, gapsin:0"
+ "f[1], gapsout:0, gapsin:0"
+ ];
+
+ windowrule = [
+ "border_size 0, match:float 0, match:workspace w[tv1]"
+ "rounding 0, match:float 0, match:workspace w[tv1]"
+ "border_size 0, match:float 0, match:workspace f[1]"
+ "rounding 0, match:float 0, match:workspace f[1]"
+ ];
+
+ };
+ };
+}
diff --git a/unmoved-modules/home-manager/hypr/default.nix b/unmoved-modules/home-manager/hypr/default.nix
new file mode 100644
index 0000000..2ec9301
--- /dev/null
+++ b/unmoved-modules/home-manager/hypr/default.nix
@@ -0,0 +1,140 @@
+{ config, pkgs, lib, inputs, ... }:
+
+{
+ options = {
+ hyprland.enable = lib.mkEnableOption "enables hyprland";
+ };
+
+ imports = [
+ ./decoration.nix
+ ./binds.nix
+ ./input.nix
+ ./waybar-hyprland.nix
+ ./hyprlock.nix
+ ./hypridle.nix
+ ./hyprpaper.nix
+ ./rofi-hyprland.nix
+ ];
+
+ config = lib.mkIf config.hyprland.enable {
+ #fixing issues
+
+ xdg.portal = {
+ enable = true;
+
+ config = {
+ common = {
+ default = [ "hyprland" ];
+ };
+ };
+
+ extraPortals = with pkgs; [
+ xdg-desktop-portal-hyprland
+ ];
+ };
+
+ home.packages = with pkgs; [
+ # pyprland
+ ];
+
+ home.file.".config/hypr/pyprland.toml".source = ./pyprland.toml;
+
+ home.sessionVariables.NIXOS_OZONE_WL = "1";
+
+ home.pointerCursor = {
+ gtk.enable = true;
+ # x11.enable = true;
+ package = pkgs.bibata-cursors;
+ name = "Bibata-Modern-Classic";
+ size = 12;
+ };
+
+ gtk = {
+ enable = true;
+
+ theme = {
+ package = pkgs.flat-remix-gtk;
+ name = "Flat-Remix-GTK-Grey-Darkest";
+ };
+
+ iconTheme = {
+ package = pkgs.adwaita-icon-theme;
+ name = "Adwaita";
+ };
+
+ font = {
+ name = "Sans";
+ size = 11;
+ };
+
+ gtk3.extraConfig = {
+ gtk-application-prefer-dark-theme = true;
+ };
+
+ gtk4.extraConfig = {
+ gtk-application-prefer-dark-theme = true;
+ };
+ };
+
+ wayland.windowManager.hyprland.systemd.variables = ["--all"];
+
+ # ok now actually hyprland
+
+ wayland.windowManager.hyprland = {
+ enable = true;
+ xwayland.enable = true;
+
+ settings = {
+ exec-once = [
+ "lxqt-policykit-agent"
+ "waybar"
+ "hyprpaper"
+ "waypaper --restore"
+ # "pypr"
+ ];
+
+ # environment variables
+ env = [
+ "XCURSOR_SIZE,24"
+ "HYPRCURSOR_SIZE,24"
+ ];
+
+ general = {
+ gaps_in = 0;
+ gaps_out = 0;
+
+ border_size = 1;
+
+ # https://wiki.hyprland.org/Configuring/Variables/#variable-types for info about colors
+ "col.active_border" = "rgba(7DAeA3ee) rgba(89B482ee) 45deg";
+ "col.inactive_border" = "rgba(504945ee)";
+
+ # 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";
+ };
+
+ misc = {
+ force_default_wallpaper = 1;
+ disable_hyprland_logo = false;
+ vfr = true;
+ };
+
+ dwindle = {
+ pseudotile = true;
+ preserve_split = true;
+ };
+ };
+
+ extraConfig = "
+ xwayland {
+ force_zero_scaling = true;
+ }
+ ";
+ };
+ };
+}
diff --git a/unmoved-modules/home-manager/hypr/hypridle.nix b/unmoved-modules/home-manager/hypr/hypridle.nix
new file mode 100644
index 0000000..3f575a0
--- /dev/null
+++ b/unmoved-modules/home-manager/hypr/hypridle.nix
@@ -0,0 +1,26 @@
+{ config, lib, ... }:
+
+{
+ config = lib.mkIf config.hyprland.enable {
+ services.hypridle = {
+ enable = true;
+
+ settings = {
+ general = {
+ lock_cmd = "pidof hyprlock || hyprlock";
+ };
+
+ listener = [
+ {
+ timeout = 300;
+ on-timeout = "hyprlock";
+ }
+ {
+ timeout = 3600;
+ on-timeout = "hyprctl dispatch dpms off";
+ }
+ ];
+ };
+ };
+ };
+} \ No newline at end of file
diff --git a/unmoved-modules/home-manager/hypr/hyprlock.nix b/unmoved-modules/home-manager/hypr/hyprlock.nix
new file mode 100644
index 0000000..675773a
--- /dev/null
+++ b/unmoved-modules/home-manager/hypr/hyprlock.nix
@@ -0,0 +1,46 @@
+{ pkgs, lib, config, ... }:
+
+{
+ config = lib.mkIf config.hyprland.enable {
+ programs.hyprlock = {
+ enable = true;
+
+ settings = {
+ general = {
+ disable_loading_bar = false;
+ hide_cursor = false;
+ no_fade_in = true;
+ };
+
+ background = [
+ {
+ path = "screenshot";
+ # path = ~/.config/hypr/wallpaper_effects/.wallpaper_current;
+ blur_passes = 5;
+ blur_size = 7;
+ }
+ ];
+
+ input-field = [
+ {
+ size = "200, 50";
+ position = "0, 0";
+ fade_on_empty = true;
+ font_color = "rgb(212, 190, 152)";
+ inner_color = "rgb(29, 32, 33)";
+ outer_color = "rgb(125, 174, 163)";
+ outline_thickness = 2;
+ rounding = 0;
+ placeholder_text = "";
+ }
+ ];
+
+ animations = [
+ {
+ enabled = false;
+ }
+ ];
+ };
+ };
+ };
+}
diff --git a/unmoved-modules/home-manager/hypr/hyprpaper.nix b/unmoved-modules/home-manager/hypr/hyprpaper.nix
new file mode 100644
index 0000000..2223e9a
--- /dev/null
+++ b/unmoved-modules/home-manager/hypr/hyprpaper.nix
@@ -0,0 +1,26 @@
+{ pkgs, lib, config, ... }:
+
+{
+ config = lib.mkIf config.hyprland.enable {
+ home.packages = [
+ pkgs.hyprpaper
+ pkgs.waypaper
+ ];
+
+ services.hyprpaper = {
+ enable = true;
+
+ settings = {
+ ipc = "on";
+ splash = false;
+
+ wallpaper = [
+ {
+ monitor = "";
+ path = "~/nixosconf/modules/home-manager/hypr/camdenyards.jpg";
+ }
+ ];
+ };
+ };
+ };
+}
diff --git a/unmoved-modules/home-manager/hypr/input.nix b/unmoved-modules/home-manager/hypr/input.nix
new file mode 100644
index 0000000..09fdb3e
--- /dev/null
+++ b/unmoved-modules/home-manager/hypr/input.nix
@@ -0,0 +1,38 @@
+{ config, lib, ... }:
+
+{
+ config = lib.mkIf config.hyprland.enable {
+ wayland.windowManager.hyprland = {
+ settings = {
+ input = {
+ touchpad = {
+ natural_scroll = true;
+ };
+ accel_profile = "flat";
+ };
+ gesture = [
+ "3, horizontal, workspace,"
+ ];
+
+ device = [
+ { # xanathar touchpad
+ name = "syna32ce:00-06cb:ce17-touchpad";
+ sensitivity = 0;
+ }
+ { # vecna mouse
+ name = "razer-razer-deathadder-v2-x-hyperspeed-1";
+ sensitivity = -0.35;
+ }
+ { # vecna mouse depending on how it's feeling
+ name = "razer-razer-deathadder-v2-x-hyperspeed";
+ sensitivity = -0.35;
+ }
+ { # i can't believe its this finnicky
+ name = "razer-razer-deathadder-v2-x-hyperspeed-mouse";
+ sensitivity = -0.35;
+ }
+ ];
+ };
+ };
+ };
+} \ No newline at end of file
diff --git a/unmoved-modules/home-manager/hypr/pyprland.toml b/unmoved-modules/home-manager/hypr/pyprland.toml
new file mode 100644
index 0000000..62227e9
--- /dev/null
+++ b/unmoved-modules/home-manager/hypr/pyprland.toml
@@ -0,0 +1,12 @@
+[pyprland]
+plugins = [
+ "scratchpads"
+]
+
+[scratchpads.kitty]
+unfocus = "hide"
+command = "kitty --class kitty-dropterm"
+class = "kitty-dropterm"
+size = "75% 60%"
+max_size = "1920px 100%"
+lazy = true \ No newline at end of file
diff --git a/unmoved-modules/home-manager/hypr/rofi-hyprland.nix b/unmoved-modules/home-manager/hypr/rofi-hyprland.nix
new file mode 100644
index 0000000..e3644f9
--- /dev/null
+++ b/unmoved-modules/home-manager/hypr/rofi-hyprland.nix
@@ -0,0 +1,23 @@
+{ pkgs, lib, ... }:
+
+{
+ programs.rofi = {
+ enable = true;
+ package = pkgs.rofi;
+ theme = "gruvbox-dark-hard";
+ font = "JetBrains Mono 13";
+
+ plugins = with pkgs; [
+ rofi-calc
+ # rofi-vpn
+ ];
+ modes = [
+ "calc"
+ "window"
+ # {
+ # name = "vpn";
+ # path = lib.getExe pkgs.rofi-vpn;
+ # }
+ ];
+ };
+}
diff --git a/unmoved-modules/home-manager/hypr/swaync.nix b/unmoved-modules/home-manager/hypr/swaync.nix
new file mode 100644
index 0000000..dc857a7
--- /dev/null
+++ b/unmoved-modules/home-manager/hypr/swaync.nix
@@ -0,0 +1,13 @@
+{ config, lib, ... }:
+
+{
+ config = lib.mkIf config.hyprland.enable {
+ services.swaync = {
+ enable = true;
+
+ settings = {
+
+ };
+ };
+ };
+} \ No newline at end of file
diff --git a/unmoved-modules/home-manager/hypr/waybar-hyprland.nix b/unmoved-modules/home-manager/hypr/waybar-hyprland.nix
new file mode 100644
index 0000000..eed22c6
--- /dev/null
+++ b/unmoved-modules/home-manager/hypr/waybar-hyprland.nix
@@ -0,0 +1,128 @@
+{ pkgs, ... }:
+
+{
+ programs.waybar = {
+ enable = true;
+
+ settings = {
+ mainBar = {
+ layer = "top";
+ position = "top";
+ height = 30;
+
+ modules-left = [ "hyprland/workspaces" "idle_inhibitor" ];
+ modules-center = [ "hyprland/window" ];
+ modules-right = [ "custom/feishin" "pulseaudio" "battery" "clock" ];
+
+ battery = {
+ interval = 60;
+ format = "{capacity}% {icon}";
+ format-charging = "{capacity}% {icon}";
+ format-icons = [" " " " " " " " " "];
+ max-length = 25;
+ };
+
+ clock = {
+ format = "{:%H:%M}";
+ tooltip = true;
+ tooltip-format = "{:%a, %b %d\nDay %j, Week %U\n%Z, UTC%z}";
+ };
+
+ "hyprland/window" = {
+ format = "{initialClass}";
+ on-click = "rofi -show window";
+ max-length = 25;
+ };
+
+ idle_inhibitor = {
+ format = "{icon}";
+ format-icons = {
+ activated = " ";
+ deactivated = " ";
+ };
+ };
+
+ pulseaudio = {
+ format = "{volume}% {icon}";
+ format-bluetooth = "{volume}% {icon}";
+ format-muted = "";
+ format-icons = {
+ default = [" " " "];
+ };
+ };
+
+ "custom/feishin" = {
+ format = "{}";
+ escape = true;
+ exec-if = "pgrep -f 'feishin'";
+ interval = 1;
+ on-click = "playerctl --player=,Feishin play-pause";
+ on-click-right = "playerctl --player=,Feishin loop track";
+ on-double-click-right = "playerctl --player=,Feishin loop playlist";
+ on-click-middle = "playerctl --player=,Feishin shuffle toggle";
+ on-scroll-up = "playerctl --player=,Feishin next";
+ on-scroll-down = "playerctl --player=,Feishin previous";
+ exec = "${pkgs.writeShellScriptBin "feishin-module-script" ''
+ shorten() {
+ if [ ''${#1} -le 24 ]; then
+ printf "%s" "$1"
+ else
+ local truncated="''${1:0:21}"
+ if [ "''${truncated: -1}" = " " ]; then
+ truncated="''${truncated:0:20}"
+ fi
+ printf "%s…" "$truncated"
+ fi
+ }
+
+ player_status=$(playerctl --player=,Feishin status 2> /dev/null)
+ artist="$(shorten "$(playerctl --player=,Feishin metadata artist)")"
+ title="$(shorten "$(playerctl --player=,Feishin metadata title)")"
+ info="$artist - $title"
+
+ if [ "$(playerctl --player=,Feishin shuffle)" = "On" ]; then
+ info="$info  "
+ fi
+
+ if [ "$player_status" != "Playing" ]; then
+ info="$info  "
+ fi
+
+ if [ "$(playerctl --player=,Feishin loop)" = "Track" ]; then
+ info="$info 󱍸 "
+ fi
+
+ echo "$info  "
+ ''}/bin/feishin-module-script";
+ };
+ };
+ };
+
+ style = ''
+ *{
+ border: none;
+ border-radius: 0;
+ font-family: "JetBrains Mono"
+ }
+
+ window#waybar {
+ background: #141617;
+ color: #D4BE98;
+ }
+
+ label.module {
+ padding: 0 15px;
+ }
+
+ #workspaces button {
+ background: #141617;
+ color: #D4BE98;
+ }
+
+ #workspaces button active {
+ background: #D4BE98;
+ color: #141617;
+ }
+ '';
+ };
+}