r/hyprland • • 16h ago

EXT TOOLS Just wanted to share a little project I've been working on

Post image
19 Upvotes

I recently released my first little open-source project — Flick.

It's a screenshot and screen recording tool for selecting screen regions, taking screenshots, annotating them, and recording your screen. It's currently built specifically for Hyprland, but I'd like to make it available for other Linux desktop environments in the future.

This was also my first experiment with vibe coding using Claude Code. I was just curious to see how it works and wanted to share what I managed to build — or rather, what Claude managed to build. I just provided the ideas)

GitHub: https://github.com/aksond1/Flick


r/hyprland • • 12h ago

MISC Came back to see this today

Post image
113 Upvotes

After years of watching prices, I finally splurge on some really nice monitors during Black Friday.

I got them installed last night!

Nervous about burn in, I see this when i return from being gone for quite some time…

Has never happened before. Story of my life haha

Luckily the monitors seem fine. Just hilarious the timing.


r/hyprland • • 21h ago

SUPPORT New to ricing

1 Upvotes

I just switched to hyprland on cachyos and I’m lost in where to go. All but maybe there tutorials on YouTube are all on the original scripting and not the new lua. Is there any place that has a definitive lua tutorial for it or has recommended tools to go along with hyprland or a place that has a bunch of preconfig themes other than the handful on GitHub similar to cinnamon spice or gnome look?


r/hyprland • • 16h ago

SUPPORT Fullscreen games not working on hyprland

0 Upvotes

Hey been using hyprland for a little now and its been great but when I try to play any fullscreen game like tf2 it always make it smaller and I cant click anything


r/hyprland • • 14h ago

RICE Pentad: a complete desktop shell for Hyprland

29 Upvotes
Tired of overloaded desktops that give little back, so I built my own shell.

GitHub


r/hyprland • • 5h ago

RICE First rice on Hyprland

15 Upvotes

Finally decided to try bare Arch, and I just switched my laptop's main OS to Arch with Hyprland. I took some ideas from other users' setups, but if u have more ideas or feedback, feel free to drop them!

Dotfiles (my repo): https://github.com/Espectro0/dotfiles


r/hyprland • • 7h ago

QUESTION help

Post image
9 Upvotes

can anyone help me find this wallpaper i can't find it anywhere


r/hyprland • • 5h ago

DISCUSSION Hyprland Gaming Config Updates

9 Upvotes

Improving on my gaming config that I posted months ago here: https://www.reddit.com/r/hyprland/comments/1uxwh5a/lets_discuss_our_hyprland_specific_gaming_tweaks/

Would love to see what everyone else has going on

Gaming.lua

Summary: Tag most common game windows from common game classes. Apply window rules to them via tags i.e. game or tearing & has hooks like the tearing hook that sets specific config options when the game window opens & then resets them on close. A hook that sets do not disturb & sets CPU power profile to performance when the game window opens & reverts them back on close. Applies rules for overrides from overrides menu listed below.

-- Tagging game windows
hl.window_rule({
    name = "proton-game-tag",
    match = {
        xdg_tag = "proton-game",
    },
    tag = "+game",
})
hl.window_rule({
    name = "steam-apps-tag",
    match = {
        initial_class = "steam_app_.*",
    },
    tag = "+game",
})
hl.window_rule({
    name = "gamescope-tag",
    match = {
        class = "gamescope",
    },
    tag = "+game",
})
hl.window_rule({
    name = "minecraft-tag",
    match = {
        class = "Minecraft.*",
    },
    tag = "+game",
})

-- Shared rules for game-tagged windows
local gameRules = {
    border_size = 0,
    rounding = 0,
    decorate = false,
    force_rgbx = true,
    sync_fullscreen = true,
    no_anim = true,
    no_blur = true,
    no_dim = true,
    no_max_size = true,
    no_shadow = true,
    no_glow = true,
    no_wobble = true,
    persistent_size = true,
    opaque = true,
    fullscreen_state = "2 2",
}

-- Tearing = everything above + extras
local tearingExtras = {
    immediate = true,
}

