summary refs log tree commit diff stats
path: root/note/wechat.html
diff options
context:
space:
mode:
authorAndrew <andrew@s22537.local>2022-09-18 21:33:56 +0800
committerAutomatic Merge <andrew+automerge@andrewyu.org>2023-07-15 00:29:23 +0800
commit15ae3441fb73ed613b5c11d498a739aaac9cb255 (patch)
treece117ba2395de6ce8f4ebb78874efe032b7691e8 /note/wechat.html
parent0a108fe82204d16f94c9b9ef3aa19c831fb05642 (diff)
downloadwww-15ae3441fb73ed613b5c11d498a739aaac9cb255.tar.gz
/school/stugov-proposals.html: Clarify legislative work.
- Examples of how many policies we have.
Diffstat (limited to 'note/wechat.html')
0 files changed, 0 insertions, 0 deletions
href='#n84'>84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111
# Copyright (C) 2009, 2010, 2011  Roman Zimbelmann <romanz@lavabit.com>
# This software is distributed under the terms of the GNU GPL version 3.

from ranger.gui.colorscheme import ColorScheme
from ranger.gui.color import *

class Default(ColorScheme):
	progress_bar_color = blue

	def use(self, context):
		fg, bg, attr = default_colors

		if context.reset:
			return default_colors

		elif context.in_browser:
			if context.selected:
				attr = reverse
			else:
				attr = normal
			if context.empty or context.error:
				bg = red
			if context.border:
				fg = default
			if context.media:
				if context.image:
					fg = yellow
				else:
					fg = magenta
			if context.container:
				fg = red
			if context.directory:
				attr |= bold
				fg = blue
			elif context.executable and not \
					any((context.media, context.container,
						context.fifo, context.socket)):
				attr |= bold
				fg = green
			if context.socket:
				fg = magenta
				attr |= bold
			if context.fifo or context.device:
				fg = yellow
				if context.device:
					attr |= bold
			if context.link:
				fg = context.good and cyan or magenta
			if context.tag_marker and not context.selected:
				attr |= bold
				if fg in (red, magenta):
					fg = white
				else:
					fg = red
			if not context.selected and (context.cut or context.copied):
				fg = black
				attr |= bold
			if context.main_column:
				if context.selected:
					attr |= bold
				if context.marked:
					attr |= bold
					fg = yellow
			if context.badinfo:
				if attr & reverse:
					bg = magenta
				else:
					fg = magenta

		elif context.in_titlebar:
			attr |= bold
			if context.hostname:
				fg = context.bad and red or green
			elif context.directory:
				fg = blue
			elif context.tab:
				if context.good:
					bg = green
			elif context.link:
				fg = cyan

		elif context.in_statusbar:
			if context.permissions:
				if context.good:
					fg = cyan
				elif context.bad:
					fg = magenta
			if context.marked:
				attr |= bold | reverse
				fg = yellow
			if context.message:
				if context.bad:
					attr |= bold
					fg = red
			if context.loaded:
				bg = self.progress_bar_color

		if context.text:
			if context.highlight:
				attr |= reverse

		if context.in_taskview:
			if context.title:
				fg = blue

			if context.selected:
				attr |= reverse

			if context.loaded:
				if context.selected:
					fg = self.progress_bar_color
				else:
					bg = self.progress_bar_color

		return fg, bg, attr