Code Monkey home page Code Monkey logo

cagebreak's Introduction

Cagebreak: A Tiling Wayland Compositor

CII Best Practices Packaging status AUR package

Contact Manuals FAQ CONTRIBUTING ArchWiki AUR

Introduction

Cagebreak provides a ratpoison-inspired, cage-based, tiling Wayland compositor.

  • Bugs, Contact Information and New Features:
  • Compatibility & Development Distribution:
    • Cagebreak supports Arch Linux and uses the library versions from extra and core at the time of release. Most other setups work with a bit of luck.
  • Quick Installation (on ArchLinux, more here (ArchWiki)):
    1. Use the cagebreak PKGBUILD.
    2. Add an example config such as config to $USER/.config/cagebreak/config
    3. Execute cagebreak like any other binary.
  • Documentation:
  • What's new?: Changelog
  • Uninstallation: pacman -R cagebreak
  • Contributing:
    • Open an issue and state your idea. We will get back to you.
    • Ask before you open a pull request. We might not accept your code and it would be sad to waste the effort.
    • Respect the Code of Conduct (To date, we've never had to intervene. - Keep it that way!)
  • Name: Cagebreak breaks the kiosk of Cage into tiles, hence the name.

Installation

On Arch Linux, use the AUR PKGBUILDs:

  • Using cagebreak, Cagebreak is built on the target system (since release 1.3.0)
  • Using cagebreak-bin, pre-built binaries are extracted to the target system (since release 1.3.2)

See cagebreak-pkgbuild for details.

You may check out other distros here:

Packaging status

Obtaining Source Code

There are different ways to obtain cagebreak source:

Verifying Source Code

There are ways to verify that you obtained the correct source (See keys/ and CONTRIBUTING):

  • signature for the tarball of release assets starting at release 1.2.1
  • signed tags for releases in the git history

Building Cagebreak

Cagebreak uses the meson build system.

Cagebreak is developed against the latest tag of wlroots, so as not to constantly chase breaking changes.

Execute the following commands to build Cagebreak:

$ meson setup build -Dxwayland=true -Dman-pages=true --buildtype=release
$ ninja -C build

Man Pages

Remove -Dman-pages=true to disable man page generation.

To generate man pages, make sure that you have scdoc installed.

Release Build

To obtain a debug build, remove --buildtype=release.

The release build is reproducible under conditions outlined in CONTRIBUTING.

Xwayland Support

To build Cagebreak without XWayland support, remove -Dxwayland=true.

To use XWayland make sure that your version of wlroots is compiled with XWayland support.

You'll need to have XWayland installed for XWayland support to work.

Running Cagebreak

$ ./build/cagebreak

If you run Cagebreak within an existing X11 or Wayland session, it will open in a virtual output as a window in your existing session.

If you run it in a TTY, it'll run with the KMS+DRM backend.

Note that a configuration file is required. For more configuration options, see the man pages.

Please see example_scripts/ for a basis to customize from.

Usage Philosophy

Cagebreak was built to suit the needs of its creators. This outlines how we intended some parts of cagebreak and might ease learning how to use cagebreak a little bit. Please note that this does not replace the man pages or the FAQ. Also, this is not intended as a guide on how cagebreak must be used but as a source of inspiration and explanation for certain particularities.

  1. Cagebreak is keyboard-based. Everything regarding cagebreak can be done through the keyboard and it is our view that it should be. This does not mean that pointers, touchpads and such are not available for the few applications that do require them.

  2. Cagebreak is a tiling compositor. Every view takes up as much screen space as possible. We believe this is useful, as only very few programs are typically necessary to complete a task. To manage multiple tasks concurrently, we use workspaces.

  3. Each task deserves its own workspace. Any given task (the sort of thing you might find in your calendar or on your todo list) probably requires very few views and ideally, these take up as much of the screen as possible.

Combining 2. and 3. might look like this in practice:

  • Task 1: Edit introduction section for paper on X
  • Task 2: Coordinate event with person Y
  • split screen vertically
  • open web browser or pdf viewer to read literature
  • focus next
  • open editor
  • change to a different workspace
  • split screen vertically
  • open calendar application
  • focus next
  • open chat application

Now each task has its own workspace and switching between tasks is possible by switching between workspaces.

Note that, for example by using the socket, more advanced setups are possible. But the user is warned that excessive tweaking eats into the work to be done.

  1. Use keybindings and terminal emulators for the right purpose. Given the philosophy outlined above you probably launch the same few programs very often and others are very rarely used. We believe that commonly used programs should have their own keybindings together with the most important cagebreak commands. All the rarely used programs should be launched from a terminal emulator as they probably require special flags, environment variables and file paths anyway.

In practice this means thinking about the applications and cagebreak commands you use and taking your keyboard layout into account when defining keybindings for your individual needs.

  1. Cagebreak can't do everything, but with scripting you can do most things. Through the socket and with a bit of scripting, you can use the internal state of cagebreak in combination with cagebreak commands and the full power of a scripting language of your choice to do almost whatever you want.

Example scripts can be found in the repository under example_scripts/.

Roadmap

Cagebreak plans to do or keep doing the following things in the future:

Governance

Cagebreak is managed by project-repo.

Consider project-repo a single benevolent dictator for life that happens to occupy at least two brains.

Project-repo is a pseudonym of at least two individuals acting as benevolent dictators for the project by the others mutual consent.

The individuals comprising project-repo are not otherwise associated by payment from any organisation or grant.

Governance Issues

Use SECURITY.md to contact project-repo.

Roles

There are members of project-repo and those who are not.

There are no specific roles forced unto anyone.

Bus Factor

The current bus factor for Cagebreak is: 1

The Bus Factor is a measure of how many people have to be incapacitated for a project to be unable to continue.

Project-repo could react to issues (even confidential e-mails) and fix easier issues if any one individual were incapacitated.

However, not all aspects of the code or release engineering are fully resilient to the loss of any one individual.

We strive to increase the bus factor to at least 2 in all aspects.

Accessibility

  • We use text input/output to interact with the user whenever possible. For example, sending text-based commands to the cagebreak sockets allows one to change every configurable feature of cagebreak.
  • Color is displayed but never a vital part to operating cagebreak.
  • Text size can be increased and background color adjusted using text commands.
  • There is no screen reader support per se but using a screen reader on socket output would work and cagebreak does not preclude the use of a screen reader for any software run with it.

Bugs

Open an issue is you find something.

See SECURITY.md for other means of contacting the Cagebreak authors and security issues.

Fixed bugs are assigned a number and summarized in Bugs.md for future reference.

Contributors

License

Copyright (c) 2020-2024 The Cagebreak authors Copyright (c) 2018-2020 Jente Hidskes Copyright (c) 2019 The Sway authors

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

cagebreak's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cagebreak's Issues

setting the escape key to a single modifier

I've been trying to use alt as my escape key but haven't been able to get it to work. I have the following in my ~/.config/cagebreak/config

escape A

bind t exec foot
bind q close

and nothing happens with I try to use them after rebooting.

Spawn an Application in Specified Workspace

I want to st autostarting all of my apliciations. The problem is that when an applicaiton starts in the autostart, it only launchs in the first workspace. I am wondering if there is a wayto clauch applciation in another workspace.

Can not read fallback config when .config/cagebreak/config is not exist.

00:00:00.059 [../source/cagebreak.c:527] Cagebreak 1.8.0 is running on Wayland display wayland-1
00:00:00.059 [../source/cagebreak.c:193] Could not open config file "/home/feng/.config/cagebreak/config"
                                                                                  

00:00:00.059 [types/wlr_output.c:1403] Falling back to software cursor on output 'WL-1'
00:00:00.059 [types/wlr_output.c:1403] Falling back to software cursor on output 'WL-1'
00:00:00.059 [types/wlr_output.c:1403] Falling back to software cursor on output 'WL-1'
double free or corruption (!prev)
已放弃

Unify `parse_rc_line` and `parse_action`

As of right now, the actions which can be run in the config file and the actions which can be run
as a keybinding are parsed separately in parse.c. This leads to a lot of code duplication. Furthermore, unifying these functionalities would enable a more versatile configuration. For instance,
it would enable the user to write hsplit into the configuration file to split the output on startup and
workspace 2 to set the default workspace to workspace 2. Therefore, this change would simplify the code base, while at the same time increasing the feature set.

PS: As a side effect, this would allow quirky statements such as bind d bind r hsplit which would bind the d key to binding the r key to split the output...

Screen refresh lag

I'm using v. 1.8.1 and am experiencing a screen refresh lag, particularly on Firefox:

When I type in anything, the text is refreshed and becomes visible only following mouse movement. I don't experience this with the same setup when I use Sway as the compositor.

Feature request: undo/redo

Is it possible to implement undo/redo, as in ratpoison:

@deffn Command undo
Undo the last change of frame layout. This is especially helpful
after a @command{only} command. One can step at most @dfn{maxundos}
steps back in frame layout history.
@EnD deffn

@deffn Command redo
redo the last change that was undone.
@EnD deffn

(from ratpoison-1.4.9/doc/ratpoison.texi)

launching programs

What is the "proper way" to launch a programs, since cagebreak doesn't support "traditional" launchers, and launching from the terminal leaves a terminal unusable?

2.0.0 fails to build on FreeBSD with Clang >= 15

reallocarray(3) is not in POSIX thus not visible with _POSIX_C_SOURCE. Linux cheats POSIX via _DEFAULT_SOURCE but on BSDs the cheat knob is different (__BSD_VISIBLE on DragonFly/FreeBSD/OpenBSD and _NETBSD_SOURCE on NetBSD).

$ cc --version
FreeBSD clang version 15.0.6 (https://github.com/llvm/llvm-project.git llvmorg-15.0.6-0-g088f33605d8a)
Target: x86_64-unknown-freebsd14.0
Thread model: posix
InstalledDir: /usr/bin
$ meson setup _build
$ meson compile -C _build
[...]
../cagebreak.c:197:11: warning: call to undeclared function 'reallocarray'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
                        line = reallocarray(line, line_length, sizeof(char));
                               ^
../cagebreak.c:197:9: error: incompatible integer to pointer conversion assigning to 'char *' from 'int' [-Wint-conversion]
                        line = reallocarray(line, line_length, sizeof(char));
                             ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Note, on Clang < 15 -Wint-conversion doesn't error out, so the implicit declaration of reallocarray sometimes leads to crashes.

waitpid for Xwayland fork failed: No child processes

Similar to djpohly/dwl#177. Xwayland works fine elsewhere: cage, hikari, kwinft, labwc, phoc, river, sway, wayfire.

$ cagebreak
[...]
00:00:00.085 [xwayland/server.c:92] Starting Xwayland on :0
00:00:00.116 [render/swapchain.c:105] Allocating new swapchain buffer
00:00:00.118 [render/allocator/gbm.c:142] Allocated 1280x720 GBM buffer (format 0x34325258, modifier 0x100000000000004)
00:00:00.118 [render/gles2/renderer.c:143] Created GL FBO for buffer 1280x720
00:00:00.160 [types/wlr_surface.c:748] New wlr_surface 0x880d81f80 (res 0x86f22d380)
00:00:00.165 [xwayland/server.c:243] waitpid for Xwayland fork failed: No child processes
(EE) failed to read Wayland events: Broken pipe
xterm: Xt error: Can't open display: :0

$ cc --version
FreeBSD clang version 11.0.1 ([email protected]:llvm/llvm-project.git llvmorg-11.0.1-0-g43ff75f2c3fe)
Target: x86_64-unknown-freebsd13.0
Thread model: posix
InstalledDir: /usr/bin

$ pkg info -x cagebreak wayland wlroots
cagebreak-1.8.3
wayland-1.20.0
wayland-protocols-1.25
xwayland-devel-21.0.99.1.171
wlroots-0.15.1

Toggle Top Mode Binding

Hey I am wondering how to set a keybind to togglig top mode. For exaple C-t enters top mode and exits after I do something. If I want to do multiple things in a row it is more efficent to also have a keybind to toggel top mode like resize.

Suggestion gaps, borders

Any chance we ll get gaps or selected frame border? I use terminals a lot and its kinda hard to know which on is selected since they share background.

Screen/output order

On multi-monitor setups there is an ordering issue with regard to screens/outputs.

I have the following 4 monitor configuration:

video card configuration:

$ ls /sys/class/drm
card0 card0-DP-1 card0-DVI-D-1 card0-DVI-I-1 card0-HDMI-A-1 card1 card1-DP-2 card1-DP-3 card1-DP-4 card1-HDMI-A-2 renderD128 renderD129 version

sway/config setting:

output HDMI-A-1 resolution 1920x1080 position 0,0
output DVI-I-1 resolution 1920x1080 position 1920,0
output DVI-D-1 resolution 1920x1080 position 3840,0
output HDMI-A-2 resolution 3840x2160 position 5760,0

$ wayland-info | grep xdg_output -A 5

interface: 'zxdg_output_manager_v1', version: 3, name: 18

xdg_output_v1
	output: 31
	name: 'HDMI-A-1'
	description: 'Goldstar Company Ltd 23EA63  (HDMI-A-1)'
	logical_x: 0, logical_y: 0
	logical_width: 1920, logical_height: 1080

xdg_output_v1
	output: 30
	name: 'DVI-I-1'
	description: 'Goldstar Company Ltd 23EA63 312INQUC8516 (DVI-I-1 via DVI-D)'
	logical_x: 1920, logical_y: 0
	logical_width: 1920, logical_height: 1080

xdg_output_v1
	output: 29
	name: 'DVI-D-1'
	description: 'Goldstar Company Ltd 23EA63 401INJL0F588 (DVI-D-1)'
	logical_x: 3840, logical_y: 0
	logical_width: 1920, logical_height: 1080

xdg_output_v1
	output: 28
	name: 'HDMI-A-2'
	description: 'Sharp Corporation SHARP HDMI 0x00000000 (HDMI-A-2)'
	logical_x: 5700, logical_y: 0
	logical_width: 3840, logical_height: 2160

Cagebreak defaults:

Output location when opening first application without prevscreen/nextscreen: DVI-I-1.

Here DVI-I-1, the second logical output, is taken as the currently active output.

Output location when opening first application after calling prevscreen: DVI-D-1 (third logical output)
Output location when opening first application after calling nextscreen: HDMI-A-1 (first logical output)

Here prevscreen and prevnext take HDMI-A-2, the fourth logical output, as the currently active output.

Cagebreak terminology

This isn't an issue per se, but concerns cagebreak terminology. I won't try to cover the entire range of terms used but stick to the ones that concern me at the moment:

OK, so I get the use of the terms 'output', 'workspace' and 'tile'.

So my question: In cagebreak, what exactly is a 'screen'? At the moment, the use of nextscreen, prevscreen, movetoscreen, movetonextscreen, movetoprevscreen all seem to suggest that 'screen' is the same as 'output'. If so, shouldn't all the aforementioned commands have screen replaced with output? eg. nextoutput, prevoutput, etc.

Missing word in config man page for input `events` setting

The configuration man page for the input send events setting is missing the events word:

diff --git man/cagebreak-config.5.md man/cagebreak-config.5.md
index 4eea4c5..c618314 100644
--- man/cagebreak-config.5.md
+++ man/cagebreak-config.5.md
@@ -123,7 +123,7 @@ by prepending a line with the # symbol.
        *dwt enabled|disabled*
                Enables or disables disable-while-typing for the specified input device.
 
-       *enabled|disabled|disabled_on_external_mouse*
+       *events enabled|disabled|disabled_on_external_mouse*
                Enables or disables send_events for specified input device. Disabling
                send_events disables the input device.

Slightly off topic: I was hoping to use this setting to hide the mouse cursor, but it doesn't work. My embedded system must expose a pointer device even though none is connected, altough I can only infer that much because the system is very bare bones and I can't check. Is there a way to do that?

Mouse not responding

Greetings, It took me a while to get back. Hope all is well at Team Cagebreak.

Now I have Cagebreak 1.9.1-1 installed on my updated Arch Linux box.

While the cursor itself responds to movement, mouse clicks do not evoke any response.

Multi-line message

Hi,

After browsing through the current code in message.c and ipc_server.c, I figured the answer might be no, but is there a way to send a message command displaying multiple lines ?

From my understanding, commands sent to the IPC socket must be terminated with a \n, so it doesn't appear to be possible, but I might have missed something (double-escaping inside the message with '\n' is rendered verbatim so it doesn't work either).

I'm trying to implement an equivalent to ratpoison's (or stumpwm) 'windows' command using IPC, starting from the show_workspace_views.sh example script

thanks,

Feature request: Cagebreak state over ipc socket

While fully recognizing - and appreciating - Cagebreak's keyboard orientation, would it be possible to accommodate support for screen change on mouse over? This would help avoid a series of key presses on multi-screen setups and improve overall ergonomics.

Thanks.

config issue - continued

This is with reference to issue #13. Earlier I thought changes to my setup were working but I find in fact that it isn't.

Based on advice in #13 I have a call to a shell script from my config file which is currently setup this way:

echo "prevscreen" | nc -i 1 -U $CAGEBREAK_SOCKET
emacsclient -a "" -c -F "((name . "dired"))" &
sleep 1 &
firefox &disown
sleep 10 &
echo "nextscreen" | nc -i 1 -U $CAGEBREAK_SOCKET
emacsclient -a "" -c -F "((name . "cider"))" &
sleep 1 &
echo "nextscreen" | nc -i 1 -U $CAGEBREAK_SOCKET
emacsclient -a "" -c -F "((name . "org"))" &
sleep 1 &
echo "prevscreen" | nc -i 1 -U $CAGEBREAK_SOCKET

However, calls to Cagebreak's screen commands continue to execute immediately and don't wait for shell commands to time out.

Suggestion: use scdoc instead of pandoc to generate manpages

Hello!

I am, huh, a mere package maintainer. This is a simple suggestion: use scdoc to generate manpages, instead of pandoc.

The advantages are:

  • scdoc is tailored to generate manpages from markdown-like sources;
  • scdoc is smaller
  • scdoc has less dependencies

How to disable a output?

Hello, I have two outputs (or heads) eDP-1 and HDMA-A-1, and always want to disable eDP-1, how to do it?

Thank you!

Feature request: custom events via IPC

If process A is already listening for cagebreak events via IPC, it would be helpful if process B could relay a custom event through the socket to process A.

Herbstluftwm has this functionality via emit_hook.

This can sort of be accomplished by abusing the definemode command with the mode being the message to pass (without spaces) to the process listening to IPC events. The modes are saved by cagebreak though, so these will quickly stack up and there doesn't seem to be a complement deletemode command. But this isn't the purpose of definemode anyway.

remove a single split

Hello,

I was wondering if there is a way to remove a single split. I looked into the manual, only to find only which remove all splits.

Thanks and cagebreak is awesome!

Is there a way to change the font and display time for message window?

Hi,
Is there a way to easily change de font? "monospace 10" are too small for my eyes. I've changed them in message.c but can you add a configuration option, please?
Same for the display time of these window. They sometimes disappear too fast (mainly time).
May be a config for the background and foreground color of the message window too?

cagebreak is great :)

