mirror of
https://github.com/amiwm/amiwm.git
synced 2026-03-24 01:24:15 +00:00
Compare commits
8 Commits
0c75c83e3b
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e029d5b68d | ||
|
|
6d13d12cd3 | ||
|
|
1f685e250a | ||
|
|
b9e7c7313d | ||
|
|
774f98ef87 | ||
|
|
e3f4248e8f | ||
|
|
599f0a17b3 | ||
|
|
9354a98208 |
105
amiwm.1
105
amiwm.1
@@ -62,13 +62,13 @@ and then de-iconifying it.)
|
||||
.Nm
|
||||
can keep several workbench screens (or just "screens" for short)
|
||||
where windows are displayed.
|
||||
Each screen has a titlebar above it displaying its name, and a few widgets.
|
||||
Each screen has a menubar above it displaying the screen's name, and a few widgets.
|
||||
Screens are controlled with the pointer as follows:
|
||||
.Bl -column "Raise button" "Right-release" XXXX
|
||||
.It Sy Target Ta Sy Operation Ta Sy Description
|
||||
.It Titlebar Ta Left-drag Ta Move screen up/down
|
||||
.It Menubar Ta Left-drag Ta Move screen up/down
|
||||
to reveal/hide other screens.
|
||||
.It Titlebar Ta Right-press Ta Reveal the menus.
|
||||
.It Menubar Ta Right-press Ta Reveal the menus.
|
||||
.It Menu Ta Right-drag Ta Navigate through menus.
|
||||
.It Menu entry Ta Right-release Ta Activate menu entry.
|
||||
.It Icon Ta Double-click Ta Launch program
|
||||
@@ -98,15 +98,24 @@ Empty lines and lines beginning with
|
||||
are ignored.
|
||||
Each other line is a configuration option and its arguments.
|
||||
The options are as follows:
|
||||
.Bl -column highlighttextpen def_tool.info XXXXXX
|
||||
.Bl -column HighlightTextPen def_tool.info XXXXXX
|
||||
.It Option Ta Default Ta Arguments
|
||||
.It Ic AutoRaise Ta Cm off Ta Ar boolean
|
||||
.It Ic BackgroundPen Ta Cm ... Ta Qq Ar colorname
|
||||
.It Ic BarBlockPen Ta Cm ... Ta Qq Ar colorname
|
||||
.It Ic BarDetailPen Ta Cm ... Ta Qq Ar colorname
|
||||
.It Ic BarTrimPen Ta Cm ... Ta Qq Ar colorname
|
||||
.It Ic BatteryInfo Ta Cm off Ta Ar boolean
|
||||
.It Ic BlockPen Ta Cm ... Ta Qq Ar colorname
|
||||
.It Ic CustomIconsOnly Ta Cm off Ta Ar boolean
|
||||
.It Ic DefaultIcon Ta Cm def_tool.info Ta Qq Ar filename
|
||||
.It Ic DetailPen Ta Cm ... Ta Qq Ar colorname
|
||||
.It Ic FastQuit Ta Cm off Ta Ar boolean
|
||||
.It Ic FillPen Ta Cm ... Ta Qq Ar colorname
|
||||
.It Ic FillTextPen Ta Cm ... Ta Qq Ar colorname
|
||||
.It Ic Focus Ta Cm followmouse Ta Cm followmouse Ns | Ns Cm sloppy Ns | Ns Cm clicktotype
|
||||
.It Ic ForceMove Ta Cm manual Ta Cm manual Ns | Ns Cm auto Ns | Ns Cm always
|
||||
.It Ic HighlightTextPen Ta Cm ... Ta Qq Ar colorname
|
||||
.It Ic IconDir Ta "" Ta Qq Ar path
|
||||
.It Ic IconFont Ta "" Ta Qq Ar fontname
|
||||
.It Ic IconPalette Ta Cm system Ta Cm system Ns | Ns Cm magicwb Ns | Ns Cm schwartz Ns | Ns Ar filename
|
||||
@@ -117,26 +126,17 @@ The options are as follows:
|
||||
.It Ic OpaqueResize Ta False Ta Ar boolean
|
||||
.It Ic Screen Ta "" Ta Oo Ar number Oc Ar screenname
|
||||
.It Ic ScreenFont Ta "" Ta Qq Ar fontname
|
||||
.It Ic ShadowPen Ta Cm ... Ta Qq Ar colorname
|
||||
.It Ic ShinePen Ta Cm ... Ta Qq Ar colorname
|
||||
.It Ic ShortLabelIcons Ta Cm off Ta Ar boolean
|
||||
.It Ic SizeBorder Ta Cm right Ta Cm right Ns | Ns Cm bottom Ns | Ns Cm both Ns | Ns Cm none
|
||||
.It Ic Style Ta "" Ta Cm "{" Cm class Qo Ar classname Qc Cm icon Qo Ar filename Qc Cm "}"
|
||||
.It Ic TextPen Ta Cm ... Ta Qq Ar colorname
|
||||
.It Ic TitleBarClock Ta Cm ... Ta Qq Ar boolean
|
||||
.It Ic TitleClockFormat Ta Qq "%c" Ta Oo Ar number Oc Ar timeformat
|
||||
.It Ic ToolItem Ta "" Ta Ic Separator
|
||||
.It Ic ToolItem Ta "" Ta Qo Ar name Qc Cm { Ar ToolItem Ns s ... Cm }
|
||||
.It Ic ToolItem Ta "" Ta Qo Ar name Qc Qo Ar command Qc Qo Ar hotkey Qc
|
||||
.It Ic ToolItem Ta "" Ta Ic Separator
|
||||
.It Ic backgroundpen Ta Cm ... Ta Qq Ar colorname
|
||||
.It Ic barblockpen Ta Cm ... Ta Qq Ar colorname
|
||||
.It Ic bardetailpen Ta Cm ... Ta Qq Ar colorname
|
||||
.It Ic bartrimpen Ta Cm ... Ta Qq Ar colorname
|
||||
.It Ic blockpen Ta Cm ... Ta Qq Ar colorname
|
||||
.It Ic detailpen Ta Cm ... Ta Qq Ar colorname
|
||||
.It Ic fillpen Ta Cm ... Ta Qq Ar colorname
|
||||
.It Ic filltextpen Ta Cm ... Ta Qq Ar colorname
|
||||
.It Ic highlighttextpen Ta Cm ... Ta Qq Ar colorname
|
||||
.It Ic shadowpen Ta Cm ... Ta Qq Ar colorname
|
||||
.It Ic shinepen Ta Cm ... Ta Qq Ar colorname
|
||||
.It Ic style Ta "" Ta Cm "{" Cm class Qo Ar classname Qc Cm icon Qo Ar filename Qc Cm "}"
|
||||
.It Ic textpen Ta Cm ... Ta Qq Ar colorname
|
||||
.El
|
||||
.
|
||||
.Pp
|
||||
@@ -149,6 +149,9 @@ Some options, like one of the forms of
|
||||
expect as argument a block of options, one per line, around curly braces.
|
||||
.
|
||||
.Pp
|
||||
Option names are case insensitive.
|
||||
.
|
||||
.Pp
|
||||
For the arguments,
|
||||
.Ar boolean
|
||||
can be
|
||||
@@ -193,51 +196,54 @@ or just move a frame indicating where the window will be after releasing the mou
|
||||
.It Ic OpaqueResize Ar bool
|
||||
Whether resizing a window by dragging its resize handle should resize the window in real time;
|
||||
or just resize a frame indicating the window's final size after releasing the mouse button.
|
||||
.El
|
||||
.
|
||||
.Ss Windows decorations
|
||||
.Bl -tag -width Ds
|
||||
.It Ic ScreenFont Qq Ar fontname
|
||||
Selects a font to use for windowtitles etc.
|
||||
.
|
||||
.It Ic SizeBorder Cm right Ns | Ns Cm bottom Ns | Ns Cm both Ns | Ns Cm none
|
||||
Specifies which border should be enlarged when a sizegadget is present.
|
||||
.El
|
||||
.
|
||||
.It Ic detailpen Qq Ar colorname
|
||||
TODO.
|
||||
.Ss Color options
|
||||
.Bl -tag -width Ds
|
||||
.It Ic BackgroundPen Qq Ar colorname
|
||||
Color for the filling (background) of objects on inactive windows and on the menubar.
|
||||
(buttons, window decorations and titlebar, etc).
|
||||
.
|
||||
.It Ic blockpen Qq Ar colorname
|
||||
TODO.
|
||||
.It Ic BarBlockPen Qq Ar colorname
|
||||
Color for the menubar's filling.
|
||||
.
|
||||
.It Ic textpen Qq Ar colorname
|
||||
TODO.
|
||||
.It Ic BarDetailPen Qq Ar colorname
|
||||
Color for the screen's name on the menubar, and the menu entries' labels.
|
||||
.
|
||||
.It Ic shinepen Qq Ar colorname
|
||||
TODO.
|
||||
.It Ic BarTrimPen Qq Ar colorname
|
||||
Color for the menubar's border, and the widgets on the menubar.
|
||||
.
|
||||
.It Ic shadowpen Qq Ar colorname
|
||||
TODO.
|
||||
.It Ic DetailPen Qq Ar colorname
|
||||
Color set by libami, currently unused.
|
||||
.
|
||||
.It Ic fillpen Qq Ar colorname
|
||||
TODO.
|
||||
.It Ic BlockPen Qq Ar colorname
|
||||
Color set by libami, currently unused.
|
||||
.
|
||||
.It Ic filltextpen Qq Ar colorname
|
||||
TODO.
|
||||
.It Ic FillPen Qq Ar colorname
|
||||
Color for the filling (background) of objects on active windows
|
||||
(buttons, window decorations and titlebar, etc).
|
||||
.
|
||||
.It Ic backgroundpen Qq Ar colorname
|
||||
TODO.
|
||||
.It Ic FillTextPen Qq Ar colorname
|
||||
Color for the text (foreground) of objects on active windows
|
||||
(buttons, window decorations and titlebar, etc).
|
||||
.
|
||||
.It Ic highlighttextpen Qq Ar colorname
|
||||
TODO.
|
||||
.It Ic HighlightTextPen Qq Ar colorname
|
||||
Special color text, used on background by libami.
|
||||
.
|
||||
.It Ic bardetailpen Qq Ar colorname
|
||||
TODO.
|
||||
.It Ic ShadowPen Qq Ar colorname
|
||||
Color for the dark edge on 3D objects
|
||||
(buttons, titlebars, handles, etc; both active and inactive).
|
||||
.
|
||||
.It Ic barblockpen Qq Ar colorname
|
||||
TODO.
|
||||
.It Ic ShinePen Qq Ar colorname
|
||||
Color for the bright edge on 3D objects
|
||||
(buttons, titlebars, handles, etc; both active and inactive).
|
||||
.
|
||||
.It Ic bartrimpen Qq Ar colorname
|
||||
TODO.
|
||||
.It Ic TextPen Qq Ar colorname
|
||||
Color for the filling (background) of objects on inactive windows and on the menubar.
|
||||
(buttons, window decorations and titlebar, etc).
|
||||
.El
|
||||
.
|
||||
.Ss Icon options
|
||||
@@ -308,6 +314,9 @@ strings in amiwmrc.
|
||||
.
|
||||
.Ss TitleBar and MenuBar
|
||||
.Bl -tag -width Ds
|
||||
.It Ic ScreenFont Qq Ar fontname
|
||||
Selects a font to use for windowtitles and menubar.
|
||||
.
|
||||
.It Ic BatteryInfo Ar boolean
|
||||
This lets you display battery information on the menu bar.
|
||||
It reqiures a module (such as Battery)
|
||||
|
||||
184
gnome.c
184
gnome.c
@@ -1,184 +0,0 @@
|
||||
/* GNOME Window Manager Compliance support for amiwm
|
||||
by Peter Bortas february 2000 */
|
||||
|
||||
#include <stdio.h>
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/Xproto.h>
|
||||
#include <X11/Xatom.h>
|
||||
|
||||
#include <X11/Xutil.h>
|
||||
|
||||
|
||||
extern void gnome_setup()
|
||||
{
|
||||
/* Section 1 - Detection of a GNOME compliant Window Manager
|
||||
|
||||
There is a single unambiguous way to detect if there currently is
|
||||
a GNOME compliant Window Manager running. It is the job of the
|
||||
Window Manager to set up a few things to make this
|
||||
possible. Using the following method it is also possible for
|
||||
applications to detect compliance by receiving an event when the
|
||||
Window Manager exits.
|
||||
|
||||
To do this the Window Manager should create a Window, that is a
|
||||
child of the root window. There is no need to map it, just create
|
||||
it. The Window Manager may reuse ANY window it has for this
|
||||
purpose - even if it is mapped, just as long as the window is
|
||||
never destroyed while the Window Manager is running.
|
||||
|
||||
Once the Window is created the Window Manager should set a
|
||||
property on the root window of the name _WIN_SUPPORTING_WM_CHECK,
|
||||
and type CARDINAL. The atom's data would be a CARDINAL that is
|
||||
the Window ID of the window that was created above. The window
|
||||
that was created would ALSO have this property set on it with the
|
||||
same values and type.*/
|
||||
|
||||
Display *disp;
|
||||
Window root_window;
|
||||
Atom atom_set;
|
||||
CARD32 val;
|
||||
Window win;
|
||||
|
||||
Atom list[10];
|
||||
|
||||
atom_set = XInternAtom(disp, "_WIN_SUPPORTING_WM_CHECK", False);
|
||||
win = XCreateSimpleWindow(disp, root_window, -200, -200, 5, 5, 0, 0, 0);
|
||||
val = win;
|
||||
XChangeProperty(disp, root_window, atom_set, XA_CARDINAL, 32,
|
||||
PropModeReplace, (unsigned char *)&val, 1);
|
||||
XChangeProperty(disp, win, atom_set, XA_CARDINAL, 32, PropModeReplace,
|
||||
(unsigned char *)&val, 1);
|
||||
|
||||
/* Section 2 - Listing GNOME Window Manager Compliance
|
||||
|
||||
It is important to list which parts of GNOME Window Manager
|
||||
compliance are supported. This is done fairly easily by doing the
|
||||
following:
|
||||
|
||||
Create a property on the root window of the atom name
|
||||
_WIN_PROTOCOLS. This property contains a list(array)of atoms that
|
||||
are all the properties the Window Manager supports. These atoms
|
||||
are any number of the following:
|
||||
|
||||
_WIN_LAYER
|
||||
_WIN_STATE
|
||||
_WIN_HINTS
|
||||
_WIN_APP_STATE
|
||||
_WIN_EXPANDED_SIZE
|
||||
_WIN_ICONS
|
||||
_WIN_WORKSPACE
|
||||
_WIN_WORKSPACE_COUNT
|
||||
_WIN_WORKSPACE_NAMES
|
||||
_WIN_CLIENT_LIST
|
||||
|
||||
If you list one of these properties then you support it and
|
||||
applications can expect information provided by, or accepted by
|
||||
the Window Manager to work. */
|
||||
|
||||
atom_set = XInternAtom(disp, "_WIN_PROTOCOLS", False);
|
||||
list[0] = XInternAtom(disp, "_WIN_LAYER", False);
|
||||
list[1] = XInternAtom(disp, "_WIN_STATE", False);
|
||||
list[2] = XInternAtom(disp, "_WIN_HINTS", False);
|
||||
list[3] = XInternAtom(disp, "_WIN_APP_STATE", False);
|
||||
list[4] = XInternAtom(disp, "_WIN_EXPANDED_SIZE", False);
|
||||
list[5] = XInternAtom(disp, "_WIN_ICONS", False);
|
||||
list[6] = XInternAtom(disp, "_WIN_WORKSPACE", False);
|
||||
list[7] = XInternAtom(disp, "_WIN_WORKSPACE_COUNT", False);
|
||||
list[8] = XInternAtom(disp, "_WIN_WORKSPACE_NAMES", False);
|
||||
list[9] = XInternAtom(disp, "_WIN_CLIENT_LIST", False);
|
||||
XChangeProperty(disp, root_window, atom_set, XA_ATOM, 32, PropModeReplace,
|
||||
(unsigned char *)list, 10);
|
||||
}
|
||||
|
||||
extern void gnome_managed_clients()
|
||||
{
|
||||
/* Section 3 - Providing Shortcuts Managed Clients
|
||||
|
||||
As an aide in having external applications be able to list and
|
||||
access clients being managed by the Window Manager, a property
|
||||
should be set on the root window of the name _WIN_CLIENT_LIST
|
||||
which is an array of type CARDINAL. Each entry is the Window ID
|
||||
of a managed client. If the list of managed clients changes,
|
||||
clients are added or deleted, this list should be updated. */
|
||||
|
||||
Display *disp;
|
||||
Window root_window;
|
||||
Atom atom_set;
|
||||
Window *wl;
|
||||
int num;
|
||||
|
||||
fprintf(stderr, "FIXME: snome_managed_clients is a stub\n");
|
||||
|
||||
atom_set = XInternAtom(disp, "_WIN_CLIENT_LIST", False);
|
||||
num = 0; /* FIXME: number of clients goes here */
|
||||
wl = malloc(sizeof(Window) * num);
|
||||
/* FIXME: Fill in array of window ID's */
|
||||
XChangeProperty(disp, root_window, atom_set, XA_CARDINAL, 32,
|
||||
PropModeReplace, (unsigned char *)wl, num);
|
||||
if (wl)
|
||||
free(wl);
|
||||
}
|
||||
|
||||
extern void gnome_multiple_desktops()
|
||||
{
|
||||
/* Section 3 - Providing Multiple/Virtual Desktop Information.
|
||||
|
||||
If your Window Manager supports the concept of Multiple/Virtual
|
||||
Desktops or Workspaces then you will definitely want to include
|
||||
it. This involves your Window Manager setting several properties
|
||||
on the root window.
|
||||
|
||||
First you should advertise how many Desktops your Window Manager
|
||||
supports. This is done by setting a property on the root window
|
||||
with the atom name _WIN_WORKSPACE_COUNT of type CARDINAL. The
|
||||
properties data is a 32-bit integer that is the number of
|
||||
Desktops your Window Manager currently supports. If you can add
|
||||
and delete desktops while running, you may change this property
|
||||
and its value whenever required. You should also set a property
|
||||
of the atom _WIN_WORKSPACE of type CARDINAL that contains the
|
||||
number of the currently active desktop (which is a number between
|
||||
0 and the number advertised by _WIN_WORKSPACE_COUNT -
|
||||
1). Whenever the active desktop changes, change this property.
|
||||
|
||||
Lastly you should set a property that is a list of strings called
|
||||
_WIN_WORKSPACE_NAMES that contains names for the desktops (the
|
||||
first string is the name of the first desktop, the second string
|
||||
is the second desktop, etc.). This will allow applications toq
|
||||
know what the name of the desktop is too, possibly to display it. */
|
||||
|
||||
Display *disp;
|
||||
Window root_window;
|
||||
Atom atom_set;
|
||||
XTextProperty text;
|
||||
int i, current_desk, number_of_desks;
|
||||
char **names, s[1024];
|
||||
CARD32 val;
|
||||
|
||||
/* FIXME: set current_desk, number_of_desks names */
|
||||
|
||||
atom_set = XInternAtom(disp, "_WIN_WORKSPACE", False);
|
||||
val = (CARD32) current_desk;
|
||||
XChangeProperty(disp, root_window, atom_set, XA_CARDINAL, 32,
|
||||
PropModeReplace, (unsigned char *)&val, 1);
|
||||
atom_set = XInternAtom(disp, "_WIN_WORKSPACE_COUNT", False);
|
||||
|
||||
val = (CARD32) number_of_desks;
|
||||
XChangeProperty(disp, root_window, atom_set, XA_CARDINAL, 32,
|
||||
PropModeReplace, (unsigned char *)&val, 1);
|
||||
atom_set = XInternAtom(disp, "_WIN_WORKSPACE_NAMES", False);
|
||||
names = malloc(sizeof(char *) * number_of_desks);
|
||||
for (i = 0; i < number_of_desks; i++)
|
||||
{
|
||||
snprintf(s, sizeof(s), "Desktop %i", i);
|
||||
names[i] = malloc(strlen(s) + 1);
|
||||
strcpy(names[i], s);
|
||||
}
|
||||
if (XStringListToTextProperty(names, mode.numdesktops, ))
|
||||
{
|
||||
XSetTextProperty(disp, root_window, &val, atom_set);
|
||||
XFree(text.value);
|
||||
}
|
||||
for (i = 0; i < number_of_desks; i++)
|
||||
free(names[i]);
|
||||
free(names);
|
||||
}
|
||||
Reference in New Issue
Block a user