local function applyGameRules(tag, extras)
    local rule = {
        name = tag .. "-games",
        match = { tag = tag, fullscreen = true },
    }

    for key, value in pairs(gameRules) do
        rule[key] = value
    end

    for key, value in pairs(extras or {}) do
        rule[key] = value
    end

    hl.window_rule(rule)

    hl.window_rule({
        name = tag .. "-game-popups",
        match = { tag = tag },
        content = "game",
        workspace = 3,
        center = true,
        idle_inhibit = "always",
    })
end

applyGameRules("game")
applyGameRules("tearing", tearingExtras)

------------------------------
---- GAME OVERRIDES MENU -----
------------------------------

local overridesFile = os.getenv("HOME") .. "/.config/hypr/game-overrides.tsv"

local function escapeRegex(s)
    return (s:gsub("[%^%$%(%)%.%[%]%*%+%?%-{}|\\]", "\\%0"))
end

local function loadOverrides()
    local f = io.open(overridesFile, "r")
    if not f then return end

    for line in f:lines() do
        local class, flags = line:match("^(.-)\t(.*)$")

        if class and class ~= "" then
            local match = { class = "^" .. escapeRegex(class) .. "$" }

            for flag in flags:gmatch("[^,]+") do
                if flag == "game" or flag == "tearing" then
                    hl.window_rule({
                        name  = class .. "-override-" .. flag,
                        match = match,
                        tag   = "+" .. flag,
                    })
                elseif flag == "no_vrr" then
                    hl.window_rule({
                        name   = class .. "-override-no_vrr",
                        match  = match,
                        no_vrr = true,
                    })
                end
            end
        end
    end

    f:close()
end

loadOverrides()

-- Override menu bind 
hl.bind(mainMod .. " + SHIFT + G", hl.dsp.exec_cmd("~/.local/bin/game-override-menu"))

------------------------------
---- GAME TAG / TRACKING -----
------------------------------

local GAME_TAGS    = { "game", "tearing" }
local TEARING_TAGS = { "tearing" }

local function hasAnyTag(win, wanted)
    if not win or not win.tags then return false end
    for _, tag in ipairs(win.tags) do
        for _, name in ipairs(wanted) do
            if tag == name or tag == name .. "*" then return true end
        end
    end
    return false
end

-- Calls setActive(true) when the first matching window appears and
-- setActive(false) when the last one closes. Also rebuilds after a reload.
local function trackTaggedWindows(tags, setActive)
    local tracked, active = {}, false

    local function update()
        local now = next(tracked) ~= nil
        if now ~= active then
            active = now
            setActive(now)
        end
    end

    hl.on("window.open", function(win)
        if hasAnyTag(win, tags) then
            tracked[win.address] = true
            update()
        end
    end)

    hl.on("window.close", function(win)
        if tracked[win.address] then
            tracked[win.address] = nil
            update()
        end
    end)

    for _, win in ipairs(hl.get_windows()) do
        if hasAnyTag(win, tags) then tracked[win.address] = true end
    end
    update()
end

----------------------------
---- GAME TEARING HOOK -----
----------------------------

local tearingEnabled = false
local stateFile = "/tmp/hypr-tearing-state"

local function stateFileExists()
    local file = io.open(stateFile, "r")
    if file then
        file:close()
        return true
    end
    return false
end

local function enableTearing()
    if tearingEnabled then return end

    local wasAlreadyEnabled = stateFileExists()
    
    -- Reflect your config values to change here 
    hl.config({
        general = { allow_tearing = true },
        misc    = { vrr = 0 },
        render  = { direct_scanout = 0 },
    })

    local f = io.open(stateFile, "w")
    if f then f:close() end

    if not wasAlreadyEnabled then
        hl.exec_cmd([[notify-send "Gaming Mode" "Tearing Enabled // VRR Disabled"]])
    end

    tearingEnabled = true
end

local function disableTearing()
    if not tearingEnabled then return end

    -- Reflect your default config values to change here 
    hl.config({
        general = { allow_tearing = false },
        misc    = { vrr = 3 },
        render  = { direct_scanout = 2 },
    })

    os.remove(stateFile)
    hl.exec_cmd([[notify-send "Gaming Mode" "Tearing Disabled // VRR Enabled"]])

    tearingEnabled = false
