about summary refs log tree commit diff stats
path: root/docs/profanity-logging.1
diff options
context:
space:
mode:
Diffstat (limited to 'docs/profanity-logging.1')
-rw-r--r--docs/profanity-logging.132
1 files changed, 32 insertions, 0 deletions
diff --git a/docs/profanity-logging.1 b/docs/profanity-logging.1
new file mode 100644
index 00000000..3ef82930
--- /dev/null
+++ b/docs/profanity-logging.1
@@ -0,0 +1,32 @@
+.TH man 1 "2022-10-12" "0.13.0" "Profanity XMPP client"
+
+.SH NAME
+/logging
+
+.SH DESCRIPTION
+Configure chat logging. Switch logging on or off. Chat logging will be enabled if /history is set to on. When disabling this option, /history will also be disabled. 
+
+.SH SYNOPSIS
+/logging chat|group on|off
+
+.LP
+
+.SH ARGUMENTS
+.PP
+\fBchat on|off\fR
+.RS 4
+Enable/Disable regular chat logging.
+.RE
+.PP
+\fBgroup on|off\fR
+.RS 4
+Enable/Disable groupchat (room) logging.
+.RE
+
+.SH EXAMPLES
+/logging chat on
+
+.LP
+/logging group off
+
+.LP
Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
import curses, debug
class UI():
	def __init__(self, options):
		self.scr = curses.initscr()
		self.scr.leaveok(1)
		curses.noecho()
		curses.halfdelay(3)

		self.options = options
		self.directories = None
		self.pwd = None
		self.cf = None
		self.termsize = None
		self.rows = 0
		self.cols = 0

	def feed(self, directories, pwd, cf, termsize):
		self.directories = directories
		self.pwd = pwd
		self.cf = cf
		self.termsize = termsize
		self.cols = termsize.x
		self.rows = termsize.y

	def exit(self):
		curses.nocbreak()
		curses.echo()
		curses.endwin()

	def draw(self):
		import time
		self.scr.erase()
		for i in range(1, len(self.pwd)):
			f = self.pwd.files[i]
			self.scr.addstr(i, 0, f.path)
			if f.infostring: self.scr.addstr(i, 50, f.infostring)
		self.scr.refresh()

	def get_next_key(self):
		key = self.scr.getch()
		curses.flushinp()
		return key