Issue with starting Cagebreak from ~/.bashrc

This is a strange one: If I start Cagebreak automatically at login with ~/.bashrc running 'exec cagebreak', no matter what application I try to run, Firefox is run instead.

I also see this message at the time, though I'm not sure if that is related to an earlier execution of the emacs daemon:

Warning: due to a long standing Gtk+ bug
https://gitlab.gnome.org/GNOME/gtk/issues/221
Emacs might crash when run in daemon mode and the X11 connection is unexpectedly lost.
Using an Emacs configured with --with-x-toolkit=lucid does not have this problem.

The problem doesn't occur if I log in and start Cagebreak manually.

Suggestion: Default values if config file not found

Apologies for opening two tickets instead of one, but I thought that these two suggestions are different enought they merit their own "issue".

Would replicating the behaviour in ratpoison (if no config file is found, load predefined defaults) something you would be interested in? I personally found confusing when I first tried cagebreak that it wouldn't start without a config file, coming from ratpoison. Of course, other people's experience might be different.

Session error upon turning off an output

Hi guys,

Thanks and congratulations on Version 2.0 which I was able to install without any issues.

The current bug existed earlier (in the dev/debug version that I was using) and is present in the new version:

If I turn an output off, I lose my session - everything is closed and a new session is opened.

keyboard shortcuts

