Remove status text

This commit is contained in:
Alex Kotov 2021-11-19 13:48:02 +05:00
parent 521f746b4b
commit a59cd9cf0f
Signed by: kotovalexarian
GPG Key ID: 553C0EBBEB5D5F08
8 changed files with 4 additions and 63 deletions

View File

@ -29,15 +29,6 @@ environment variable is set correctly, e.g.:
(This will start PolytreeWM on display :1 of the host foo.bar.)
In order to display status info in the bar, you can do something
like this in your .xinitrc:
while xsetroot -name "`date` `uptime | sed 's/.*,//'`"
do
sleep 1
done &
exec polytreewm
Credits
-------
@ -56,7 +47,6 @@ Applied patches
* pertag
* resetnmaster
* smartborders
* statusallmons
* swallow
Interesting patches (not applied)

View File

@ -21,8 +21,7 @@ Windows are grouped by tags. Each window can be tagged with one or multiple
tags. Selecting certain tags displays all windows with these tags.
.P
Each screen contains a small status bar which displays all available tags, the
layout, the title of the focused window, and the text read from the root window
name property, if the screen is focused. A floating window is indicated with an
layout, the title of the focused window. A floating window is indicated with an
empty square and a maximised floating window is indicated with a filled square
before the windows title. The selected tags are indicated with a different
color. The tags of the focused window are indicated with a filled square in the
@ -37,11 +36,6 @@ prints version information to stderr, then exits.
.SH USAGE
.SS Status bar
.TP
.B X root window name
is read and displayed in the status text area. It can be set with the
.BR xsetroot (1)
command.
.TP
.B Button1
click on a tag label to display all windows with that tag, click on the layout
label toggles between tiled and floating layout.

View File

@ -107,7 +107,7 @@ static Key keys[] = {
};
/* button definitions */
/* click can be ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */
/* click can be ClkTagBar, ClkLtSymbol, ClkWinTitle, ClkClientWin, or ClkRootWin */
static Button buttons[] = {
/* click event mask button function argument */

View File

@ -74,7 +74,7 @@
enum { CurNormal, CurResize, CurMove, CurLast }; /* cursor */
enum { SchemeNorm, SchemeSel }; /* color schemes */
enum { ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle,
enum { ClkTagBar, ClkLtSymbol, ClkWinTitle,
ClkClientWin, ClkRootWin, ClkLast }; /* clicks */
typedef struct Monitor Monitor;
@ -238,7 +238,6 @@ static void updateclientlist(void);
static int updategeom(void);
static void updatenumlockmask(void);
static void updatesizehints(Client *c);
static void updatestatus(void);
static void updatetitle(Client *c);
static void updatewindowtype(Client *c);
static void updatewmhints(Client *c);
@ -260,7 +259,6 @@ static void zoom(const Arg *arg);
static Unit global_unit = NULL;
static const char broken[] = "broken";
static char stext[256];
static int screen;
static int sw, sh; /* X display screen geometry width, height */
static int bh, blw = 0; /* bar geometry */
@ -1614,7 +1612,6 @@ setup(void)
scheme[i] = drw_scm_create(drw, colors[i], 3);
/* init bars */
createbars();
updatestatus();
/* supporting window for NetWMCheck */
wmcheckwin = XCreateSimpleWindow(dpy, root, 0, 0, 1, 1, 0, 0, 0);
@ -2033,20 +2030,6 @@ updatesizehints(Client *c)
c->isfixed = (c->maxw && c->maxh && c->maxw == c->minw && c->maxh == c->minh);
}
void
updatestatus(void)
{
if (!gettextprop(root, XA_WM_NAME, stext, sizeof(stext))) {
strcpy(stext, "polytreewm-"VERSION);
}
if (settings_get_status_on_all_monitors()) {
drawbars();
} else {
drawbar(selmon);
}
}
void
updatetitle(Client *c)
{

View File

@ -44,13 +44,6 @@ drawbar(Monitor *m)
unsigned int i, occ = 0, urg = 0;
Client *c;
/* draw status first so it can be overdrawn by tags later */
if (m == selmon || settings_get_status_on_all_monitors()) {
drw_setscheme(drw, scheme[SchemeNorm]);
tw = TEXTW(stext) - lrpad + 2; /* 2px right padding */
drw_text(drw, m->ww - tw, 0, tw, bh, 0, stext, 0);
}
for (c = m->clients; c; c = c->next) {
occ |= c->tags == 255 ? 0 : c->tags;
if (c->isurgent)

View File

@ -33,8 +33,6 @@ on_button_press(XEvent *e)
arg.ui = 1 << i;
} else if (ev->x < x + blw)
click = ClkLtSymbol;
else if (ev->x > selmon->ww - (int)TEXTW(stext))
click = ClkStatusText;
else
click = ClkWinTitle;
} else if ((c = wintoclient(ev->window))) {
@ -237,9 +235,7 @@ on_property_notify(XEvent *e)
Window trans;
XPropertyEvent *ev = &e->xproperty;
if ((ev->window == root) && (ev->atom == XA_WM_NAME))
updatestatus();
else if (ev->state == PropertyDelete)
if (ev->state == PropertyDelete)
return; /* ignore */
else if ((c = wintoclient(ev->window))) {
switch(ev->atom) {

View File

@ -16,7 +16,6 @@ static bool respect_resize_hints_in_floating_layout = false;
static bool show_bar_by_default = true;
static UnitKind show_bar_per_unit = UNIT_MONITOR;
static unsigned int snap_distance = 32;
static bool status_on_all_monitors = false;
static bool swallow_floating = false;
SettingsForSingleWindow settings_get_border_for_single_window()
@ -168,17 +167,6 @@ void settings_set_snap_distance(unsigned int new_snap_distance)
snap_distance = constraints_snap_distance(new_snap_distance);
}
bool settings_get_status_on_all_monitors()
{
return status_on_all_monitors;
}
void settings_set_status_on_all_monitors(const bool new_status_on_all_monitors)
{
status_on_all_monitors = new_status_on_all_monitors;
// TODO: notify WM to rearrange clients
}
bool settings_get_swallow_floating()
{
return swallow_floating;

View File

@ -54,9 +54,6 @@ void settings_set_show_bar_per_unit(UnitKind new_show_bar_per_unit);
unsigned int settings_get_snap_distance();
void settings_set_snap_distance(unsigned int new_snap_distance);
bool settings_get_status_on_all_monitors();
void settings_set_status_on_all_monitors(bool new_status_on_all_monitors);
bool settings_get_swallow_floating();
void settings_set_swallow_floating(bool new_swallow_floating);