Commit Graph

10324 Commits

Author SHA1 Message Date
Julien Danjou 66d43ef0d9 change default conf to work with new widget layout 2007-12-16 13:12:35 +01:00
Aldo Cortesi 5715b70ab3 Make empty status bar look nice.
It's now possible to have unfilled space on the status bar. Fill it with the
background colour on creation.

Normalise line lengths while I'm at it.
2007-12-16 12:58:21 +01:00
Aldo Cortesi 5923c90aaa Solidify widgets.
Factor out common initialisation into a common_new function. Copy the section
title into the Widget title attribute.
2007-12-16 12:57:47 +01:00
Aldo Cortesi 65fd8d48f0 The beginnings of a more flexible widget configuration.
The problem is as follows. In the end, different types of widget are going to
have distinct configurable options. This means that we need to have a
different section type for every widget type, if we are ever to make the
configuration nice. In fact, a configuration syntax like this would suit us
very well:

    textbox name {
        foo = bar
    }
    focuslist name2 {
        bar = voing
    }

This is all very well, but libconfuse has a limitation - there is no "nice"
way to retrieve the order of disparate sections (i.e. sections of different
types), and order is important to us. This patch goes to some effort to
retrieve the section order by extracting an array of widgets, and sorting them
based on line number.
2007-12-16 12:57:03 +01:00
Aldo Cortesi 8880a3804e Simplify widget draw interface. 2007-12-16 12:54:42 +01:00
Aldo Cortesi 65d8d846f2 Fix compiler warning re unused argument, and improve the function interface
while we're at it.
2007-12-16 12:54:09 +01:00
Aldo Cortesi 6e8b1383fe Various doc comment fixes. 2007-12-16 12:13:07 +01:00
Aldo Cortesi 2f74c079aa Massive, massive interface refactoring.
The big change here is that we now keep our configuration structure in a global
variable called globalconf. This radically simplifies many interfaces, since
passing awesomeconf everywhere is no longer necessary. There are also more
subtle interface effects - now we can reliably identify a screen from just a
screen ID, rather than an awesomeconf, screenid tuple.

Overall, this patch makes most of the interfaces in awesome much nicer to use -
enjoy!

Yes, this is a huge patch, but since a lot of the refactoring was done
systematically using vim macros, splitting this up would have been very hard.
2007-12-16 12:12:48 +01:00
Aldo Cortesi ec80635cbc Fix compilation warning related to parsing of statusbar widgets config.
Also make the code surrounding this problem more legible, and remove
Widget_ptr, which just confuses the issue.
2007-12-16 12:00:00 +01:00
Julien Danjou db6a9e92c3 add uicb_focus_history and bind with -1 to Mod4+Tab by default 2007-12-15 20:32:49 +01:00
Julien Danjou ae7b2ed9d0 finish with NULL 2007-12-15 20:22:20 +01:00
Julien Danjou 33d97a7934 remove default reloadconfig un manpage 2007-12-15 19:22:47 +01:00
Julien Danjou 602f921559 first try to get widget configurable 2007-12-15 18:21:02 +01:00
Julien Danjou 4432bd6d39 cosmetic 2007-12-15 16:34:22 +01:00
Julien Danjou 3b013f90b1 cosmetic and don't cast for nothing 2007-12-15 16:25:54 +01:00
Julien Danjou 79749fcc7f remove useless #include 2007-12-15 16:17:57 +01:00
Julien Danjou bf20f9cee9 rework widget.c 2007-12-15 13:37:34 +01:00
Julien Danjou 8b62669970 fix tag_view prev/next segfault 2007-12-15 13:35:15 +01:00
Julien Danjou 8500188d6a uicb_screen_focus honors focus history 2007-12-15 10:19:33 +01:00
Aldo Cortesi 76ddf235ac Widget-ise the statusbar.
We now have the beginnings of a flexible widget structure for the statusbar.
For now, there is no behavioural change, and the interface is a bit crude, but
watch this space!
2007-12-15 10:15:42 +01:00
Aldo Cortesi c81b5cfc55 Refactor statusbar.c
This a preparatory patch. Refactor statusbar.c to compartmentalise the drawing
of the statusbar "widgets". We can now begin to see what a generalised widget
drawing interface would look like.

