about summary refs log tree commit diff stats
path: root/src/command/cmd_funcs.c
diff options
context:
space:
mode:
authorMichael Vetter <jubalh@iodoru.org>2019-11-05 21:06:07 +0100
committerMichael Vetter <jubalh@iodoru.org>2019-11-05 21:06:07 +0100
commit40dc5932f71ccb6bd67f4fd8365749a0ddecbf71 (patch)
treedda496c377db7713532387f4acd642211660f78a /src/command/cmd_funcs.c
parent68843f2448256b9761b81dcd7656ea360dae9d75 (diff)
downloadprofani-tty-40dc5932f71ccb6bd67f4fd8365749a0ddecbf71.tar.gz
Add `/titlebar show presence` command
Additionally to `/presence titlebar on` we now allow the setting via
/titlebar show|hide presence` since it's about the titlebar.

Regards https://github.com/profanity-im/profanity/issues/1116
Diffstat (limited to 'src/command/cmd_funcs.c')
-rw-r--r--src/command/cmd_funcs.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/command/cmd_funcs.c b/src/command/cmd_funcs.c
index 32474650..3a8ae2de 100644
--- a/src/command/cmd_funcs.c
+++ b/src/command/cmd_funcs.c
@@ -5960,6 +5960,9 @@ cmd_titlebar_show_hide(ProfWin *window, const char *const command, gchar **args)
             } else if (g_strcmp0(args[1], "resource") == 0) {
                 cons_show("Showing resource in titlebar enabled.");
                 prefs_set_boolean(PREF_RESOURCE_TITLE , TRUE);
+            } else if (g_strcmp0(args[1], "presence") == 0) {
+                cons_show("Showing contact presence in titlebar enabled.");
+                prefs_set_boolean(PREF_PRESENCE , TRUE);
             } else {
                 cons_bad_cmd_usage(command);
             }
@@ -5974,6 +5977,9 @@ cmd_titlebar_show_hide(ProfWin *window, const char *const command, gchar **args)
             } else if (g_strcmp0(args[1], "resource") == 0) {
                 cons_show("Showing resource in titlebar disabled.");
                 prefs_set_boolean(PREF_RESOURCE_TITLE , FALSE);
+            } else if (g_strcmp0(args[1], "presence") == 0) {
+                cons_show("Showing contact presence in titlebar enabled.");
+                prefs_set_boolean(PREF_PRESENCE , FALSE);
             } else {
                 cons_bad_cmd_usage(command);
             }