diff --git a/hypr/colors.lua b/hypr/colors.lua new file mode 120000 index 0000000..9004841 --- /dev/null +++ b/hypr/colors.lua @@ -0,0 +1 @@ +/home/baobeld/.cache/wal/colors.lua \ No newline at end of file diff --git a/hypr/hyprland.conf b/hypr/hyprland.conf deleted file mode 100644 index 42cd3a1..0000000 --- a/hypr/hyprland.conf +++ /dev/null @@ -1,78 +0,0 @@ -# See https://wiki.hyprland.org/Configuring/Keywords/ for more - -# Programs -$terminal = alacritty -$fileManager = nautilus -$lockScreen = hyprlock - -# See https://wiki.hyprland.org/Configuring/Keywords/ for more -$mainMod = SUPER - -# See https://wiki.hyprland.org/Configuring/Monitors/ -# PC -monitor=DP-1,2560x1440@144,auto,auto - -# Laptop -monitor=eDP-1,1920x1080@60,auto,1.20 - -# For all categories, see https://wiki.hyprland.org/Configuring/Variables/ -input { - kb_layout = us - kb_variant = - kb_model = - kb_options = - kb_rules = - - follow_mouse = 1 - - touchpad { - natural_scroll = no - } - - sensitivity = 0 # -1.0 - 1.0, 0 means no modification. -} - -general { - # See https://wiki.hyprland.org/Configuring/Variables/ for more - - gaps_in = 10 - gaps_out = 10 - border_size = 3 - - layout = dwindle - - # Please see https://wiki.hyprland.org/Configuring/Tearing/ before you turn this on - allow_tearing = true -} - -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 -} - -master { - # See https://wiki.hyprland.org/Configuring/Master-Layout/ for more -} - -misc { - # See https://wiki.hyprland.org/Configuring/Variables/ for more - force_default_wallpaper = -1 # Set to 0 or 1 to disable the anime mascot wallpapers -} - -# Example per-device config -# See https://wiki.hyprland.org/Configuring/Keywords/#executing for more -device { - name = epic-mouse-v1 - sensitivity = -0.5 -} - -$hypr = ~/.config/hypr/hyprland - -source = $hypr/animations.conf -source = $hypr/colours.conf -source = $hypr/decorations.conf -source = $hypr/env.conf -source = $hypr/execs.conf -source = $hypr/keybinds.conf -source = $hypr/rules.conf diff --git a/hypr/hyprland.lua b/hypr/hyprland.lua index 619f1fe..47dfcdd 100644 --- a/hypr/hyprland.lua +++ b/hypr/hyprland.lua @@ -1,4 +1,6 @@ require("hyprland.bindings") +require("hyprland.env") +require("hyprland.rules") local M = require("colors") -- monitors https://wiki.hypr.land/Configuring/Basics/Monitors/ @@ -16,33 +18,30 @@ hl.monitor({ scale = 1.20, }) --- environment -hl.env("XDG_SESSION_TYPE", "wayland") -hl.env("QT_QPA_PLATFORM", "wayland") +hl.on("config.reloaded", function() + hl.notification.create({ text = "Config Reloaded" }) +end) -hl.env("LIBVA_DRIVER_NAME", "nvidia") -hl.env("__GLX_VENDOR_LIBRARY_NAME", "nvidia") -hl.env("NVD_BACKEND", "direct") -hl.env("GBM_BACKEND", "nvidia-drm") -hl.env("__GL_VRR_ALLOWED", "1") +hl.on("hyprland.start", function() + hl.exec_cmd("gnome-keyring-daemon --start --components=secrets") + hl.exec_cmd("hypridle") + hl.exec_cmd("swww-daemon") + hl.exec_cmd("quickshell") + hl.exec_cmd("xsetroot -cursor_name left_ptr") -hl.env("ELECTRON_OZONE_PLATFORM_HINT", "auto") - -hl.env("GTK_THEME", "WhiteSur-Dark") -hl.env("ICON_THEME", "WhiteSur-Dark") -hl.env("COLOR_SCHEME", "prefer-dark") - -hl.env("XCURSOR_PATH", "/usr/share/icons/:$XDG_DATA_HOME/icons") -hl.env("XCURSOR_THEME", "default") -hl.env("XCURSOR_SIZE", 24) -hl.env("HYPRCURSOR_THEME", "Volantes Cursors") -hl.env("HYPRCURSOR_SIZE", 24) - -hl.env("FONT_NAME", "JetBrainsMono Nerd Font 24") -hl.env("DOCUMENT_FONT_NAME", "Cantarell 24") -hl.env("MONOSPACE_FONT_NAME", "JetBrainsMono Nerd Font 24") -hl.env("FONT_ANTIALIASING", "rgba") -hl.env("FONT_HINTING", "full") + hl.exec_cmd("thunderbird", { workspace = "1 silent" }) + hl.exec_cmd('proton-mail --password-store="gnome-libsecret"', { workspace = "1 silent" }) + hl.exec_cmd("discord --enable-features=UseOzonePlatform --ozone-platform=wayland", { workspace = "2 silent" }) + hl.exec_cmd('signal-desktop --password-store="gnome-libsecret"', { workspace = "2 silent" }) + hl.exec_cmd("zen-browser", { workspace = "3 silent" }) + hl.exec_cmd("alacritty", { workspace = "4 silent" }) + hl.exec_cmd("steam", { workspace = "5 silent" }) + hl.exec_cmd("alacritty", { workspace = "special:terminal silent" }) + hl.exec_cmd( + "tidal-hifi --enable-features=UseOzonePlatform --ozone-platform=wayland", + { workspace = "special:music silent" } + ) +end) -- bindings @@ -57,31 +56,14 @@ hl.env("FONT_HINTING", "full") -- natural_scroll = "no", -- }) --- general https://wiki.hypr.land/Configuring/Basics/Variables/#general --- hl.general({ --- gaps_in = 10, --- gaps_out = 10, --- border_size = 3, --- layout = "dwindle", --- allow_tearing = true, --- }) - --- layout https://wiki.hypr.land/Configuring/Layouts/Dwindle-Layout/ -hl.config({ - dwindle = { - preserve_split = true, - }, -}) - --- animations https://wiki.hypr.land/Configuring/Advanced-and-Cool/Animations/ - --- colour --- hl.general.col.active_border = { colors = { color4, color13 }, angle = 45 } --- hl.general.col.inactive_border = { colors = { color0 } } - -- config https://wiki.hypr.land/Configuring/Basics/Variables hl.config({ general = { + gaps_in = 10, + gaps_out = 10, + border_size = 3, + layout = "dwindle", + allow_tearing = true, col = { active_border = { colors = { M.color4, M.color13 }, angle = 45 }, inactive_border = { colors = { M.color0 } }, @@ -102,6 +84,9 @@ hl.config({ color = "#1a1a1aee", }, }, + dwindle = { + preserve_split = true, + }, misc = { force_default_wallpaper = 0, }, diff --git a/hypr/hyprland/bindings.lua b/hypr/hyprland/bindings.lua index 3130554..b3595a1 100644 --- a/hypr/hyprland/bindings.lua +++ b/hypr/hyprland/bindings.lua @@ -5,7 +5,6 @@ hl.bind( "SUPER + F10", hl.dsp.send_shortcut({ mods = "CTRL", key = "F10", window = "class:^(com\\.obsproject\\.Studio)$" }) ) -hl.bind("CTRL + SHIFT + M", hl.dsp.pass({ window = "initialClass: discord" })) hl.bind("SUPER + ESCAPE", hl.dsp.global("lux:power-menu")) hl.bind("SUPER + R", hl.dsp.global("lux:launcher")) @@ -14,7 +13,7 @@ hl.bind("SUPER + W", hl.dsp.global("lux:storybook")) hl.bind("SUPER + grave", hl.dsp.global("lux:configuration")) hl.bind("SUPER + T", hl.dsp.exec_cmd("alacritty")) -hl.bind("SUPER + X", hl.dsp.window.kill()) +hl.bind("SUPER + X", hl.dsp.window.close()) hl.bind("SUPER + E", hl.dsp.exec_cmd("nautilus")) hl.bind("SUPER + F", hl.dsp.window.float()) hl.bind("SUPER + CTRL + F", hl.dsp.window.fullscreen()) @@ -57,8 +56,8 @@ hl.bind("SUPER + right", hl.dsp.focus({ direction = "r" })) hl.bind("SUPER + up", hl.dsp.focus({ direction = "u" })) hl.bind("SUPER + down", hl.dsp.focus({ direction = "d" })) -hl.bind("CTRL + SUPER + T", hl.dsp.workspace.toggle_special("terminal")) -hl.bind("CTRL + SUPER + M", hl.dsp.workspace.toggle_special("music")) +hl.bind("CTRL + SHIFT + T", hl.dsp.workspace.toggle_special("terminal")) +hl.bind("CTRL + SHIFT + M", hl.dsp.workspace.toggle_special("music")) hl.bind("XF86AudioRaiseVolume", hl.dsp.exec_cmd("wpctl set-volume @DEFAULT_AUDIO_SINK@ 2%+")) hl.bind("XF86AudioLowerVolume", hl.dsp.exec_cmd("wpctl set-volume @DEFAULT_AUDIO_SINK@ 2%-")) diff --git a/hypr/hyprland/colours.conf b/hypr/hyprland/colours.conf deleted file mode 100644 index caa84ef..0000000 --- a/hypr/hyprland/colours.conf +++ /dev/null @@ -1,7 +0,0 @@ -# PyWal Colors -source = ~/.cache/wal/colors-hyprland.conf - -general { - col.active_border = $color4 $color13 45deg - col.inactive_border = $color0 -} diff --git a/hypr/hyprland/decorations.conf b/hypr/hyprland/decorations.conf deleted file mode 100644 index ed6c1df..0000000 --- a/hypr/hyprland/decorations.conf +++ /dev/null @@ -1,19 +0,0 @@ -decoration { - # See https://wiki.hyprland.org/Configuring/Variables/ for more - - rounding = 6 - - blur { - enabled = true - size = 6 - passes = 1 - ignore_opacity = true - } - - shadow { - enabled = true - range = 4 - render_power = 3 - color = rgba(1a1a1aee) - } -} diff --git a/hypr/hyprland/env.conf b/hypr/hyprland/env.conf deleted file mode 100644 index ab07e7c..0000000 --- a/hypr/hyprland/env.conf +++ /dev/null @@ -1,47 +0,0 @@ -# ----------------------------------------------------- -# Environment Variables -# ----------------------------------------------------- - -# General -env = XDG_SESSION_TYPE,wayland -env = QT_QPA_PLATFORM,wayland - -# Nvidia -# https://wiki.hyprland.org/Nvidia/ -env = LIBVA_DRIVER_NAME,nvidia -env = __GLX_VENDOR_LIBRARY_NAME,nvidia -env = NVD_BACKEND,direct - -env = GBM_BACKEND,nvidia-drm -env = __GL_VRR_ALLOWED,1 - -# Electron -env = ELECTRON_OZONE_PLATFORM_HINT,auto - -# Themes -env = GTK_THEME,WhiteSur-Dark -env = ICON_THEME,WhiteSur-Dark -env = COLOR_SCHEME,prefer-dark - -#Cursors -cursor { - no_hardware_cursors = true -} -env = XCURSOR_PATH, /usr/share/icons:$XDG_DATA_HOME/icons -env = XCURSOR_THEME,default -env = XCURSOR_SIZE,24 -env = HYPRCURSOR_THEME,Volantes Cursors -env = HYPRCURSOR_SIZE,24 -exec-once = hyprctl setcursor $cursorTheme $cursorSize -# exec-once = gsettings set org.gnome.desktop.interface cursor-theme '$cursorTheme' -# exec-once = gsettings set org.gnome.desktop.interface cursor-size $cursorSize - -# Fonts -env = FONT_NAME,JetBrainsMono Nerd Font 24 -env = DOCUMENT_FONT_NAME,Cantarell 24 -env = MONOSPACE_FONT_NAME,JetBrainsMono Nerd Font 5 -env = FONT_ANTIALIASING,rgba -env = FONT_HINTING,full - -# uwsm/app2unit -env = APP2UNIT_SLICES,'a=app-graphical.slice b=background-graphical.slice s=session-graphical.slice' diff --git a/hypr/hyprland/env.lua b/hypr/hyprland/env.lua new file mode 100644 index 0000000..720cf5e --- /dev/null +++ b/hypr/hyprland/env.lua @@ -0,0 +1,28 @@ +hl.env("XDG_SESSION_TYPE", "wayland") +hl.env("QT_QPA_PLATFORM", "wayland") + +hl.env("LIBVA_DRIVER_NAME", "nvidia") +hl.env("__GLX_VENDOR_LIBRARY_NAME", "nvidia") +hl.env("NVD_BACKEND", "direct") +hl.env("GBM_BACKEND", "nvidia-drm") +hl.env("__GL_VRR_ALLOWED", "1") + +hl.env("ELECTRON_OZONE_PLATFORM_HINT", "auto") + +hl.env("GTK_THEME", "WhiteSur-Dark") +hl.env("ICON_THEME", "WhiteSur-Dark") +hl.env("COLOR_SCHEME", "prefer-dark") + +hl.env("XCURSOR_PATH", "/usr/share/icons/:$XDG_DATA_HOME/icons") +hl.env("XCURSOR_THEME", "default") +hl.env("XCURSOR_SIZE", 24) +hl.env("HYPRCURSOR_THEME", "Volantes Cursors") +hl.env("HYPRCURSOR_SIZE", 24) + +hl.env("FONT_NAME", "JetBrainsMono Nerd Font 24") +hl.env("DOCUMENT_FONT_NAME", "Cantarell 24") +hl.env("MONOSPACE_FONT_NAME", "JetBrainsMono Nerd Font 24") +hl.env("FONT_ANTIALIASING", "rgba") +hl.env("FONT_HINTING", "full") + +hl.env("APP2UNIT_SLICES", "a=app-graphical.slice b=background-graphical.slice s=session-graphical.slice") diff --git a/hypr/hyprland/execs.conf b/hypr/hyprland/execs.conf deleted file mode 100644 index 429408b..0000000 --- a/hypr/hyprland/execs.conf +++ /dev/null @@ -1,23 +0,0 @@ -# Key ring -exec-once = gnome-keyring-daemon --start --components=secrets - -# Idle Daemon -exec-once = hypridle -# Lux-shell -exec-once = quickshell -# Emotes -exec-once = emote -# Wallpaper Daemon -exec-once = swww-daemon - -exec-once = xsetroot -cursor_name left_ptr -exec-once = [workspace 1 silent] thunderbird -exec-once = [workspace 1 silent] proton-mail --password-store="gnome-libsecret" -exec-once = [workspace 2 silent] discord --enable-features=UseOzonePlatform --ozone-platform=wayland -exec-once = [workspace 2 silent] signal-desktop --password-store="gnome-libsecret" -exec-once = [workspace 3 silent] zen-browser -exec-once = [workspace 4 silent] alacritty -exec-once = [workspace 5 silent] steam -exec-once = [workspace special:terminal silent] alacritty -exec-once = [workspace special:music silent] tidal-hifi --enable-features=UseOzonePlatform --ozone-platform=wayland - diff --git a/hypr/hyprland/keybinds.conf b/hypr/hyprland/keybinds.conf deleted file mode 100644 index 1f816ac..0000000 --- a/hypr/hyprland/keybinds.conf +++ /dev/null @@ -1,93 +0,0 @@ - -# Lux Keybinds -bind = $mainMod, ESCAPE, global, lux:power-menu -bind = $mainMod, R, global, lux:launcher -bind = $mainMod, M, global, lux:pomodoro -bind = $mainMod, W, global, lux:storybook -bind = $mainMod, grave, global, lux:configuration - -# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more - -# Global -bind = SUPER, F10, sendshortcut, CTRL, F10, class:^(com\.obsproject\.Studio)$ - -# Programs -bind = $mainMod, T, exec, $terminal -bind = $mainMod, X, killactive, -bind = $mainMod, E, exec, $fileManager -bind = $mainMod, F, togglefloating, -bind = $mainMod, P, pseudo, # dwindle -bind = $mainMod, V, togglesplit, # dwindle -bind = $mainMod, L, exec, $lockScreen # hyprlock -bind = $mainMod, period, exec, gnome-characters -bind = $mainMod, B, exec, zen-browser -bind = $mainMod CTRL, F, fullscreen -bind = , PRINT, exec, grim -g "$(slurp)" - | swappy -f - - -# 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 - -# 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 - -############################################################################### -# Special workspaces -############################################################################### -# Scratchpad -bind = CTRL SHIFT, S, togglespecialworkspace, magic -bind = CTRL $mainMod, S, movetoworkspace, special:magic - -# Terminal -bind = CTRL SHIFT, T, togglespecialworkspace, terminal - -# Music -bind = CTRL SHIFT, M, togglespecialworkspace, music - -# Scroll through existing workspaces with mainMod + scroll -bind = $mainMod, mouse_down, workspace, e+1 -bind = $mainMod, mouse_up, workspace, e-1 - -# Switch workspaces -bind = CTRL ALT, right, workspace, e+1 -bind = CTRL ALT, left, workspace, e-1 - -# Move/resize windows with mainMod + LMB/RMB and dragging -bindm = $mainMod, mouse:272, movewindow -bindm = $mainMod, mouse:273, resizewindow - -# Audio keybinds -bind = , XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 2%+ -bind = , XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 2%- -bind = , XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle -bind = , XF86AudioPlay, exec, playerctl play-pause -bind = , XF86AudioStop, exec, -bind = , XF86AudioPrev, exec, playerctl previous -bind = , XF86AudioNext, exec, playerctl next - -# Gestures -# https://wiki.hypr.land/Configuring/Gestures/ -gesture = 4, horizontal, workspace diff --git a/hypr/hyprland/rules.conf b/hypr/hyprland/rules.conf deleted file mode 100644 index e2c4fa9..0000000 --- a/hypr/hyprland/rules.conf +++ /dev/null @@ -1,28 +0,0 @@ -# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more -windowrule = match:class .*, no_max_size true - -# Apps -windowrule = match:class ^(*)$, idle_inhibit fullscreen true -windowrule = match:title ^(*)$, idle_inhibit fullscreen true -windowrule = match:fullscreen true, idle_inhibit fullscreen -windowrule = match:modal true, float 0, center 0 - -# windowrule = workspace special:terminal, kitty -windowrule = match:initial_class tidal-hifi, workspace special:music - -windowrule = match:class thunderbird, workspace 1, no_initial_focus true -windowrule = match:class discord, workspace 2, no_initial_focus true -windowrule = match:class signal, workspace 2, opacity 0.999, no_initial_focus true -windowrule = match:class firefox, workspace 3, opacity 0.999, no_initial_focus true -windowrule = match:class steam, workspace 5, float true, no_initial_focus true -windowrule = match:class ^(steam_app_*)$, workspace 5, no_initial_focus true - -windowrule = match:class org.gnome.Calculator, float true - -# Workspaces -workspace = 1, persistent:true -workspace = 2, persistent:true -workspace = 3, persistent:true -workspace = 4, persistent:true -workspace = 5, persistent:true - diff --git a/hypr/hyprland/rules.lua b/hypr/hyprland/rules.lua new file mode 100644 index 0000000..54890e8 --- /dev/null +++ b/hypr/hyprland/rules.lua @@ -0,0 +1,18 @@ +hl.window_rule({ match = { modal = true }, float = true, center = true }) +hl.window_rule({ idle_inhibit = "fullscreen" }) + +hl.window_rule({ match = { initial_class = "tidal-hifi" }, workspace = "special:music" }) + +hl.window_rule({ match = { initial_class = "thunderbird" }, workspace = "1" }) +hl.window_rule({ match = { initial_class = "discord" }, workspace = "2" }) +hl.window_rule({ match = { initial_class = "signal" }, workspace = "2" }) +hl.window_rule({ match = { initial_class = "zen-browser" }, workspace = "3" }) +hl.window_rule({ match = { initial_class = "steam" }, workspace = "5" }) + +hl.window_rule({ match = { class = "org.gnome.Calculator" }, float = true }) + +hl.workspace_rule({ workspace = "1", persistent = true }) +hl.workspace_rule({ workspace = "2", persistent = true }) +hl.workspace_rule({ workspace = "3", persistent = true }) +hl.workspace_rule({ workspace = "4", persistent = true }) +hl.workspace_rule({ workspace = "5", persistent = true })