1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-06-23 21:45:30 +00:00
Commit Graph

303 Commits

Author SHA1 Message Date
Paul Fertser
1272543237 Use EDITOR environment variable
When preferences do not specify a program to be used for /editor
command, try getting it from EDITOR (which POSIX.1-2017 calls one of
"variables that are frequently exported by widely used command
interpreters and applications"), fall back to "vim" if not set.
2022-03-27 21:48:45 +03:00
Steffen Jaeckel
d2ba0e0833 auto-format
Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
2021-10-27 22:45:44 +02:00
Michael Vetter
a9bcc8e8bd Allow utf8 in occupants header char 2021-10-22 16:54:05 +02:00
Michael Vetter
1c96115f97 Allow utf8 in occupants char 2021-10-22 16:54:05 +02:00
Michael Vetter
fa2881fcea Allow utf8 in roster room private char 2021-10-22 16:54:05 +02:00
Michael Vetter
8fc359ba2d Allow utf8 in roster rooms char 2021-10-22 16:54:05 +02:00
Michael Vetter
7faf15a18c Allow utf8 in roster private char 2021-10-22 16:54:05 +02:00
Michael Vetter
83ee4a27cb Allow utf8 in roster resource char 2021-10-22 16:54:02 +02:00
Michael Vetter
a668ca45b7 Allow utf8 in roster contact char 2021-10-22 16:23:18 +02:00
Michael Vetter
91898597dd Allow utf8 in roster header char
This and the following commits should make a couple of more configs
allow utf8 chars so people can use their weird icons :-)

We did the same for the otr/omemo/pgp indicators at:
1f8b1eb740
5cf6ee1bc6
2021-10-21 15:30:01 +02:00
Michael Vetter
ba7b6c2e96 Clean sourcepath from profrc
See 3b3a6b7a75 for sourcepath removal.
2021-09-29 17:32:54 +02:00
Michael Vetter
3b3a6b7a75 Remove /python sourcepath
I feel like this mostly is confusing people.
Also don't see much value for it.

To me it looks like a regular workflow is like:
```
/plugin install ~/src/profanity-plugins/my.py
```

The whole thing with sourcepath, install (which also loads without
having that described anywhere), load etc is confusing.
Also each plugin file that is present in
`.local/share/profanity/plugins` will then be auto loaded. Which means
after installation.
2021-09-29 15:49:05 +02:00
Michael Vetter
0a8d69dc46 Enable whole word only notifications by default
Set PREF_NOTIFY_MENTION_WHOLE_WORD to true.

If I'm not mistaken the _mucwin_print_mention() / get_mentions()
functions only work correctly since
6bc440c6f7.

This changed the behaviour for users.
They got notified when their nick was `kaffee` and in the message the
string `kaffeekanne` occured.

Setting `/notify room mention word_whole` corrected this.

So my idea is that only now the mention function work correctly. And to
have a good default behaviour we should set the `word_whole` on by
default.

Regards https://github.com/profanity-im/profanity/issues/1578
2021-09-08 12:04:34 +02:00
Michael Vetter
06482fdaef Add option to only allow messages from jids in roster
`/silence on` will throw away all messages (type: chat, normal) that
come from jids that are not in the roster.

Implement https://github.com/profanity-im/profanity/issues/955
2021-07-01 18:02:03 +02:00
Michael Vetter
7db8f6f5a4 Disable notifications by default
Since I didn't find a way to discover whether a notification server is
running I decided to disable them by default. So people without one will
not have such a bad lag due to timeout from libnotify.

Fix https://github.com/profanity-im/profanity/issues/977
2021-06-28 19:22:22 +02:00
Jörg Thalheim
a5a0dd6c91
external editor: don't use absolute paths and allow path search 2021-05-30 23:14:05 +02:00
Michael Vetter
64244474d3 Have intype on by default 2021-05-08 19:41:38 +02:00
Michael Vetter
1d8061e89b Have separate settings for intype
Old: `/intype on|of`
Typing information is printed in console and titlebar.

New: `/intype titlebar|console on|off`
Typing information can be configured in more detail.

