X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=messages.c;h=734cf111029dc401bd1c24f78627dafaff2ad789;hb=1d7b5b89f09bdc9af476e4ce0e5cbf27c40c868b;hp=27a286db2f16d7477e611ce6964eff59d93438dc;hpb=cc4492d9ca51c4291fb5e4c59cfa80b7070f93c7;p=bspwm.git diff --git a/messages.c b/messages.c index 27a286d..734cf11 100644 --- a/messages.c +++ b/messages.c @@ -3,18 +3,17 @@ #include #include #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) { @@ -282,11 +281,11 @@ bool cmd_desktop(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 { @@ -384,7 +383,7 @@ bool cmd_monitor(char **args, int num) 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++; } @@ -487,6 +486,10 @@ bool cmd_rule(char **args, int num, char *rsp) { 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)) { @@ -511,7 +514,7 @@ bool cmd_rule(char **args, int num, char *rsp) { 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; @@ -519,6 +522,10 @@ bool cmd_rule(char **args, int num, char *rsp) { 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++;