end

trackTaggedWindows(TEARING_TAGS, function(on)
    if on then enableTearing() else disableTearing() end
end)

-------------------------------------
---- GAME PERFORMANCE & DND HOOK ----
-------------------------------------

local gamePerfEnabled = false

local function setGamePerf(enabled)
    if enabled == gamePerfEnabled then return end
    gamePerfEnabled = enabled

    if enabled then
        hl.exec_cmd("powerprofilesctl set performance")
        hl.exec_cmd("noctalia msg notification-dnd-set on")
    else
        hl.exec_cmd("powerprofilesctl set balanced")
        hl.exec_cmd("noctalia msg notification-dnd-set off")
    end
end

trackTaggedWindows(GAME_TAGS, setGamePerf)

--------------------------------------
---- FLOATING FULLSCREEN CASE FIX ----
--------------------------------------

hl.on("window.fullscreen", function(w)
    if w == nil or not w.floating or w.fullscreen == 0 then return end
    if not hasAnyTag(w, GAME_TAGS) then return end
    hl.dispatch(hl.dsp.window.float({ window = w, action = "disable" }))
end)

Game Overrides Zenity Menu

TLDR: Grabs the focused window class & opens a zenity menu that can manually apply the tag tearing or game if it hasn't been from prior rules like in the case of native linux games which can't be automagically tagged by a common steam class & can apply override rules like no_vrr for example.

#!/usr/bin/env bash

class="$1"

if [ -z "$class" ]; then
    class=$(hyprctl activewindow | sed -n 's/^[[:space:]]*class: //p' | head -n1)
fi

if [ -z "$class" ]; then
    notify-send "Overrides" "No focused window class found"
    exit 1
fi

safe_class=$(printf '%s' "$class" | sed 's/&/\&amp;/g; s/</\&lt;/g; s/>/\&gt;/g')

file="$HOME/.config/hypr/game-overrides.tsv"
touch "$file"

flags=$(CLASS="$class" awk -F'\t' '$1==ENVIRON["CLASS"]{print $2}' "$file")

has() { [[ ",$flags," == *",$1,"* ]] && echo TRUE || echo FALSE; }

write_flags() {
    local tmp; tmp=$(mktemp "$file.XXXXXX")
    CLASS="$class" awk -F'\t' '$1!=ENVIRON["CLASS"]' "$file" > "$tmp"
    [ -n "$1" ] && printf '%s\t%s\n' "$class" "$1" >> "$tmp"
    mv "$tmp" "$file"
}

while true; do
    selected=$(zenity --list --checklist \
        --title="Overrides: $class" \
        --text="Tick what applies to: <b>$safe_class</b>\n\n<i>Changes won't apply until the game is restarted.</i>\n\n<i>Note: no_vrr is dropped automatically when tearing is selected, since tearing already disables VRR.</i>" \
        --column="" --column="key" --column="Option" \
        --hide-column=2 --print-column=2 --separator=',' \
        --width=360 --height=320 \
        "$(has game)"    game    "Manually tag: game" \
        "$(has tearing)" tearing "Manually tag: tearing" \
        "$(has no_vrr)"  no_vrr  "Window rule: no_vrr" \
        FALSE            clear   "Remove all overrides") || exit 0

    if [[ ",$selected," == *",game,"* && ",$selected," == *",tearing,"* && ",$selected," != *",clear,"* ]]; then
        zenity --error --width=320 \
            --text="Pick either game or tearing, not both. Tearing already includes the game behavior."
        flags="$selected"
        continue
    fi
    break
done

if [[ ",$selected," == *",tearing,"* ]]; then
    selected=$(printf ',%s,' "$selected" | sed 's/,no_vrr,/,/g; s/^,//; s/,$//')
fi

if [[ ",$selected," == *",clear,"* ]]; then
    write_flags ""
else
    write_flags "$selected"
fi

hyprctl reload

r/hyprland • • 17h ago

RICE i'm use arch 202 day btw

Post image
16 Upvotes