about summary refs log tree commit diff stats
path: root/src/command
Commit message (Collapse)AuthorAgeFilesLines
* same filename in url openDaniel Santos2023-07-011-0/+17
| | | | Signed-off-by: Daniel Santos <dan.git@brilhante.top>
* /executable async on|offDaniel Santos2023-07-014-9/+23
| | | | | | | | | | | | | | * rename call_external() to call_external_async(). * add call_external_fork(). This function makes all executable calls to be forked and synchronous. So that running profanity inside a TTY, we can set all executables to be TTY programs (fbi, mpv, w3m, emacs eww, etc.), making possible to open urls or see images inside the TTY. * add '/executable async' command. * make call_external() use either call_external_async() or call_external_fork(), according to the '/executable async' configuration. Signed-off-by: Daniel Santos <dacs.git@brilhante.top>
* Profani-tty has rebornDaniel Santos2023-07-016-86/+86
|
* Revert "Merge pull request #1821 from mdosch/use-proper-ellipsis-char"Daniel Santos2023-07-011-15/+15
| | | | | This reverts commit 19921f61c14095cadc55b329dd7c8f02bdc79d31, reversing changes made to ac581c29bfa7c31fbfb6fe8019d257d3883b33bb.
* Merge pull request #1842 from H3rnand3zzz/feature/plugins-downloadMichael Vetter2023-06-062-100/+126
|\ | | | | New Feature: Plugins Download
| * Add url support (downloading) to `/plugins install`John Hernandez2023-05-162-25/+79
| | | | | | | | Additional changes include code refactoring.
| * `/url save` and `/url open` refactoringJohn Hernandez2023-05-111-78/+50
| | | | | | | | Additional changes: jid.c minor refactoring
* | Expand `/url` descriptionMichael Vetter2023-05-311-2/+2
| |
* | Merge branch 'master' into cleanup/gchar-charMichael Vetter2023-05-113-63/+66
|\ \
| * \ Merge pull request #1847 from profanity-im/minor-improvementsMichael Vetter2023-05-111-1/+2
| |\ \ | | | | | | | | Minor improvements
| | * | fix `/reconnect now`Steffen Jaeckel2023-05-101-1/+2
| | |/ | | | | | | | | | | | | | | | | | | This fixes #1846 Issue introduced by a0aa26b6fa65ba625f4a6d3495a345c7120ff16d Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
| * | Add helper function for individual cmd_executable_*() functionsMichael Vetter2023-05-101-46/+7
| | | | | | | | | | | | | | | | | | Each of the cmd_executable_editor(), cmd_executable_urlopen() etc calls this helper function since they were all doing the same just for different configurations.
| * | Add autocompletion for /executable parametersMichael Vetter2023-05-101-0/+32
| | | | | | | | | | | | | | | We autocompleted `/executable` to `avatar`, `vcard_photo`, `editor` etc. But didn't autocomplete the next parameter. Namely `set` and `default`.
| * | Make it possible to reset editor to defaultMichael Vetter2023-05-102-0/+5
| | | | | | | | | | | | | | | All the other commands (avatar, vcard_photo, urlsave, urlopen) have the ability to reset to default already.
| * | Add vcard_photo to /executable autocompletionMichael Vetter2023-05-101-0/+1
| | | | | | | | | | | | Was forgotten in f934c5b59.
| * | Align avatar behaviour with urlopenMichael Vetter2023-05-102-18/+23
| | | | | | | | | | | | | | | | | | `/executable avatar` now also uses cmdtemplate and parse %p. It seems to me that the `/avatar` command was actually completely broken on master.
| * | Remove parsing of /avatar cmdMichael Vetter2023-05-101-3/+0
| |/ | | | | | | | | | | This is done in `/executable avatar set` since d7848e38b. The command help also didn't mention this anymore. Seems like it was forgotten to remove the actual parsing of this.
* / Cleanup: gchar as gchar instead of charJohn Hernandez2023-05-042-8/+5
|/ | | | | | | | Use gchar instead of char in most of the cases where gchar is intended. Reason: improve compatibility and stability. Issue #1819 Minor refactoring.
* Add ability to disable avatar publishingIsaacM882023-05-023-20/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add "/avatar disable" to comply with point "3.5 Publisher Disables Avatar Publishing" in XEP-0084. src/command/cmd_defs.c:2416 Add "disable" argument. Reword the "/avatar" command description so it flows better. src/command/cmd_ac.c:1101 Add "disable" to the "/avatar" autocomplete dictionary. src/command/cmd_funcs.c:9277 Split "/avatar" commands into two groups with an if statement; those with a parameter and those without. "cons_bad_cmd_usage()" is in both groups, which is messy. "disable" has similar logic to "set", but it includes a failure message. src/xmpp/avatar.c:152 "avatar_publishing_disable()" uses the same logic to publish metadata as in "avatar_set()". src/xmpp/avatar.c:238 Add a message to inform users when they do not receive an avatar after using "/avatar get" and "/avatar open". In case of a failure, the user will be subscribed to future avatar updates as long as they continue to use their current instance of profanity. Adding "caps_remove_feature()" after "cons_show()" will unsubscribe the user from avatar updates and prevent the user from downloading an avatar unexpectedly hours later without issuing an "/avatar" command. src/xmpp/stanza.c:2698 The new "disable" function follows the same logic as "stanza_create_avatar_metadata_publish_iq()".
* Merge pull request #1838 from H3rnand3zzz/fix/omemo-trust-notificationMichael Vetter2023-04-191-3/+3
|\ | | | | Improve OMEMO messages
| * Improve OMEMO messagesJohn Hernandez2023-04-191-3/+3
| |
* | Fix `/plugins update`John Hernandez2023-04-191-31/+22
|/ | | | | | | | | | | Before it tried to unload the plugin first and check the output. But if broken plugin was loaded, then it couldn't unload it, so before it require uninstall and install after it, making update useless for plugin development purposes. Unload is part of the uninstall so no unload is needed inside of the cmd function. Refactoring of cmd_plugins_update.
* Fix `/log level` crashJohn Hernandez2023-04-181-18/+10
| | | | | | Fix crash caused by `/log level` command. Minor refactoring of command function.
* Add sessions_alarmJohn Hernandez2023-04-183-2/+35
| | | | | | | | | Introduce new feature: sessions_alarm. Added new account setting: max_connections. On exceeding this number, user will get an alert. If number is less than 1, no alert will happen. Tests altered to fit new feature.
* Add nickname support for /roster removeJohn Hernandez2023-04-133-7/+10
| | | | | | Add support of name/nickname instead of only JID for `/roster remove` command. Add tests for it as well.
* Add limitation info about /statusbar chat user|jidMichael Vetter2023-04-101-1/+1
| | | | | | | | | | | | | | | | | | While testing https://github.com/profanity-im/profanity/pull/1817 we found that: ``` /statusbar show name (I have this off by default /msg someone where I chose someone in my roster that has a nick assigned /statusbar chat jid ``` Will only take effect upon creation or redraw of that tab. Reason is that we do this in create_tab to limit building this dynamically. Let's leave it like it is but add a note to users. Not worth build that string all the time.
* Improve titlebar flexibilityJohn Hernandez2023-04-101-2/+2
| | | | | | | Before this change, only nickname or JID (if no nickname set) is shown in the titlebar. Change allows to alter nickname/JID preference using already implemented /titlebar show jid|name setting. If both are set to "show", then it is displayed in "nickname <JID>" format.
* Rewrite description for clientidMichael Vetter2023-04-091-1/+1
|
* Merge pull request #1815 from H3rnand3zzz/feature/the-client-switcherMichael Vetter2023-04-093-12/+21
|\ | | | | Feature: Allow setting client identification name/version manually
| * Allow setting client identification name/version manuallyJohn Hernandez2023-04-093-12/+21
| | | | | | | | | | | | | | | | Add changes allowing user to switch client name and version. Useful for enhancing user privacy. Minor cleanup.
* | User proper ellipsis charMartin Dosch2023-04-091-15/+15
| | | | | | | | | | | | | | As stated in https://github.com/profanity-im/profanity/pull/1820#issuecomment-1498083383 profanity uses "..." (three dots) in a lot of places instead the proper ellipsis char "…".
* | add `/statusbar tabmode actlist`Steffen Jaeckel2023-04-083-0/+31
| | | | | | | | | | | | | | | | | | | | The existing way how active tabs are displayed didn't allow showing more than 10 tabs. This patch adds a mode where the statusbar shows a comma-separated list of tabs which were active since the last time viewed. This view is inspired by how `irssi` shows the active tabs, therefore it is also called `actlist`. Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
* | refactor into array of a `struct`Steffen Jaeckel2023-04-041-5/+15
| | | | | | | | | | | | ...instead of having two separate arrays. Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
* | only create hashtable onceSteffen Jaeckel2023-04-041-72/+74
|/ | | | | | | Before this change the same hashtable was re-created each time one used the auto-completion feature. Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
* Fix typosMichael Vetter2023-04-031-1/+1
|
* Add autocomplete for the /reconnect commandMarcoPolo-PasTonMolo2023-04-021-0/+16
| | | | | After typing `/reconnect ` and pressing tab nothing appeared where in reality, it should have been autocompleted to `/reconnect now`
* Add editor executable to CMD_SYNDaniel Santos2023-03-311-0/+1
| | | | | | * Add missing text of how to set editor in CMD_SYN Signed-off-by: Daniel Santos <dacs.git@brilhante.top>
* Editor executable support flagsDaniel Santos2023-03-301-1/+1
| | | | | | | | * Make editor executable into a string to be able to support (multiple) flags. * Change /help executable to suit this new feature Signed-off-by: Daniel Santos <dacs.git@brilhante.top>
* Adapt to g_string_free glib 2.75.3 changeMichael Vetter2023-03-213-27/+5
| | | | | | | | | | | | glib 2.75.3 changes warning behaviour of `g_string_free()`. See: * https://gitlab.gnome.org/GNOME/glib/-/merge_requests/3219 * https://gitlab.gnome.org/GNOME/glib/-/merge_requests/3226 Use this opportunity to replace the use of GString with `g_strdup_printf()` where possible. Otherwise correctly take the return value of `g_string_free()` which is nicer anyways.
* Fix duplicate download IDs.IsaacM882023-03-091-5/+13
| | | | | | | | | | Fixes https://github.com/profanity-im/profanity/issues/1794 Explanation The problem is the download's identifier. Downloads are given an ID so they can be referenced later when their progress changes. Currently, the download's ID is the download's URL. When you download the same file twice, you have two downloads with the same ID. Download progress updates are shown on the first of both downloads with the same ID. Solution Change the download's ID from its URL to a random number. A random ID is generated when get_random_string() is called from cmd_funcs.c. Several other functions are updated to cope with the new ID format.
* cmd: Update MAM helpMichael Vetter2023-02-151-2/+2
|
* introduce `auto_gcharv`Steffen Jaeckel2023-01-191-71/+13
| | | | | | This also fixes memory leaks in `_omemo_autocomplete()`. Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
* fix more memory leaksSteffen Jaeckel2023-01-182-7/+9
| | | | Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
* add `now` option to `/reconnect` commandSteffen Jaeckel2023-01-182-9/+13
| | | | Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
* slightly improve `command_defs[]`Steffen Jaeckel2023-01-185-463/+274
| | | | | | | | | * make the struct `const` * use designated initializers * remove `CMD_NOxyz` macros * fix function-pointer correctness of `sub_func[]` Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
* minor changesSteffen Jaeckel2023-01-182-24/+20
| | | | | | | | | | | * fix typo * less code duplication * less `GString` usage * more `auto_gchar` usage * document connecting to servers supporting SASL ANONYMOUS * ignore valgrind output Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
* add `/strophe` command to modify libstrophe-specific settingsSteffen Jaeckel2023-01-184-0/+94
| | | | Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
* Update copyright yearMichael Vetter2023-01-105-5/+5
|
* Make `/url save` autocomplete filenames after a urlMarcoPolo-PasTonMolo2022-12-271-1/+15
| | | | | | | | | | Previously after the url if you pressed tab, even if you typed out a filepath, profanity would erase that and cycle through url autocomplete results. This patch solves that and autocompletes filepaths after the url. Fixes https://github.com/profanity-im/profanity/issues/1783
* Add vCard supportMarouane L2022-10-184-5/+1380
| | | | | | | | | | | | Only nicknames, photos, birthdays, addresses, telephone numbers, emails, JIDs, titles, roles, notes, and URLs are supported Due to the synopsis array not having enough space, `/vcard photo open-self` and `/vcard photo save-self` are not documented properly in the synopsis section of the `/vcard` command, but they are documented in the arguments section Fixed memory leak in vcard autocomplete (thanks to debXwoody)