In config I use Latin letters to configure the shortcuts I want to use. For me having 2 different keyboard layouts it feels overwhelming to keep track of what is current layout to execute cagebreak shortcuts (obv. when it's not english, shorcuts don't work). So here's the question: is there a way to force cagebreak execute shortcuts in both layouts?

Huge mouse pointer/cursor icons

This is somewhat related to issue #10. After the fix to the screen refresh lag in Firefox, my mouse pointer/cursor is very frequently (but not always) huge and hard to look at. This occurs when hovering over all applications, not just Firefox.

Also, and I'm not sure if it is related, even with an 'export MOZ_ENABLE_WALYAND=1' setting, xlsclients reports Firefox as a Xorg application and not Wayland as I would expect.

wlroots >=0.16.0

Hi,
cagebreak is not my main compositor but i like it.
Since a few days, Arch Linux updated to wlroots 0.16.1 and cagebreak can't be used anymore without downgrading wlroots.
Do you plan to update to newer wlroots versions soon or do i need to downgrade some packages on my pc?

SwayBG Returns Error

When I run swaygb, it returns the error [main.c:587] Missing a required Wayland interface.

Guidance on tweaking Cagebreak

Now that I have Cagebreak set up very close to my needs, there are a few areas where I would appreciate some help in tweaking it further.

  1. Where can I configure my keyboard repeat and delay rates? The current default that I'm getting isn't ideal:
    interface: 'wl_seat', version: 7, name: 10
    name: seat0
    capabilities: pointer keyboard
    keyboard repeat rate: 25
    keyboard repeat delay: 600

  2. Is there an idle screen/output handling tool that you could recommend as suitable for Cagebreak? It would be nice to have the monitors blank out when idle for a specified duration.

  3. Also, if I turn off an output, or if it isn't on at load time, Cagebreak is unable to access it unless we restart Cagebreak. I've looked at dynamic output managers like Kanshi which seem like the solution. However, it isn't supported by Cagebreak: we get this message 'compositor doesn't support wlr-output-management-unstable-v1'. Regarding this my questions are: what would you recommend for dynamic output management, and, is there any chance you might add support for a tool like kanshi?

