Commit graph

286 commits

Author SHA1 Message Date
bi4k8
a9f11c5fc7 move window raise/focus on click from hard-coded logic to default mouse binding 2021-12-03 06:46:43 +00:00
bi4k8
11512d30af implement root menu display as a default mouse binding 2021-12-03 06:46:43 +00:00
bi4k8
4f6297d1ad parse menu names from Menu mouse-bindings 2021-12-01 23:17:19 +00:00
bi4k8
8eab1e8132 parse and respect modifiers for mouse bindings 2021-12-01 15:11:21 -05:00
Johan Malm
d50c2f2eac Fix minor style violations 2021-11-26 19:27:50 +00:00
John Lindgren
c01d1f124c Basic support for Move action
- Add Move as a default mouse binding for a Titlebar Press action
- Remove the hard-coded handling in cursor_button()

Example config snippet:

    <mouse>
      <context name="Titlebar">
        <mousebind button="Left" action="Press">
          <action name="Focus"/>
          <action name="Raise"/>
          <action name="Move"/>
        </mousebind>
      </context>
    </mouse>
2021-11-26 18:25:04 +00:00
ARDiDo
6b948c7106 mousebind: add support for more contexts and mouse events 2021-11-02 18:14:50 +00:00
ARDiDo
9d37860a40 resistance: update documentation + default strength value 2021-10-26 21:15:13 +01:00
ARDiDo
8f8359597c resistance: move to <resistance> node 2021-10-26 21:15:13 +01:00
ARDiDo
a24e17dea7 Improve expandibility 2021-10-26 21:15:13 +01:00
ARDiDo
e1c8b3c641 Partial screen_edge_strength 2021-10-26 21:15:13 +01:00
Johan Malm
c48b9d44d1 config: add <core><adaptiveSync> 2021-10-22 20:23:09 +01:00
Johan Malm
d9253331cd config: make capitalization consistent in rc.xml 2021-10-21 20:40:14 +01:00
Johan Malm
7398966661 config: change libinput variables to camelCase
This is more consistent with other rc.xml variables.

strcasecmp() is used in src/config/rc.xml, so there are not backward
compatibility issues.
2021-10-19 21:44:44 +01:00
Joshua Ashton
d8a499deaa config: Fix RaiseOnFocus always setting FollowMouse
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2021-10-18 17:25:08 +01:00
Johan Malm
526fb1668c config: use super+arrow for SnapToEdge by default 2021-10-17 21:30:48 +01:00
Johan Malm
606b6d946e Fix coding style, mostly whitespace 2021-10-15 20:52:36 +01:00
Johan Malm
f8e1d76333 config: survive parsing error
It is no good crashing on an rc.xml syntax error, particularly on a
SIGHUP when the user could have applications open.
2021-10-15 20:33:55 +01:00
ARDiDo
416499624e Complete libinput configuration 2021-10-15 19:11:35 +01:00
Johan Malm
417763e8f8 config: support audio and monitor keys by default
Add default keybinds:

    XF86_AudioLowerVolume - amixer sset Master 5%-
    XF86_AudioRaiseVolume - amixer sset Master 5%+
    XF86_AudioMute - amixer sset Master toggle
    XF86_MonBrightnessUp - brightnessctl set +10%
    XF86_MonBrightnessDown - brightnessctl set 10%-
2021-10-14 19:37:57 +01:00
ARDiDo
326b4aebd1 keyboard repeat configuration 2021-10-10 11:34:48 +01:00
ARDiDo
3dc4c02c54 partial libinput configuration 2021-10-10 11:34:48 +01:00
Johan Malm
d2375b025d Fix coding style 2021-09-24 22:04:03 +01:00
Johan Malm
ebb632419b *.c: add SPDX-License-Identifier 2021-09-24 21:45:48 +01:00
Johan Malm
97e8cb45ec config: remove comment describing simple code 2021-09-22 20:36:55 +01:00
Johan Malm
e1c1b4544d config: remove is_attribute
Simplify code, by removing the ability to differentiate between
attributes and sub-elements when creating node names. For example,
the following two examples would generate the nodename `bar.foo`

- <bar><foo></foo></bar>
- <bar foo="">

In theory, there could be clashes, but I think in reality it is unlikely.
There are no clashes in openbox-spec and it would be pretty confusing to
have something like:

<font name="">
  <name></name>
