#include <stdlib.h>
#include <errno.h>
#include "settings.h"
-#include "messages.h"
#include "query.h"
-#include "restore.h"
-#include "common.h"
-#include "types.h"
#include "bspwm.h"
-#include "ewmh.h"
-#include "helpers.h"
+#include "tree.h"
+#include "desktop.h"
+#include "monitor.h"
#include "window.h"
+#include "rule.h"
+#include "restore.h"
#include "events.h"
-#include "tree.h"
-#include "rules.h"
+#include "ewmh.h"
+#include "messages.h"
bool cmd_window(char **args, int num)
{
strncpy(trg.desktop->name, *args, sizeof(trg.desktop->name));
ewmh_update_desktop_names();
put_status();
- } else if (streq("-r", *args) || streq("--rm", *args)) {
+ } else if (streq("-r", *args) || streq("--remove", *args)) {
if (trg.desktop->root == NULL
&& trg.monitor->desk_head != trg.monitor->desk_tail) {
remove_desktop(trg.monitor, trg.desktop);
- desktop_show(trg.monitor->desk);
+ show_desktop(trg.monitor->desk);
update_current();
return true;
} else {
coordinates_t dst;
if (locate_desktop(*args, &dst) && dst.monitor->desk_head != dst.monitor->desk_tail && dst.desktop->root == NULL) {
remove_desktop(dst.monitor, dst.desktop);
- desktop_show(dst.monitor->desk);
+ show_desktop(dst.monitor->desk);
}
num--, args++;
}
while (num > 0) {
if (streq("--floating", *args)) {
rule->effect.floating = true;
+ } else if (streq("--fullscreen", *args)) {
+ rule->effect.fullscreen = true;
+ } else if (streq("--locked", *args)) {
+ rule->effect.locked = true;
} else if (streq("--follow", *args)) {
rule->effect.follow = true;
} else if (streq("--focus", *args)) {
num--, args++;
}
add_rule(rule);
- } else if (streq("-r", *args) || streq("--rm", *args)) {
+ } else if (streq("-r", *args) || streq("--remove", *args)) {
num--, args++;
if (num < 1)
return false;
while (num > 0) {
if (sscanf(*args, "%X", &uid) == 1)
remove_rule_by_uid(uid);
+ else if (streq("tail", *args))
+ remove_rule(rule_tail);
+ else if (streq("head", *args))
+ remove_rule(rule_head);
else
return false;
num--, args++;