TIA

Losing reference to $CAGEBREAK_SOCKET

After starting Cagebreak, initial configuration calls to the IPC socket work as usual.
However, after cagebreak/config is executed, if I run this in a terminal:
$ rlwrap nc -U $CAGEBREAK_SOCKET
I get this message:
Ncat: You have to specify path to a socket to connect to. QUITTING.
At this point 'echo $CAGEBREAK_SOCKET' returns nothing.

If I save the value of $CAGEBREAK_SOCKET in cagebreak/config (in the call to my initialization shell script, cb-netcat):
'echo $CAGEBREAK_SOCKET > socket-path'
and use that socket path to access the IPC socket, it works.

So the ipc socket itself isn't the problem just the $CAGEBREAK_SOCKET seems to be getting lost at some point.

navigating screens question and suggestion

In my first post I forgot to thank you for cagebreak. I've been evaluating compositors for my needs and have been through kiwmi, japokwm, wayfire, sway and cagebreak. So far I like cagebreak most of all.

Back to my question:

You currently support 'movetonextscreen' but there is no equivalent movetoprevscreen.
For multiple 3 to 4 screen configurations the second command would be useful.

Also, is it not possible to move to a screen directly, like 'movetoscreen 3'?

The same thing with prevscreen and nextscreen: something like 'focusscreen 3', if it were possible, would be useful.

