Commit 2bb32278 authored by Hund's avatar Hund

Herp derp

parents
! Urxvt
URxvt*termName: rxvt-256color
URxvt.cursorUnderline: false
URxvt.cursorBlink: false
URxvt*scrollBar: false
URxvt*borderLess: false
URxvt.fading: 0
!--Colors?--!
URxvt.intensityStyles: false
!--Clickable URLs--!
URxvt.perl-ext-common: default,matcher,clipboard
URxvt.url-launcher: palemoon
URxvt.matcher.button: 1
!--Paste--!
URxvt.keysym.Shift-Control-V: perl:clipboard:paste
URxvt.iso14755: False
!-- Fonts --!
URxvt*font:xft:Terminus:size=12, \
xft:unifont:medium
URxvt*boldFont:xft:Terminus:size=12, \
xft:unifont:medium
!-- Colors --!
! Common
#define S_yellow #b58900
#define S_orange #cb4b16
#define S_red #dc322f
#define S_magenta #d33682
#define S_violet #6c71c4
#define S_blue #268bd2
#define S_cyan #2aa198
#define S_green #859900
! Dark
#define S_base03 #002b36
#define S_base02 #0d4350
#define S_base01 #586e75
#define S_base00 #657b83
#define S_base0 #839496
#define S_base1 #93a1a1
#define S_base2 #839496
#define S_base3 #fdf6e3
! Light
! #define S_base03 #fdf6e3
! #define S_base02 #839496
! #define S_base01 #93a1a1
! #define S_base00 #839496
! #define S_base0 #657b83
! #define S_base1 #586e75
! #define S_base2 #073642
! #define S_base3 #002b36
! To only apply colors to your terminal, for example, prefix
! the color assignment statement with its name. Example:
!
! URxvt*background: S_base03
URxvt.background: S_base03
URxvt.foreground: S_base0
*fading: 0
*fadeColor: S_base03
URxvt.cursorColor: S_base1
*pointerColorBackground: S_base01
*pointerColorForeground: S_base1
URxvt.color0: S_base02
URxvt.color1: S_red
URxvt.color2: S_green
URxvt.color3: S_yellow
URxvt.color4: S_blue
URxvt.color5: S_magenta
URxvt.color6: S_cyan
URxvt.color7: S_base2
URxvt.color9: S_orange
URxvt.color8: S_base03
URxvt.color10: S_base01
URxvt.color11: S_base00
URxvt.color12: S_base0
URxvt.color13: S_violet
URxvt.color14: S_base1
URxvt.color15: S_base3
[global]
font = Monospace 9
# If markup is not allowed, those tags will be stripped out of the
# message.
allow_markup = yes
# Treat incoming notifications as plain text
plain_text = no
# The format of the message. Possible variables are:
# %a appname
# %s summary
# %b body
# %i iconname (including its path)
# %I iconname (without its path)
# %p progress value if set ([ 0%] to [100%]) or nothing
# Markup is allowed
format = "<b>%s</b>\n%b"
# Sort messages by urgency.
sort = yes
# Show how many messages are currently hidden (because of geometry).
indicate_hidden = yes
# Alignment of message text.
# Possible values are "left", "center" and "right".
alignment = left
# The frequency with which text that is longer than the notification
# window allows bounces back and forth.
# This option conflicts with "word_wrap".
# Set to 0 to disable.
bounce_freq = 0
# Show age of message if message is older than show_age_threshold
# seconds.
# Set to -1 to disable.
show_age_threshold = 60
# Split notifications into multiple lines if they don't fit into
# geometry.
word_wrap = yes
# Ignore newlines '\n' in notifications.
ignore_newline = no
# The geometry of the window:
# [{width}]x{height}[+/-{x}+/-{y}]
# The geometry of the message window.
# The height is measured in number of notifications everything else
# in pixels. If the width is omitted but the height is given
# ("-geometry x2"), the message window expands over the whole screen
# (dmenu-like). If width is 0, the window expands to the longest
# message displayed. A positive x is measured from the left, a
# negative from the right side of the screen. Y is measured from
# the top and down respectively.
# The width can be negative. In this case the actual width is the
# screen width minus the width defined in within the geometry option.
geometry = "300x1000-8+35"
# Shrink window if it's smaller than the width. Will be ignored if
# width is 0.
shrink = 1
# The transparency of the window. Range: [0; 100].
# This option will only work if a compositing window manager is
# present (e.g. xcompmgr, compiz, etc.).
transparency = 0
# Don't remove messages, if the user is idle (no mouse or keyboard input)
# for longer than idle_threshold seconds.
# Set to 0 to disable.
idle_threshold = 120
# Which monitor should the notifications be displayed on.
monitor = 0
# Display notification on focused monitor. Possible modes are:
# mouse: follow mouse pointer
# keyboard: follow window with keyboard focus
# none: don't follow anything
#
# "keyboard" needs a window manager that exports the
# _NET_ACTIVE_WINDOW property.
# This should be the case for almost all modern window managers.
#
# If this option is set to mouse or keyboard, the monitor option
# will be ignored.
follow = none
# Should a notification popped up from history be sticky or timeout
# as if it would normally do.
sticky_history = yes
# Maximum amount of notifications kept in history
history_length = 20
# Display indicators for URLs (U) and actions (A).
show_indicators = yes
# The spacing between lines. If the height is smaller than the
# font height, it will get raised to the font height.
line_height = 0
# The height of the entire notification. If the height is smaller
# than the font height and padding combined, it will be raised
# to the font height and padding.
notification_height = 0
# Draw a line of "separator_height" pixel height between two
# notifications.
# Set to 0 to disable.
separator_height = 2
# Padding between text and separator.
padding = 8
# Horizontal padding.
horizontal_padding = 8
# Define a color for the separator.
# possible values are:
# * auto: dunst tries to find a color fitting to the background;
# * foreground: use the same color as the foreground;
# * frame: use the same color as the frame;
# * anything else will be interpreted as a X color.
separator_color = frame
# Print a notification on startup.
# This is mainly for error detection, since dbus (re-)starts dunst
# automatically after a crash.
startup_notification = false
# dmenu path.
dmenu = /usr/bin/dmenu -p dunst:
# Browser for opening urls in context menu.
browser = /usr/bin/firefox -new-tab
# Align icons left/right/off
icon_position = off
# Paths to default icons.
icon_folders = /usr/share/icons/gnome/16x16/status/:/usr/share/icons/gnome/16x16/devices/
[frame]
width = 1
color = "#4C7899"
[shortcuts]
# Shortcuts are specified as [modifier+][modifier+]...key
# Available modifiers are "ctrl", "mod1" (the alt-key), "mod2",
# "mod3" and "mod4" (windows-key).
# Xev might be helpful to find names for keys.
# Close notification.
close = ctrl+space
# Close all notifications.
close_all = ctrl+shift+space
# Redisplay last message(s).
# On the US keyboard layout "grave" is normally above TAB and left
# of "1".
history = ctrl+section
# Context menu.
context = ctrl+shift+period
[urgency_low]
# IMPORTANT: colors have to be defined in quotation marks.
# Otherwise the "#" and following would be interpreted as a comment.
background = "#222222"
foreground = "#888888"
timeout = 10
[urgency_normal]
background = "#285577"
foreground = "#ffffff"
timeout = 10
[urgency_critical]
background = "#900000"
foreground = "#ffffff"
timeout = 0
# Every section that isn't one of the above is interpreted as a rules to
# override settings for certain messages.
# Messages can be matched by "appname", "summary", "body", "icon", "category",
# "msg_urgency" and you can override the "timeout", "urgency", "foreground",
# "background", "new_icon" and "format".
# Shell-like globbing will get expanded.
#
# SCRIPTING
# You can specify a script that gets run when the rule matches by
# setting the "script" option.
# The script will be called as follows:
# script appname summary body icon urgency
# where urgency can be "LOW", "NORMAL" or "CRITICAL".
#
# NOTE: if you don't want a notification to be displayed, set the format
# to "".
# NOTE: It might be helpful to run dunst -print in a terminal in order
# to find fitting options for rules.
#[espeak]
# summary = "*"
# script = dunst_espeak.sh
#[script-test]
# summary = "*script*"
# script = dunst_test.sh
#[ignore]
# # This notification will not be displayed
# summary = "foobar"
# format = ""
#[signed_on]
# appname = Pidgin
# summary = "*signed on*"
# urgency = low
#
#[signed_off]
# appname = Pidgin
# summary = *signed off*
# urgency = low
#
#[says]
# appname = Pidgin
# summary = *says*
# urgency = critical
#
#[twitter]
# appname = Pidgin
# summary = *twitter.com*
# urgency = normal
#
# vim: ft=cfg
[twitchnotifier]
appname = twitchnotifier
summary = is offline
urgency = normal
/etc/fonts/conf.avail/10-sub-pixel-rgb.conf
\ No newline at end of file
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<!-- Enable hinting -->
<edit name="hinting" mode="assign">
<bool>true</bool>
</edit>
<match target="font">
<edit name="antialias" mode="assign">
<bool>true</bool>
</edit>
</match>
<match target="font">
<edit name="hintstyle" mode="assign">
<const>hintfull</const>
</edit>
</match>
<match target="font">
<edit name="rgba" mode="assign">
<const>rgb</const>
</edit>
</match>
<match target="font">
<edit mode="assign" name="lcdfilter">
<const>lcddefault</const>
</edit>
</match>
</fontconfig>
, add volume -2
. add volume 2
p show-progress
r cycle-values loop "inf" "no"
h seek -5
l seek 5
shift+h seek -60
shift+l seek 60
##################
# video settings #
##################
# Specify default video driver (see --vo=help for a list).
vo=vdpau
# Start in fullscreen mode by default.
#fs=yes
# force starting with centered window
#geometry=50%:50%
# don't allow a new window to have a size larger than 90% of the screen size
#autofit-larger=90%x90%
# Disable the On Screen Controller (OSC).
osc=no
# Keep the player window on top of all other windows.
#ontop=yes
##################
# audio settings #
##################
# Specify default audio driver (see --ao=help for a list).
#ao=alsa
# Disable softvol usage, and always use the system mixer if available.
#softvol=no
# Scale audio tempo by playback speed without altering pitch. (By default does
# nothing if playback speed is not changed. May introduce artifacts.)
#af=scaletempo
# Output 5.1 audio natively, and upmix/downmix audio with a different format.
#audio-channels=5.1
# Disable any automatic remix, _if_ the audio output accepts the audio format.
# of the currently played file.
#audio-channels=empty
#Volume is too low
softvol-max=200
volume=100
##################
# other settings #
##################
# Pretend to be a web browser. Might fix playback with some streaming sites,
# but also will break with shoutcast streams.
#user-agent="Mozilla/5.0"
# cache settings
#
# Use 8MB input cache by default. The cache is enabled for network streams only.
#cache-default=8192
#
# Use 8MB input cache for everything, even local files.
#cache=8192
#
# If a seek is issued, and the target is 1024KB past the cached range, then
# keep reading until the seek target is hit, instead of doing a real seek.
#cache-seek-min=1024
#
# Disable the behavior that the player will pause if the cache goes below a
# certain fill size.
#cache-pause=no
#
# Read ahead about 5 seconds of audio and video packets.
#demuxer-readahead-secs=5.0
# Display English subtitles if available.
slang=
# Play Finnish audio if available, fall back to English otherwise.
#alang=fi,en
# Change subtitle encoding. For Arabic subtitles use 'cp1256'.
# If the file seems to be valid UTF-8, prefer UTF-8.
#sub-codepage=utf8:cp1256
# Enable hardware decoding if available. Often, this requires using an certain
# video output, otherwise no hardware decoding will be used.
#hwdec=auto
############
# Profiles #
############
# The options declared as part of profiles override global default settings,
# but only take effect when the profile is active.
# The following profile can be enabled on the command line with: --profile=vdpau
#[vdpau]
# The profile forces the vdpau VO.
vo=vdpau
# Use hardware decoding (this might break playback of some h264 files)
#hwdec=vdpau
# Most video filters do not work with hardware decoding.
#vf-clr=yes
# You can also include other configuration files.
#nclude=/path/to/the/file/you/want/to/include
# vdpau only works on 50% of files, then falls back to tearing. Simpler to set all to opengl-hq
vo=opengl-hq
-- Display some stats.
--
-- You can invoke the script with "i" by default or create a different key
-- binding in input.conf using "<yourkey> script_binding stats".
--
-- The style is configurable through a config file named "lua-settings/stats.conf"
-- located in your mpv directory.
--
-- Please note: not every property is always available and therefore not always
-- visible.
local options = require 'mp.options'
-- Options
local o = {
ass_formatting = true,
duration = 3,
debug = false,
-- Text style
font = "Source Sans Pro",
font_size = 11,
font_color = "FFFFFF",
border_size = 1.0,
border_color = "262626",
shadow_x_offset = 0.0,
shadow_y_offset = 0.0,
shadow_color = "000000",
alpha = "11",
-- Custom header for ASS tags to style the text output.
-- Specifying this will ignore the text style values above and just
-- use this string instead.
custom_header = "",
-- Text formatting
-- With ASS
nl = "\\N",
prop_indent = "\\h\\h\\h\\h\\h",
kv_sep = "\\h\\h",
b1 = "{\\b1}",
b0 = "{\\b0}",
-- Without ASS
no_ass_nl = "\n",
no_ass_prop_indent = "\t",
no_ass_kv_sep = " ",
no_ass_b1 = "\027[1m",
no_ass_b0 = "\027[0m",
}
options.read_options(o)
function main()
local stats = {
header = "",
file = "",
video = "",
audio = ""
}
o.ass_formatting = o.ass_formatting and has_vo_window()
if not o.ass_formatting then
o.nl = o.no_ass_nl
o.prop_indent = o.no_ass_prop_indent
o.kv_sep = o.no_ass_kv_sep
if not has_ansi() then
o.b1 = ""
o.b0 = ""
else
o.b1 = o.no_ass_b1
o.b0 = o.no_ass_b0
end
end
add_header(stats)
add_file(stats)
add_video(stats)
add_audio(stats)
mp.osd_message(join_stats(stats), o.duration)
end
function add_file(s)
local sec = "file"
s[sec] = ""
append_property(s, sec, "filename", {prefix="File:", nl="", indent=""})
append_property(s, sec, "metadata/title", {prefix="Title:"})
append_property(s, sec, "chapter", {prefix="Chapter:"})
if append_property(s, sec, "cache-used", {prefix="Cache:"}) then
append_property(s, sec, "demuxer-cache-duration",
{prefix="+", suffix=" sec", nl="", indent=o.kv_sep,
prefix_sep="", no_prefix_markup=true})
end
end
function add_video(s)
local sec = "video"
s[sec] = ""
if not has_video() then
return
end
if append_property(s, sec, "video-codec", {prefix="Video:", nl="", indent=""}) then
append_property(s, sec, "hwdec-active",
{prefix="(hwdec)", nl="", indent=" ",
no_prefix_markup=true, no_value=true},
{no=true})
end
append_property(s, sec, "avsync", {prefix="A-V:"})
if append_property(s, sec, "drop-frame-count", {prefix="Dropped:"}) then
append_property(s, sec, "vo-drop-frame-count", {prefix="VO:", nl=""})
append_property(s, sec, "vo-missed-frame-count", {prefix="Missed:", nl=""})
end
if append_property(s, sec, "fps", {prefix="FPS:", suffix=" (specified)"}) then
append_property(s, sec, "estimated-vf-fps",
{suffix=" (estimated)", nl="", indent=""})
else
append_property(s, sec, "estimated-vf-fps",
{prefix="FPS:", suffix=" (estimated)"})
end
if append_property(s, sec, "video-speed-correction", {prefix="DS:"}) then
append_property(s, sec, "audio-speed-correction",
{prefix="/", nl="", indent=" ", prefix_sep=" ", no_prefix_markup=true})
end
if append_property(s, sec, "video-params/w", {prefix="Native Resolution:"}) then
append_property(s, sec, "video-params/h",
{prefix="x", nl="", indent=" ", prefix_sep=" ", no_prefix_markup=true})
end
append_property(s, sec, "window-scale", {prefix="Window Scale:"})
append_property(s, sec, "video-params/aspect", {prefix="Aspect Ratio:"})
append_property(s, sec, "video-params/pixelformat", {prefix="Pixel format:"})
append_property(s, sec, "video-params/colormatrix", {prefix="Colormatrix:"})
append_property(s, sec, "video-params/primaries", {prefix="Primaries:"})
append_property(s, sec, "video-params/colorlevels", {prefix="Levels:"})
append_property(s, sec, "packet-video-bitrate", {prefix="Bitrate:", suffix=" kbps"})
end
function add_audio(s)
local sec = "audio"
s[sec] = ""
if not has_audio() then
return
end
append_property(s, sec, "audio-codec", {prefix="Audio:", nl="", indent=""})
append_property(s, sec, "audio-params/samplerate", {prefix="Sample Rate:", suffix=" Hz"})
append_property(s, sec, "audio-params/channel-count", {prefix="Channels:"})
append_property(s, sec, "packet-audio-bitrate", {prefix="Bitrate:", suffix=" kbps"})
end
function add_header(s)
if not o.ass_formatting then
s.header = ""
return
end
if o.custom_header and o.custom_header ~= "" then
s.header = set_ASS(true) .. o.custom_header
else
s.header = string.format("%s{\\fs%d}{\\fn%s}{\\bord%f}{\\3c&H%s&}{\\1c&H%s&}" ..
"{\\alpha&H%s&}{\\xshad%f}{\\yshad%f}{\\4c&H%s&}",
set_ASS(true), o.font_size, o.font, o.border_size,
o.border_color, o.font_color, o.alpha, o.shadow_x_offset,
o.shadow_y_offset, o.shadow_color)
end
end
-- Format and append a property.
-- A property whose value is either `nil` or empty (hereafter called "invalid")
-- is skipped and not appended.
-- Returns `false` in case nothing was appended, otherwise `true`.
--
-- s : Table containing key `sec`.
-- sec : Existing key in table `s`, value treated as a string.
-- property: The property to query and format (based on its OSD representation).
-- attr : Optional table to overwrite certain (formatting) attributes for
-- this property.
-- exclude : Optional table containing keys which are considered invalid values
-- for this property. Specifying this will replace empty string as
-- default invalid value (nil is always invalid).
function append_property(s, sec, prop, attr, excluded)
excluded = excluded or {[""] = true}
local ret = mp.get_property_osd(prop)
if not ret or excluded[ret] then
if o.debug then
print("No value for property: " .. prop)
end
return false
end
attr.prefix_sep = attr.prefix_sep or o.kv_sep
attr.indent = attr.indent or o.prop_indent
attr.nl = attr.nl or o.nl
attr.suffix = attr.suffix or ""
attr.prefix = attr.prefix or ""
attr.no_prefix_markup = attr.no_prefix_markup or false
attr.prefix = attr.no_prefix_markup and attr.prefix or b(attr.prefix)
ret = attr.no_value and "" or ret
s[sec] = string.format("%s%s%s%s%s%s%s", s[sec], attr.nl, attr.indent,
attr.prefix, attr.prefix_sep, no_ASS(ret), attr.suffix)
return true
end
function no_ASS(t)
return set_ASS(false) .. t .. set_ASS(true)
end
function set_ASS(b)
if not o.ass_formatting then
return ""
end
return mp.get_property_osd("osd-ass-cc/" .. (b and "0" or "1"))
end
function join_stats(s)
r = s.header .. s.file