18 Commits

Author SHA1 Message Date
James Le Cuirot
147cb92b7f Respect ${AR} when building
Unfortunately, there is no AC_PROG_AR yet.
2023-10-07 23:03:03 +01:00
James Le Cuirot
cf6e360a7e Respect LDFLAGS 2023-10-07 23:02:48 +01:00
James Le Cuirot
34c0c7af02 Fix parallel builds 2023-10-07 23:02:44 +01:00
Adrian Chadd
87ba044ea4 [libami] handle EINTR from select() as a non-error
EINTR is happening during suspend/resume, which was causing all of
the modules to die (and requiring a restart of amiwm to re-run all
of its modules.)

This fixes things in FreeBSD suspend/resume so, well, the modules
keep working. :)
2023-06-12 11:39:41 -07:00
Adrian Chadd
631176c9a2 [amiwm] Implement a keyboard shortcut to move a client to a different screen
This allows a keyboard shortcut to move a client to a different amiwm
screen.  That way when you have things like Firefox restart every window
in a single screen, you can quickly move screens to where they should be.
2022-09-05 16:06:18 -07:00
Adrian Chadd
4bd5a665db [libami] Add a 5 second read timeout so the periodic routine can be called
* add a basic select() loop for the read FD to see if it's ready
* optionally block in md_read() even if we timeout - this is used for
  the md_command() side of things
* md_handle_input() however doesn't block and will happily timeout
  so the loop can run and the periodic function can run.

This indeed seems to work.  It's a bit dirty, but it at least stops
the main loop from being fully blocking and that's super useful for
modules that wish to schedule background work.
2022-05-14 22:07:36 -07:00
Adrian Chadd
54adc01be4 [libami] document how the module loop works; start thinking about how to make it async
* Yeah it'd be nice to just use libevent here, alas
* Figure out how all the reading/writing works and comment it
* Add a periodic function that'll be called every trip through
  the main loop; will turn it into something more formally periodic
  later.

There's still lots to do here before I can actually schedule
periodic events and the read()s are non-blocking.  Give it time!
2022-05-08 14:04:21 -07:00
Adrian Chadd
18e858ae80 [amiwm] MVP for initial battery stuff
Totally not ready for prod, but at least I'm making progress
figuring out how to add extra bits to this thing.

* add a second widget to the menu bar, next to the title bar
* add a new module command to update the battery information
* add a freebsd specific Battery module, not linked into the
  build right now.
* amiwm will print out whenever we get battery information from the
  module.

Right now I'm trying to figure out how to get some kind of periodic
background event into the module main loop.  Launcher does it
using cx_broker(), but I dunno if I can adapt that pattern here.
2022-04-25 21:28:49 -07:00
Adrian Chadd
0e5c81f6e3 [libami] add button, textbox and textinput from requestchoice/executecmd
Marcus had written up workbench style widgets inside the two external
helper programs requestchoice and executecmd.  This ports the code over
to libami.

Note that there isn't a generic gadget or collection of gadgets yet -
this is purely a refactor of the code, and the upcoming commit that
migrates requestchoice/executecmd over to use them just handles them
directly via xlib like they have always done.
2022-04-09 17:33:21 -07:00
Adrian Chadd
e0c13213c5 [amiwm] add a new command action to rotate windows
This adds a command to iterate over the set of windows.  It's not
like alt-tab in ye olde windows world where you'd alt tab once to
switch between two windows, and then keep alt-tab'ing with alt down
to go through the window list.  For now it just literally iterates
through those windows.

This makes it a lot easier to work with a large number of open
windows without having to constantly use the mouse.
2022-04-03 08:27:14 -07:00
Adrian Chadd
4162377f10 [libami] more compile warning fixes
* fix 32/64 bit int size printing stuff
* more if braces
2022-02-26 11:31:37 -08:00
Adrian Chadd
31b98f3ef0 [libami] Another if / else clause warning to clean up 2022-02-18 21:52:15 -08:00
Adrian Chadd
5365f97cbe [amiwm] Do another pass to clean up build warnings
This is mostly a "dangling if" cleanup, but I did add some other
comments here and there!
2022-02-10 12:37:38 -08:00
Adrian Chadd
59eae9c029 [libami] Make 'clean' a libami target
To make it easier / cleaner to build libami by itself, make a clean
target and call into it from the top level makefile as needed.
2020-11-10 11:55:10 -08:00
Adrian Chadd
31b2a069ea [libami] Fix compile warnings in module.c 2020-11-10 11:54:56 -08:00
reddsik
5e6ed1191b Added something that will be a config util later, removed some unusable options from menus(you'll be later able to re-enable them), changed module dir to /lib/amiwm 2017-07-14 13:06:22 +02:00
reddsik
d35ad096fc removed a few not needed files 2017-03-26 18:03:50 +02:00
reddsik
c85716f60e Initial commit! 2017-03-26 13:00:19 +02:00