config issue

I'm trying to do a minimal initial layout in config.

When I just have this at the end of my config:
nextscreen
exec firefox
Firefox is correctly opened on what is the nextscreen relative to the default

However, when I try this:
nextscreen
exec firefox
exec sleep 15
nextscreen
exec alacritty
all calls to nextscreen seem to be ignored as both Firefox and alacritty are opened in the default screen, and sleep seems to have no effect no matter what value I set.

Related to this is the slightly confusing status of the default screen:
a) If I don't open any applications via the config file and then run an application, it will run on one screen.
b) If I don't open any applications via the config file, call nextscreen or prevscreen, and then run an application, it opens in a screen different from what it should be if the screen in a) was in fact the default. nextscreen/prevscreen seem to be reading a different default value.

Error When Starting From TTY with `./cagebreak/build/cagebreak`

./cagebreak is the git directory.
This is the error:

00:00:00.000 [libseat] [libseat/backend/seatd.c:64] Could not connect to socket /run/seatd.sock: No such file or directory
00:00:00.000 [libseat] [libseat/libseat.c:76] Backend 'seatd' failed to open seat, skipping
00:00:00.000 [libseat] [libseat/libseat.c:76] Backend 'logind' failed to open seat, skipping
00:00:00.000 [libseat] [libseat/libseat.c:79] No backend was able to open a seat
00:00:00.000 [backend/session/session.c:83] Unable to create seat: Function not implemented
00:00:00.000 [backend/session/session.c:248] Failed to load session backend
00:00:00.000 [backend/backend.c:86] Failed to start a session
00:00:00.000 [backend/backend.c:357] Failed to start a DRM session
00:00:00.000 [../cagebreak.c:373] Unable to create the wlroots backend

