Two questions for Toxic
JFreegman, thank you so much creating the great Toxic messenger!
I use it as a beacon on remote servers :-) It turned out that it was very convenient to monitor their work online.
But two things aren't enough for me:
-
How do I make that Toxic is always Online mode (green) after its launch? (it is currently in Away mode, yellow)
-
How to make Toxic after it is launched send a welcome message to its clients? For example:
My server is again online
Thanks!
JFreegman, thank you so much creating the great Toxic messenger!
I'm glad you're enjoying it :)
- How do I make that Toxic is always Online mode (green) after its launch? (it is currently in Away mode, yellow)
If you type the command /status online it should set you to online mode. Toxic's default configuration will make the client auto-away when it detaches from Screen or Tmux while running. You can disable this with the config option mplex_away=false. See man toxic.conf or the config example file in the misc directory for more info about that.
- How to make Toxic after it is launched send a welcome message to its clients?
You could probably do this with a custom python script. Toxic can be compiled with python scripting support via the ENABLE_PYTHON=1 compile option. But otherwise it's not possible without modifying the source code (it would be trivial to do this if you're comfortable with modifying source code).
You can disable this with the config option mplex_away=false
Ok, I did it, then overloaded Linux, but unfortunately, Toxic is still in Away mode.
You can disable this with the config option mplex_away=false
Ok, I did it, then overloaded Linux, but unfortunately, Toxic is still in Away mode.
Are you sure you're using the correct configuration file and that it's correctly configured? Also, have you used the /status online command?
Of course, when I run the /status online command, the Toxic status becomes Online ("Green"). But after the system is rebooted, it turns back into the "Away" mode.
Here is a fragment of the /home/toxic/toxic.conf file :
// Indicator for special messages.
line_special=">";
// true to change status based on screen/tmux attach/detach, false to disable
// mplex_away=true;
mplex_away=false;
// Status message to use when status set to away due to screen/tmux detach
mplex_away_note="My Sever is Online!"
Do other changes in the config file take effect?
I have not made any other changes to this file.
I have not made any other changes to this file.
The reason I asked is so that you can make sure that you're actually using the correct config file. If you're using a non-default Tox profile (e.g. with the -f option) then you will also need to use the config file that's associated with that profile, which should be in the same directory, with the same name.
For example, if you're running toxic with the command toxic -f /home/my_stuff/cool_profile.tox then a config file will be created: /home/my_stuff/cool_profile.conf, and that's the config file that your profile will use by default.
Otherwise, you can manually set which config file you want to use on startup with the -c option.
JFreegman, of course, I understand your doubts. But I'm sure I'm using the standard configuration file /home/toxic/toxic.conf The reason for this belief is that I see in the tox client the inscription My Server is Online! , which I added to the Toxic config file.
JFreegman, of course, I understand your doubts. But I'm sure I'm using the standard configuration file /home/toxic/toxic.conf The reason for this belief is that I see in the tox client the inscription My Server is Online! , which I added to the Toxic config file.
In that case there's not much I can do to help you without seeing the full configuration file. I just tested this locally and it works fine.
So I'll provide you with the configuration file :-) Here you go:
// SAMPLE TOXIC CONFIGURATION
// USES LIBCONFIG-ACCEPTED SYNTAX
ui = {
// true to enable timestamps, false to disable
timestamps=true;
// true to enable acoustic alerts on messages, false to disable
alerts=true;
// true to show notification content on desktop alerts, false to hide
show_notification_content=true;
// Output a bell when receiving a message (see manpage)
bell_on_message=true;
// Output a bell when receiving a filetransfer (see manpage)
bell_on_filetrans=true;
// Don''t output a bell when a filetransfer was accepted (see manpage)
bell_on_filetrans_accept=false;
// Output a bell when receiving a group/call invite (see manpage)
bell_on_invite=true;
// true to use native terminal colors, false to use toxic default color theme
native_colors=false;
// set background color of chat status bars
// colors: black, white, gray, brown, red, green, blue, cyan, yellow, magenta, orange, pink
color_bar_bg="blue";
// set foreground (text) color of chat status bars
// colors: black, white, gray, brown, red, green, blue, cyan, yellow, magenta, orange, pink
color_bar_fg="white";
// set foreground accent color of chat status bars
// colors: black, white, gray, brown, red, green, blue, cyan, yellow, magenta, orange, pink
color_bar_accent="cyan";
// set foreground notify (and typing) color in chat status bar
// colors: black, white, gray, brown, red, green, blue, cyan, yellow, magenta, orange, pink
color_bar_notify="yellow";
// true to enable autologging, false to disable
autolog=false;
// 24 or 12 hour time
time_format=24;
// Timestamp format string according to date/strftime format. Overrides time_format setting
timestamp_format="%H:%M";
// Timestamp format string for raw logs according to date/strftime format. (Note: the time
// of the format string must be enclosed in square brackets in order to be parsed by toxic).
log_timestamp_format="%Y/%m/%d [%H:%M]"
// true to show you when others are typing a message in 1-on-1 chats
show_typing_other=true;
// true to show others when you''re typing a message in 1-on-1 chats
show_typing_self=true;
// true to show the welcome message on startup
show_welcome_msg=true;
// true to enable friend connection change notifications
show_connection_msg=true;
// true to show peer connection change messages in groups
show_group_connection_msg=true;
// How often in days to update the DHT nodes list. (0 to disable updates)
nodeslist_update_freq=7;
// How often in seconds to auto-save the Tox data file. (0 to disable periodic auto-saves)
autosave_freq=600;
// maximum lines for chat window history
history_size=700;
// time in milliseconds to display a notification
notification_timeout=6000;
// true to pad every wrapped line of a message with enough spaces to
// align it to the beginning of the first line
line_padding=true;
// Indicator for display when someone connects or joins a group
line_join="-->";
// Indicator for display when someone disconnects or leaves a group
line_quit="<--";
// Indicator for alert messages.
line_alert="-!-";
// Indicator for normal messages.
line_normal="-";
// Indicator for special messages.
line_special=">";
// true to change status based on screen/tmux attach/detach, false to disable
// mplex_away=true;
mplex_away=false;
// Status message to use when status set to away due to screen/tmux detach
mplex_away_note="My Server is Online!"
// Parting message that will be sent to all groupchat peers when you leave the group
group_part_message="Toxic user signing out"
};
audio = {
// preferred audio input device; numbers correspond to /lsdev in
input_device=2;
// preferred audio output device; numbers correspond to /lsdev out
output_device=0;
// default VAD threshold; float (recommended values are 1.0-40.0)
VAD_threshold=5.0;
// Number of channels to use for conference audio broadcasts; 1 for mono, 2 for stereo.
conference_audio_channels=1;
// Number of channels to use for 1-on-1 audio broadcasts; 1 for mono, 2 for stereo.
chat_audio_channels=2;
// toggle conference push-to-talk
push_to_talk=false;
};
tox = {
// Path for downloaded files
// download_path="/home/USERNAME/Downloads/";
// Path for your avatar (file must be a .png and cannot exceed 64 KiB)
// avatar_path="/home/USERNAME/Pictures/youravatar.png";
avatar_path="/home/toxic/ia2-128x138.png";
// Path for scripts that should be run on startup
// autorun_path="/home/USERNAME/toxic_scripts/";
// Path for chatlogs
// chatlogs_path="/home/USERNAME/toxic_chatlogs/";
};
// Friend-specific config settings. Public keys are used as friend identifiers
// and must begin with the prefix "pk_". These take priority over global settings.
friends = {
pk_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA = {
// Set an alias for this friend.
alias="EXAMPLE_NAME";
// Enable auto-accepting inbound file transfers for this friend.
auto_accept_files=false;
// Enable autologging for this friend.
autolog=false;
// true to enable connection change notifications.
show_connection_msg=true;
// The color of the friend's window tab name.
// colors: black, white, gray, brown, red, green, blue, cyan, yellow, magenta, orange, pink
tab_name_color="white";
};
// pk_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA = {
// ...
// };
};
// Groupchat-specific config settings. Public keys (chat ID's) are used as
// group identifiers and must begin with the prefix "pk_". These take priority
// over global settings.
groupchats = {
pk_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA = {
// Enable autologging for this group.
autolog=false;
// The color of the group''s window tab name.
// colors: black, white, gray, brown, red, green, blue, cyan, yellow, magenta, orange, pink
tab_name_color="white";
};
// pk_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA = {
// ...
// };
};
// Conference-specific config settings. Public keys are used as group identifiers
// and must begin with the prefix "pk_". These take priority over global settings.
conferences = {
pk_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA = {
// Enable autologging for this conference.
autolog=false;
// The color of the conference''s window tab name.
// colors: black, white, gray, brown, red, green, blue, cyan, yellow, magenta, orange, pink
tab_name_color="white";
};
// pk_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA = {
// ...
// };
};
// A list of case-insensitive words that cannot be sent in messages. If you attempt to send
// a message that contains a word in this list to a group, friend, etc., the message will not
// send and an error will be displayed. Words must be enclosed in double quotes and must not
// be longer than 256 characters.
blocked_words = [
// "hunter2",
// "certainly!"
];
// To disable a sound set the path to "silent"
sounds = {
error="__DATADIR__/sounds/ToxicError.wav";
user_log_in="__DATADIR__/sounds/ToxicContactOnline.wav";
user_log_out="__DATADIR__/sounds/ToxicContactOffline.wav";
call_incoming="__DATADIR__/sounds/ToxicIncomingCall.wav";
call_outgoing="__DATADIR__/sounds/ToxicOutgoingCall.wav";
generic_message="__DATADIR__/sounds/ToxicRecvMessage.wav";
transfer_pending="__DATADIR__/sounds/ToxicTransferStart.wav";
transfer_completed="__DATADIR__/sounds/ToxicTransferComplete.wav";
};
// Currently supported: Ctrl modified keys, Tab, PAGEUP and PAGEDOWN (case insensitive)
// Note: Ctrl+M does not work
keys = {
next_tab="Ctrl+P";
prev_tab="Ctrl+O";
scroll_line_up="Ctrl+F";
scroll_line_down="Ctrl+V";
half_page_up="PAGEUP";
half_page_down="PAGEDOWN";
page_bottom="Ctrl+H";
toggle_peerlist="Ctrl+B";
toggle_paste_mode="Ctrl+T";
reload_config="Ctrl+R";
};
So I'll provide you with the configuration file :-) Here you go:
Have you tried rebooting Toxic with your updated config file? It looks like ctrl+r isn't properly toggling the auto-away timer as it should be.
Have you tried rebooting Toxic with your updated config file?
Yes, I did it.
fix: config changes to mplex auto-away now work in running sessions TokTok/toxic#406
So I need to install a new version of Toxic?
Have you tried rebooting Toxic with your updated config file?
Yes, I did it.
fix: config changes to mplex auto-away now work in running sessions TokTok/toxic#406
So I need to install a new version of Toxic?
The patch isn't merged yet. You should be able to just restart your toxic instance with the change. I've tested this locally and it works. Otherwise I'm really not sure what the problem could be.
The patch has been merged. You can try it out and see if it works.
The patch has been merged.
It's very good! But unfortunately, I don't understand how to use it. Please tell me in detailю.
The patch has been merged.
It's very good! But unfortunately, I don't understand how to use it. Please tell me in detailю.
The patch should fix the bug you've reported. When you change tmux_away to false and use ctrl+r to reload the config, it should now disable the auto-away feature.
My question is not about that. My question is how to use this patch? What do I need to do for this?
My question is not about that. My question is how to use this patch? What do I need to do for this?
For now you'd need to compile Toxic from source using the master branch on either my or the toktok repo. Eventually it will make it into the next release.
For now you'd need to compile Toxic from source
Unfortunately, I am afraid and do not like compilation, because of this I use only ready-made packages. So I'll be waiting for your new release Toxic.
And one more request: could you add a new feature to the new release - sending arbitrary messages to contacts when Toxic is launched?