diff --git a/home-manager/features/hypr/config/animation.lua b/home-manager/features/hypr/config/animation.lua new file mode 100644 index 0000000..face8f6 --- /dev/null +++ b/home-manager/features/hypr/config/animation.lua @@ -0,0 +1,124 @@ +hl.curve("easeOutQuint", { + type = "bezier", + points = { { 0.23, 1.0 }, { 0.32, 1.0 } }, +}) +hl.curve("easeInOutCubic", { + type = "bezier", + points = { { 0.65, 0.05 }, { 0.36, 1.0 } }, +}) +hl.curve("linear", { + type = "bezier", + points = { { 0.0, 0.0 }, { 1.0, 1.0 } }, +}) +hl.curve("almostLinear", { + type = "bezier", + points = { { 0.5, 0.5 }, { 0.75, 1.0 } }, +}) +hl.curve("quick", { + type = "bezier", + points = { { 0.15, 0.0 }, { 0.1, 1.0 } }, +}) + +hl.animation({ + leaf = "global", + enabled = true, + speed = 10.0, + bezier = "default", +}) +hl.animation({ + leaf = "border", + enabled = true, + speed = 5.39, + bezier = "easeOutQuint", +}) +hl.animation({ + leaf = "windows", + enabled = true, + speed = 4.79, + bezier = "easeOutQuint", +}) +hl.animation({ + leaf = "windowsIn", + enabled = true, + speed = 4.1, + bezier = "easeOutQuint", + style = "popin 87%", +}) +hl.animation({ + leaf = "windowsOut", + enabled = true, + speed = 1.49, + bezier = "linear", + style = "popin 87%", +}) +hl.animation({ + leaf = "fadeIn", + enabled = true, + speed = 1.73, + bezier = "almostLinear", +}) +hl.animation({ + leaf = "fadeOut", + enabled = true, + speed = 1.46, + bezier = "almostLinear", +}) +hl.animation({ + leaf = "fade", + enabled = true, + speed = 3.03, + bezier = "quick", +}) +hl.animation({ + leaf = "layers", + enabled = true, + speed = 3.81, + bezier = "easeOutQuint", +}) +hl.animation({ + leaf = "layersIn", + enabled = true, + speed = 4.0, + bezier = "easeOutQuint", + style = "fade", +}) +hl.animation({ + leaf = "layersOut", + enabled = true, + speed = 1.5, + bezier = "linear", + style = "fade", +}) +hl.animation({ + leaf = "fadeLayersIn", + enabled = true, + speed = 1.79, + bezier = "almostLinear", +}) +hl.animation({ + leaf = "fadeLayersOut", + enabled = true, + speed = 1.39, + bezier = "almostLinear", +}) +hl.animation({ + leaf = "workspaces", + enabled = true, + speed = 1.94, + bezier = "almostLinear", + style = "fade", +}) +hl.animation({ + leaf = "workspacesIn", + enabled = true, + speed = 1.21, + bezier = "almostLinear", + style = "fade", +}) +hl.animation({ + leaf = "workspacesOut", + enabled = true, + speed = 1.94, + bezier = "almostLinear", + style = "fade", +}) diff --git a/home-manager/features/hypr/config/autostart.lua b/home-manager/features/hypr/config/autostart.lua index 048c789..bc28578 100644 --- a/home-manager/features/hypr/config/autostart.lua +++ b/home-manager/features/hypr/config/autostart.lua @@ -1,3 +1,10 @@ hl.on("hyprland.start", function() - hl.exec_cmd("eww open-many primary-statusbar secondary-statusbar") + hl.exec_cmd("nm-applet") + -- hl.exec_cmd("sleep 2 && hyprpm reload -n") + -- hl.exec_cmd("systemctl --user start hyprpolkitagent") + hl.exec_cmd("gsettings set org.gnome.desktop.interface color-scheme 'prefer-dark'") + hl.exec_cmd("gsettings set org.gnome.desktop.interface gtk-theme 'Adwaita-dark'") + hl.exec_cmd("wpaperd") + hl.exec_cmd("sleep 2 && eww open-many primary-statusbar secondary-statusbar") + hl.exec_cmd("xrandr --output DP-2 --primary") end) diff --git a/home-manager/features/hypr/config/binds.lua b/home-manager/features/hypr/config/binds.lua new file mode 100644 index 0000000..e7a62fd --- /dev/null +++ b/home-manager/features/hypr/config/binds.lua @@ -0,0 +1,99 @@ +local browser = "zen --new-window" +local mainMod = "SUPER + ALT" +local menu = "rofi -show combi -combi-modes drun,ssh,run -theme ~/.config/rofi/launcher/style.rasi" +local terminal = "foot" + +local split = require("hyprsplit") + +hl.bind("SUPER + ALT + T", function() + hl.exec_cmd(terminal) +end) +hl.bind("SUPER + ALT + B", function() + hl.exec_cmd(browser) +end) +hl.bind("SUPER + ALT + D", function() + hl.exec_cmd(menu) +end) +hl.bind("SUPER + ALT + SHIFT + S", function() + hl.exec_cmd("hyprshot -m region --clipboard-only") +end) +hl.bind("SUPER + ALT + CTRL + SHIFT + S", function() + hl.exec_cmd("hyprshot -m region -o ~/Pictures") +end) +hl.bind("SUPER + ALT + C", function() + hl.exec_cmd("swaync-client -t") +end) +hl.bind("SUPER + ALT + CTRL + Q", function() + hl.exec_cmd("/home/drew/.config/rofi/powermenu/powermenu.sh") +end) +hl.bind("SUPER + ALT + X", function() + hl.exec_cmd("/home/drew/.config/rofi/powermenu/powermenu.sh") +end) +hl.bind("SUPER + ALT + F", hl.dsp.window.float({ action = "toggle" })) +hl.bind("SUPER + ALT + SHIFT + F", hl.dsp.window.fullscreen({ action = "toggle" })) +hl.bind("SUPER + ALT + CTRL + left", hl.dsp.window.resize({ x = -20, y = 0 })) +hl.bind("SUPER + ALT + CTRL + right", hl.dsp.window.resize({ x = 20, y = 0 })) +hl.bind("SUPER + ALT + CTRL + down", hl.dsp.window.resize({ x = 0, y = 20 })) +hl.bind("SUPER + ALT + CTRL + up", hl.dsp.window.resize({ x = 0, y = -20 })) +hl.bind("SUPER + ALT + R", hl.dsp.focus({ monitor = "next" })) +-- +hl.bind("SUPER + ALT + r", hl.dsp.focus({ monitor = "l" })) +hl.bind("SUPER + ALT + s", hl.dsp.focus({ monitor = "r" })) + +local hy3 = hl.plugin.hy3 + +hl.bind("SUPER + ALT + Q", hy3.kill_active()) +hl.bind("SUPER + ALT + G", hy3.make_group("opposite")) +hl.bind("SUPER + ALT + W", hy3.make_group("tab", { toggle = true })) +hl.bind("SUPER + ALT + A", hy3.change_focus("raise")) +hl.bind("SUPER + ALT + Z", hy3.change_focus("lower")) +hl.bind("SUPER + ALT + O", hy3.change_group("opposite")) +hl.bind("SUPER + ALT + left", hy3.move_focus("left")) +hl.bind("SUPER + ALT + right", hy3.move_focus("right")) +hl.bind("SUPER + ALT + up", hy3.move_focus("up")) +hl.bind("SUPER + ALT + down", hy3.move_focus("down")) +hl.bind("SUPER + ALT + SHIFT + left", hy3.move_window("left")) +hl.bind("SUPER + ALT + SHIFT + right", hy3.move_window("right")) +hl.bind("SUPER + ALT + SHIFT + up", hy3.move_window("up")) +hl.bind("SUPER + ALT + SHIFT + down", hy3.move_window("down")) + +-- Workspace binds +for i = 1, 10 do + hl.bind("SUPER + ALT + " .. (i % 10), split.dsp.focus({ workspace = tostring(i) })) + hl.bind("SUPER + ALT + SHIFT + " .. (i % 10), hy3.move_to_workspace(tostring(i))) +end + +hl.bind("SUPER + ALT + SHIFT + r", hl.dsp.window.move({ monitor = "+1" })) +hl.bind(" + XF86AudioRaiseVolume", function() + hl.exec_cmd("swayosd-client --output-volume raise") +end, { locked = true }) +hl.bind(" + XF86AudioLowerVolume", function() + hl.exec_cmd("swayosd-client --output-volume lower") +end, { locked = true }) +hl.bind(" + XF86AudioMute", function() + hl.exec_cmd("swayosd-client --output-volume mute-toggle") +end, { locked = true }) +hl.bind(" + XF86AudioMicMute", function() + hl.exec_cmd("swayosd-client --input-volume mute-toggle") +end, { locked = true }) +hl.bind(" + XF86MonBrightnessUp", function() + hl.exec_cmd("brightnessctl s 10%+") +end, { locked = true }) +hl.bind(" + XF86MonBrightnessDown", function() + hl.exec_cmd("brightnessctl s 10%-") +end, { locked = true }) +hl.bind(" + XF86AudioNext", function() + hl.exec_cmd("playerctl next") +end, { locked = true }) +hl.bind(" + XF86AudioPause", function() + hl.exec_cmd("playerctl play-pause") +end, { locked = true }) +hl.bind(" + XF86AudioPlay", function() + hl.exec_cmd("playerctl play-pause") +end, { locked = true }) +hl.bind(" + XF86AudioPrev", function() + hl.exec_cmd("playerctl previous") +end, { locked = true }) +hl.bind("SUPER + mouse:272", hl.dsp.window.drag(), { mouse = true }) +hl.bind("SUPER + mouse:273", hl.dsp.window.resize(), { mouce = true }) +-- hl.bind(" + mouse:272", hl.dsp.hy3:focustab({ mouse })) --, { non_consuming = true } diff --git a/home-manager/features/hypr/config/hyprland.lua b/home-manager/features/hypr/config/hyprland.lua index dec1a09..b165a00 100644 --- a/home-manager/features/hypr/config/hyprland.lua +++ b/home-manager/features/hypr/config/hyprland.lua @@ -1,8 +1,3 @@ -local browser = "zen --new-window" -local mainMod = "SUPER + ALT" -local menu = "rofi -show combi -combi-modes drun,ssh,run -theme ~/.config/rofi/launcher/style.rasi" -local terminal = "foot" - local split = require("hyprsplit") split.config({ @@ -16,10 +11,13 @@ hl.config({ border_size = 2, col = { active_border = { - colors = { "rgba(eeeeffee)", "rgba(3366ffee)" }, + colors = { "rgba(ff00ffee)", "rgba(ff9900ee)" }, + angle = 45, + }, + inactive_border = { + colors = { "rgba(00ffff99)", "rgba(0000cc99)" }, angle = 45, }, - inactive_border = "rgba(595959aa)", }, gaps_in = 5, gaps_out = 10, @@ -150,235 +148,7 @@ hl.window_rule({ match = "match:class Rofi", stay_focused = true }) -- hl.window_rule({ match = { class = "float on" }, match:title = "^Battle.net$" }) -- hl.window_rule({ match = { class = "tile on" }, match:title = "^Balatro$" }) -hl.bind("SUPER + ALT + T", function() - hl.exec_cmd(terminal) -end) -hl.bind("SUPER + ALT + B", function() - hl.exec_cmd(browser) -end) -hl.bind("SUPER + ALT + D", function() - hl.exec_cmd(menu) -end) -hl.bind("SUPER + ALT + SHIFT + S", function() - hl.exec_cmd("hyprshot -m region --clipboard-only") -end) -hl.bind("SUPER + ALT + CTRL + SHIFT + S", function() - hl.exec_cmd("hyprshot -m region -o ~/Pictures") -end) -hl.bind("SUPER + ALT + C", function() - hl.exec_cmd("swaync-client -t") -end) -hl.bind("SUPER + ALT + CTRL + Q", function() - hl.exec_cmd("/home/drew/.config/rofi/powermenu/powermenu.sh") -end) -hl.bind("SUPER + ALT + X", function() - hl.exec_cmd("/home/drew/.config/rofi/powermenu/powermenu.sh") -end) -hl.bind("SUPER + ALT + F", hl.dsp.window.float({ action = "toggle" })) -hl.bind("SUPER + ALT + SHIFT + F", hl.dsp.window.fullscreen({ action = "toggle" })) -hl.bind("SUPER + ALT + CTRL + left", hl.dsp.window.resize({ x = -20, y = 0 })) -hl.bind("SUPER + ALT + CTRL + right", hl.dsp.window.resize({ x = 20, y = 0 })) -hl.bind("SUPER + ALT + CTRL + down", hl.dsp.window.resize({ x = 0, y = 20 })) -hl.bind("SUPER + ALT + CTRL + up", hl.dsp.window.resize({ x = 0, y = -20 })) -hl.bind("SUPER + ALT + R", hl.dsp.focus({ monitor = "next" })) --- -hl.bind("SUPER + ALT + r", hl.dsp.focus({ monitor = "l" })) -hl.bind("SUPER + ALT + s", hl.dsp.focus({ monitor = "r" })) - -local hy3 = hl.plugin.hy3 - -hl.bind("SUPER + ALT + Q", hy3.kill_active()) -hl.bind("SUPER + ALT + G", hy3.make_group("opposite")) -hl.bind("SUPER + ALT + W", hy3.make_group("tab", { toggle = true })) -hl.bind("SUPER + ALT + A", hy3.change_focus("raise")) -hl.bind("SUPER + ALT + Z", hy3.change_focus("lower")) -hl.bind("SUPER + ALT + O", hy3.change_group("opposite")) -hl.bind("SUPER + ALT + left", hy3.move_focus("left")) -hl.bind("SUPER + ALT + right", hy3.move_focus("right")) -hl.bind("SUPER + ALT + up", hy3.move_focus("up")) -hl.bind("SUPER + ALT + down", hy3.move_focus("down")) -hl.bind("SUPER + ALT + SHIFT + left", hy3.move_window("left")) -hl.bind("SUPER + ALT + SHIFT + right", hy3.move_window("right")) -hl.bind("SUPER + ALT + SHIFT + up", hy3.move_window("up")) -hl.bind("SUPER + ALT + SHIFT + down", hy3.move_window("down")) - --- Workspace binds -for i = 1, 10 do - hl.bind("SUPER + ALT + " .. (i % 10), split.dsp.focus({ workspace = tostring(i) })) - hl.bind("SUPER + ALT + SHIFT + " .. (i % 10), hy3.move_to_workspace(tostring(i))) -end - -hl.bind("SUPER + ALT + SHIFT + r", hl.dsp.window.move({ monitor = "+1" })) -hl.bind(" + XF86AudioRaiseVolume", function() - hl.exec_cmd("swayosd-client --output-volume raise") -end, { locked = true }) -hl.bind(" + XF86AudioLowerVolume", function() - hl.exec_cmd("swayosd-client --output-volume lower") -end, { locked = true }) -hl.bind(" + XF86AudioMute", function() - hl.exec_cmd("swayosd-client --output-volume mute-toggle") -end, { locked = true }) -hl.bind(" + XF86AudioMicMute", function() - hl.exec_cmd("swayosd-client --input-volume mute-toggle") -end, { locked = true }) -hl.bind(" + XF86MonBrightnessUp", function() - hl.exec_cmd("brightnessctl s 10%+") -end, { locked = true }) -hl.bind(" + XF86MonBrightnessDown", function() - hl.exec_cmd("brightnessctl s 10%-") -end, { locked = true }) -hl.bind(" + XF86AudioNext", function() - hl.exec_cmd("playerctl next") -end, { locked = true }) -hl.bind(" + XF86AudioPause", function() - hl.exec_cmd("playerctl play-pause") -end, { locked = true }) -hl.bind(" + XF86AudioPlay", function() - hl.exec_cmd("playerctl play-pause") -end, { locked = true }) -hl.bind(" + XF86AudioPrev", function() - hl.exec_cmd("playerctl previous") -end, { locked = true }) -hl.bind("SUPER + mouse:272", hl.dsp.window.drag(), { mouse = true }) -hl.bind("SUPER + mouse:273", hl.dsp.window.resize(), { mouce = true }) --- hl.bind(" + mouse:272", hl.dsp.hy3:focustab({ mouse })) --, { non_consuming = true } - -hl.on("hyprland.start", function() - hl.exec_cmd("hyprctl plugin load /nix/store/faphbyy63c9v1m6a7dl3ash30vy8bap9-hy3-0.55.0/lib/libhy3.so") - hl.exec_cmd("nm-applet") - hl.exec_cmd("sleep 2 && hyprpm reload -n") - hl.exec_cmd("systemctl --user start hyprpolkitagent") - hl.exec_cmd("gsettings set org.gnome.desktop.interface color-scheme 'prefer-dark'") - hl.exec_cmd("gsettings set org.gnome.desktop.interface gtk-theme 'Adwaita-dark'") - hl.exec_cmd("wpaperd") - hl.exec_cmd("sleep 2 && eww open-many primary-statusbar secondary-statusbar") - hl.exec_cmd("xrandr --output DP-2 --primary") -end) - -hl.curve("easeOutQuint", { - type = "bezier", - points = { { 0.23, 1.0 }, { 0.32, 1.0 } }, -}) -hl.curve("easeInOutCubic", { - type = "bezier", - points = { { 0.65, 0.05 }, { 0.36, 1.0 } }, -}) -hl.curve("linear", { - type = "bezier", - points = { { 0.0, 0.0 }, { 1.0, 1.0 } }, -}) -hl.curve("almostLinear", { - type = "bezier", - points = { { 0.5, 0.5 }, { 0.75, 1.0 } }, -}) -hl.curve("quick", { - type = "bezier", - points = { { 0.15, 0.0 }, { 0.1, 1.0 } }, -}) - -hl.animation({ - leaf = "global", - enabled = true, - speed = 10.0, - bezier = "default", -}) -hl.animation({ - leaf = "border", - enabled = true, - speed = 5.39, - bezier = "easeOutQuint", -}) -hl.animation({ - leaf = "windows", - enabled = true, - speed = 4.79, - bezier = "easeOutQuint", -}) -hl.animation({ - leaf = "windowsIn", - enabled = true, - speed = 4.1, - bezier = "easeOutQuint", - style = "popin 87%", -}) -hl.animation({ - leaf = "windowsOut", - enabled = true, - speed = 1.49, - bezier = "linear", - style = "popin 87%", -}) -hl.animation({ - leaf = "fadeIn", - enabled = true, - speed = 1.73, - bezier = "almostLinear", -}) -hl.animation({ - leaf = "fadeOut", - enabled = true, - speed = 1.46, - bezier = "almostLinear", -}) -hl.animation({ - leaf = "fade", - enabled = true, - speed = 3.03, - bezier = "quick", -}) -hl.animation({ - leaf = "layers", - enabled = true, - speed = 3.81, - bezier = "easeOutQuint", -}) -hl.animation({ - leaf = "layersIn", - enabled = true, - speed = 4.0, - bezier = "easeOutQuint", - style = "fade", -}) -hl.animation({ - leaf = "layersOut", - enabled = true, - speed = 1.5, - bezier = "linear", - style = "fade", -}) -hl.animation({ - leaf = "fadeLayersIn", - enabled = true, - speed = 1.79, - bezier = "almostLinear", -}) -hl.animation({ - leaf = "fadeLayersOut", - enabled = true, - speed = 1.39, - bezier = "almostLinear", -}) -hl.animation({ - leaf = "workspaces", - enabled = true, - speed = 1.94, - bezier = "almostLinear", - style = "fade", -}) -hl.animation({ - leaf = "workspacesIn", - enabled = true, - speed = 1.21, - bezier = "almostLinear", - style = "fade", -}) -hl.animation({ - leaf = "workspacesOut", - enabled = true, - speed = 1.94, - bezier = "almostLinear", - style = "fade", -}) - -- Additional configs require("config.autostart") +require("config.binds") +require("config.animation")