The OS is OpenSuse Tumbleweed.

High CPU until first event is written over IPC socket

While testing scripts with the IPC socket I noticed that one core on my 4 core desktop goes to 100% and stays there until the first event occurs and is read by the script, at which point the CPU usage drops back down and the script and event processing seems to progress as expected from then on.

This also occurs when just connecting directly with nc (I tested with both busybox nc and openbsd-netcat), single core CPU goes to 100% until the first event occurs.

The process at 100% is cagebreak -e so it seems like a cagebreak issue at first glance but maybe it's something on the client side?

I'm a novice at troubleshooting this type of thing, but strace is logging a lot of epoll_pwait calls during high CPU and then those taper off dramatically after the first event and CPU usage goes down.

~ $ doas -c -f strace -p 6983
strace: Process 6983 attached with 11 threads
^Cstrace: Process 6983 detached
strace: Process 6984 detached
strace: Process 6985 detached
strace: Process 6986 detached
strace: Process 6987 detached
strace: Process 6988 detached
strace: Process 6989 detached
strace: Process 6990 detached
strace: Process 6991 detached
strace: Process 6992 detached
strace: Process 6993 detached
% time     seconds  usecs/call     calls    errors syscall
------ ----------- ----------- --------- --------- ----------------
 94.62    2.724267           1   2096153           epoll_pwait
  4.73    0.136285          20      6719        28 ioctl
  0.51    0.014639           5      2913       397 read
  0.09    0.002717           6       428           sendmsg
  0.01    0.000409           3       114           write
  0.01    0.000290           9        32           recvmsg
  0.01    0.000183          10        17           munmap
  0.01    0.000153           8        18           mmap
  0.01    0.000145           6        24           timerfd_settime
  0.00    0.000031           3         8           fcntl
  0.00    0.000014          14         1           accept
  0.00    0.000012           6         2           epoll_ctl