</font>
2021-09-22 20:25:57 +01:00
Johan Malm
39b9133cec rcxml: refactor load_default_key_bindings() 2021-09-06 22:04:56 +01:00
Johan Malm
b5acf387b8 rcxml: set default mousebind
...if none specified by the user in ~/.config/labwc/rc.xml
2021-09-06 22:02:02 +01:00
Johan Malm
62d93d54c5 rcxml: refactor mousebind implementation 2021-09-06 21:54:00 +01:00
alexander bryan
1ac654f006 Apply coding std to <mouse> code & add .clang-format
The files:
    include/config/mousebind.h
    src/config/mousebind.c
    src/config/rc.xml
were formatted automatically via clang-format using the rules specified
in the .clang-format file. Specifically, the command;
clang-format -i -style=file include/config/mousebind.h \
src/config/mousebind.c src/config/rc.xml

This is unfortunately adding a break before the brace in enum
declarations
2021-09-01 07:05:37 +01:00
alexander bryan
10a685a0e4 refactor <mouse> xml parsing to match rest of xml parsing 2021-09-01 07:05:37 +01:00
alex
36f5b49f2a Implemented <doubleClickTime> in rc.xml 2021-09-01 07:05:37 +01:00
alex
dfdb4e4b0e First implemenation of <mouse> in rc.xml
Can successfully parse the following XML and and implement the action:

<mouse>
    <context name="TitleBar">
        <mousebind button="Left" action="DoubleClick">
            <action name="ToggleMaximize"/>
        </mousebind>
    </context>
</mouse>

The XML parsing code for this looks A LOT different than the already
existing XML parsing code. It may have to be reworked
2021-09-01 07:05:37 +01:00
Johan Malm
b7573c8d36 rcxml: load default keybinds on <keyboard><default />
This is an addition to the openbox specification and provides a way to
keep config files simpler whilst allowing user-specific keybinds.

docs/rc.xml shows a simple config file with <default />
docs/rc.xml.full shows the full config
2021-08-22 19:09:31 +01:00
Johan Malm
93244cfbe1 rcxml: add some default keybinds
super-return - alacritty
alt-F4       - close window
super-a      - toggle maximize
alt-arrow    - move window to edge
2021-08-22 17:00:22 +01:00
Johan Malm
a6eb29ad33 config: add <core><gap>
Specify the distance in pixels between views and output edges when using
movement actions such as MoveToEdge
2021-08-22 14:32:19 +01:00
Johan Malm
3990018bb9 config: support setting menu item font
In rc.xml, support

<font place="MenuItem">
  <name></name>
  <size></size>
</font>
2021-08-20 20:27:52 +01:00
Johan Malm
82e47ac1f5 Remove src/common/log.c
Use wlr_log() instead
2021-07-23 21:15:55 +01:00
Johan Malm
20fd8f59a7 Remove info() and die() 2021-07-22 21:30:17 +01:00
Johan Malm
49a73befdb action: add 'MoveToEdge'
Currently only moves view to edges of outputs

Example keybind:

<keybind key="A-Left">
  <action name="MoveToEdge">
    <direction>left</direction>
  </action>
</keybind>
2021-07-20 19:54:57 +01:00
Johan Malm
2e4f931469 rcxml: allow <theme><font> without place="" attribute
The construct below will set the font for all supported places. Currently
that's only ActiveWindow, but is likely to include InactiveWindow,
MenuHeader, MenuItem and OnScreenDisplay at some point.

<theme>
  <font>
    <name></name>
    <size></size>
  </font>
</theme>
2021-07-19 20:46:32 +01:00
Johan Malm
ec2c67338a rcxml.c: survive incorrect keybind 2021-07-19 07:07:33 +01:00
Johan Malm
b31c1c4b75 rcxml: change <lab><xdg_shell_server_side_deco> to <core><decoration> 2021-07-16 17:38:17 +01:00
Johan Malm
a9b46131ab rcxml: use root-node <labwc_config> 2021-07-16 17:30:07 +01:00
Johan Malm
018593c824 rcxml: do not try to use theme Clearlooks-3.4
If no theme is specified in rc.xml, just use built-in theme
2021-06-28 20:48:55 +01:00
Johan Malm
3c9f6c0551 rcxml: fix typo 2021-05-28 21:31:02 +01:00
Mikhail Kshevetskiy
00db22e44f focus: add basic follow mouse support 2021-05-28 21:25:19 +01:00
Johan Malm
2f5a44d34d theme: move title_height to theme struct
title_height is a derived variable which needs both config and theme
variables (font height and title padding). The code is tidier calling
post_processing() for this from theme_init()
2021-04-15 20:13:49 +01:00
Johan Malm
0a6eead36b rcxml: simplify debugging nodenames 2021-03-30 22:40:41 +01:00
Johan Malm
a5139815d6 config: add <theme><cornerRadius> 2021-03-30 22:39:52 +01:00