diff options
author | Thomas Lübking <thomas.luebking@gmail.com> | 2016-06-29 15:27:28 (GMT) |
---|---|---|
committer | Mathias Gumz <akira@fluxbox.org> | 2016-08-26 06:18:48 (GMT) |
commit | fbb2d16639491fdb0c49e388278fabcc4b0800f3 (patch) | |
tree | b216515b1265dd6164722ebd77ff580738dfc9a0 /src/WorkspaceCmd.hh | |
parent | 393ba45f91480bb10f510248837c6051b7ff6a03 (diff) | |
download | fluxbox-fbb2d16639491fdb0c49e388278fabcc4b0800f3.zip fluxbox-fbb2d16639491fdb0c49e388278fabcc4b0800f3.tar.bz2 |
allow to alter button labels via fluxbox-remote
Command is "RelabelButton button.foo $LABEL"
This is useful to eg. hint the amount of unread mails in a
button to start your MUA, reflect the $USER in a session menu button
etc.
Diffstat (limited to 'src/WorkspaceCmd.hh')
-rw-r--r-- | src/WorkspaceCmd.hh | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/WorkspaceCmd.hh b/src/WorkspaceCmd.hh index ae0b577..b118d02 100644 --- a/src/WorkspaceCmd.hh +++ b/src/WorkspaceCmd.hh | |||
@@ -217,4 +217,15 @@ public: | |||
217 | void execute(); | 217 | void execute(); |
218 | }; | 218 | }; |
219 | 219 | ||
220 | class RelabelButtonCmd: public FbTk::Command<void> { | ||
221 | public: | ||
222 | explicit RelabelButtonCmd(std::string button, std::string label): | ||
223 | m_button(button), m_label(label) {} | ||
224 | void execute(); | ||
225 | static FbTk::Command<void> *parse(const std::string &command, | ||
226 | const std::string &args, bool trusted); | ||
227 | private: | ||
228 | std::string m_button, m_label; | ||
229 | }; | ||
230 | |||
220 | #endif // WORKSPACECMD_HH | 231 | #endif // WORKSPACECMD_HH |