------ ----------- ----------- --------- --------- ----------------
100.00    2.879145           1   2106429       425 total

Suggestion: Change cursor to square when waiting for a key

I personally found quite useful when I started with ratpoison to have the cursor change when the escape sequence is pressed and the wm is waiting for a key.

If this ratpoison behaviour is something you think would fit your vision for cagebreak it would be nice to have it :)

Hiding Mouse Cursor

Extract from #25 subdivided into a new issue:

I was hoping to use this setting to hide the mouse cursor, but it doesn't work. My embedded system must expose a pointer device even though none is connected, altough I can only infer that much because the system is very bare bones and I can't check. Is there a way to do that?

Additional relevant remark:

Thanks a lot, I'll also try to dig a bit into wlroots and see if there's anything that would allow hiding the cursor.
Would hiding the cursor when no pointer device is enabled be an acceptable solution? Or should it be a separate option?

interacting with $CAGEBREAK_SOCKET

It's not an issue I guess, I just couldn't find any information on how to interact with the socket.

nc -u $CAGEBREAK_SOCKET 

I get forward host lookup failed. So how do I interact with this socket? Sorry for a noob question, but I would appreciate some examples. If that's inappropriate place to discuss but someone wants to help me -- my discord is exitone hashtag 9183.

Is cagebreak compatible with waybar?

