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

135 Commits

Author SHA1 Message Date
Michael Vetter
fcd69532ad Make 'scrolled' themeable 2020-05-21 09:16:18 +02:00
Michael Vetter
4f19ea2642 Add -t theme option
`profanity -t bios` loads the bios theme now.

Fix https://github.com/profanity-im/profanity/issues/1286
2020-03-24 23:00:39 +01:00
Michael Vetter
f131680055 titlebar: allow displaying MUC name and MUC jid
`/titlebar use name|jid` -> `/titlebar show|hide name|jid`

Fix https://github.com/profanity-im/profanity/issues/1284
2020-03-24 22:22:16 +01:00
Michael Vetter
6dbbbe11e5 Make trackbar color configurable
Use `main.trackbar` in themes.
2020-02-21 19:12:16 +01:00
Michael Vetter
1f8b1eb740 Allow utf8 symbols as omemo/pgp/otr indicator char
Fix https://github.com/profanity-im/profanity/issues/1264
2020-02-20 23:36:10 +01:00
Michael Vetter
280b718cfb Fix theme setting correction char
Copy paste error. We actually set the omemo char..
2020-02-20 16:50:17 +01:00
Michael Vetter
3c1db1cd32 xep-0308: make correction.char themeable 2020-02-10 14:58:22 +01:00
Michael Vetter
cd80b6cbf2 Change theme handling
So far when loading a theme it also overwrote the preferences the user
set.

Lengthy discussion can be found at
https://github.com/profanity-im/profanity/issues/1077

Now we use `/theme load themename` to load the [colours] part of a
themem only.

`/theme full-load themename` will load the complete theme including
preferences set in there.

Regards https://github.com/profanity-im/profanity/issues/1077
2020-01-29 12:33:55 +01:00
Michael Vetter
7dbc0baef3 Refactor theme.c
Make _theme_list_dir() static.
Sort _load_preferences() loadings accoding to type.
Add comments.
2020-01-29 11:49:08 +01:00
Michael Vetter
56b7482b08 Add option to display MUC name or JID in titlebar
Add `/titlebar use [name|jid]`.
2020-01-23 19:42:22 +01:00
Michael Vetter
9e35861001 Add /roster room use command
`/roster room use name` to use the name of the MUC in the roster list.
`/roster room use jid` to use the jid of the MUC in the roster list.

Display it only in case `/roster room by none` is set so far.
2020-01-23 16:50:43 +01:00
Michael Vetter
802df37926 XEP-0392: get background color from theme
So far we just used -1 (default color). Now we actually check whether
`bkgnd` is set in the theme file and use this if available.

Fix https://github.com/profanity-im/profanity/issues/1255
2020-01-22 10:01:04 +01:00
Michael Vetter
be13e98fe7 Update my Copyright to 2020 2020-01-03 19:52:31 +01:00
Michael Vetter
92c8366880 Dont kill *.char preferences if theme doesnt contain it
So far `/occupants char *`, `/roster contact char *`, `/roster room char #`,
`/roster header char -`, `/occupants header char -` was saved and
loaded from the preferences.

But was overwritten when the theme was loaded. If the theme didn't set
these values the value was just cleared. Despite that it might have been
set in the users preferences.

Funny enough the themes don't operate generally like this.
For example `otr.char` is not cleared.