Regards https://github.com/profanity-im/profanity/issues/1516
2021-05-08 19:38:40 +02:00
Stefan
3ba38eafa8
OMEMO - trust mode (#1506)
Add OMEMO trust mode capabilities.

* ToFu / first usage
* blind trust
* manual
2021-04-17 13:28:54 +02:00
Stefan
9f32b2afb2 Editor: Using preferences compose.editor
compose.editor is the path to the executable ( default /usr/bin/vim )
2021-04-16 18:04:03 +02:00
Thorben Günther
f1780f0017
MUC: Show offline members in sidebar 2021-03-08 14:34:59 +01:00
Michael Vetter
8c08e64f37 Update copyright 2021-01-08 16:36:30 +01:00
William Wennerström
01e8f01ed3
Add /executable (urlsave|urlopen) migrations 2020-12-18 16:05:11 +01:00
Michael Vetter
a94378f206 Fix various typos 2020-12-10 09:24:32 +01:00
Michael Vetter
5179b253c4 Purge omemo sendfile from config
https://github.com/profanity-im/profanity/pull/1375 added omemo media sharing support.

Thus the protection
(https://github.com/profanity-im/profanity/pull/1270) to sending files plainly in an omemo chat isn't
needed anymore and got removed.

Lets clean it from the config file.
2020-12-09 08:44:44 +01:00
William Wennerström
d7848e38bc
Remove scheme and filetype matching for url (save|open) 2020-12-08 20:01:17 +01:00
William Wennerström
1d2c0a8836
Move unique_filename_from_url functions to common 2020-12-04 16:13:13 +01:00
William Wennerström
3a6597ee29
Refactor for threaded external executable for built-in download methods 2020-12-03 16:54:06 +01:00
William Wennerström
fb002a59b6
Use fallback method when /executable urlsave is unset 2020-11-16 21:58:09 +01:00
William Wennerström
4711fc62a3
Run make format on rebase 2020-11-16 21:58:09 +01:00
William Wennerström
9d58472c8c
Remove /omemo sendfile 2020-11-16 21:58:08 +01:00
Michael Vetter
35aecd425f Declare counter var inside loop
We require c99/gnu99 anyways.
2020-11-09 11:33:33 +01:00
Michael Vetter
a2726b6a7d Apply coding style 2020-07-07 14:18:57 +02:00
Michael Vetter
a4cadf78fa Revert "Apply coding style"
This reverts commit 9b55f2dec0.

Sorting the includes creates some problems.
2020-07-07 13:53:30 +02:00
Michael Vetter
9b55f2dec0 Apply coding style
Regards https://github.com/profanity-im/profanity/issues/1396
2020-07-07 09:43:28 +02:00
Michael Vetter
e5ac12afa6 Remove prefs_free_string()
It just does a free.
Related to b580b9ef11
2020-07-02 11:34:12 +02:00
Michael Vetter
9774b0c550
Merge pull request #1374 from profanity-im/revampUrlopen
Rework /url and /executable for filetypes
2020-07-02 11:26:18 +02:00
Michael Vetter
322caf877e Transform url.open.cmd to new default scheme
Additionally to:
7de83217c4
1e2a288d80
2020-07-02 11:14:27 +02:00
Michael Vetter
6ada720e18 executable: actually take the user set default if a certain scheme is
not found
2020-07-02 10:59:45 +02:00
Michael Vetter
59f5b81b85 cmd_url_*(): use gchar instead of char 2020-07-02 10:58:31 +02:00
Michael Vetter
1e2a288d80 Use correct format when transforming old urlopen.cmd
Additionally to ec7e635e75.

In the earlier commit I just setted the test value ignoring the real
format.

Now we correctly transform:

```
[logging]
urlopen.cmd=xdg-open
```

into:

```
[executables]
url.open.cmd=false;xdg-open %u;
```
2020-07-02 10:22:18 +02:00
Pierre Mazière
274e695320 use '*' to set a default executable
Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
2020-07-02 09:52:43 +02:00
Michael Vetter
ec7e635e75 Move url/avatar commands from logging to exectuables section
c56d530b67 by peetah moves:
urlopen.cmd from the 'logging' to a new 'executables' section in profrc
avatar.cmd from the 'logging' to a new 'executables' section in profrc

We need to adapt this so that users don't have to set the setting again
themselves.
2020-07-01 15:29:57 +02:00
Michael Vetter
b580b9ef11 prefs_free_string() doesnt need to check if pref is NULL
g_free(NULL); is noop.
2020-07-01 14:42:35 +02:00
DebXWoody
2c94ee5a88 Feature request - XEP-0373: OpenPGP for XMPP (OX)
Basic implementation of XEP-0373: OpenPGP for XMPP.
https://xmpp.org/extensions/xep-0373.html

Command /ox

Issue: #1331
2020-06-29 19:05:41 +02:00
Pierre Mazière
c56d530b67 Replace /urlopen with /url and adapt /executable
/urlopen is replaced by /url with the following sub commands:
/url open <url>
/url save <url> [<path>]

Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
2020-06-25 15:03:04 +02:00
Pierre Mazière
7e652f4ca0 Add string and string list preferences with option
Where GKeyFile usually use the pref[locale] format to define
locale specific translated data, it is here hijacked to be used
as pref[option] in order to specialize a preference according
to an option:

open.url.cmd[pdf] = pdf-viewer
open.url.cmd[jpg] = image-viewer

Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
2020-06-25 15:03:04 +02:00
Michael Vetter
914c6752dd Fix reading/writing linked files
"base" was not really base but the filename :-)

Fix https://github.com/profanity-im/profanity/issues/1362
2020-06-13 15:02:43 +02:00
Michael Vetter
74e061165a Define POSIX macro to have strdup
98c38dc6d6
sets C99 as standard.

strdup() is not part of C99.

For now set `-D_POSIX_C_SOURCE=200809L` macro to have strdup() in C99.
Using `gnu99` instead would be another option.

We should take more care to use glib functions whenever possible.

Regards https://github.com/profanity-im/profanity/issues/1357
2020-06-12 16:12:21 +02:00
Michael Vetter
cb78ee4665 Make option to allow hiding windows with no messages in statusbar
`statusbar.show.read` can be set to false in the config.
`/statusbar show|hide read`.

Implement https://github.com/profanity-im/profanity/issues/1285
2020-05-21 16:15:14 +02:00