Hello,

I have tried to use waybar with cagebreak and I only get the following error message:

[2021-09-24 21:48:49.220] [error] Failed to acquire required resources.

Is cagebreak compatible with waybar?

Feature request: ratpoison's colon command

I'm not sure if this would be outside the scope of what you want cagebreak to be able to do, but would it be possible to be able to execute cagebreak commands either through the command line or though a small gui window similar to ratpoison's colon. Outside of this, and issue #21, cagebreak works great, so thank you.

More intuitive switch of focus

Hello,

I think switching focus is a bit confusing in some situations. When focus is switched in a direction, it can end up diagonally instead of the frame next to the previously focused one. The minimal example for this is with four frames, but it also applies in layouts with more than four of them.

Let´s say I press the keybindings for these actions:
vsplit, hsplit, focusright, hsplit.
This leaves me with a layout of four simple quarters:

+-----+-----+
|  1  |  2  |
+-----+-----+
|  3  |  4  |
+-----+-----+

Now, using focuslefton frame 2 brings me to frame 3 instead of one. Likewise, focusright on frame 3 brings me to frame 2 instead of frame 4.

As soon as I resize a width, switching works as expected and desired. The oddness however reappears whenever the vertical frame edges are realigned.

The same trouble happens when creating the layout with the keybindings for hsplit, vsplit, focusdown, vsplit. Now, focusing up from frame 3 brings me two frame 2 instead of 1, and same with the symmetrical opposite again (2 downwards is 3 instead of 4). Now resizing heights is what helps until the horizontal edges are realigned.

As said before, similar things occur with more complex layouts. I use those much less frequently of course, but intuitive navigation is even more important then. In these two minimal examples, reaching the frames 1 and 4 is also often more tedious then necessary.

I understand this is due to the way the frames were created and makes some sense in this regard. However, unless there is some reason to keep this behavior (which disappears by some resize options anyways), I´d suggest to change it to be more intuitive.

I imagine an approach for this could be to determine the frames center point and then looking for an adjacent frame in horizontal (vertical) direction from there when focusrightor focusleft (focusdownor focusup) is used.

(Everything said about focus[direction] also applies to exchange[direction].)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.