This is again due to our borked theme/prefs concept
(https://github.com/profanity-im/profanity/issues/1077).

For now let's just use the one set from the preferences if it's set. The
theme will however overwrite it if it is set there.

Fix https://github.com/profanity-im/profanity/issues/1244
2019-12-20 10:45:25 +01:00
Michael Vetter
3258211f27 Improve color blindness handling
Rename some things and use a swtich instead of if.
2019-12-12 14:23:07 +01:00
Michael Vetter
2750194279 Implement Color Vision Deficiencies setting
Implement settings for redgreen and blue blindness.

Regards https://github.com/profanity-im/profanity/issues/1191
2019-12-12 11:07:11 +01:00
Aurelien Aptel
7a0a578a8a XEP-0392: theme, ui: conditionally colorize user nicks
* add theme_hash_attrs()
* when printing a user message check PREF_COLOR_NICK to decide whether
  to colorize it or not

ideally we should hash the jid instead of the nick but this is already
a first step.
2019-12-03 21:10:39 +01:00
Michael Vetter
46fd7150e5 Add vim modeline 2019-11-13 12:11:05 +01:00
Martin
b16426f66d Change default text colors to default (#1213)
Change default themes text color

Using "default" instead of white makes the default better readable
when using a black/dark font on white/light background.

May fix #535
2019-10-22 08:13:39 +02:00
Michael Vetter
5c53e02d86 Add option to hilight unread rooms in /wins command
In the theme we can now set `cmd.wins.unread` to hvae a special color
for the lines of the `/wins` output that have unread messages.

Fix https://github.com/profanity-im/profanity/issues/895
2019-10-12 13:03:14 +02:00
Daniel Lublin
641410f6bd Add coloring of statusbar.current tab in view
This theme color applies to the tab title text of the statusbar tab that
is currently shown.

The (somewhat confusingly named) `statusbar.active` theme color now
applies to all other tabs (before, it applied to all tabs).

Coloring of a tab that is highlighted/has new messages is done as before
using the `statusbar.new` theme color.

The default color is set to `cyan`, and thus causes no visible change
for users -- until modified.
2019-09-24 10:35:30 +02:00
Michael Vetter
e10f4d4bb0 Set default color for main.text.history
Might be related to https://github.com/profanity-im/profanity/issues/1186
2019-09-11 13:20:32 +02:00
Michael Vetter
aa0f497975 Allow colorization of history messages
History was always printed with `THEME_DEFAULT` we now use
`THEME_TEXT_HISTORY` which is accesible in theme files via
`main.text.history`.

Fix https://github.com/profanity-im/profanity/issues/1170
2019-09-10 11:22:30 +02:00
Michael Vetter
03fbf2e77a Remove unused colour_string_t struct 2019-08-23 14:59:26 +02:00
Michael Vetter
7d7a49f132 theme: print to log not to console
Seems this can cause trouble in case we cant use the theme properly.
2019-08-23 14:56:29 +02:00
Michael Vetter
c2a565c2ec Notify trying to load 256 colour theme in incapable terminal 2019-08-23 14:24:44 +02:00
Michael Vetter
023e2dc387 Reset color pairs when new theme is loaded
We only need the colour pairs initialized that the theme actually uses.
It's otherwise possible that we run over the max value of initialzed
pairs.
2019-08-23 13:54:09 +02:00
Michael Vetter
0b9880f7a0 Use log_error() instead of g_warning() 2019-08-23 13:46:14 +02:00
Aurelien Aptel
269afa53b4 Add 256 colors support
Themes can now use color names from the xterm color name list [1].

1: https://jonasjacek.github.io/colors/
2019-08-23 13:25:45 +02:00
Paul Fariello
9482ce6168 Set foreground color for untrusted messages 2019-06-20 14:30:45 +02:00
Michael Vetter
40b72ffe55 Add myself to copyright
Like discussed with James.
2019-06-17 10:44:08 +02:00
Michael Vetter
c57d0b8c8e Add omemo.char theme option
Thanks to @kaffekanne for noticing this!
2019-06-05 11:01:08 +02:00
Michael Vetter
f082563bf2 Add occupants char
`/occupants char` now sets a character that is displayed before the nick
in MUCs. Similar like `/roster char` is displaying a char for the roster.

Regards #690
2019-05-02 17:01:55 +02:00
Michael Vetter
1d2c0ddc69 Fix statusbar number in theme
There is a typo here. So this actually never worked ;-)
2019-04-24 14:48:24 +02:00
Michael Vetter
125ca2f0d2 Add occupants wrap option
Wrapping for the occupants panel like already exists for the roster
panel. See `/occupants wrap on`.

Regards https://github.com/boothj5/profanity/issues/690
2019-04-24 09:49:14 +02:00
Michael Vetter
566022786d Add occupants header char
`/occupants header char` now sets a character that is displayed before
the role (moderator, visitor..) in a room. Similar to `/roster header
char` is displaying a char for the roster.

Regards https://github.com/boothj5/profanity/issues/690
2019-04-23 14:13:03 +02:00
Michael Vetter
0c248a0b16 Add /occupants indent command
Roster has a `/roster contact indent` option.
Now we have the same for occupants. So contacts in roster and in MUC can
have configurable indentation.

Regards https://github.com/boothj5/profanity/issues/690
2019-04-18 20:53:02 +02:00
Michael Vetter
706af9a900 Update copyright to include 2019 2019-01-22 11:31:45 +01:00
Paul Fariello
a952776b89 Rename mucconf wins into conf wins
Configuration windows are now being used by both muc and cmd.
2018-09-05 13:51:00 +02:00
James Booth
70c70fcdf9 Fix theme load max tab length 2018-03-11 01:21:36 +00:00
James Booth
d6e7f389d1 Add max tab length to statusbar 2018-03-11 01:18:46 +00:00
James Booth
aa520f4f7c Add statusbar pref to themes 2018-03-10 23:22:58 +00:00
James Booth
136b975b6c Remove empty tabs 2018-03-09 22:42:20 +00:00
James Booth
f4759cf337 Update themes 2018-02-10 00:01:26 +00:00
James Booth
4c7396e77d Allow hiding room server in roster 2018-01-21 18:56:20 +00:00
James Booth
250e972b7a Update copyright 2018-01-21 15:00:02 +00:00
Lukasz Marcinowski
91bc302acf Add theme option for time in a status bar 2017-03-22 19:56:00 +01:00
James Booth
68a3daedb9 Update Copyright 2017-01-28 17:24:22 +00:00
Frank Zschockelt
c0f099cb84 Added main.help.header theme option 2016-10-29 18:19:12 +02:00
James Booth
83974728af Remove verbose output on window move 2016-09-25 21:47:00 +01:00