Commit graph

64 commits

Author SHA1 Message Date
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
Johan Malm
b9d6ce324f Set default A-F3 binding to bemenu instead of dmenu 2021-03-01 18:40:11 +00:00
Johan Malm
9f61a819fc Add zfree 2021-02-21 21:59:53 +00:00
Johan Malm
9eac349046 rc.xml: move nodename() to nodename.c 2021-02-16 21:04:49 +00:00
Johan Malm
a97428020e rc.xml: split out rstrip() to string-helpers.c 2021-02-16 21:03:38 +00:00
Johan Malm
375084c40c log: s/warn/info/ on missing config/theme files 2020-12-30 10:59:39 +00:00
Johan Malm
529d7016f2 config: change default font size from 8 to 10 2020-12-30 10:44:57 +00:00
Johan Malm
543f00131c action: add "ShowMenu" option
Parse the following in rc.xml:

<keyboard>
  <keybind key="">
    <action name="ShowMenu">
      <menu>root-menu</menu>
    </action>
  </keybind>
</keyboard>
2020-10-31 15:27:22 +00:00
Johan Malm
678d327d6f rcxml,theme: update info() message 2020-10-13 19:41:55 +01:00
Johan Malm
51507df2e7 rcxml: remove <lab><keyboard><layout> support
The preferred method is now to set this environment variable in
~/.config/labwc/enrivonment
2020-10-08 21:18:36 +01:00
Johan Malm
581f4ea0c3 s/BUG_ON/assert/ 2020-09-28 20:53:59 +01:00
Johan Malm
96e05057a3 Update .clang-format
Align with wlroots style
2020-09-28 20:41:41 +01:00
Johan Malm
1721b339da Reload config+theme on SIGHUP 2020-09-25 19:42:40 +01:00
Johan Malm
35ff6e5bb0 rcxml: s/csd/xdg_shell_server_side_deco 2020-09-15 21:10:02 +01:00
Johan Malm
4a89fbfb22 Improve log messages for reading config+theme 2020-09-14 18:17:36 +01:00
Johan Malm
92f6afdf65 rcxml: amend default keybinds
A-F2 to cycle view
A-F3 to launch dmenu_run
2020-09-11 20:51:25 +01:00
Johan Malm
c0a807765e rcxml: remove invalid keybind 2020-09-09 18:58:02 +01:00
Johan Malm
b2504bdf9a keybind: s/add/create/ 2020-09-02 21:05:28 +01:00
Johan Malm
e25118d8ec rcxml: set empty variables in post_processing()
Avoid crash if no config file can be found
2020-08-21 19:47:50 +01:00
Johan Malm
68fb8a3af5 rcxml: add rcxml_finish() 2020-08-13 20:20:44 +01:00
Johan Malm
2a17df0f8b Add log.c with info() and warn() 2020-08-12 19:37:44 +01:00
Johan Malm
f635d834ee rcxml: remove "[bind]" message 2020-08-11 21:12:02 +01:00
Johan Malm
f003abf608 Simplify and merge {config,theme}-dir.c 2020-08-10 17:24:17 +01:00