Commit graph

412 commits

Author SHA1 Message Date
outfoxxed
f0e4f6622e
Implement pass binds (#2503)
* Implement pass binds

Pass binds run the associated dispatcher but do not prevent windows
from receiving the bind.

* Fix pass binds not working properly with release binds

* Rename `pass` to `nonConsuming`
2023-06-14 13:08:56 +02:00
memchr
24ed9b061f
feat: add variable to customize locked group border color (#2507)
added variables:
- general:col.group_border_locked
- general:col.group_border_locked_active
2023-06-13 12:04:54 +02:00
6beb79f27b xwayland: add force_zero_scaling 2023-06-11 21:52:13 +02:00
64ce06a353 xwayland: add nearest neighbor filtering as an opt 2023-06-11 21:33:59 +02:00
end-4
e1edfde539
Allow setting alpha value for ignorezero layer rule (#2477)
* rename ignorezero to ignorealpha

* allow setting ignorealpha value

This commit allows setting a float value (0-1) for the ignorealpha layer rule.
Does not yet have error handling; invalid ignorealpha layer rule will crash Hyprland.

* add brackets i forgot to add

* prevent crash with invalid ignorealpha value

prevents hyprland from immediately crashing with invalid ignorealpha layer rule
does not log

* don't try to set ignoreAlphaValue if alpha value not specified

* add catch to try, reintroduce ignorezero

- added catch after try cuz i was an idiot
- re-add ignorezero as an alternative to ignorealpha to not introduce a breaking change

* add logging for failed ignorealpha layer rule

* fix get ignorealpha's get VALUE

* check npos and use empty()

* rename VALUE cuz no longer const

* format Shader.hpp
2023-06-11 19:30:31 +02:00
e76bd43f53 rules: add nodim 2023-05-31 21:11:20 +02:00
fd73a7f795 gradient: fix warn 2023-05-31 15:55:54 +02:00
vaxerski
078ba6daa8 groupbars: add text color opt 2023-05-27 17:46:02 +02:00
vaxerski
90cb5fb672 groupbars: make gradients toggleable 2023-05-22 22:07:32 +02:00
vaxerski
206ac000b9 groupbars: add title and gradient rendering 2023-05-22 21:40:32 +02:00
vaxerski
896a78aaa0 lock: add allow_session_lock_restore 2023-05-13 12:36:36 +01:00
vaxerski
413a36a914 workspacerules: overwrite on existing 2023-05-12 01:15:32 +01:00
Andrei Alexeyev
2f87e4c2f3
renderer,config: add custom DRM modeline support (#2254)
This allows specifying custom display resolutions for the DRM backend.
This is useful for display overclocking, working around broken EDIDs,
etc. To use this feature, specify a modeline instead of a resolution
in the config, for example:

    monitor = DP-1, modeline 1071.101 3840 3848 3880 3920 2160 2263 2271 2277 +hsync -vsync, 0x0, 1

This example is a custom 3840x2160@120Hz mode with tightened timings.
I use it because the standard timings don't work with my monitor and GPU
combination (M28U with RX580).

The syntax is compatible with Sway and Xorg.
2023-05-09 14:01:45 +01:00
scorpion-26
826dc61e5c
Add "next on monitor or empty" workspace parameter (#2198)
* Add "next on monitor or empty" workspace parameter

Implements the following workspace parameter:
r+x/r-x (i.e. r+1): Behaves similar to the "m" parameter, but can also
select empty workspaces and it doesn't wrap around

* Improve code comments

* Implementation V2 for 'r' workspace param

* Rebase to upstream

Should fix CI

* Always set outName

* Include named workspaces

Currently only considers open/active named workspaces
2023-05-08 14:37:59 +01:00
vaxerski
7f0738bcb3 varlist: allow using s for std::isspace 2023-05-06 01:16:20 +01:00
vaxerski
583b8842e7 configmanager: fix substr offset in default ws rule 2023-05-06 01:10:05 +01:00
Dashie
a8541d5f64
Add split preselection (#2240) 2023-05-06 01:02:18 +01:00
vaxerski
c0be1e2fd8 configmanager: remove useless log from handleWorkspaceRule 2023-05-05 15:42:02 +01:00
vaxerski
7b73a332ea configmanager: deprecate bindws 2023-05-05 15:41:25 +01:00
vaxerski
a5d63a0324 configmanager: store workspace rules as a deque 2023-05-05 15:33:31 +01:00
vaxerski
bf04c83e3d config: clear layer rules on reload 2023-05-04 18:28:45 +01:00
scorpion-26
c3b9326ba1
Honor debug:enable_stdout_logs on startup (#2197)
* Honor debug:enable_stdout_logs on startup

disableStdout is set via config in CConfigManager::init(), which is
called early in CCompositor::initServer(). initServer() always disables
stdout logs at the end though, even when stdout is enabled is config. With this commit,
the config is respected.

* Don't spam stdout message
2023-05-03 16:08:01 +01:00
levnikmyskin
c949173bc9
Added some workspace-specific rules (#1986)
* added some workspace-specific rules

* added some worskpace-specific rules, with windowrule like syntax

* monitor is not mandatory anymore

* pointers to config are now static

* fixed optional WorkspaceRule fields

* Windows can now specify border size

* removed CHyprOpenGLImpl::renderBorder borderSize default value

* stuff

---------

Co-authored-by: Alessio Molinari <alessiomolinari@gmail.com>
Co-authored-by: vaxerski <43317083+vaxerski@users.noreply.github.com>
2023-05-01 22:28:27 +01:00
Jan Beich
250d5cf78c
config: add missing header for libc++ after 3a631e40db (#2208)
src/config/ConfigManager.cpp:1980:27: error: implicit instantiation of undefined template 'std::basic_stringstream<char>'
        std::stringstream error;
                          ^
/usr/include/c++/v1/iosfwd:134:32: note: template is declared here
    class _LIBCPP_TEMPLATE_VIS basic_stringstream;
                               ^
2023-05-01 22:24:51 +01:00
outfoxxed
3a631e40db
Declarative plugin management (#2180)
* Declarative plugin management

Allow declaring `plugin` entries in the hyprland configuration.

Plugins will be loaded if an entry is added and unloaded if that entry
is removed.

* Replace pointers with copying in updateconfigPlugins

* Include which plugin was declared twice in error
2023-05-01 15:10:53 +01:00
vaxerski
dbb6d9d174 rules: add noinitialfocus 2023-04-28 15:36:08 +01:00
outfoxxed
f40272d509
Add follow mouse mode to avoid refocusing under cursor (#2135)
* Add follow mouse mode to avoid refocusing under cursor
2023-04-25 16:00:34 +01:00
DB
e446db02f6
Add windowrule fakeFullScreen (#2043)
Co-authored-by: xVermillionx <xVermillionx@notvalid>
2023-04-18 21:59:08 +01:00
vaxerski
a4330fe378 misc: scan ppids in exec rules 2023-04-18 11:48:56 +01:00
vaxerski
8b3d8dc792 Format: use %lx for all addresses 2023-04-17 17:35:28 +01:00
vaxerski
b05ff89c76 Render: add cursor_zoom 2023-04-16 14:48:38 +01:00
Jan Beich
63841c8aac
Disable systemctl when built without systemd support (#2066)
/bin/sh: systemctl: not found
2023-04-15 20:03:09 +01:00
Person1873
33d06fb0e5
Add ability to split master when only 1 additional window (#2025)
* fix: enable master split less than 2 windows

added a config flag  "master:allow_small_split"
added config to minimum windows check.
TODO: check that no bug added (remove all masters?)

* IMPL:FIX: multiple master windows full width

Implemented the ability to have multiple master windows filling the full
monitor width in master mode.
this is controlled by the config option master:allow_small_split
(true/false)
this defaults to false as it was the original behaviour before this
patch

* BUGFIX: corrected issue with blanks re: addmaster

FIX 1: Treat ORIENTATION_CENTER the same as ORIENTATION_LEFT unless
there are enough STACK_WINDOWS to fill both wings.
FIX 2: enforced last window always set as master in
MasterLayout::CHyperMasterLayout::calculateWorkspace();
FIX 3: fix 2, also fixed focus issues previously noted.

* Changes requested by vaxerski

changed how we access config variables (by reference not value)
fixed a regression previously missed prior to requested changes.
I had somehow broken the very functionality i meant to add.

* added static keyword to config variables

* removed superfluous static tags

I made a mistake with making too many variables static.
this made them only evaluate once per runtime breaking things majorly.
My appologies. I haven't touched C++ in nearly 20 years.

* remove annoying comment

---------

Co-authored-by: vaxerski <43317083+vaxerski@users.noreply.github.com>
2023-04-13 15:20:58 +01:00
vaxerski
4bc3f9adbe config: ignore invalid paths in configPaths 2023-04-12 22:00:39 +01:00
Kajetan Puchalski
efee6a1cda
swallow: Add swallow_exception_regex (#2026)
Currently, if a window class is specified in the swallow_regex (e.g.
Kitty) it will swallow every other window spawned by it automatically.
Many other WMs implementing this functionality allow for defining
exceptions from this rule. For instance, we want Kitty to swallow sxiv
or zathura but we do not want Kitty to swallow something like wev.

This commit adds an additional regex - swallow_exception_regex where
these exceptions can be defined. This regex is then compared against the
title of the window about to be swallowed and if it happens to be a
match, aborts the swallowing.

This works because whenever an application that could be swallowed is
launched by a terminal, the class of the terminal remains the same while
the title changes to whatever the application's name is, thus letting it
be matched against a regex.
2023-04-12 13:38:15 +01:00
Hilmar Wiegand
6a4bda60f2
Allow movefocus for empty workspaces (#2011)
* Allow switching to empty workspaces using movefocus

* Allow switching to other workspaces when no windows are focused

* Implement review feedback

* Add option to disable focus fallback

* Remove unnecessary braces
2023-04-10 14:40:03 +01:00
scorpion-26
07e4ba9d80
Fix crash in CConfigManager::parseKeyword (#1983)
If debug:manual_crash is set on startup, parseKeyword tries
to call g_pHyprNotificationOverlay->addNotification, but
g_pHyprNotificationOverlay isn't initialized yet (is nullptr)

This commit adds a sanity check for that.
2023-04-07 20:15:11 +01:00
vaxerski
eea99abc49 debug: allow manual crash from hyprctl 2023-04-04 22:13:36 +01:00
7d9977d028 debug: added manual_crash 2023-04-04 14:50:03 +01:00
vaxerski
d3b0c90356 internal: rename ensureDPMS to ensureMonitorStatus 2023-04-03 22:52:09 +01:00
vaxerski
88a96110b7 config: default no direct scanout to true 2023-04-01 19:37:30 +01:00
Alexander Seiler
60527ab180
Fix some typos (#1907)
Signed-off-by: Alexander Seiler <seileralex@gmail.com>
2023-03-29 23:44:25 +01:00
vaxerski
3343aac6bf feat: add forcergbx rule 2023-03-26 02:00:24 +01:00
vaxerski
41f7736c85 config: default manual animations to false 2023-03-24 22:24:12 +00:00
vaxerski
70e3cb8151 feat: add debug:enable_stdout_logs 2023-03-24 19:37:37 +00:00
Vaxry
a80f8f257f
Feat: Introduce render_ahead_of_time (#1863) 2023-03-24 19:23:16 +00:00
vaxerski
a5a0434fff dbus: don't update vars in nests 2023-03-24 03:21:38 +00:00
vaxerski
463690a27a keybinds: allow code: prefix 2023-03-23 13:05:23 +00:00
vaxerski
a8b3be2c9c config: add misc:suppress_portal_warnings 2023-03-22 12:17:16 +00:00
vaxerski
71a95a581f feat: add pretty notifications 2023-03-20 15:03:09 +00:00