summaryrefslogtreecommitdiff
path: root/home/wayland
diff options
context:
space:
mode:
Diffstat (limited to 'home/wayland')
-rw-r--r--home/wayland/eww.nix7
-rw-r--r--home/wayland/hyprland/binds.nix65
-rw-r--r--home/wayland/waybar.nix211
-rw-r--r--home/wayland/xdg.nix37
4 files changed, 320 insertions, 0 deletions
diff --git a/home/wayland/eww.nix b/home/wayland/eww.nix
new file mode 100644
index 0000000..fe7df23
--- /dev/null
+++ b/home/wayland/eww.nix
@@ -0,0 +1,7 @@
+{ ... }:
+{
+ programs.eww = {
+ enable = true;
+ enableFishIntegration = true;
+ };
+}
diff --git a/home/wayland/hyprland/binds.nix b/home/wayland/hyprland/binds.nix
new file mode 100644
index 0000000..8dc9ec8
--- /dev/null
+++ b/home/wayland/hyprland/binds.nix
@@ -0,0 +1,65 @@
+let
+ workspaces = builtins.concatLists (builtins.genList (
+ x: let
+ ws = let
+ c = (x + 1) / 10;
+ in
+ builtins.toString (x + 1 - (c * 10));
+ in [
+ "$mod, ${ws}, workspace, ${toString (x + 1)}"
+ "$mod SHIFT, ${ws}, movetoworkspacesilent, ${toString (x + 1)}"
+ ]
+ )
+ 5);
+in {
+ wayland.windowManager.hyprland.settings = {
+ bindm = [
+ "$mod, mouse:272, movewindow"
+ "$mod, mouse:273, resizewindow"
+ ];
+
+ bind =
+ [
+ "$mod, RETURN, exec, foot"
+ "$mod, D, exec, wofi -f --show=drun --lines=5"
+# --prompt=\"\""
+ "$mod SHIFT, D, exec, grimblast --freeze copy area"
+# "$mod SHIFT, F, exec, grimblast copysave output ~/.screenshots/$(date +'%s_hypr.png')"
+# "$mod SHIFT, G, exec, grimblast copy active"
+# "$mod CTRL, P, exec, swayidle timeout 2 'sleep 1; hyprctl dispatcher dpms off' resume 'hyprctl dispatcher dpms on & pkill swayidle'"
+
+ "$mod SHIFT, Q, killactive,"
+ "$mod CTRL, E, exit,"
+ "$mod, SPACE, togglesplit,"
+ "$mod, F, fullscreen,"
+ "$mod, V, togglefloating,"
+ "$mod, P, pseudo,"
+
+ "$mod, H, movefocus, l"
+ "$mod, L, movefocus, r"
+ "$mod, K, movefocus, u"
+ "$mod, J, movefocus, d"
+
+ "$mod SHIFT, H, movewindow, l"
+ "$mod SHIFT, L, movewindow, r"
+ "$mod SHIFT, K, movewindow, u"
+ "$mod SHIFT, J, movewindow, d"
+
+ "$mod SUPER, H, resizeactive, -10 0"
+ "$mod SUPER, L, resizeactive, 10 0"
+ "$mod SUPER, K, resizeactive, 0 -10"
+ "$mod SUPER, J, resizeactive, 0 10"
+
+# "$mod, E, togglegroup"
+# "$mod SHIFT, E, lockactivegroup, toggle"
+# "$mod, TAB, changegroupactive, f"
+# "$mod SHIFT, TAB, changegroupactive, b"
+# "$mod CTRL, L, moveoutofgroup, r"
+# "$mod CTRL, H, moveoutofgroup, l"
+
+# "$mod, Prior, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+"
+# "$mod, Next, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-"
+ ]
+ ++ workspaces;
+ };
+}
diff --git a/home/wayland/waybar.nix b/home/wayland/waybar.nix
new file mode 100644
index 0000000..ea0ccb4
--- /dev/null
+++ b/home/wayland/waybar.nix
@@ -0,0 +1,211 @@
+{config, ...}: {
+ programs.waybar = {
+ enable = true;
+ settings = {
+ mainBar = {
+ layer = "top";
+ position = "top";
+# margin-top = 8;
+# margin-bottom = 80;
+# margin-left = 8;
+ reload_style_on_change = true;
+ modules-left = ["hyprland/workspaces"];
+ modules-center = ["clock#date" "clock#time"];
+ modules-right = ["pulseaudio/slider" "pulseaudio#percentage"];
+ "hyprland/workspaces" = {
+ on-click = "activate";
+ format = "{icon}";
+ format-icons = {
+ "1" = "1";
+ "2" = "2";
+ "3" = "3";
+ "4" = "4";
+ "5" = "5";
+ };
+ persistent-workspaces = {
+ "*" = 5;
+ };
+ };
+ "clock#date" = {
+ format = "{:%a %B %d}";
+ tooltip-format = "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>";
+# rotate = 270;
+ };
+ "clock#time" = {
+ format = "{:%I:%M}";
+ };
+ "pulseaudio" = {
+ format = "{icon}";
+ format-bluetooth = "{icon}";
+ format-muted = "";
+ format-icons = {
+ headphones = "";
+ default = [""];
+ };
+ scroll-step = 1;
+ on-click = "pavucontrol";
+ };
+ "pulseaudio#percentage" = {
+ on-click = "pactl set-sink-mute @DEFAULT_SINK@ toggle";
+ format = "{volume}%";
+ };
+ "pulseaudio/slider" = {
+ min = 0;
+ max = 100;
+ orientation = "vertical";
+ };
+ };
+ };
+ /*
+ style = ''
+ @define-color mainbg #${config.colorScheme.palette.base00};
+ @define-color modulesbg #${config.colorScheme.palette.base01};
+ @define-color text #${config.colorScheme.palette.base05};
+ @define-color alttext1 #${config.colorScheme.palette.base0C};
+ @define-color alttext2 #${config.colorScheme.palette.base05};
+ @define-color border #${config.colorScheme.palette.base0E};
+ @define-color empty #${config.colorScheme.palette.base02};
+ @define-color persistent #${config.colorScheme.palette.base04};
+ @define-color hover #${config.colorScheme.palette.base09};
+ @define-color white #${config.colorScheme.palette.base05};
+ @define-color red #${config.colorScheme.palette.base08};
+ @define-color orange #${config.colorScheme.palette.base09};
+ @define-color yellow #${config.colorScheme.palette.base0A};
+ @define-color green #${config.colorScheme.palette.base0B};
+
+ * {
+ all: initial;
+ font-family:'JetBrainsMono Nerd Font';
+ padding-left: 1px;
+ padding-right: 1px;
+ }
+
+ window#waybar {
+ background: @mainbg;
+ border: 1px solid @border;
+ border-radius: 5px;
+ }
+
+ tooltip {
+ background: #${config.colorScheme.palette.base03};
+ border: 2px solid #${config.colorScheme.palette.base0C};
+ border-radius: 5px;
+ font-size: 12pt;
+ }
+
+ tooltip label {
+ padding: 10px;
+ }
+
+ #workspaces {
+ margin: 10px 0px;
+ background: @modulesbg;
+ font-size: 12pt;
+ padding: 20px 0px;
+ border-top:3px solid @border;
+ border-top-left-radius: 50px;
+ border-top-right-radius: 5px;
+ border-bottom: 3px solid @border;
+ border-bottom-right-radius: 50px;
+ border-bottom-left-radius: 5px;
+ }
+
+ #workspaces button {
+ font-size: 18pt;
+ padding: 2px;
+ margin: 5px 6px;
+ border-radius: 10px;
+ }
+
+ #workspaces button.persistent {
+ background-color: @persistent;
+ }
+
+ #workspaces button.empty {
+ background-color: @empty;
+ }
+
+ #workspaces button.visible {
+ background-color: @empty;
+ }
+
+ #workspaces button.active {
+ background-color: @green;
+ }
+
+ #workspaces button.urgent {
+ background-color: @red;
+ }
+
+ #workspaces button:hover {
+ background-color: @hover;
+ }
+
+ #pulseaudio, #clock, #clock.date, #clock.time {
+ background: @modulesbg;
+ }
+
+ #pulseaudio {
+ padding: 1px 5px 1px 5px;
+ color: @text;
+ font-size: 16px;
+ }
+
+ #clock.date {
+ padding: 30px 5px 10px 5px;
+ font-size: 14px;
+ color: @alttext2;
+ border-top:3px solid @border;
+ border-top-left-radius: 50px;
+ border-top-right-radius: 5px;
+ }
+
+ #clock.time {
+ padding: 10px 5px 30px 5px;
+ font-size: 14px;
+ color: @alttext1;
+ border-bottom: 3px solid @border;
+ border-bottom-left-radius: 5px;
+ border-bottom-right-radius: 50px;
+ }
+
+ #pulseaudio-slider, #pulseaudio.percentage {
+ background-color: @modulesbg;
+ }
+
+ #pulseaudio-slider {
+ padding: 15px 0px 5px 0px;
+ border-top: 3px solid @border;
+ border-top-left-radius: 50px;
+ border-top-right-radius: 5px;
+ }
+ #pulseaudio-slider slider {
+ min-height: 0px;
+ min-width: 1px;
+ opacity: 0;
+ background-image: none;
+ border: none;
+ box-shadow: none;
+ }
+ #pulseaudio-slider trough {
+ min-height: 70px;
+ min-width: 0px;
+ border-radius: 5px;
+ background-color: @border;
+ }
+ #pulseaudio-slider highlight {
+ min-width: 10px;
+ border-radius: 5px;
+ background-color: @white;
+ }
+
+ #pulseaudio.percentage {
+ font-size: 12px;
+ margin: 0px 0px;
+ padding: 2px 5px;
+ color: @text;
+ }
+ '';
+ */
+ };
+}
diff --git a/home/wayland/xdg.nix b/home/wayland/xdg.nix
new file mode 100644
index 0000000..f4b1294
--- /dev/null
+++ b/home/wayland/xdg.nix
@@ -0,0 +1,37 @@
+{ ... }:
+
+{
+ xdg.userDirs = {
+ enable = true;
+
+ createDirectories = true;
+ download = "$HOME/dl";
+ documents = "$HOME/docs";
+ pictures = "/media/pics";
+ videos = "/media/vids";
+
+ desktop = null;
+ music = null;
+ publicShare = null;
+ templates = null;
+
+ extraConfig = {
+ XDG_PROJECTS_DIR = "$HOME/projects";
+ XDG_GAMES_DIR = "$HOME/Games";
+ XDG_MEDIA_DIR = "/media";
+ XDG_SS_DIR = "/media/ss";
+ XDG_CLIPS_DIR = "/media/clips";
+ XDG_ISO_DIR = "/media/iso";
+ XDG_ARCHIVE_DIR = "/media/archive";
+ };
+ };
+ home.sessionVariables = {
+ XDG_PROJECTS_DIR = "$HOME/projects";
+ XDG_GAMES_DIR = "$HOME/Games";
+ XDG_MEDIA_DIR = "/media";
+ XDG_SS_DIR = "/media/ss";
+ XDG_CLIPS_DIR = "/media/clips";
+ XDG_ISO_DIR = "/media/iso";
+ XDG_ARCHIVE_DIR = "/media/archive";
+ };
+}