Note that at the moment we don't gracefully handle situations where "widgets"
run out of space. That will come as we generalise from here.
2007-12-15 09:48:13 +01:00
Aldo Cortesi a6bb5abfef Remove stubs for reloadconfig.
- reloadconfig never worked properly. There were a number of circumstances
    under which it would crash awesome.

    - reloadconfig always leaked memory, because our cleanup process was never
    perfect. Making it perfect would be Hard.

    - Just exec-ing awesome over the top of itself is an OK solution. Maybe we
    should add a uicb_restart to do this so users don't have to think about
    uicb_exec.
2007-12-15 09:46:28 +01:00
Aldo Cortesi f36a56cdcc Refactor draw.c
This is a big patch that does not change any behaviour. We abstract the data
needed by the draw.c functions into a context object, and pass that around
instead of passing each argument every time. This results in a much cleaner API
- most functions lose 3-4 arguments.

This is a preparatory patch for further work on statusbar.
2007-12-15 09:30:29 +01:00
Julien Danjou 7327a92972 untag everything on rules applying 2007-12-15 09:02:49 +01:00
Nikos Ntarmos e205a144cc awesome crashes when non-focused client exits/dies
When a non-focused client exits (e.g. through a signal) then awesome
crashes. The attached patch fixes this for me.

Cheers.

\n\n
2007-12-15 08:16:03 +01:00
Julien Danjou 69ba990371 rename description 2007-12-15 07:42:18 +01:00
marco candrian 0d2c1557e6 awesomerc man page 2007-12-15 07:39:55 +01:00
Nikos Ntarmos b0388938b4 minor documentation fix
Changing setstatustext to statusbar_set_text in awesome-client.1.txt.
2007-12-15 07:36:06 +01:00
Julien Danjou df2a8e1b1d add a focus history 2007-12-14 21:51:54 +01:00
Julien Danjou c7c1da5693 fix memory leak on exit 2007-12-14 20:18:59 +01:00
Julien Danjou aacb020564 rename statusbar functions 2007-12-14 20:10:52 +01:00
Julien Danjou e53b941679 rename loadprops to client_loadprops 2007-12-14 19:06:03 +01:00
Julien Danjou bb1381abc2 make tags a linked list instead of array 2007-12-14 19:05:30 +01:00
Julien Danjou b03cdbd877 remove nlayouts 2007-12-14 17:57:05 +01:00
Julien Danjou b9320be372 add spiral and dwindle layouts (fibonacci) 2007-12-14 17:05:29 +01:00
Julien Danjou f92772953c fix some #include 2007-12-14 16:42:54 +01:00
Julien Danjou 781ebc8882 move tag_client_with_rules() from client.c to tag.c 2007-12-14 16:40:08 +01:00
Julien Danjou 3a4fbce6f9 rename isvisible() to client_isvisible() and move it in client.c 2007-12-14 16:38:12 +01:00
Julien Danjou e426e60801 remove my name from -v and accept --version 2007-12-14 16:32:34 +01:00
Julien Danjou 687b648c1b fix some includes and add copyright 2007-12-14 16:15:40 +01:00
Julien Danjou 6658994a22 cosmetic 2007-12-14 16:09:05 +01:00
Julien Danjou 15cfbb9ee7 run_uicb() is static 2007-12-14 16:07:34 +01:00
Julien Danjou 213c839597 prefix some client functions with client 2007-12-14 16:05:10 +01:00
Julien Danjou 37a7116c92 we should reset client_sel on untag 2007-12-14 16:01:01 +01:00
Julien Danjou d197014d71 untag client on unmanage 2007-12-14 15:58:09 +01:00
Julien Danjou 84bb954004 rename statusbar uicb and add uicb_statusbar_set_position 2007-12-14 15:52:52 +01:00
Julien Danjou 14809f80e4 remove useless client_reattach_after() 2007-12-14 14:51:58 +01:00
Julien Danjou 078d224b46 use a linked list for handling tag <-> client relationship 2007-12-14 14:29:32 +01:00
Aldo Cortesi 2b5ba1f16f Improve the call signature of get_current_tag and get_current_layout. 2007-12-14 09:29:42 +01:00
Aldo Cortesi 8264f15fc6 Remove inline declarations in client.h - these don't match what's in the the .c
anyway.
2007-12-14 09:12:45 +01:00