diff --git a/hypr/autostart.lua b/hypr/autostart.lua new file mode 100644 index 0000000..e69de29 diff --git a/hypr/colors.lua b/hypr/colors.lua new file mode 100644 index 0000000..8fe412a --- /dev/null +++ b/hypr/colors.lua @@ -0,0 +1,104 @@ +return { + image = "/home/sem/Pictures/wallpapers/a_person_riding_a_bicycle_on_a_hill_with_sunflowers.jpeg", + + background = "0xff0f1510", + + error = "0xffff5449", + + error_container = "0xff7b0007", + + inverse_on_surface = "0xff606660", + + inverse_primary = "0xff508d65", + + inverse_surface = "0xffdfe4dd", + + on_background = "0xff5e645e", + + on_error = "0xff5c0003", + + on_error_container = "0xffff7d70", + + on_primary = "0xff0c4f2d", + + on_primary_container = "0xff73b286", + + on_primary_fixed = "0xff93d2a5", + + on_primary_fixed_variant = "0xff6fad83", + + on_secondary = "0xff1b2e21", + + on_secondary_container = "0xff94a997", + + on_secondary_fixed = "0xffb3cab6", + + on_secondary_fixed_variant = "0xff90a593", + + on_surface = "0xff9fa49e", + + on_surface_variant = "0xff7d857d", + + on_tertiary = "0xff002e38", + + on_tertiary_container = "0xff80abb7", + + on_tertiary_fixed = "0xffa0cbd8", + + on_tertiary_fixed_variant = "0xff7da7b3", + + outline = "0xff4e564f", + + outline_variant = "0xff343c35", + + primary = "0xff609e74", + + primary_container = "0xff004424", + + primary_fixed = "0xff1e5c38", + + primary_fixed_dim = "0xff004424", + + scrim = "0xff000000", + + secondary = "0xff819684", + + secondary_container = "0xff2b3e30", + + secondary_fixed = "0xff425647", + + secondary_fixed_dim = "0xff2b3e30", + + shadow = "0xff000000", + + source_color = "0xff52735b", + + surface = "0xff0f1510", + + surface_bright = "0xff353b36", + + surface_container = "0xff1c211c", + + surface_container_high = "0xff262b27", + + surface_container_highest = "0xff313631", + + surface_container_low = "0xff181d19", + + surface_container_lowest = "0xff0a0f0b", + + surface_dim = "0xff0f1510", + + surface_tint = "0xff95d5a7", + + surface_variant = "0xff414942", + + tertiary = "0xff6d97a3", + + tertiary_container = "0xff11404a", + + tertiary_fixed = "0xff2c5762", + + tertiary_fixed_dim = "0xff11404a", + +} \ No newline at end of file diff --git a/hypr/environment.lua b/hypr/environment.lua new file mode 100644 index 0000000..8bfca68 --- /dev/null +++ b/hypr/environment.lua @@ -0,0 +1,7 @@ +-- See https://wiki.hypr.land/Configuring/Environment-variables/ + +-- Generated by hyprlang2lua. Review TODOs before reloading Hyprland. + +hl.env("XCURSOR_SIZE", "24") +hl.env("HYPRCURSOR_SIZE", "24") +hl.env("QT_QPA_PLATFORMTHEME", "qt6ct") \ No newline at end of file diff --git a/hypr/hyprland-base.lua b/hypr/hyprland-base.lua new file mode 100644 index 0000000..b38b1e0 --- /dev/null +++ b/hypr/hyprland-base.lua @@ -0,0 +1,356 @@ +-- This is an example Hyprland Lua config file. +-- Refer to the wiki for more information. +-- https://wiki.hypr.land/Configuring/Start/ + +-- Please note not all available settings / options are set here. +-- For a full list, see the wiki + +-- You can (and should!!) split this configuration into multiple files +-- Create your files separately and then require them like this: +-- require("myColors") + + +------------------ +---- MONITORS ---- +------------------ + +-- See https://wiki.hypr.land/Configuring/Basics/Monitors/ +hl.monitor({ + output = "", + mode = "preferred", + position = "auto", + scale = "auto", +}) + + +--------------------- +---- MY PROGRAMS ---- +--------------------- + +-- Set programs that you use +local terminal = "kitty" +local fileManager = "dolphin" +local menu = "hyprlauncher" + + +------------------- +---- AUTOSTART ---- +------------------- + +-- See https://wiki.hypr.land/Configuring/Basics/Autostart/ + +-- Autostart necessary processes (like notifications daemons, status bars, etc.) +-- Or execute your favorite apps at launch like this: +-- +-- hl.on("hyprland.start", function () +-- hl.exec_cmd(terminal) +-- hl.exec_cmd("nm-applet") +-- hl.exec_cmd("waybar & hyprpaper & firefox") +-- end) + + +------------------------------- +---- ENVIRONMENT VARIABLES ---- +------------------------------- + +-- See https://wiki.hypr.land/Configuring/Advanced-and-Cool/Environment-variables/ + +hl.env("XCURSOR_SIZE", "24") +hl.env("HYPRCURSOR_SIZE", "24") + + +----------------------- +----- PERMISSIONS ----- +----------------------- + +-- See https://wiki.hypr.land/Configuring/Advanced-and-Cool/Permissions/ +-- Please note permission changes here require a Hyprland restart and are not applied on-the-fly +-- for security reasons + +-- hl.config({ +-- ecosystem = { +-- enforce_permissions = true, +-- }, +-- }) + +-- hl.permission("/usr/(bin|local/bin)/grim", "screencopy", "allow") +-- hl.permission("/usr/(lib|libexec|lib64)/xdg-desktop-portal-hyprland", "screencopy", "allow") +-- hl.permission("/usr/(bin|local/bin)/hyprpm", "plugin", "allow") + + +----------------------- +---- LOOK AND FEEL ---- +----------------------- + +-- Refer to https://wiki.hypr.land/Configuring/Basics/Variables/ +hl.config({ + general = { + gaps_in = 5, + gaps_out = 20, + + border_size = 2, + + col = { + active_border = { colors = {"rgba(33ccffee)", "rgba(00ff99ee)"}, angle = 45 }, + inactive_border = "rgba(595959aa)", + }, + + -- Set to true to enable resizing windows by clicking and dragging on borders and gaps + resize_on_border = false, + + -- Please see https://wiki.hypr.land/Configuring/Advanced-and-Cool/Tearing/ before you turn this on + allow_tearing = false, + + layout = "dwindle", + }, + + decoration = { + rounding = 10, + rounding_power = 2, + + -- Change transparency of focused and unfocused windows + active_opacity = 1.0, + inactive_opacity = 1.0, + + shadow = { + enabled = true, + range = 4, + render_power = 3, + color = 0xee1a1a1a, + }, + + blur = { + enabled = true, + size = 3, + passes = 1, + vibrancy = 0.1696, + }, + }, + + animations = { + enabled = true, + }, +}) + +-- Default curves and animations, see https://wiki.hypr.land/Configuring/Advanced-and-Cool/Animations/ +hl.curve("easeOutQuint", { type = "bezier", points = { {0.23, 1}, {0.32, 1} } }) +hl.curve("easeInOutCubic", { type = "bezier", points = { {0.65, 0.05}, {0.36, 1} } }) +hl.curve("linear", { type = "bezier", points = { {0, 0}, {1, 1} } }) +hl.curve("almostLinear", { type = "bezier", points = { {0.5, 0.5}, {0.75, 1} } }) +hl.curve("quick", { type = "bezier", points = { {0.15, 0}, {0.1, 1} } }) + +-- Default springs +hl.curve("easy", { type = "spring", mass = 1, stiffness = 71.2633, dampening = 15.8273644 }) + +hl.animation({ leaf = "global", enabled = true, speed = 10, bezier = "default" }) +hl.animation({ leaf = "border", enabled = true, speed = 5.39, bezier = "easeOutQuint" }) +hl.animation({ leaf = "windows", enabled = true, speed = 4.79, spring = "easy" }) +hl.animation({ leaf = "windowsIn", enabled = true, speed = 4.1, spring = "easy", 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, 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" }) +hl.animation({ leaf = "zoomFactor", enabled = true, speed = 7, bezier = "quick" }) + +-- Ref https://wiki.hypr.land/Configuring/Basics/Workspace-Rules/ +-- "Smart gaps" / "No gaps when only" +-- uncomment all if you wish to use that. +-- hl.workspace_rule({ workspace = "w[tv1]", gaps_out = 0, gaps_in = 0 }) +-- hl.workspace_rule({ workspace = "f[1]", gaps_out = 0, gaps_in = 0 }) +-- hl.window_rule({ +-- name = "no-gaps-wtv1", +-- match = { float = false, workspace = "w[tv1]" }, +-- border_size = 0, +-- rounding = 0, +-- }) +-- hl.window_rule({ +-- name = "no-gaps-f1", +-- match = { float = false, workspace = "f[1]" }, +-- border_size = 0, +-- rounding = 0, +-- }) + +-- See https://wiki.hypr.land/Configuring/Layouts/Dwindle-Layout/ for more +hl.config({ + dwindle = { + preserve_split = true, -- You probably want this + }, +}) + +-- See https://wiki.hypr.land/Configuring/Layouts/Master-Layout/ for more +hl.config({ + master = { + new_status = "master", + }, +}) + +-- See https://wiki.hypr.land/Configuring/Layouts/Scrolling-Layout/ for more +hl.config({ + scrolling = { + fullscreen_on_one_column = true, + }, +}) + +---------------- +---- MISC ---- +---------------- + +hl.config({ + misc = { + force_default_wallpaper = -1, -- Set to 0 or 1 to disable the anime mascot wallpapers + disable_hyprland_logo = false, -- If true disables the random hyprland logo / anime girl background. :( + }, +}) + + +--------------- +---- INPUT ---- +--------------- + +hl.config({ + input = { + kb_layout = "us", + kb_variant = "", + kb_model = "", + kb_options = "", + kb_rules = "", + + follow_mouse = 1, + + sensitivity = 0, -- -1.0 - 1.0, 0 means no modification. + + touchpad = { + natural_scroll = false, + }, + }, +}) + +hl.gesture({ + fingers = 3, + direction = "horizontal", + action = "workspace" +}) + +-- Example per-device config +-- See https://wiki.hypr.land/Configuring/Advanced-and-Cool/Devices/ for more +hl.device({ + name = "epic-mouse-v1", + sensitivity = -0.5, +}) + + +--------------------- +---- KEYBINDINGS ---- +--------------------- + +local mainMod = "SUPER" -- Sets "Windows" key as main modifier + +-- Example binds, see https://wiki.hypr.land/Configuring/Basics/Binds/ for more +hl.bind(mainMod .. " + Q", hl.dsp.exec_cmd(terminal)) +local closeWindowBind = hl.bind(mainMod .. " + C", hl.dsp.window.close()) +-- closeWindowBind:set_enabled(false) +hl.bind(mainMod .. " + M", hl.dsp.exec_cmd("command -v hyprshutdown >/dev/null 2>&1 && hyprshutdown || hyprctl dispatch 'hl.dsp.exit()'")) +hl.bind(mainMod .. " + E", hl.dsp.exec_cmd(fileManager)) +hl.bind(mainMod .. " + V", hl.dsp.window.float({ action = "toggle" })) +hl.bind(mainMod .. " + R", hl.dsp.exec_cmd(menu)) +hl.bind(mainMod .. " + P", hl.dsp.window.pseudo()) +hl.bind(mainMod .. " + J", hl.dsp.layout("togglesplit")) -- dwindle only + +-- Move focus with mainMod + arrow keys +hl.bind(mainMod .. " + left", hl.dsp.focus({ direction = "left" })) +hl.bind(mainMod .. " + right", hl.dsp.focus({ direction = "right" })) +hl.bind(mainMod .. " + up", hl.dsp.focus({ direction = "up" })) +hl.bind(mainMod .. " + down", hl.dsp.focus({ direction = "down" })) + +-- Switch workspaces with mainMod + [0-9] +-- Move active window to a workspace with mainMod + SHIFT + [0-9] +for i = 1, 10 do + local key = i % 10 -- 10 maps to key 0 + hl.bind(mainMod .. " + " .. key, hl.dsp.focus({ workspace = i})) + hl.bind(mainMod .. " + SHIFT + " .. key, hl.dsp.window.move({ workspace = i })) +end + +-- Example special workspace (scratchpad) +hl.bind(mainMod .. " + S", hl.dsp.workspace.toggle_special("magic")) +hl.bind(mainMod .. " + SHIFT + S", hl.dsp.window.move({ workspace = "special:magic" })) + +-- Scroll through existing workspaces with mainMod + scroll +hl.bind(mainMod .. " + mouse_down", hl.dsp.focus({ workspace = "e+1" })) +hl.bind(mainMod .. " + mouse_up", hl.dsp.focus({ workspace = "e-1" })) + +-- Move/resize windows with mainMod + LMB/RMB and dragging +hl.bind(mainMod .. " + mouse:272", hl.dsp.window.drag(), { mouse = true }) +hl.bind(mainMod .. " + mouse:273", hl.dsp.window.resize(), { mouse = true }) + +-- Laptop multimedia keys for volume and LCD brightness +hl.bind("XF86AudioRaiseVolume", hl.dsp.exec_cmd("wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+"), { locked = true, repeating = true }) +hl.bind("XF86AudioLowerVolume", hl.dsp.exec_cmd("wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-"), { locked = true, repeating = true }) +hl.bind("XF86AudioMute", hl.dsp.exec_cmd("wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"), { locked = true, repeating = true }) +hl.bind("XF86AudioMicMute", hl.dsp.exec_cmd("wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle"), { locked = true, repeating = true }) +hl.bind("XF86MonBrightnessUp", hl.dsp.exec_cmd("brightnessctl -e4 -n2 set 5%+"), { locked = true, repeating = true }) +hl.bind("XF86MonBrightnessDown",hl.dsp.exec_cmd("brightnessctl -e4 -n2 set 5%-"), { locked = true, repeating = true }) + +-- Requires playerctl +hl.bind("XF86AudioNext", hl.dsp.exec_cmd("playerctl next"), { locked = true }) +hl.bind("XF86AudioPause", hl.dsp.exec_cmd("playerctl play-pause"), { locked = true }) +hl.bind("XF86AudioPlay", hl.dsp.exec_cmd("playerctl play-pause"), { locked = true }) +hl.bind("XF86AudioPrev", hl.dsp.exec_cmd("playerctl previous"), { locked = true }) + + +-------------------------------- +---- WINDOWS AND WORKSPACES ---- +-------------------------------- + +-- See https://wiki.hypr.land/Configuring/Basics/Window-Rules/ +-- and https://wiki.hypr.land/Configuring/Basics/Workspace-Rules/ + +-- Example window rules that are useful + +local suppressMaximizeRule = hl.window_rule({ + -- Ignore maximize requests from all apps. You'll probably like this. + name = "suppress-maximize-events", + match = { class = ".*" }, + + suppress_event = "maximize", +}) +-- suppressMaximizeRule:set_enabled(false) + +hl.window_rule({ + -- Fix some dragging issues with XWayland + name = "fix-xwayland-drags", + match = { + class = "^$", + title = "^$", + xwayland = true, + float = true, + fullscreen = false, + pin = false, + }, + + no_focus = true, +}) + +-- Layer rules also return a handle. +-- local overlayLayerRule = hl.layer_rule({ +-- name = "no-anim-overlay", +-- match = { namespace = "^my-overlay$" }, +-- no_anim = true, +-- }) +-- overlayLayerRule:set_enabled(false) + +-- Hyprland-run windowrule +hl.window_rule({ + name = "move-hyprland-run", + match = { class = "hyprland-run" }, + + move = "20 monitor_h-120", + float = true, +}) \ No newline at end of file diff --git a/hypr/hyprland.lua b/hypr/hyprland.lua new file mode 100644 index 0000000..0a06f87 --- /dev/null +++ b/hypr/hyprland.lua @@ -0,0 +1,64 @@ +-- https://wiki.hypr.land/Configuring/ + +-- Please note not all available settings / options are set here. +-- For a full list, see the wiki + +-- You can split this configuration into multiple files +-- Create your files separately and then link them to this file like this: +-- source = ~/.config/hypr/myColors.conf + +local mainMod = "SUPER" + +-- require("monitors") +local colors = require("colors") +-- require("programs") +require("autostart") +require("environment") +require("look-and-feel") +require("input") +require("keybindings") +-- require("window-rules") + +-- exec-once = hyprpaper # wallpaper +-- exec-once = cava -p ~/.config/cava/config + +-- monitors + +--############### +--## MONITORS ### +--############### + +-- See https://wiki.hypr.land/Configuring/Monitors/ + +-- Generated by hyprlang2lua. Review TODOs before reloading Hyprland. + +hl.monitor({ + output = "DP-2", + mode = "2560x1440@165.00Hz", + position = "0x0", + scale = "1", +}) + +hl.monitor({ + output = "HDMI-A-1", + mode = "1920x1080@74.97Hz", + position = "2560x0", + scale = "1", +}) + +hl.monitor({ + output = "DP-1", + mode = "1920x1080", + position = "1280x-1080", + scale = "1", +}) + +-- automatically place any other monitors on the right of the other ones +hl.monitor({ + output = "", + mode = "preferred", + position = "auto", + scale = "auto", +}) + +-- window rules \ No newline at end of file diff --git a/hypr/input.lua b/hypr/input.lua new file mode 100644 index 0000000..60fcdc9 --- /dev/null +++ b/hypr/input.lua @@ -0,0 +1,34 @@ +--############ +--## INPUT ### +--############ + +-- https://wiki.hypr.land/Configuring/Variables/#input + +hl.gesture({ + fingers = 3, + direction = "horizontal", + action = "workspace", +}) + +hl.device({ + name = "epic-mouse-v1", + sensitivity = -0.5, +}) + +hl.config({ + input = { + kb_layout = "us", + kb_variant = "intl", + kb_model = "", + kb_options = "", + kb_rules = "", + follow_mouse = 1, + sensitivity = -0.8, -- -1.0 - 1.0, 0 means no modification. + touchpad = { + natural_scroll = false, + }, + }, + -- See https://wiki.hypr.land/Configuring/Gestures + -- Example per-device config + -- See https://wiki.hypr.land/Configuring/Keywords/#per-device-input-configs for more +}) \ No newline at end of file diff --git a/hypr/keybindings.lua b/hypr/keybindings.lua new file mode 100644 index 0000000..4400af9 --- /dev/null +++ b/hypr/keybindings.lua @@ -0,0 +1,92 @@ +--################## +--## KEYBINDINGS ### +--################## + +-- See https://wiki.hypr.land/Configuring/Keywords/ + +local mainMod = "SUPER" +local terminal = "kitty" +local fileManager = "dolphin" +local menu = "rofi -show run" +local programs = "rofi -show drun" + +-- Example binds, see https://wiki.hypr.land/Configuring/Binds/ for more +hl.bind(mainMod .. " + Return", hl.dsp.exec_cmd(terminal)) +hl.bind(mainMod .. " + SHIFT + C", hl.dsp.window.close()) +hl.bind(mainMod .. " + ALT + SHIFT + L", hl.dsp.exec_cmd("command -v hyprshutdown >/dev/null 2>&1 && hyprshutdown || hyprctl dispatch exit")) +hl.bind(mainMod .. " + E", hl.dsp.exec_cmd(fileManager)) +hl.bind(mainMod .. " + M", hl.dsp.window.fullscreen(1)) +hl.bind(mainMod .. " + SHIFT + M", hl.dsp.window.float({ action = "toggle" })) +hl.bind(mainMod .. " + R", hl.dsp.exec_cmd(menu)) +hl.bind(mainMod .. " + P", hl.dsp.exec_cmd(programs)) +hl.bind(mainMod .. " + L", hl.dsp.layout("togglesplit")) +hl.bind(mainMod .. " + code:47", hl.dsp.exec_cmd("rofi -show emoji")) +hl.bind(mainMod .. " + TAB", hl.dsp.exec_cmd("qs ipc -c overview call overview toggle")) + +-- Move focus with mainMod + arrow keys +hl.bind(mainMod .. " + J", hl.dsp.window.cycle_next("")) +hl.bind(mainMod .. " + K", hl.dsp.window.cycle_next("prev")) +-- bind = $mainMod, o, movefocus, u +hl.bind(mainMod .. " + SHIFT + o", hl.dsp.focus({ direction = "down" })) + +hl.bind(mainMod .. " + SHIFT + J", hl.dsp.window.swap( {direction = "left"})) +hl.bind(mainMod .. " + SHIFT + K", hl.dsp.window.swap( {direction = "right"})) +hl.bind(mainMod .. " + F", hl.dsp.window.fullscreen("toggle")) + +-- Switch workspaces with mainMod + [0-9] +hl.bind(mainMod .. " + 1", hl.dsp.focus({ workspace = 1 })) +hl.bind(mainMod .. " + 2", hl.dsp.focus({ workspace = 2 })) +hl.bind(mainMod .. " + 3", hl.dsp.focus({ workspace = 3 })) +hl.bind(mainMod .. " + 4", hl.dsp.focus({ workspace = 4 })) +hl.bind(mainMod .. " + 5", hl.dsp.focus({ workspace = 5 })) +hl.bind(mainMod .. " + 6", hl.dsp.focus({ workspace = 6 })) +hl.bind(mainMod .. " + 7", hl.dsp.focus({ workspace = 7 })) +hl.bind(mainMod .. " + 8", hl.dsp.focus({ workspace = 8 })) +hl.bind(mainMod .. " + 9", hl.dsp.focus({ workspace = 9 })) +hl.bind(mainMod .. " + 0", hl.dsp.focus({ workspace = 10 })) + +-- Move active window to a workspace with mainMod + SHIFT + [0-9] +hl.bind(mainMod .. " + SHIFT + 1", hl.dsp.window.move({ workspace = 1 })) +hl.bind(mainMod .. " + SHIFT + 2", hl.dsp.window.move({ workspace = 2 })) +hl.bind(mainMod .. " + SHIFT + 3", hl.dsp.window.move({ workspace = 3 })) +hl.bind(mainMod .. " + SHIFT + 4", hl.dsp.window.move({ workspace = 4 })) +hl.bind(mainMod .. " + SHIFT + 5", hl.dsp.window.move({ workspace = 5 })) +hl.bind(mainMod .. " + SHIFT + 6", hl.dsp.window.move({ workspace = 6 })) +hl.bind(mainMod .. " + SHIFT + 7", hl.dsp.window.move({ workspace = 7 })) +hl.bind(mainMod .. " + SHIFT + 8", hl.dsp.window.move({ workspace = 8 })) +hl.bind(mainMod .. " + SHIFT + 9", hl.dsp.window.move({ workspace = 9 })) +hl.bind(mainMod .. " + SHIFT + 0", hl.dsp.window.move({ workspace = 10 })) + +hl.bind(mainMod .. " + left", hl.dsp.focus({ workspace = -1 })) +hl.bind(mainMod .. " + right", hl.dsp.focus({ workspace = "+1" })) +hl.bind(mainMod .. " + SHIFT + left", hl.dsp.window.move({ workspace = -1 })) +hl.bind(mainMod .. " + SHIFT + right", hl.dsp.window.move({ workspace = "+1" })) + +-- Example special workspace (scratchpad) +-- bind = $mainMod, S, togglespecialworkspace, magic +-- bind = $mainMod SHIFT, S, movetoworkspace, special:magic + +-- Scroll through existing workspaces with mainMod + scroll +hl.bind(mainMod .. " + mouse_down", hl.dsp.focus({ workspace = "e+1" })) +hl.bind(mainMod .. " + mouse_up", hl.dsp.focus({ workspace = "e-1" })) + +-- Move/resize windows with mainMod + LMB/RMB and dragging +hl.bind(mainMod .. " + mouse:272", hl.dsp.window.drag()) +hl.bind(mainMod .. " + mouse:273", hl.dsp.window.resize()) + +-- Laptop multimedia keys for volume and LCD brightness +hl.bind("XF86AudioRaiseVolume", hl.dsp.exec_cmd("wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+"), { locked = true, repeating = true }) +hl.bind("XF86AudioLowerVolume", hl.dsp.exec_cmd("wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-"), { locked = true, repeating = true }) +hl.bind("XF86AudioMute", hl.dsp.exec_cmd("wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"), { locked = true, repeating = true }) +hl.bind("XF86AudioMicMute", hl.dsp.exec_cmd("wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle"), { locked = true, repeating = true }) +hl.bind("XF86MonBrightnessUp", hl.dsp.exec_cmd("brightnessctl -e4 -n2 set 5%+"), { locked = true, repeating = true }) +hl.bind("XF86MonBrightnessDown", hl.dsp.exec_cmd("brightnessctl -e4 -n2 set 5%-"), { locked = true, repeating = true }) + +-- Requires playerctl +hl.bind("XF86AudioNext", hl.dsp.exec_cmd("playerctl next"), { locked = true }) +hl.bind("XF86AudioPause", hl.dsp.exec_cmd("playerctl play-pause"), { locked = true }) +hl.bind("XF86AudioPlay", hl.dsp.exec_cmd("playerctl play-pause"), { locked = true }) +hl.bind("XF86AudioPrev", hl.dsp.exec_cmd("playerctl previous"), { locked = true }) + +-- applications +hl.bind(mainMod .. " + SHIFT + S", hl.dsp.exec_cmd("grimblast copysave area")) diff --git a/hypr/look-and-feel.lua b/hypr/look-and-feel.lua new file mode 100644 index 0000000..0dee82c --- /dev/null +++ b/hypr/look-and-feel.lua @@ -0,0 +1,223 @@ +--#################### +--## LOOK AND FEEL ### +--#################### + +local colors = require("colors") + +-- Refer to https://wiki.hypr.land/Configuring/Variables/ + +-- https://wiki.hypr.land/Configuring/Variables/#general + +hl.curve("easeOutQuint", { type = "bezier", points = { { 0.23, 1 }, { 0.32, 1 } } }) +hl.curve("easeInOutCubic", { type = "bezier", points = { { 0.65, 0.05 }, { 0.36, 1 } } }) +hl.curve("linear", { type = "bezier", points = { { 0, 0 }, { 1, 1 } } }) +hl.curve("almostLinear", { type = "bezier", points = { { 0.5, 0.5 }, { 0.75, 1 } } }) +hl.curve("quick", { type = "bezier", points = { { 0.15, 0 }, { 0.1, 1 } } }) +hl.animation({ + leaf = "global", + enabled = true, + speed = 10, + 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, + 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 = "easeOutQuint", + style = "slide", +}) +hl.animation({ + leaf = "workspacesIn", + enabled = true, + speed = 1.21, + bezier = "easeOutQuint", + style = "slide", +}) +hl.animation({ + leaf = "workspacesOut", + enabled = true, + speed = 1.94, + bezier = "easeOutQuint", + style = "slide", +}) +hl.animation({ + leaf = "zoomFactor", + enabled = true, + speed = 7, + bezier = "quick", +}) + +hl.config({ + general = { + gaps_in = 5, + gaps_out = 20, + border_size = 2, + -- https://wiki.hypr.land/Configuring/Variables/#variable-types for info about colors + col = { + active_border = colors.inverse_primary, + inactive_border = colors.on_secondary, + }, + -- Set to true enable resizing windows by clicking and dragging on borders and gaps + resize_on_border = false, + -- Please see https://wiki.hypr.land/Configuring/Tearing/ before you turn this on + allow_tearing = false, + layout = "dwindle", + }, + -- https://wiki.hypr.land/Configuring/Variables/#decoration + decoration = { + rounding = 5, + rounding_power = 2, + -- Change transparency of focused and unfocused windows + active_opacity = 1.0, + inactive_opacity = 0.85, + shadow = { + enabled = true, + range = 4, + render_power = 3, + color = "rgba(1a1a1aee)", + }, + -- https://wiki.hypr.land/Configuring/Variables/#blur + blur = { + enabled = true, + size = 10, + passes = 2, + noise = 0.0117, + popups = false, + vibrancy = 0.1696, + new_optimizations = true, + }, + }, + -- https://wiki.hypr.land/Configuring/Variables/#animations + animations = { + enabled = true, + -- Default curves, see https://wiki.hypr.land/Configuring/Animations/#curves + -- NAME, X0, Y0, X1, Y1 + -- Default animations, see https://wiki.hypr.land/Configuring/Animations/ + -- NAME, ONOFF, SPEED, CURVE, [STYLE] + }, + -- Ref https://wiki.hypr.land/Configuring/Workspace-Rules/ + -- "Smart gaps" / "No gaps when only" + -- uncomment all if you wish to use that. + -- workspace = w[tv1], gapsout:0, gapsin:0 + -- workspace = f[1], gapsout:0, gapsin:0 + -- windowrule { + -- name = no-gaps-wtv1 + -- match:float = false + -- match:workspace = w[tv1] + -- + -- border_size = 0 + -- rounding = 0 + -- } + -- + -- windowrule { + -- name = no-gaps-f1 + -- match:float = false + -- match:workspace = f[1] + -- + -- border_size = 0 + -- rounding = 0 + -- } + -- See https://wiki.hypr.land/Configuring/Dwindle-Layout/ for more + dwindle = { + preserve_split = true, -- You probably want this + smart_split = false, -- Remove outer gaps when there's only one window + }, + -- See https://wiki.hypr.land/Configuring/Master-Layout/ for more + master = { + new_status = "master", + }, + --################## + --## PERMISSIONS ### + --################## + -- See https://wiki.hypr.land/Configuring/Permissions/ + -- Please note permission changes here require a Hyprland restart and are not applied on-the-fly + -- for security reasons + -- ecosystem { + -- enforce_permissions = 1 + -- } + -- permission = /usr/(bin|local/bin)/grim, screencopy, allow + -- permission = /usr/(lib|libexec|lib64)/xdg-desktop-portal-hyprland, screencopy, allow + -- permission = /usr/(bin|local/bin)/hyprpm, plugin, allow + -- https://wiki.hypr.land/Configuring/Variables/#misc + misc = { + force_default_wallpaper = -1, -- Set to 0 or 1 to disable the anime mascot wallpapers + disable_hyprland_logo = false, -- If true disables the random hyprland logo / anime girl background. :( + }, +}) + diff --git a/hypr/monitors.lua b/hypr/monitors.lua new file mode 100644 index 0000000..2bce2be --- /dev/null +++ b/hypr/monitors.lua @@ -0,0 +1,36 @@ +--############### +--## MONITORS ### +--############### + +-- See https://wiki.hypr.land/Configuring/Monitors/ + +-- Generated by hyprlang2lua. Review TODOs before reloading Hyprland. + +hl.monitor({ + output = "DP-2", + mode = "2560x1440@165.00Hz", + position = "0x0", + scale = "1", +}) + +hl.monitor({ + output = "HDMI-A-1", + mode = "1920x1080@74.97Hz", + position = "2560x0", + scale = "1", +}) + +hl.monitor({ + output = "DP-1", + mode = "1920x1080", + position = "1280x-1080", + scale = "1", +}) + +-- automatically place any other monitors on the right of the other ones +hl.monitor({ + output = "", + mode = "preferred", + position = "auto", + scale = "auto", +}) diff --git a/hypr/autostart.conf b/hypr/old/autostart.conf similarity index 100% rename from hypr/autostart.conf rename to hypr/old/autostart.conf diff --git a/hypr/old/colors.conf b/hypr/old/colors.conf new file mode 100644 index 0000000..0e75b23 --- /dev/null +++ b/hypr/old/colors.conf @@ -0,0 +1,150 @@ + +$image = /home/sem/Pictures/wallpapers/a_group_of_men_posing_for_a_picture.png +$background = rgba(0e1415ff) + +$image = /home/sem/Pictures/wallpapers/a_group_of_men_posing_for_a_picture.png +$error = rgba(ff5449ff) + +$image = /home/sem/Pictures/wallpapers/a_group_of_men_posing_for_a_picture.png +$error_container = rgba(7b0007ff) + +$image = /home/sem/Pictures/wallpapers/a_group_of_men_posing_for_a_picture.png +$inverse_on_surface = rgba(5f6666ff) + +$image = /home/sem/Pictures/wallpapers/a_group_of_men_posing_for_a_picture.png +$inverse_primary = rgba(338d91ff) + +$image = /home/sem/Pictures/wallpapers/a_group_of_men_posing_for_a_picture.png +$inverse_surface = rgba(dde4e3ff) + +$image = /home/sem/Pictures/wallpapers/a_group_of_men_posing_for_a_picture.png +$on_background = rgba(5d6364ff) + +$image = /home/sem/Pictures/wallpapers/a_group_of_men_posing_for_a_picture.png +$on_error = rgba(5c0003ff) + +$image = /home/sem/Pictures/wallpapers/a_group_of_men_posing_for_a_picture.png +$on_error_container = rgba(ff7d70ff) + +$image = /home/sem/Pictures/wallpapers/a_group_of_men_posing_for_a_picture.png +$on_primary = rgba(004d50ff) + +$image = /home/sem/Pictures/wallpapers/a_group_of_men_posing_for_a_picture.png +$on_primary_container = rgba(5cb1b5ff) + +$image = /home/sem/Pictures/wallpapers/a_group_of_men_posing_for_a_picture.png +$on_primary_fixed = rgba(7dd2d5ff) + +$image = /home/sem/Pictures/wallpapers/a_group_of_men_posing_for_a_picture.png +$on_primary_fixed_variant = rgba(58adb1ff) + +$image = /home/sem/Pictures/wallpapers/a_group_of_men_posing_for_a_picture.png +$on_secondary = rgba(142e2fff) + +$image = /home/sem/Pictures/wallpapers/a_group_of_men_posing_for_a_picture.png +$on_secondary_container = rgba(8ea9aaff) + +$image = /home/sem/Pictures/wallpapers/a_group_of_men_posing_for_a_picture.png +$on_secondary_fixed = rgba(aec9caff) + +$image = /home/sem/Pictures/wallpapers/a_group_of_men_posing_for_a_picture.png +$on_secondary_fixed_variant = rgba(8ba5a6ff) + +$image = /home/sem/Pictures/wallpapers/a_group_of_men_posing_for_a_picture.png +$on_surface = rgba(9ea4a4ff) + +$image = /home/sem/Pictures/wallpapers/a_group_of_men_posing_for_a_picture.png +$on_surface_variant = rgba(7b8585ff) + +$image = /home/sem/Pictures/wallpapers/a_group_of_men_posing_for_a_picture.png +$on_tertiary = rgba(182a45ff) + +$image = /home/sem/Pictures/wallpapers/a_group_of_men_posing_for_a_picture.png +$on_tertiary_container = rgba(93a5c5ff) + +$image = /home/sem/Pictures/wallpapers/a_group_of_men_posing_for_a_picture.png +$on_tertiary_fixed = rgba(b3c5e7ff) + +$image = /home/sem/Pictures/wallpapers/a_group_of_men_posing_for_a_picture.png +$on_tertiary_fixed_variant = rgba(8fa1c1ff) + +$image = /home/sem/Pictures/wallpapers/a_group_of_men_posing_for_a_picture.png +$outline = rgba(4c5656ff) + +$image = /home/sem/Pictures/wallpapers/a_group_of_men_posing_for_a_picture.png +$outline_variant = rgba(323c3cff) + +$image = /home/sem/Pictures/wallpapers/a_group_of_men_posing_for_a_picture.png +$primary = rgba(479da1ff) + +$image = /home/sem/Pictures/wallpapers/a_group_of_men_posing_for_a_picture.png +$primary_container = rgba(004144ff) + +$image = /home/sem/Pictures/wallpapers/a_group_of_men_posing_for_a_picture.png +$primary_fixed = rgba(005b5eff) + +$image = /home/sem/Pictures/wallpapers/a_group_of_men_posing_for_a_picture.png +$primary_fixed_dim = rgba(004144ff) + +$image = /home/sem/Pictures/wallpapers/a_group_of_men_posing_for_a_picture.png +$scrim = rgba(000000ff) + +$image = /home/sem/Pictures/wallpapers/a_group_of_men_posing_for_a_picture.png +$secondary = rgba(7b9697ff) + +$image = /home/sem/Pictures/wallpapers/a_group_of_men_posing_for_a_picture.png +$secondary_container = rgba(253e3fff) + +$image = /home/sem/Pictures/wallpapers/a_group_of_men_posing_for_a_picture.png +$secondary_fixed = rgba(3c5556ff) + +$image = /home/sem/Pictures/wallpapers/a_group_of_men_posing_for_a_picture.png +$secondary_fixed_dim = rgba(253e3fff) + +$image = /home/sem/Pictures/wallpapers/a_group_of_men_posing_for_a_picture.png +$shadow = rgba(000000ff) + +$image = /home/sem/Pictures/wallpapers/a_group_of_men_posing_for_a_picture.png +$source_color = rgba(208286ff) + +$image = /home/sem/Pictures/wallpapers/a_group_of_men_posing_for_a_picture.png +$surface = rgba(0e1415ff) + +$image = /home/sem/Pictures/wallpapers/a_group_of_men_posing_for_a_picture.png +$surface_bright = rgba(343a3bff) + +$image = /home/sem/Pictures/wallpapers/a_group_of_men_posing_for_a_picture.png +$surface_container = rgba(1a2121ff) + +$image = /home/sem/Pictures/wallpapers/a_group_of_men_posing_for_a_picture.png +$surface_container_high = rgba(252b2bff) + +$image = /home/sem/Pictures/wallpapers/a_group_of_men_posing_for_a_picture.png +$surface_container_highest = rgba(303636ff) + +$image = /home/sem/Pictures/wallpapers/a_group_of_men_posing_for_a_picture.png +$surface_container_low = rgba(161d1dff) + +$image = /home/sem/Pictures/wallpapers/a_group_of_men_posing_for_a_picture.png +$surface_container_lowest = rgba(090f10ff) + +$image = /home/sem/Pictures/wallpapers/a_group_of_men_posing_for_a_picture.png +$surface_dim = rgba(0e1415ff) + +$image = /home/sem/Pictures/wallpapers/a_group_of_men_posing_for_a_picture.png +$surface_tint = rgba(80d4d8ff) + +$image = /home/sem/Pictures/wallpapers/a_group_of_men_posing_for_a_picture.png +$surface_variant = rgba(3f4949ff) + +$image = /home/sem/Pictures/wallpapers/a_group_of_men_posing_for_a_picture.png +$tertiary = rgba(7f91b1ff) + +$image = /home/sem/Pictures/wallpapers/a_group_of_men_posing_for_a_picture.png +$tertiary_container = rgba(293b56ff) + +$image = /home/sem/Pictures/wallpapers/a_group_of_men_posing_for_a_picture.png +$tertiary_fixed = rgba(40526eff) + +$image = /home/sem/Pictures/wallpapers/a_group_of_men_posing_for_a_picture.png +$tertiary_fixed_dim = rgba(293b56ff) diff --git a/hypr/environment.conf b/hypr/old/environment.conf similarity index 100% rename from hypr/environment.conf rename to hypr/old/environment.conf diff --git a/hypr/hyprland.conf b/hypr/old/hyprland.conf similarity index 61% rename from hypr/hyprland.conf rename to hypr/old/hyprland.conf index eec279f..069f289 100644 --- a/hypr/hyprland.conf +++ b/hypr/old/hyprland.conf @@ -1,12 +1,3 @@ -# ####################################################################################### -# AUTOGENERATED HYPRLAND CONFIG. -# EDIT THIS CONFIG ACCORDING TO THE WIKI INSTRUCTIONS. -# ####################################################################################### - - - -# This is an example Hyprland config file. -# Refer to the wiki for more information. # https://wiki.hypr.land/Configuring/ # Please note not all available settings / options are set here. diff --git a/hypr/hyprpaper.conf b/hypr/old/hyprpaper.conf similarity index 100% rename from hypr/hyprpaper.conf rename to hypr/old/hyprpaper.conf diff --git a/hypr/input.conf b/hypr/old/input.conf similarity index 100% rename from hypr/input.conf rename to hypr/old/input.conf diff --git a/hypr/keybindings.conf b/hypr/old/keybindings.conf similarity index 100% rename from hypr/keybindings.conf rename to hypr/old/keybindings.conf diff --git a/hypr/look-and-feel.conf b/hypr/old/look-and-feel.conf similarity index 100% rename from hypr/look-and-feel.conf rename to hypr/old/look-and-feel.conf diff --git a/hypr/monitors.conf b/hypr/old/monitors.conf similarity index 100% rename from hypr/monitors.conf rename to hypr/old/monitors.conf diff --git a/hypr/permissions.conf b/hypr/old/permissions.conf similarity index 100% rename from hypr/permissions.conf rename to hypr/old/permissions.conf diff --git a/hypr/programs.conf b/hypr/old/programs.conf similarity index 100% rename from hypr/programs.conf rename to hypr/old/programs.conf diff --git a/hypr/window-rules.conf b/hypr/old/window-rules.conf similarity index 100% rename from hypr/window-rules.conf rename to hypr/old/window-rules.conf diff --git a/hypr/programs.lua b/hypr/programs.lua new file mode 100644 index 0000000..38ab884 --- /dev/null +++ b/hypr/programs.lua @@ -0,0 +1,6 @@ +-- See https://wiki.hypr.land/Configuring/Keywords/ + +local terminal = "kitty" +local fileManager = "dolphin" +local menu = "rofi -show run" +local programs = "rofi -show drun" diff --git a/hypr/window-rules.lua b/hypr/window-rules.lua new file mode 100644 index 0000000..39d0276 --- /dev/null +++ b/hypr/window-rules.lua @@ -0,0 +1,47 @@ +--############################# +--## WINDOWS AND WORKSPACES ### +--############################# + +-- See https://wiki.hypr.land/Configuring/Window-Rules/ for more +-- See https://wiki.hypr.land/Configuring/Workspace-Rules/ for workspace rules + +-- Example windowrules that are useful + +hl.window_rule({ + name = "suppress-maximize-events", + match = { + class = ".*", + }, + -- Ignore maximize requests from all apps. You'll probably like this. + suppress_event = "maximize", +}) + +hl.window_rule({ + name = "fix-xwayland-drags", + match = { + class = "^$", + title = "^$", + xwayland = true, + float = true, + fullscreen = false, + pin = false, + }, + -- Fix some dragging issues with XWayland + -- TODO: manual review — unmapped window rule action: "no_focus true" +}) + +-- Hyprland-run windowrule +hl.window_rule({ + name = "move-hyprland-run", + match = { + class = "hyprland-run", + }, + move = "20 monitor_h-120", + float = true, +}) + +hl.config({ + debug = { + disable_logs = false, + }, +}) \ No newline at end of file diff --git a/matugen/config.toml b/matugen/config.toml index 955f609..fde79f3 100644 --- a/matugen/config.toml +++ b/matugen/config.toml @@ -50,9 +50,14 @@ command = "awww img {{ image }} --transition-type grow --transition-fps 60 --tra # Whether to set the wallpaper or not set = true +# [templates.hyprland] +# input_path = '~/linux-dotfiles/matugen/templates/hyprland-colors.conf' +# output_path = '~/linux-dotfiles/hypr/colors.conf' +# post_hook = "hyprctl reload && echo 'done'" + [templates.hyprland] -input_path = '~/linux-dotfiles/matugen/templates/hyprland-colors.conf' -output_path = '~/linux-dotfiles/hypr/colors.conf' +input_path = '~/linux-dotfiles/matugen/templates/hyprland-colors.lua' +output_path = '~/linux-dotfiles/hypr/colors.lua' post_hook = "hyprctl reload && echo 'done'" [templates.kitty] diff --git a/matugen/templates/hyprland-colors.lua b/matugen/templates/hyprland-colors.lua new file mode 100644 index 0000000..934e463 --- /dev/null +++ b/matugen/templates/hyprland-colors.lua @@ -0,0 +1,6 @@ +return { + image = "{{image}}", +<* for name, value in colors *> + {{name}} = "0xff{{value.default.hex_stripped}}", +<* endfor *> +} \ No newline at end of file diff --git a/quickshell/.qmlls.ini b/quickshell/.qmlls.ini index a47eb94..98dadab 120000 --- a/quickshell/.qmlls.ini +++ b/quickshell/.qmlls.ini @@ -1 +1 @@ -/run/user/1000/quickshell/vfs/4ae8f7ef09a48f8dc93b6ec90ac7277a/.qmlls.ini \ No newline at end of file +/run/user/1000/quickshell/vfs/964f4870f1d670c35076e35b9d9e12df/.qmlls.ini \ No newline at end of file