mirror of
https://github.com/outbackdingo/hyprcosmic.git
synced 2026-08-25 14:53:21 +00:00
Focus follows mouse was already there and already off. cosmic-comp has supported it for as long as this fork has existed -- focus_follows_cursor and focus_follows_cursor_delay, both live-watched -- and the schema already exposed them under general. What was missing was the Hyprland spelling: there was no input section at all, so a config written the way a Hyprland user would write it named a setting that did not exist. So this is an alias, not a new setting. input.follow_mouse and input.follow_mouse_delay resolve to exactly the same cosmic-config keys as general.focus_follows_cursor and its delay, and both spellings stay. Setting both in one file is not an error; the last assignment wins, which is the rule the rest of the file already follows. A test pins the two pairs to the same targets, because a rebase that renames a target key would otherwise leave one spelling working and the other quietly dead. follow_mouse needs its own type. Hyprland writes it as a number and COSMIC stores a bool, so Ty::FollowMouse maps 0 to false and 1 to true -- the same trick Ty::Mode already plays for dark/light. Hyprland's 2 and 3 split pointer focus from keyboard focus, which cosmic-comp cannot express: it has one focus and either moves it or does not. They are rejected with a diagnostic that says why, rather than rounded up to 1, because silently handing click-to-focus to someone who asked for the opposite is worse than telling them the mode does not exist here. Anything else gets the ordinary "expected 0 or 1" error. There is no autoraise key because autoraise is not a separate feature. raise_with_children runs inside update_active, which is what the focus-follows-cursor timer ends up calling, so a floating window under the pointer comes to the front as part of being focused. Tiled windows do not overlap, so raising one is a no-op. The delay is left at COSMIC's 250ms rather than shortened. It is what stops focus from skating across every window the pointer crosses on its way somewhere else, and that failure is more irritating than the wait. Installing the binary before editing the config is the required order, not a preference: resolution is transactional, so the old binary meeting an unknown input section would refuse to write the whole file, not just that block.
114 lines
5.3 KiB
Plaintext
114 lines
5.3 KiB
Plaintext
# HyprCosmic configuration, in Hyprland's idiom.
|
|
#
|
|
# Compiled into COSMIC's config tree by `cosmic-conf apply`. The file wins:
|
|
# every key here overwrites whatever COSMIC's own settings UI last stored, so
|
|
# edit this rather than the GUI for anything it covers.
|
|
|
|
# --- Theme --------------------------------------------------------------
|
|
#
|
|
# `cosmic-conf import-theme <theme>/hypr.theme --out ~/.config/hyprcosmic/theme.conf`
|
|
# turns a HyDE theme into conf keys. Sourcing it rather than pasting it in
|
|
# keeps the two apart: re-importing overwrites theme.conf and cannot touch the
|
|
# keybindings below, and anything you want to override can simply be repeated
|
|
# later in this file, since the last assignment to a key wins.
|
|
#
|
|
# Commented out because a `source` pointing at a file that does not exist is a
|
|
# hard error, and no theme is imported yet. Uncomment it once you have run the
|
|
# command above -- import-theme will remind you.
|
|
#
|
|
# source = ~/.config/hyprcosmic/theme.conf
|
|
|
|
$mainMod = SUPER
|
|
|
|
# --- Tiling -------------------------------------------------------------
|
|
#
|
|
# COSMIC ships with autotile off, so a new window opens floating, at whatever
|
|
# size the application asked for, on top of what you were already looking at.
|
|
# This is the setting that makes window placement automatic: each new window
|
|
# takes a share of the screen instead.
|
|
#
|
|
# It applies immediately and everywhere. `autotile_behavior` is a separate
|
|
# COSMIC key that defaults to Global, which retiles workspaces that already
|
|
# exist; the other value, PerWorkspace, arms only workspaces created from now
|
|
# on. There is no conf key for it because the default is the one worth having
|
|
# -- if you want the other, set it in cosmic-settings and this file will not
|
|
# fight you over it.
|
|
#
|
|
# Super+Y still toggles tiling for the current workspace on its own, so a
|
|
# workspace you want to keep floating does not need this turned off.
|
|
#
|
|
# Gaps are here rather than in the theme block because they are only visible
|
|
# once windows tile: with autotile off nothing is laid out, so nothing has a
|
|
# gap. gaps_out is doubled so the screen edge reads as deliberate margin
|
|
# rather than as one more seam.
|
|
$gap = 4
|
|
|
|
general {
|
|
autotile = true
|
|
preserve_split = true
|
|
gaps_in = $gap
|
|
gaps_out = $gap * 2
|
|
}
|
|
|
|
# --- Input ---------------------------------------------------------------
|
|
#
|
|
# Focus follows the mouse, which COSMIC supports but ships turned off. Hyprland
|
|
# spells it `input:follow_mouse`, and that spelling is what this file accepts;
|
|
# `general:focus_follows_cursor` is the same setting under COSMIC's own name,
|
|
# and setting both is not an error -- whichever comes last in the file wins.
|
|
#
|
|
# Autoraise comes with it and is not a separate key. cosmic-comp raises a
|
|
# window as part of focusing it, so a floating window under the pointer comes
|
|
# to the front on its own. Tiled windows do not overlap, so there is nothing
|
|
# there to raise.
|
|
#
|
|
# The delay is what stops the focus from skating across every window between
|
|
# where the pointer started and where it stopped -- moving the mouse to a menu
|
|
# on the far side of the screen should not hand focus to whatever it crossed on
|
|
# the way. 250ms is COSMIC's own default and is kept rather than shortened,
|
|
# because the failure it prevents is more annoying than the wait.
|
|
#
|
|
# Only 0 and 1 mean anything here. Hyprland's 2 and 3 separate pointer focus
|
|
# from keyboard focus, which cosmic-comp cannot do -- it has one focus. Those
|
|
# values are rejected with an explanation rather than rounded to 1.
|
|
input {
|
|
follow_mouse = 1
|
|
follow_mouse_delay = 250
|
|
}
|
|
|
|
# --- Launcher -----------------------------------------------------------
|
|
#
|
|
# The hyprcosmic profile does not start cosmic-launcher or cosmic-app-library,
|
|
# which leaves COSMIC's stock Super, Super+/ and Super+A bindings pointing at
|
|
# nothing. These take them over with rofi. Written to the Shortcuts `custom`
|
|
# key, which cosmic-comp merges over `defaults`, so the system file is not
|
|
# touched and reverting is a matter of deleting these lines and re-applying.
|
|
|
|
# Tap Super on its own to open the launcher.
|
|
# The key field is deliberately empty: COSMIC supports
|
|
# modifier-only bindings, which Hyprland's `bind` cannot express.
|
|
bind = $mainMod, , exec, rofi -show drun
|
|
bind = $mainMod, slash, exec, rofi -show drun
|
|
bind = $mainMod, A, exec, rofi -show drun
|
|
|
|
# Was System(WorkspaceOverview); cosmic-workspaces is not running either.
|
|
# rofi's window mode is the nearest thing that still shows every open window.
|
|
bind = $mainMod, W, exec, rofi -show window
|
|
|
|
# Terminal, in the Hyprland idiom. Super+T also still works — cosmic-comp
|
|
# handles System(Terminal) itself, so that binding never went dead.
|
|
bind = $mainMod, Return, exec, cosmic-term
|
|
|
|
# --- Session ------------------------------------------------------------
|
|
#
|
|
# The hyprcosmic profile disables cosmic-panel, and COSMIC's power applet lives
|
|
# in that panel, so a HyprCosmic session had no logout, reboot or shutdown
|
|
# anywhere -- the only way out was `systemctl reboot` from a terminal. This is
|
|
# that way out. The same script backs waybar's power button, so the two cannot
|
|
# drift apart, and it asks for confirmation before anything that ends the
|
|
# session.
|
|
#
|
|
# Super+Shift+E is Hyprland's own spelling for "exit". The menu also offers
|
|
# lock and suspend, which is why the binding is not named after logout.
|
|
bind = $mainMod SHIFT, E, exec, hyprcosmic-powermenu
|