commit eeaffdeefb7751e0be4c4f0ef2aa191b0aeafedb Author: Alex Hubbard Date: Sat Aug 13 00:26:11 2022 -0500 initial commit diff --git a/.config/Xresources b/.config/Xresources new file mode 100644 index 0000000..b2b5a3e --- /dev/null +++ b/.config/Xresources @@ -0,0 +1,214 @@ +Xft.autohint: 1 +Xft.antialias: 1 +Xft.hinting: true +Xft.hintstyle: hintslight +Xft.rgba: rgb +Xft.lcdfilter: lcddefault +Xcursor.theme: Adwaita + +! urxvt +urxvt.font: xft:mono:size=10:antialias=true:hinting=true +urxvt.url-launcher: /usr/bin/xdg-open +urxvt.matcher.button: 1 +urxvt.matcher.pattern.0: \\b([a-zA-Z]+:\/\/\\w[\\w-.@:]*|www\\.\\w[\\w-]*\\.\\w[\\w-.]*)(\/[^"' ()]*)? +urxvt.scrollBar: false +urxvt.termName: xterm-256color +urxvt.saveLines: 10000 +urxvt.inheritPixmap: true +urxvt.shading: 20 +urxvt.clipboard.autocopy: true +urxvt.perl-ext-common: default,selection-to-clipboard,pasta,matcher,keyboard-select,resize-font,font +urxvt.keysym.M-u: perl:url-select:select_next +urxvt.transparent: true +urxvt.buffered: true +urxvt.jumpScroll: false +urxvt.scrollTtyKeypress: true +urxvt.scrollTtyOutput: false +urxvt.scrollWithBuffer: false +urxvt.scrollstyle: plain +urxvt.secondaryScroll: false +urxvt.xftAntialias: true +!urxvt.color4: RoyalBlue +urxvt.matcher.rend.0: Bold fg6 +urxvt.cursorBlink: false +urxvt.cursorColor: #5f8fff +urxvt.mapAlert: true +urxvt.pointerBlank: true +urxvt.resource: value +urxvt.iso14755: false +urxvt.iso14755_52: false + +!xterm font +XTerm.vt100.faceName: mono:size=10 + +!st settings +*.font: mono:pixelsize=13 +*.borderpx: 2 +*.tabspaces: 4 +!cursorColor STRING, &colorname[258] }, +!termname STRING, &termname }, +!shell STRING, &shell }, +*.xfps: 30 +!actionfps INTEGER, &actionfps }, +!blinktimeout INTEGER, &blinktimeout }, +*.bellvolume: 100 !INTEGER, &bellvolume }, +!cwscale FLOAT, &cwscale }, +!chscale FLOAT &chscale }, + +!dmenu settings +dmenu.font : mono:pixelsize=13 + + +/*** COLOR SETTINGS ***/ + +!global colors +#define WHITE #ffffff +#define BLACK #000000 + +/* include color theme. theme can be set using ~/scripts/set_colors.sh*/ +#include "./color" + +!if COLOR15 is not defined, there is an error in ~/.config/colors. default to nord +#ifndef COLOR15 + +#define COLOR0 #3B4252 +#define COLOR1 #BF616A +#define COLOR2 #A3BE8C +#define COLOR3 #EBCB8B +#define COLOR4 #81A1C1 +#define COLOR5 #B48EAD +#define COLOR6 #88C0D0 +#define COLOR7 #E5E9F0 +#define COLOR8 #4C566A +#define COLOR9 #BF616A +#define COLOR10 #A3BE8C +#define COLOR11 #EBCB8B +#define COLOR12 #81A1C1 +#define COLOR13 #B48EAD +#define COLOR14 #8FBCBB +#define COLOR15 #ECEFF4 + +#define FOREGROUND #D8DEE9 +#define BACKGROUND #2E3440 + +#define DWM_NBDR COLOR13 +#define DWM_NBG BACKGROUND +#define DWM_NFG COLOR6 +#define DWM_SBDR WHITE +#define DWM_SBG #434C5E +#define DWM_SFG COLOR13 + +#endif + +/* DWM colors + * dwm.normbordercolor: border not currently selected + * dwm.normbgcolor: bg of top bar, bg of not selected tags, bg of dmenu + * dwm.normfgclolor: ??? + * dwm.selbordercolor: active window border color, color of selected entry in dmenu + * dwm.selbgcolor: selected tag color, color of section of top bar displaying window title + * dwm.selfgcolor: color of window title text, color of current tag indicator, + */ + +!source dwm colors from color pallete if not defined +#ifndef DWM_NBDR + #define DWM_NBDR COLOR8 +#endif +#ifndef DWM_NBG + #define DWM_NBG COLOR0 +#endif +#ifndef DWM_NFG + #define DWM_NFG COLOR15 +#endif +#ifndef DWM_SBDR + #define DWM_SBDR COLOR15 +#endif +#ifndef DWM_SBG + #define DWM_SBG COLOR2 +#endif +#ifndef DWM_FBG + #define DWM_FBG COLOR15 +#endif + +!source dmenu colors from color pallette if not defined +#ifndef DMENU_NBG + #define DMENU_NBG COLOR0 +#endif +#ifndef DMENU_NFG + #define DMENU_NFG COLOR15 +#endif +#ifndef DMENU_SBG + #define DMENU_SBG COLOR1 +#endif +#ifndef DMENU_SFG + #define DMENU_SFG COLOR15 +#endif + + +! 6 11 14 +#define AAAA COLOR6 + +#ifndef DMENU_SHFG + #define DMENU_SHFG AAAA +#endif + +#ifndef DMENU_SHBG + #define DMENU_SHBG COLOR1 +#endif + +#ifndef DMENU_NHFG + #define DMENU_NHFG AAAA +#endif + +#ifndef DMENU_NHBG + #define DMENU_NHBG COLOR0 +#endif + + +!source colors for BG and FG if not defined +#ifndef BACKGROUND + #define BACKGROUND COLOR0 +#endif +#ifndef FOREGROUND + #define FOREGROUND COLOR15 +#endif + + + +!set dwm colors defined in included file above +dwm.normbordercolor: DWM_NBDR +dwm.normbgcolor: DWM_NBG +dwm.normfgclolor: DWM_NFG +dwm.selbordercolor: DWM_SBDR +dwm.selbgcolor: DWM_SBG +dwm.selfgcolor: DWM_SFG + +!set dmenu colors defined in included file above +dmenu.background : DMENU_NBG +dmenu.foreground : DMENU_NFG +dmenu.selbackground : DMENU_SBG +dmenu.selforeground : DMENU_SFG + +dmenu.selhighlightfg : DMENU_SHFG +dmenu.selhighlightbg : DMENU_SHBG +dmenu.normhighlightfg : DMENU_NHFG +dmenu.normhighlightbg : DMENU_NHBG + +/* ST/Xterm colors */ +*.color0: COLOR0 +*.color1: COLOR1 +*.color2: COLOR2 +*.color3: COLOR3 +*.color4: COLOR4 +*.color5: COLOR5 +*.color6: COLOR6 +*.color7: COLOR7 +*.color8: COLOR8 +*.color9: COLOR9 +*.color10: COLOR10 +*.color11: COLOR11 +*.color12: COLOR12 +*.color13: COLOR13 +*.color14: COLOR14 +*.color15: COLOR15 +*.background: BACKGROUND +*.foreground: FOREGROUND diff --git a/.config/alacritty/alacritty.yml b/.config/alacritty/alacritty.yml new file mode 100644 index 0000000..476185a --- /dev/null +++ b/.config/alacritty/alacritty.yml @@ -0,0 +1,531 @@ +# Configuration for Alacritty, the GPU enhanced terminal emulator. + +# Any items in the `env` entry below will be added as +# environment variables. Some entries may override variables +# set by alacritty itself. +env: + # TERM variable + # + # This value is used to set the `$TERM` environment variable for + # each instance of Alacritty. If it is not present, alacritty will + # check the local terminfo database and use `alacritty` if it is + # available, otherwise `xterm-256color` is used. + TERM: xterm-256color + +window: + # Window dimensions (changes require restart) + # + # Specified in number of columns/lines, not pixels. + # If both are `0`, this setting is ignored. + #dimensions: + # columns: 0 + # lines: 0 + + # Window position (changes require restart) + # + # Specified in number of pixels. + # If the position is not set, the window manager will handle the placement. + #position: + # x: 0 + # y: 0 + + # Window padding (changes require restart) + # + # Blank space added around the window in pixels. This padding is scaled + # by DPI and the specified value is always added at both opposing sides. + padding: + x: 3 + y: 3 + + # Spread additional padding evenly around the terminal content. + #dynamic_padding: false + + # Window decorations + # + # Values for `decorations`: + # - full: Borders and title bar + # - none: Neither borders nor title bar + # + # Values for `decorations` (macOS only): + # - transparent: Title bar, transparent background and title bar buttons + # - buttonless: Title bar, transparent background, but no title bar buttons + decorations: none + + opacity: 0.98 + #opacity: 1 + + # Startup Mode (changes require restart) + # + # Values for `startup_mode`: + # - Windowed + # - Maximized + # - Fullscreen + # + # Values for `startup_mode` (macOS only): + # - SimpleFullscreen + #startup_mode: Windowed + + # Window title + #title: Alacritty + + # Window class (Linux/BSD only): + #class: + # Application instance name + #instance: Alacritty + # General application class + #general: Alacritty + + # GTK theme variant (Linux/BSD only) + # + # Override the variant of the GTK theme. Commonly supported values are `dark` and `light`. + # Set this to `None` to use the default theme variant. + #gtk_theme_variant: None + +#scrolling: + # Maximum number of lines in the scrollback buffer. + # Specifying '0' will disable scrolling. + #history: 10000 + + # Number of lines the viewport will move for every line scrolled when + # scrollback is enabled (history > 0). + #multiplier: 3 + + # Scroll to the bottom when new text is written to the terminal. + #auto_scroll: false + +# Spaces per Tab (changes require restart) +# +# This setting defines the width of a tab in cells. +# +# Some applications, like Emacs, rely on knowing about the width of a tab. +# To prevent unexpected behavior in these applications, it's also required to +# change the `it` value in terminfo when altering this setting. +#tabspaces: 8 + +# Font configuration +font: + # Normal (roman) font face + normal: + # Font family + # + # Default: + # - (macOS) Menlo + # - (Linux/BSD) monospace + # - (Windows) Consolas + family: monospace + + # The `style` can be specified to pick a specific face. + style: Regular + + # Bold font face + #bold: + # Font family + # + # If the bold family is not specified, it will fall back to the + # value specified for the normal font. + #family: monospace + + # The `style` can be specified to pick a specific face. + #style: Bold + + # Italic font face + #italic: + # Font family + # + # If the italic family is not specified, it will fall back to the + # value specified for the normal font. + #family: monospace + + # The `style` can be specified to pick a specific face. + #style: Italic + + # Bold italic font face + #bold_italic: + # Font family + # + # If the bold italic family is not specified, it will fall back to the + # value specified for the normal font. + #family: monospace + + # The `style` can be specified to pick a specific face. + #style: Bold Italic + + # Point size + size: 10.0 + + # Offset is the extra space around each character. `offset.y` can be thought of + # as modifying the line spacing, and `offset.x` as modifying the letter spacing. + #offset: + # x: 0 + # y: 0 + + # Glyph offset determines the locations of the glyphs within their cells with + # the default being at the bottom. Increasing `x` moves the glyph to the right, + # increasing `y` moves the glyph upwards. + #glyph_offset: + # x: 0 + # y: 0 + + # Thin stroke font rendering (macOS only) + # + # Thin strokes are suitable for retina displays, but for non-retina screens + # it is recommended to set `use_thin_strokes` to `false` + # + # macOS >= 10.14.x: + # + # If the font quality on non-retina display looks bad then set + # `use_thin_strokes` to `true` and enable font smoothing by running the + # following command: + # `defaults write -g CGFontRenderingFontSmoothingDisabled -bool NO` + # + # This is a global setting and will require a log out or restart to take + # effect. + #use_thin_strokes: true + +# If `true`, bold text is drawn using the bright color variants. +#draw_bold_text_with_bright_colors: true + +# Base16 Gruvbox dark, medium - alacritty color config +# Dawid Kurek (dawikur@gmail.com), morhetz (https://github.com/morhetz/gruvbox) +colors: + # Default colors + primary: + background: '0x282828' + foreground: '0xd5c4a1' + + # Colors the cursor will use if `custom_cursor_colors` is true + cursor: + text: '0x282828' + cursor: '0xd5c4a1' + + # Normal colors + normal: + black: '0x282828' + red: '0xfb4934' + green: '0xb8bb26' + yellow: '0xfabd2f' + blue: '0x83a598' + magenta: '0xd3869b' + cyan: '0x8ec07c' + white: '0xd5c4a1' + + # Bright colors + bright: + black: '0x665c54' + red: '0xfe8019' + green: '0x3c3836' + yellow: '0x504945' + blue: '0xbdae93' + magenta: '0xebdbb2' + cyan: '0xd65d0e' + white: '0xfbf1c7' + +draw_bold_text_with_bright_colors: false + +# Visual Bell +# +# Any time the BEL code is received, Alacritty "rings" the visual bell. Once +# rung, the terminal background will be set to white and transition back to the +# default background color. You can control the rate of this transition by +# setting the `duration` property (represented in milliseconds). You can also +# configure the transition function by setting the `animation` property. +# +# Values for `animation`: +# - Ease +# - EaseOut +# - EaseOutSine +# - EaseOutQuad +# - EaseOutCubic +# - EaseOutQuart +# - EaseOutQuint +# - EaseOutExpo +# - EaseOutCirc +# - Linear +# +# Specifying a `duration` of `0` will disable the visual bell. +#visual_bell: +# animation: EaseOutExpo +# duration: 0 +# color: '0xffffff' + +# Background opacity +# +# Window opacity as a floating point number from `0.0` to `1.0`. +# The value `0.0` is completely transparent and `1.0` is opaque. + + +#selection: + #semantic_escape_chars: ",│`|:\"' ()[]{}<>\t" + + # When set to `true`, selected text will be copied to the primary clipboard. + #save_to_clipboard: false + +# Allow terminal applications to change Alacritty's window title. +#dynamic_title: true + +#cursor: + # Cursor style + # + # Values for `style`: + # - ▇ Block + # - _ Underline + # - | Beam + #style: Block + + # If this is `true`, the cursor will be rendered as a hollow box when the + # window is not focused. + #unfocused_hollow: true + +# Live config reload (changes require restart) +#live_config_reload: true + +# Shell +# +# You can set `shell.program` to the path of your favorite shell, e.g. `/bin/fish`. +# Entries in `shell.args` are passed unmodified as arguments to the shell. +# +# Default: +# - (macOS) /bin/bash --login +# - (Linux/BSD) user login shell +# - (Windows) powershell +#shell: +# program: /bin/bash +# args: +# - --login + +# Startup directory +# +# Directory the shell is started in. If this is unset, or `None`, the working +# directory of the parent process will be used. +#working_directory: None + +# WinPTY backend (Windows only) +# +# Alacritty defaults to using the newer ConPTY backend if it is available, +# since it resolves a lot of bugs and is quite a bit faster. If it is not +# available, the the WinPTY backend will be used instead. +# +# Setting this option to `true` makes Alacritty use the legacy WinPTY backend, +# even if the ConPTY backend is available. +#winpty_backend: false + +# Send ESC (\x1b) before characters when alt is pressed. +#alt_send_esc: true + +#debug: + # Display the time it takes to redraw each frame. + #render_timer: false + + # Keep the log file after quitting Alacritty. + #persistent_logging: false + + # Log level + # + # Values for `log_level`: + # - None + # - Error + # - Warn + # - Info + # - Debug + # - Trace + #log_level: Warn + + # Print all received window events. + #print_events: false + + # Record all characters and escape sequences as test data. + #ref_test: false + +#mouse: + # Click settings + # + # The `double_click` and `triple_click` settings control the time + # alacritty should wait for accepting multiple clicks as one double + # or triple click. + #double_click: { threshold: 300 } + #triple_click: { threshold: 300 } + + # If this is `true`, the cursor is temporarily hidden when typing. + #hide_when_typing: false + + #url: + # URL launcher + # + # This program is executed when clicking on a text which is recognized as a URL. + # The URL is always added to the command as the last parameter. + # + # When set to `None`, URL launching will be disabled completely. + # + # Default: + # - (macOS) open + # - (Linux/BSD) xdg-open + # - (Windows) explorer + #launcher: + # program: xdg-open + # args: [] + + # URL modifiers + # + # These are the modifiers that need to be held down for opening URLs when clicking + # on them. The available modifiers are documented in the key binding section. + #modifiers: None + +# Mouse bindings +# +# Mouse bindings are specified as a list of objects, much like the key +# bindings further below. +# +# Each mouse binding will specify a: +# +# - `mouse`: +# +# - Middle +# - Left +# - Right +# - Numeric identifier such as `5` +# +# - `action` (see key bindings) +# +# And optionally: +# +# - `mods` (see key bindings) +#mouse_bindings: +# - { mouse: Middle, action: PasteSelection } + +# Key bindings +# +# Key bindings are specified as a list of objects. For example, this is the +# default paste binding: +# +# `- { key: V, mods: Control|Shift, action: Paste }` +# +# Each key binding will specify a: +# +# - `key`: Identifier of the key pressed +# +# - A-Z +# - F1-F24 +# - Key0-Key9 +# +# A full list with available key codes can be found here: +# https://docs.rs/glutin/*/glutin/event/enum.VirtualKeyCode.html#variants +# +# Instead of using the name of the keys, the `key` field also supports using +# the scancode of the desired key. Scancodes have to be specified as a +# decimal number. This command will allow you to display the hex scancodes +# for certain keys: +# +# `showkey --scancodes`. +# +# Then exactly one of: +# +# - `chars`: Send a byte sequence to the running application +# +# The `chars` field writes the specified string to the terminal. This makes +# it possible to pass escape sequences. To find escape codes for bindings +# like `PageUp` (`"\x1b[5~"`), you can run the command `showkey -a` outside +# of tmux. Note that applications use terminfo to map escape sequences back +# to keys. It is therefore required to update the terminfo when changing an +# escape sequence. +# +# - `action`: Execute a predefined action +# +# - Copy +# - Paste +# - PasteSelection +# - IncreaseFontSize +# - DecreaseFontSize +# - ResetFontSize +# - ScrollPageUp +# - ScrollPageDown +# - ScrollLineUp +# - ScrollLineDown +# - ScrollToTop +# - ScrollToBottom +# - ClearHistory +# - Hide +# - Minimize +# - Quit +# - ToggleFullscreen +# - SpawnNewInstance +# - ClearLogNotice +# - ReceiveChar +# - None +# +# (macOS only): +# - ToggleSimpleFullscreen: Enters fullscreen without occupying another space +# +# - `command`: Fork and execute a specified command plus arguments +# +# The `command` field must be a map containing a `program` string and an +# `args` array of command line parameter strings. For example: +# `{ program: "alacritty", args: ["-e", "vttest"] }` +# +# And optionally: +# +# - `mods`: Key modifiers to filter binding actions +# +# - Command +# - Control +# - Option +# - Super +# - Shift +# - Alt +# +# Multiple `mods` can be combined using `|` like this: +# `mods: Control|Shift`. +# Whitespace and capitalization are relevant and must match the example. +# +# - `mode`: Indicate a binding for only specific terminal reported modes +# +# This is mainly used to send applications the correct escape sequences +# when in different modes. +# +# - AppCursor +# - AppKeypad +# - Alt +# +# A `~` operator can be used before a mode to apply the binding whenever +# the mode is *not* active, e.g. `~Alt`. +# +# Bindings are always filled by default, but will be replaced when a new +# binding with the same triggers is defined. To unset a default binding, it can +# be mapped to the `ReceiveChar` action. Alternatively, you can use `None` for +# a no-op if you do not wish to receive input characters for that binding. +#key_bindings: + # (Windows, Linux, and BSD only) + #- { key: V, mods: Control|Shift, action: Paste } + #- { key: C, mods: Control|Shift, action: Copy } + #- { key: Insert, mods: Shift, action: PasteSelection } + #- { key: Key0, mods: Control, action: ResetFontSize } + #- { key: Equals, mods: Control, action: IncreaseFontSize } + #- { key: Add, mods: Control, action: IncreaseFontSize } + #- { key: Subtract, mods: Control, action: DecreaseFontSize } + #- { key: Minus, mods: Control, action: DecreaseFontSize } + + # (Windows only) + #- { key: Return, mods: Alt, action: ToggleFullscreen } + + # (macOS only) + #- { key: Key0, mods: Command, action: ResetFontSize } + #- { key: Equals, mods: Command, action: IncreaseFontSize } + #- { key: Add, mods: Command, action: IncreaseFontSize } + #- { key: Minus, mods: Command, action: DecreaseFontSize } + #- { key: K, mods: Command, action: ClearHistory } + #- { key: K, mods: Command, chars: "\x0c" } + #- { key: V, mods: Command, action: Paste } + #- { key: C, mods: Command, action: Copy } + #- { key: H, mods: Command, action: Hide } + #- { key: M, mods: Command, action: Minimize } + #- { key: Q, mods: Command, action: Quit } + #- { key: W, mods: Command, action: Quit } + #- { key: F, mods: Command|Control, action: ToggleFullscreen } + + #- { key: Paste, action: Paste } + #- { key: Copy, action: Copy } + #- { key: L, mods: Control, action: ClearLogNotice } + #- { key: L, mods: Control, chars: "\x0c" } + #- { key: PageUp, mods: Shift, action: ScrollPageUp, mode: ~Alt } + #- { key: PageDown, mods: Shift, action: ScrollPageDown, mode: ~Alt } + #- { key: Home, mods: Shift, action: ScrollToTop, mode: ~Alt } + #- { key: End, mods: Shift, action: ScrollToBottom, mode: ~Alt } diff --git a/.config/alacritty/colors/base16-atlas.yml b/.config/alacritty/colors/base16-atlas.yml new file mode 100644 index 0000000..0d3a4ea --- /dev/null +++ b/.config/alacritty/colors/base16-atlas.yml @@ -0,0 +1,36 @@ +# Base16 Atlas - alacritty color config +# Alex Lende (https://ajlende.com) +colors: + # Default colors + primary: + background: '0x002635' + foreground: '0xa1a19a' + + # Colors the cursor will use if `custom_cursor_colors` is true + cursor: + text: '0x002635' + cursor: '0xa1a19a' + + # Normal colors + normal: + black: '0x002635' + red: '0xff5a67' + green: '0x7fc06e' + yellow: '0xffcc1b' + blue: '0x5dd7b9' + magenta: '0x9a70a4' + cyan: '0x14747e' + white: '0xa1a19a' + + # Bright colors + bright: + black: '0x6c8b91' + red: '0xf08e48' + green: '0x00384d' + yellow: '0x517f8d' + blue: '0x869696' + magenta: '0xe6e6dc' + cyan: '0xc43060' + white: '0xfafaf8' + +draw_bold_text_with_bright_colors: false diff --git a/.config/alacritty/colors/base16-dracula.yml b/.config/alacritty/colors/base16-dracula.yml new file mode 100644 index 0000000..77dadfb --- /dev/null +++ b/.config/alacritty/colors/base16-dracula.yml @@ -0,0 +1,36 @@ +# Base16 Dracula - alacritty color config +# Mike Barkmin (http://github.com/mikebarkmin) based on Dracula Theme (http://github.com/dracula) +colors: + # Default colors + primary: + background: '0x282936' + foreground: '0xe9e9f4' + + # Colors the cursor will use if `custom_cursor_colors` is true + cursor: + text: '0x282936' + cursor: '0xe9e9f4' + + # Normal colors + normal: + black: '0x282936' + red: '0xea51b2' + green: '0xebff87' + yellow: '0x00f769' + blue: '0x62d6e8' + magenta: '0xb45bcf' + cyan: '0xa1efe4' + white: '0xe9e9f4' + + # Bright colors + bright: + black: '0x626483' + red: '0xb45bcf' + green: '0x3a3c4e' + yellow: '0x4d4f68' + blue: '0x62d6e8' + magenta: '0xf1f2f8' + cyan: '0x00f769' + white: '0xf7f7fb' + +draw_bold_text_with_bright_colors: false diff --git a/.config/alacritty/colors/base16-gruvbox-dark-soft-256.yml b/.config/alacritty/colors/base16-gruvbox-dark-soft-256.yml new file mode 100644 index 0000000..b5dc272 --- /dev/null +++ b/.config/alacritty/colors/base16-gruvbox-dark-soft-256.yml @@ -0,0 +1,42 @@ +# Base16 Gruvbox dark, soft 256 - alacritty color config +# Dawid Kurek (dawikur@gmail.com), morhetz (https://github.com/morhetz/gruvbox) +colors: + # Default colors + primary: + background: '0x32302f' + foreground: '0xd5c4a1' + + # Colors the cursor will use if `custom_cursor_colors` is true + cursor: + text: '0x32302f' + cursor: '0xd5c4a1' + + # Normal colors + normal: + black: '0x32302f' + red: '0xfb4934' + green: '0xb8bb26' + yellow: '0xfabd2f' + blue: '0x83a598' + magenta: '0xd3869b' + cyan: '0x8ec07c' + white: '0xd5c4a1' + + # Bright colors + bright: + black: '0x665c54' + red: '0xfb4934' + green: '0xb8bb26' + yellow: '0xfabd2f' + blue: '0x83a598' + magenta: '0xd3869b' + cyan: '0x8ec07c' + white: '0xfbf1c7' + + indexed_colors: + - { index: 16, color: '0xfe8019' } + - { index: 17, color: '0xd65d0e' } + - { index: 18, color: '0x3c3836' } + - { index: 19, color: '0x504945' } + - { index: 20, color: '0xbdae93' } + - { index: 21, color: '0xebdbb2' } diff --git a/.config/alacritty/colors/base16-gruvbox-dark-soft.yml b/.config/alacritty/colors/base16-gruvbox-dark-soft.yml new file mode 100644 index 0000000..85f9d0d --- /dev/null +++ b/.config/alacritty/colors/base16-gruvbox-dark-soft.yml @@ -0,0 +1,36 @@ +# Base16 Gruvbox dark, soft - alacritty color config +# Dawid Kurek (dawikur@gmail.com), morhetz (https://github.com/morhetz/gruvbox) +colors: + # Default colors + primary: + background: '0x32302f' + foreground: '0xd5c4a1' + + # Colors the cursor will use if `custom_cursor_colors` is true + cursor: + text: '0x32302f' + cursor: '0xd5c4a1' + + # Normal colors + normal: + black: '0x32302f' + red: '0xfb4934' + green: '0xb8bb26' + yellow: '0xfabd2f' + blue: '0x83a598' + magenta: '0xd3869b' + cyan: '0x8ec07c' + white: '0xd5c4a1' + + # Bright colors + bright: + black: '0x665c54' + red: '0xfe8019' + green: '0x3c3836' + yellow: '0x504945' + blue: '0xbdae93' + magenta: '0xebdbb2' + cyan: '0xd65d0e' + white: '0xfbf1c7' + +draw_bold_text_with_bright_colors: false diff --git a/.config/alacritty/colors/dracula b/.config/alacritty/colors/dracula new file mode 100644 index 0000000..0c69ceb --- /dev/null +++ b/.config/alacritty/colors/dracula @@ -0,0 +1,96 @@ +colors: + # Default colors + primary: + background: '0x282a36' + foreground: '0xf8f8f2' + + # Bright and dim foreground colors + # + # The dimmed foreground color is calculated automatically if it is not present. + # If the bright foreground color is not set, or `draw_bold_text_with_bright_colors` + # is `false`, the normal foreground color will be used. + #dim_foreground: '0x9a9a9a' + #bright_foreground: '0xffffff' + + # Cursor colors + # + # Colors which should be used to draw the terminal cursor. If these are unset, + # the cursor color will be the inverse of the cell color. + #cursor: + # text: '0x000000' + # cursor: '0xffffff' + + # Selection colors + # + # Colors which should be used to draw the selection area. If selection + # background is unset, selection color will be the inverse of the cell colors. + # If only text is unset the cell text color will remain the same. + #selection: + # text: '0xeaeaea' + # background: '0x404040' + + # Normal colors + #normal: + # black: '0x000000' + # red: '0xd54e53' + # green: '0xb9ca4a' + # yellow: '0xe6c547' + # blue: '0x7aa6da' + # magenta: '0xc397d8' + # cyan: '0x70c0ba' + # white: '0xeaeaea' + + # Bright colors + #bright: + # black: '0x666666' + # red: '0xff3334' + # green: '0x9ec400' + # yellow: '0xe7c547' + # blue: '0x7aa6da' + # magenta: '0xb77ee0' + # cyan: '0x54ced6' + # white: '0xffffff' + +#dracula + normal: + black: '0x000000' + red: '0xff5555' + green: '0x50fa7b' + yellow: '0xf1fa8c' + blue: '0xbd93f9' + magenta: '0xff79c6' + cyan: '0x8be9fd' + white: '0xbbbbbb' + bright: + black: '0x44475a' + red: '0xff5555' + green: '0x50fa7b' + yellow: '0xf1fa8c' + blue: '0xbd93f9' + magenta: '0xff79c6' + cyan: '0x8be9fd' + white: '0xffffff' + + # Dim colors + # + # If the dim colors are not set, they will be calculated automatically based + # on the `normal` colors. + #dim: + # black: '0x000000' + # red: '0x8c3336' + # green: '0x7a8530' + # yellow: '0x97822e' + # blue: '0x506d8f' + # magenta: '0x80638e' + # cyan: '0x497e7a' + # white: '0x9a9a9a' + + # Indexed Colors + # + # The indexed colors include all colors from 16 to 256. + # When these are not set, they're filled with sensible defaults. + # + # Example: + # `- { index: 16, color: '0xff00ff' }` + # + #indexed_colors: [] diff --git a/.config/aliasrc b/.config/aliasrc new file mode 100644 index 0000000..8c5c6b5 --- /dev/null +++ b/.config/aliasrc @@ -0,0 +1,66 @@ +#better commands +alias ls="ls -hN --color=auto --group-directories-first" +alias wget='wget --hsts-file ~/.config/wget/wget-hsts' + +#git +alias gs='git status | less' + +#xbps +#alias xi='sudo xbps-install' +#alias xq='xbps-query' +#alias xr='sudo xbps-remove' + +alias vim='nvim' +alias mbsync="mbsync -c $HOME/.config/mbsync/config" + +#alias setwp='wal -s -t -e -i ' + +#shortend commands +alias btc='bluetoothctl' + +#sfeed +alias sf='sfeed_curses ~/.local/share/sfeed/feeds/*' +alias sfu='sfeed_update ~/.config/sfeed/sfeedrc' +alias sfc='rm -r ~/.local/share/sfeed/feeds/*' +alias sfe='$EDITOR ~/.config/sfeed/sfeedrc' + + +#alias mocp='mocp -M ~/.config/moc/' #-T transparent-background' +#alias glrun='proot -r ~/.local/share/void-glibc -b /home/' +alias mpvyl='mpv --ytdl-format=18 ' + +#system power +alias poweroff='sudo poweroff' +alias reboot='sudo reboot' +alias shutdown='sudo shutdown' + +#programs +alias trc='tremc -c @192.168.1.162:9091' +alias pm='pulsemixer' + +#Youtube +alias yv='pipe-viewer --resolution=480p' +alias yd='youtube-dl' + +#dotfiles configuration alias +alias config='git --git-dir=$HOME/.cfg/ --work-tree=$HOME' + +alias chrome='firejail chromium --ozone-platform-hint=auto' + +note() { + NOTEFILE="$HOME/.cache/notes" + if [ "$#" -lt 1 ]; then + cat "$NOTEFILE" + elif [ "$1" = "-e" ]; then + $EDITOR "$NOTEFILE" + elif [ "$1" = "-h" ]; then + echo " usage: note this is a note" + echo " the line: \"this is a note\" is stored as a line in the file $NOTEFILE" + echo "" + echo " run this without arguments to view the contents of $NOTEFILE" + echo " -e -> edit note file with \$EDITOR" + echo " -h -> print this help menu" + else + echo "$@" >> "$NOTEFILE" + fi +} diff --git a/.config/bemenu/bemenu_opts.sh b/.config/bemenu/bemenu_opts.sh new file mode 100644 index 0000000..97d78ca --- /dev/null +++ b/.config/bemenu/bemenu_opts.sh @@ -0,0 +1,3 @@ +#!/bin/sh +#generated from: /home/alex/.config/bemenu/colors/base16-nord +export BEMENU_OPTS="-H 22 --nb #2E3440 --nf #EBCB8B --hb #2E3440 --hf #ECEFF4 --sb #3B4252 --sf #ECEFF4 --tb #2E3440 --tf #EBCB8B --fb #2E3440 --ff #ffffff" diff --git a/.config/bemenu/colors/base16-atlas b/.config/bemenu/colors/base16-atlas new file mode 100644 index 0000000..8ffb3a7 --- /dev/null +++ b/.config/bemenu/colors/base16-atlas @@ -0,0 +1,16 @@ +#002635 +#00384d +#517F8D +#6C8B91 +#869696 +#a1a19a +#e6e6dc +#fafaf8 +#ff5a67 +#f08e48 +#ffcc1b +#7fc06e +#14747e +#5dd7b9 +#9a70a4 +#c43060 diff --git a/.config/bemenu/colors/base16-gruvbox-dark-hard b/.config/bemenu/colors/base16-gruvbox-dark-hard new file mode 100644 index 0000000..79bba91 --- /dev/null +++ b/.config/bemenu/colors/base16-gruvbox-dark-hard @@ -0,0 +1,16 @@ +#1d2021 +#3c3836 +#504945 +#665c54 +#bdae93 +#d5c4a1 +#ebdbb2 +#fbf1c7 +#fb4934 +#fe8019 +#fabd2f +#b8bb26 +#8ec07c +#83a598 +#d3869b +#d65d0e diff --git a/.config/bemenu/colors/base16-nord b/.config/bemenu/colors/base16-nord new file mode 100644 index 0000000..f2fac45 --- /dev/null +++ b/.config/bemenu/colors/base16-nord @@ -0,0 +1,16 @@ +#2E3440 +#3B4252 +#434C5E +#4C566A +#D8DEE9 +#E5E9F0 +#ECEFF4 +#8FBCBB +#BF616A +#D08770 +#EBCB8B +#A3BE8C +#88C0D0 +#81A1C1 +#B48EAD +#5E81AC diff --git a/.config/colors/base16-atlas b/.config/colors/base16-atlas new file mode 100644 index 0000000..8ffb3a7 --- /dev/null +++ b/.config/colors/base16-atlas @@ -0,0 +1,16 @@ +#002635 +#00384d +#517F8D +#6C8B91 +#869696 +#a1a19a +#e6e6dc +#fafaf8 +#ff5a67 +#f08e48 +#ffcc1b +#7fc06e +#14747e +#5dd7b9 +#9a70a4 +#c43060 diff --git a/.config/colors/base16-gruvbox-dark-hard b/.config/colors/base16-gruvbox-dark-hard new file mode 100644 index 0000000..79bba91 --- /dev/null +++ b/.config/colors/base16-gruvbox-dark-hard @@ -0,0 +1,16 @@ +#1d2021 +#3c3836 +#504945 +#665c54 +#bdae93 +#d5c4a1 +#ebdbb2 +#fbf1c7 +#fb4934 +#fe8019 +#fabd2f +#b8bb26 +#8ec07c +#83a598 +#d3869b +#d65d0e diff --git a/.config/colors/base16-nord b/.config/colors/base16-nord new file mode 100644 index 0000000..f2fac45 --- /dev/null +++ b/.config/colors/base16-nord @@ -0,0 +1,16 @@ +#2E3440 +#3B4252 +#434C5E +#4C566A +#D8DEE9 +#E5E9F0 +#ECEFF4 +#8FBCBB +#BF616A +#D08770 +#EBCB8B +#A3BE8C +#88C0D0 +#81A1C1 +#B48EAD +#5E81AC diff --git a/.config/fontconfig/fonts.conf b/.config/fontconfig/fonts.conf new file mode 100644 index 0000000..3bef0ce --- /dev/null +++ b/.config/fontconfig/fonts.conf @@ -0,0 +1,76 @@ + + + + + + + Serif + Linux Libertine + + + sans-serif + Linux Biolinum + + + sans + Linux Biolinum + + + monospace + Mononoki Nerd Font + + + + + + Arial + + Linux Biolinum + + + + Helvetica + + Linux Biolinum + + + + Verdana + + Linux Biolinum + + + + Tahoma + + Linux Biolinum + + + + + Comic Sans MS + + Linux Biolinum + + + + Times New Roman + + Linux Libertine + + + + Times + + Linux Libertine + + + + Courier New + + Mononoki Nerd Font + + + + + diff --git a/.config/gtk-2.0/gtkfilechooser.ini b/.config/gtk-2.0/gtkfilechooser.ini new file mode 100644 index 0000000..a112f7c --- /dev/null +++ b/.config/gtk-2.0/gtkfilechooser.ini @@ -0,0 +1,11 @@ +[Filechooser Settings] +LocationMode=path-bar +ShowHidden=true +ShowSizeColumn=true +GeometryX=512 +GeometryY=194 +GeometryWidth=792 +GeometryHeight=702 +SortColumn=name +SortOrder=ascending +StartupMode=recent diff --git a/.config/gtk-2.0/gtkrc-2.0 b/.config/gtk-2.0/gtkrc-2.0 new file mode 100644 index 0000000..b68bf34 --- /dev/null +++ b/.config/gtk-2.0/gtkrc-2.0 @@ -0,0 +1,19 @@ +# DO NOT EDIT! This file will be overwritten by LXAppearance. +# Any customization should be done in ~/.gtkrc-2.0.mine instead. + +include "/home/alex/.gtkrc-2.0.mine" +gtk-theme-name="Nordic-standard-buttons" +gtk-icon-theme-name="Papirus-Dark" +gtk-font-name="Sans 10" +gtk-cursor-theme-name="Adwaita" +gtk-cursor-theme-size=0 +gtk-toolbar-style=GTK_TOOLBAR_BOTH +gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR +gtk-button-images=1 +gtk-menu-images=1 +gtk-enable-event-sounds=1 +gtk-enable-input-feedback-sounds=1 +gtk-xft-antialias=1 +gtk-xft-hinting=1 +gtk-xft-hintstyle="hintslight" +gtk-xft-rgba="rgb" diff --git a/.config/gtk-3.0/settings.ini b/.config/gtk-3.0/settings.ini new file mode 100644 index 0000000..259da03 --- /dev/null +++ b/.config/gtk-3.0/settings.ini @@ -0,0 +1,16 @@ +[Settings] +gtk-theme-name=Nordic-standard-buttons +gtk-icon-theme-name=Papirus-Dark +gtk-font-name=Sans 10 +gtk-cursor-theme-size=0 +gtk-toolbar-style=GTK_TOOLBAR_ICONS +gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR +gtk-button-images=1 +gtk-menu-images=0 +gtk-enable-event-sounds=1 +gtk-enable-input-feedback-sounds=1 +gtk-xft-antialias=1 +gtk-xft-hinting=1 +gtk-xft-hintstyle=hintslight +gtk-xft-rgba=rgb +gtk-cursor-theme-name=Adwaita diff --git a/.config/inputrc b/.config/inputrc new file mode 100644 index 0000000..55e23de --- /dev/null +++ b/.config/inputrc @@ -0,0 +1 @@ +$include /etc/inputrc diff --git a/.config/kitty/kitty.conf b/.config/kitty/kitty.conf new file mode 100644 index 0000000..66f8c9c --- /dev/null +++ b/.config/kitty/kitty.conf @@ -0,0 +1,1337 @@ +# vim:fileencoding=utf-8:ft=conf:foldmethod=marker + +#: Fonts {{{ + +#: kitty has very powerful font management. You can configure +#: individual font faces and even specify special fonts for particular +#: characters. + +font_family monospace +bold_font auto +italic_font auto +bold_italic_font auto + +#: You can specify different fonts for the bold/italic/bold-italic +#: variants. To get a full list of supported fonts use the `kitty +#: list-fonts` command. By default they are derived automatically, by +#: the OSes font system. Setting them manually is useful for font +#: families that have many weight variants like Book, Medium, Thick, +#: etc. For example:: + +#: font_family Operator Mono Book +#: bold_font Operator Mono Medium +#: italic_font Operator Mono Book Italic +#: bold_italic_font Operator Mono Medium Italic + +font_size 10.0 + +#: Font size (in pts) + +force_ltr no + +#: kitty does not support BIDI (bidirectional text), however, for RTL +#: scripts, words are automatically displayed in RTL. That is to say, +#: in an RTL script, the words "HELLO WORLD" display in kitty as +#: "WORLD HELLO", and if you try to select a substring of an RTL- +#: shaped string, you will get the character that would be there had +#: the the string been LTR. For example, assuming the Hebrew word +#: ירושלים, selecting the character that on the screen appears to be ם +#: actually writes into the selection buffer the character י. + +#: kitty's default behavior is useful in conjunction with a filter to +#: reverse the word order, however, if you wish to manipulate RTL +#: glyphs, it can be very challenging to work with, so this option is +#: provided to turn it off. Furthermore, this option can be used with +#: the command line program GNU FriBidi +#: to get BIDI +#: support, because it will force kitty to always treat the text as +#: LTR, which FriBidi expects for terminals. + +adjust_line_height 0 +adjust_column_width 0 + +#: Change the size of each character cell kitty renders. You can use +#: either numbers, which are interpreted as pixels or percentages +#: (number followed by %), which are interpreted as percentages of the +#: unmodified values. You can use negative pixels or percentages less +#: than 100% to reduce sizes (but this might cause rendering +#: artifacts). + +# symbol_map U+E0A0-U+E0A3,U+E0C0-U+E0C7 PowerlineSymbols + +#: Map the specified unicode codepoints to a particular font. Useful +#: if you need special rendering for some symbols, such as for +#: Powerline. Avoids the need for patched fonts. Each unicode code +#: point is specified in the form U+. You +#: can specify multiple code points, separated by commas and ranges +#: separated by hyphens. symbol_map itself can be specified multiple +#: times. Syntax is:: + +#: symbol_map codepoints Font Family Name + +disable_ligatures never + +#: Choose how you want to handle multi-character ligatures. The +#: default is to always render them. You can tell kitty to not render +#: them when the cursor is over them by using cursor to make editing +#: easier, or have kitty never render them at all by using always, if +#: you don't like them. The ligature strategy can be set per-window +#: either using the kitty remote control facility or by defining +#: shortcuts for it in kitty.conf, for example:: + +#: map alt+1 disable_ligatures_in active always +#: map alt+2 disable_ligatures_in all never +#: map alt+3 disable_ligatures_in tab cursor + +#: Note that this refers to programming ligatures, typically +#: implemented using the calt OpenType feature. For disabling general +#: ligatures, use the font_features setting. + +font_features none + +#: Choose exactly which OpenType features to enable or disable. This +#: is useful as some fonts might have features worthwhile in a +#: terminal. For example, Fira Code Retina includes a discretionary +#: feature, zero, which in that font changes the appearance of the +#: zero (0), to make it more easily distinguishable from Ø. Fira Code +#: Retina also includes other discretionary features known as +#: Stylistic Sets which have the tags ss01 through ss20. + +#: Note that this code is indexed by PostScript name, and not the font +#: family. This allows you to define very precise feature settings; +#: e.g. you can disable a feature in the italic font but not in the +#: regular font. + +#: On Linux, these are read from the FontConfig database first and +#: then this, setting is applied, so they can be configured in a +#: single, central place. + +#: To get the PostScript name for a font, use kitty + list-fonts +#: --psnames: + +#: .. code-block:: sh + +#: $ kitty + list-fonts --psnames | grep Fira +#: Fira Code +#: Fira Code Bold (FiraCode-Bold) +#: Fira Code Light (FiraCode-Light) +#: Fira Code Medium (FiraCode-Medium) +#: Fira Code Regular (FiraCode-Regular) +#: Fira Code Retina (FiraCode-Retina) + +#: The part in brackets is the PostScript name. + +#: Enable alternate zero and oldstyle numerals:: + +#: font_features FiraCode-Retina +zero +onum + +#: Enable only alternate zero:: + +#: font_features FiraCode-Retina +zero + +#: Disable the normal ligatures, but keep the calt feature which (in +#: this font) breaks up monotony:: + +#: font_features TT2020StyleB-Regular -liga +calt + +#: In conjunction with force_ltr, you may want to disable Arabic +#: shaping entirely, and only look at their isolated forms if they +#: show up in a document. You can do this with e.g.:: + +#: font_features UnifontMedium +isol -medi -fina -init + +box_drawing_scale 0.001, 1, 1.5, 2 + +#: Change the sizes of the lines used for the box drawing unicode +#: characters These values are in pts. They will be scaled by the +#: monitor DPI to arrive at a pixel value. There must be four values +#: corresponding to thin, normal, thick, and very thick lines. + +#: }}} + +#: Cursor customization {{{ + +cursor #cccccc + +#: Default cursor color + +cursor_text_color #111111 + +#: Choose the color of text under the cursor. If you want it rendered +#: with the background color of the cell underneath instead, use the +#: special keyword: background + +cursor_shape block + +#: The cursor shape can be one of (block, beam, underline) + +cursor_beam_thickness 1.5 + +#: Defines the thickness of the beam cursor (in pts) + +cursor_underline_thickness 2.0 + +#: Defines the thickness of the underline cursor (in pts) + +cursor_blink_interval -1 + +#: The interval (in seconds) at which to blink the cursor. Set to zero +#: to disable blinking. Negative values mean use system default. Note +#: that numbers smaller than repaint_delay will be limited to +#: repaint_delay. + +cursor_stop_blinking_after 15.0 + +#: Stop blinking cursor after the specified number of seconds of +#: keyboard inactivity. Set to zero to never stop blinking. + +#: }}} + +#: Scrollback {{{ + +scrollback_lines 2000 + +#: Number of lines of history to keep in memory for scrolling back. +#: Memory is allocated on demand. Negative numbers are (effectively) +#: infinite scrollback. Note that using very large scrollback is not +#: recommended as it can slow down performance of the terminal and +#: also use large amounts of RAM. Instead, consider using +#: scrollback_pager_history_size. + +scrollback_pager less --chop-long-lines --RAW-CONTROL-CHARS +INPUT_LINE_NUMBER + +#: Program with which to view scrollback in a new window. The +#: scrollback buffer is passed as STDIN to this program. If you change +#: it, make sure the program you use can handle ANSI escape sequences +#: for colors and text formatting. INPUT_LINE_NUMBER in the command +#: line above will be replaced by an integer representing which line +#: should be at the top of the screen. Similarly CURSOR_LINE and +#: CURSOR_COLUMN will be replaced by the current cursor position. + +scrollback_pager_history_size 0 + +#: Separate scrollback history size, used only for browsing the +#: scrollback buffer (in MB). This separate buffer is not available +#: for interactive scrolling but will be piped to the pager program +#: when viewing scrollback buffer in a separate window. The current +#: implementation stores the data in UTF-8, so approximatively 10000 +#: lines per megabyte at 100 chars per line, for pure ASCII text, +#: unformatted text. A value of zero or less disables this feature. +#: The maximum allowed size is 4GB. + +wheel_scroll_multiplier 5.0 + +#: Modify the amount scrolled by the mouse wheel. Note this is only +#: used for low precision scrolling devices, not for high precision +#: scrolling on platforms such as macOS and Wayland. Use negative +#: numbers to change scroll direction. + +touch_scroll_multiplier 1.0 + +#: Modify the amount scrolled by a touchpad. Note this is only used +#: for high precision scrolling devices on platforms such as macOS and +#: Wayland. Use negative numbers to change scroll direction. + +#: }}} + +#: Mouse {{{ + +mouse_hide_wait 3.0 + +#: Hide mouse cursor after the specified number of seconds of the +#: mouse not being used. Set to zero to disable mouse cursor hiding. +#: Set to a negative value to hide the mouse cursor immediately when +#: typing text. Disabled by default on macOS as getting it to work +#: robustly with the ever-changing sea of bugs that is Cocoa is too +#: much effort. + +url_color #0087bd +url_style curly + +#: The color and style for highlighting URLs on mouse-over. url_style +#: can be one of: none, single, double, curly + +open_url_modifiers kitty_mod + +#: The modifier keys to press when clicking with the mouse on URLs to +#: open the URL + +open_url_with default + +#: The program with which to open URLs that are clicked on. The +#: special value default means to use the operating system's default +#: URL handler. + +url_prefixes http https file ftp + +#: The set of URL prefixes to look for when detecting a URL under the +#: mouse cursor. + +detect_urls yes + +#: Detect URLs under the mouse. Detected URLs are highlighted with an +#: underline and the mouse cursor becomes a hand over them. Even if +#: this option is disabled, URLs are still clickable. + +copy_on_select no + +#: Copy to clipboard or a private buffer on select. With this set to +#: clipboard, simply selecting text with the mouse will cause the text +#: to be copied to clipboard. Useful on platforms such as macOS that +#: do not have the concept of primary selections. You can instead +#: specify a name such as a1 to copy to a private kitty buffer +#: instead. Map a shortcut with the paste_from_buffer action to paste +#: from this private buffer. For example:: + +#: map cmd+shift+v paste_from_buffer a1 + +#: Note that copying to the clipboard is a security risk, as all +#: programs, including websites open in your browser can read the +#: contents of the system clipboard. + +strip_trailing_spaces never + +#: Remove spaces at the end of lines when copying to clipboard. A +#: value of smart will do it when using normal selections, but not +#: rectangle selections. always will always do it. + +rectangle_select_modifiers ctrl+alt + +#: The modifiers to use rectangular selection (i.e. to select text in +#: a rectangular block with the mouse) + +terminal_select_modifiers shift + +#: The modifiers to override mouse selection even when a terminal +#: application has grabbed the mouse + +select_by_word_characters @-./_~?&=%+# + +#: Characters considered part of a word when double clicking. In +#: addition to these characters any character that is marked as an +#: alphanumeric character in the unicode database will be matched. + +click_interval -1.0 + +#: The interval between successive clicks to detect double/triple +#: clicks (in seconds). Negative numbers will use the system default +#: instead, if available, or fallback to 0.5. + +focus_follows_mouse no + +#: Set the active window to the window under the mouse when moving the +#: mouse around + +pointer_shape_when_grabbed arrow + +#: The shape of the mouse pointer when the program running in the +#: terminal grabs the mouse. Valid values are: arrow, beam and hand + +default_pointer_shape beam + +#: The default shape of the mouse pointer. Valid values are: arrow, +#: beam and hand + +pointer_shape_when_dragging beam + +#: The default shape of the mouse pointer when dragging across text. +#: Valid values are: arrow, beam and hand + +#: }}} + +#: Performance tuning {{{ + +repaint_delay 10 + +#: Delay (in milliseconds) between screen updates. Decreasing it, +#: increases frames-per-second (FPS) at the cost of more CPU usage. +#: The default value yields ~100 FPS which is more than sufficient for +#: most uses. Note that to actually achieve 100 FPS you have to either +#: set sync_to_monitor to no or use a monitor with a high refresh +#: rate. Also, to minimize latency when there is pending input to be +#: processed, repaint_delay is ignored. + +input_delay 3 + +#: Delay (in milliseconds) before input from the program running in +#: the terminal is processed. Note that decreasing it will increase +#: responsiveness, but also increase CPU usage and might cause flicker +#: in full screen programs that redraw the entire screen on each loop, +#: because kitty is so fast that partial screen updates will be drawn. + +sync_to_monitor yes + +#: Sync screen updates to the refresh rate of the monitor. This +#: prevents tearing (https://en.wikipedia.org/wiki/Screen_tearing) +#: when scrolling. However, it limits the rendering speed to the +#: refresh rate of your monitor. With a very high speed mouse/high +#: keyboard repeat rate, you may notice some slight input latency. If +#: so, set this to no. + +#: }}} + +#: Terminal bell {{{ + +enable_audio_bell yes + +#: Enable/disable the audio bell. Useful in environments that require +#: silence. + +visual_bell_duration 0.0 + +#: Visual bell duration. Flash the screen when a bell occurs for the +#: specified number of seconds. Set to zero to disable. + +window_alert_on_bell yes + +#: Request window attention on bell. Makes the dock icon bounce on +#: macOS or the taskbar flash on linux. + +bell_on_tab yes + +#: Show a bell symbol on the tab if a bell occurs in one of the +#: windows in the tab and the window is not the currently focused +#: window + +command_on_bell none + +#: Program to run when a bell occurs. + +#: }}} + +#: Window layout {{{ + +remember_window_size yes +initial_window_width 640 +initial_window_height 400 + +#: If enabled, the window size will be remembered so that new +#: instances of kitty will have the same size as the previous +#: instance. If disabled, the window will initially have size +#: configured by initial_window_width/height, in pixels. You can use a +#: suffix of "c" on the width/height values to have them interpreted +#: as number of cells instead of pixels. + +enabled_layouts * + +#: The enabled window layouts. A comma separated list of layout names. +#: The special value all means all layouts. The first listed layout +#: will be used as the startup layout. Default configuration is all +#: layouts in alphabetical order. For a list of available layouts, see +#: the https://sw.kovidgoyal.net/kitty/index.html#layouts. + +window_resize_step_cells 2 +window_resize_step_lines 2 + +#: The step size (in units of cell width/cell height) to use when +#: resizing windows. The cells value is used for horizontal resizing +#: and the lines value for vertical resizing. + +window_border_width 0.5pt + +#: The width of window borders. Can be either in pixels (px) or pts +#: (pt). Values in pts will be rounded to the nearest number of pixels +#: based on screen resolution. If not specified the unit is assumed to +#: be pts. Note that borders are displayed only when more than one +#: window is visible. They are meant to separate multiple windows. + +draw_minimal_borders yes + +#: Draw only the minimum borders needed. This means that only the +#: minimum needed borders for inactive windows are drawn. That is only +#: the borders that separate the inactive window from a neighbor. Note +#: that setting a non-zero window margin overrides this and causes all +#: borders to be drawn. + +window_margin_width 0 + +#: The window margin (in pts) (blank area outside the border). A +#: single value sets all four sides. Two values set the vertical and +#: horizontal sides. Three values set top, horizontal and bottom. Four +#: values set top, right, bottom and left. + +single_window_margin_width -1 + +#: The window margin (in pts) to use when only a single window is +#: visible. Negative values will cause the value of +#: window_margin_width to be used instead. A single value sets all +#: four sides. Two values set the vertical and horizontal sides. Three +#: values set top, horizontal and bottom. Four values set top, right, +#: bottom and left. + +window_padding_width 0 + +#: The window padding (in pts) (blank area between the text and the +#: window border). A single value sets all four sides. Two values set +#: the vertical and horizontal sides. Three values set top, horizontal +#: and bottom. Four values set top, right, bottom and left. + +placement_strategy center + +#: When the window size is not an exact multiple of the cell size, the +#: cell area of the terminal window will have some extra padding on +#: the sides. You can control how that padding is distributed with +#: this option. Using a value of center means the cell area will be +#: placed centrally. A value of top-left means the padding will be on +#: only the bottom and right edges. + +active_border_color #00ff00 + +#: The color for the border of the active window. Set this to none to +#: not draw borders around the active window. + +inactive_border_color #cccccc + +#: The color for the border of inactive windows + +bell_border_color #ff5a00 + +#: The color for the border of inactive windows in which a bell has +#: occurred + +inactive_text_alpha 1.0 + +#: Fade the text in inactive windows by the specified amount (a number +#: between zero and one, with zero being fully faded). + +hide_window_decorations no + +#: Hide the window decorations (title-bar and window borders) with +#: yes. On macOS, titlebar-only can be used to only hide the titlebar. +#: Whether this works and exactly what effect it has depends on the +#: window manager/operating system. + +resize_debounce_time 0.1 + +#: The time (in seconds) to wait before redrawing the screen when a +#: resize event is received. On platforms such as macOS, where the +#: operating system sends events corresponding to the start and end of +#: a resize, this number is ignored. + +resize_draw_strategy static + +#: Choose how kitty draws a window while a resize is in progress. A +#: value of static means draw the current window contents, mostly +#: unchanged. A value of scale means draw the current window contents +#: scaled. A value of blank means draw a blank window. A value of size +#: means show the window size in cells. + +resize_in_steps no + +#: Resize the OS window in steps as large as the cells, instead of +#: with the usual pixel accuracy. Combined with an +#: initial_window_width and initial_window_height in number of cells, +#: this option can be used to keep the margins as small as possible +#: when resizing the OS window. Note that this does not currently work +#: on Wayland. + +confirm_os_window_close 0 + +#: Ask for confirmation when closing an OS window or a tab that has at +#: least this number of kitty windows in it. A value of zero disables +#: confirmation. This confirmation also applies to requests to quit +#: the entire application (all OS windows, via the quit action). + +#: }}} + +#: Tab bar {{{ + +tab_bar_edge bottom + +#: Which edge to show the tab bar on, top or bottom + +tab_bar_margin_width 0.0 + +#: The margin to the left and right of the tab bar (in pts) + +tab_bar_style fade + +#: The tab bar style, can be one of: fade, separator, powerline, or +#: hidden. In the fade style, each tab's edges fade into the +#: background color, in the separator style, tabs are separated by a +#: configurable separator, and the powerline shows the tabs as a +#: continuous line. If you use the hidden style, you might want to +#: create a mapping for the select_tab action which presents you with +#: a list of tabs and allows for easy switching to a tab. + +tab_bar_min_tabs 2 + +#: The minimum number of tabs that must exist before the tab bar is +#: shown + +tab_switch_strategy previous + +#: The algorithm to use when switching to a tab when the current tab +#: is closed. The default of previous will switch to the last used +#: tab. A value of left will switch to the tab to the left of the +#: closed tab. A value of right will switch to the tab to the right of +#: the closed tab. A value of last will switch to the right-most tab. + +tab_fade 0.25 0.5 0.75 1 + +#: Control how each tab fades into the background when using fade for +#: the tab_bar_style. Each number is an alpha (between zero and one) +#: that controls how much the corresponding cell fades into the +#: background, with zero being no fade and one being full fade. You +#: can change the number of cells used by adding/removing entries to +#: this list. + +tab_separator " ┇" + +#: The separator between tabs in the tab bar when using separator as +#: the tab_bar_style. + +tab_activity_symbol none + +#: Some text or a unicode symbol to show on the tab if a window in the +#: tab that does not have focus has some activity. + +tab_title_template "{title}" + +#: A template to render the tab title. The default just renders the +#: title. If you wish to include the tab-index as well, use something +#: like: {index}: {title}. Useful if you have shortcuts mapped for +#: goto_tab N. In addition you can use {layout_name} for the current +#: layout name and {num_windows} for the number of windows in the tab. +#: Note that formatting is done by Python's string formatting +#: machinery, so you can use, for instance, {layout_name[:2].upper()} +#: to show only the first two letters of the layout name, upper-cased. +#: If you want to style the text, you can use styling directives, for +#: example: {fmt.fg.red}red{fmt.fg.default}normal{fmt.bg._00FF00}green +#: bg{fmt.bg.normal}. Similarly, for bold and italic: +#: {fmt.bold}bold{fmt.nobold}normal{fmt.italic}italic{fmt.noitalic}. + +active_tab_title_template none + +#: Template to use for active tabs, if not specified falls back to +#: tab_title_template. + +active_tab_foreground #000 +active_tab_background #eee +active_tab_font_style bold-italic +inactive_tab_foreground #444 +inactive_tab_background #999 +inactive_tab_font_style normal + +#: Tab bar colors and styles + +tab_bar_background none + +#: Background color for the tab bar. Defaults to using the terminal +#: background color. + +#: }}} + +#: Color scheme {{{ + +foreground #e9e9f4 +background #282936 + +#: The foreground and background colors + +background_opacity 0.9 + +#: The opacity of the background. A number between 0 and 1, where 1 is +#: opaque and 0 is fully transparent. This will only work if +#: supported by the OS (for instance, when using a compositor under +#: X11). Note that it only sets the background color's opacity in +#: cells that have the same background color as the default terminal +#: background. This is so that things like the status bar in vim, +#: powerline prompts, etc. still look good. But it means that if you +#: use a color theme with a background color in your editor, it will +#: not be rendered as transparent. Instead you should change the +#: default background color in your kitty config and not use a +#: background color in the editor color scheme. Or use the escape +#: codes to set the terminals default colors in a shell script to +#: launch your editor. Be aware that using a value less than 1.0 is a +#: (possibly significant) performance hit. If you want to dynamically +#: change transparency of windows set dynamic_background_opacity to +#: yes (this is off by default as it has a performance cost) + +background_image none + +#: Path to a background image. Must be in PNG format. + +background_image_layout tiled + +#: Whether to tile or scale the background image. + +background_image_linear no + +#: When background image is scaled, whether linear interpolation +#: should be used. + +dynamic_background_opacity no + +#: Allow changing of the background_opacity dynamically, using either +#: keyboard shortcuts (increase_background_opacity and +#: decrease_background_opacity) or the remote control facility. + +background_tint 0.0 + +#: How much to tint the background image by the background color. The +#: tint is applied only under the text area, not margin/borders. Makes +#: it easier to read the text. Tinting is done using the current +#: background color for each window. This setting applies only if +#: background_opacity is set and transparent windows are supported or +#: background_image is set. + +dim_opacity 0.75 + +#: How much to dim text that has the DIM/FAINT attribute set. One +#: means no dimming and zero means fully dimmed (i.e. invisible). + +selection_foreground #000000 + +#: The foreground for text selected with the mouse. A value of none +#: means to leave the color unchanged. + +selection_background #fffacd + +#: The background for text selected with the mouse. + + +#: The 256 terminal colors. There are 8 basic colors, each color has a +#: dull and bright version, for the first 16 colors. You can set the +#: remaining 240 colors as color16 to color255. + +#color0 #000000 +#color8 #767676 + +#: black + +#color1 #cc0403 +#color9 #f2201f + +#: red + +#color2 #19cb00 +#color10 #23fd00 + +#: green + +#color3 #cecb00 +#color11 #fffd00 + +#: yellow + +#color4 #0d73cc +#color12 #1a8fff + +#: blue + +#color5 #cb1ed1 +#color13 #fd28ff + +#: magenta + +#color6 #0dcdcd +color14 #14ffff + +#: cyan + +#color7 #dddddd +#color15 #ffffff + +color0 #282936 +color1 #3a3c4e +color2 #F7CA88 +color3 #626483 +color4 #62d6e8 +color5 #e9e9f4 +color6 #f1f2f8 +color7 #f7f7fb +color8 #ea51b2 +color9 #b45bcf +color10 #00f769 +color11 #ebff87 +color12 #a1efe4 +color13 #62d6e8 +color14 #b45bcf +color15 #00f769 + +#define FOREGROUND COLOR5 +#define BACKGROUND COLOR0 + +#: white + +mark1_foreground black + +#: Color for marks of type 1 + +mark1_background #98d3cb + +#: Color for marks of type 1 (light steel blue) + +mark2_foreground black + +#: Color for marks of type 2 + +mark2_background #f2dcd3 + +#: Color for marks of type 1 (beige) + +mark3_foreground black + +#: Color for marks of type 3 + +mark3_background #f274bc + +#: Color for marks of type 1 (violet) + +#: }}} + +#: Advanced {{{ + +shell . + +#: The shell program to execute. The default value of . means to use +#: whatever shell is set as the default shell for the current user. +#: Note that on macOS if you change this, you might need to add +#: --login to ensure that the shell starts in interactive mode and +#: reads its startup rc files. + +editor . + +#: The console editor to use when editing the kitty config file or +#: similar tasks. A value of . means to use the environment variables +#: VISUAL and EDITOR in that order. Note that this environment +#: variable has to be set not just in your shell startup scripts but +#: system-wide, otherwise kitty will not see it. + +close_on_child_death no + +#: Close the window when the child process (shell) exits. If no (the +#: default), the terminal will remain open when the child exits as +#: long as there are still processes outputting to the terminal (for +#: example disowned or backgrounded processes). If yes, the window +#: will close as soon as the child process exits. Note that setting it +#: to yes means that any background processes still using the terminal +#: can fail silently because their stdout/stderr/stdin no longer work. + +allow_remote_control no + +#: Allow other programs to control kitty. If you turn this on other +#: programs can control all aspects of kitty, including sending text +#: to kitty windows, opening new windows, closing windows, reading the +#: content of windows, etc. Note that this even works over ssh +#: connections. You can chose to either allow any program running +#: within kitty to control it, with yes or only programs that connect +#: to the socket specified with the kitty --listen-on command line +#: option, if you use the value socket-only. The latter is useful if +#: you want to prevent programs running on a remote computer over ssh +#: from controlling kitty. + +listen_on none + +#: Tell kitty to listen to the specified unix/tcp socket for remote +#: control connections. Note that this will apply to all kitty +#: instances. It can be overridden by the kitty --listen-on command +#: line flag. This option accepts only UNIX sockets, such as +#: unix:${TEMP}/mykitty or (on Linux) unix:@mykitty. Environment +#: variables are expanded. If {kitty_pid} is present then it is +#: replaced by the PID of the kitty process, otherwise the PID of the +#: kitty process is appended to the value, with a hyphen. This option +#: is ignored unless you also set allow_remote_control to enable +#: remote control. See the help for kitty --listen-on for more +#: details. + +# env + +#: Specify environment variables to set in all child processes. Note +#: that environment variables are expanded recursively, so if you +#: use:: + +#: env MYVAR1=a +#: env MYVAR2=${MYVAR1}/${HOME}/b + +#: The value of MYVAR2 will be a//b. + +update_check_interval 24 + +#: Periodically check if an update to kitty is available. If an update +#: is found a system notification is displayed informing you of the +#: available update. The default is to check every 24 hrs, set to zero +#: to disable. + +startup_session none + +#: Path to a session file to use for all kitty instances. Can be +#: overridden by using the kitty --session command line option for +#: individual instances. See +#: https://sw.kovidgoyal.net/kitty/index.html#sessions in the kitty +#: documentation for details. Note that relative paths are interpreted +#: with respect to the kitty config directory. Environment variables +#: in the path are expanded. + +clipboard_control write-clipboard write-primary + +#: Allow programs running in kitty to read and write from the +#: clipboard. You can control exactly which actions are allowed. The +#: set of possible actions is: write-clipboard read-clipboard write- +#: primary read-primary. You can additionally specify no-append to +#: disable kitty's protocol extension for clipboard concatenation. The +#: default is to allow writing to the clipboard and primary selection +#: with concatenation enabled. Note that enabling the read +#: functionality is a security risk as it means that any program, even +#: one running on a remote server via SSH can read your clipboard. + +allow_hyperlinks yes + +#: Process hyperlink (OSC 8) escape sequences. If disabled OSC 8 +#: escape sequences are ignored. Otherwise they become clickable +#: links, that you can click by holding down ctrl+shift and clicking +#: with the mouse. The special value of ``ask`` means that kitty will +#: ask before opening the link. + +term xterm-kitty + +#: The value of the TERM environment variable to set. Changing this +#: can break many terminal programs, only change it if you know what +#: you are doing, not because you read some advice on Stack Overflow +#: to change it. The TERM variable is used by various programs to get +#: information about the capabilities and behavior of the terminal. If +#: you change it, depending on what programs you run, and how +#: different the terminal you are changing it to is, various things +#: from key-presses, to colors, to various advanced features may not +#: work. + +#: }}} + +#: OS specific tweaks {{{ + +macos_titlebar_color system + +#: Change the color of the kitty window's titlebar on macOS. A value +#: of system means to use the default system color, a value of +#: background means to use the background color of the currently +#: active window and finally you can use an arbitrary color, such as +#: #12af59 or red. WARNING: This option works by using a hack, as +#: there is no proper Cocoa API for it. It sets the background color +#: of the entire window and makes the titlebar transparent. As such it +#: is incompatible with background_opacity. If you want to use both, +#: you are probably better off just hiding the titlebar with +#: hide_window_decorations. + +macos_option_as_alt no + +#: Use the option key as an alt key. With this set to no, kitty will +#: use the macOS native Option+Key = unicode character behavior. This +#: will break any Alt+key keyboard shortcuts in your terminal +#: programs, but you can use the macOS unicode input technique. You +#: can use the values: left, right, or both to use only the left, +#: right or both Option keys as Alt, instead. + +macos_hide_from_tasks no + +#: Hide the kitty window from running tasks (Option+Tab) on macOS. + +macos_quit_when_last_window_closed no + +#: Have kitty quit when all the top-level windows are closed. By +#: default, kitty will stay running, even with no open windows, as is +#: the expected behavior on macOS. + +macos_window_resizable yes + +#: Disable this if you want kitty top-level (OS) windows to not be +#: resizable on macOS. + +macos_thicken_font 0 + +#: Draw an extra border around the font with the given width, to +#: increase legibility at small font sizes. For example, a value of +#: 0.75 will result in rendering that looks similar to sub-pixel +#: antialiasing at common font sizes. + +macos_traditional_fullscreen no + +#: Use the traditional full-screen transition, that is faster, but +#: less pretty. + +macos_show_window_title_in all + +#: Show or hide the window title in the macOS window or menu-bar. A +#: value of window will show the title of the currently active window +#: at the top of the macOS window. A value of menubar will show the +#: title of the currently active window in the macOS menu-bar, making +#: use of otherwise wasted space. all will show the title everywhere +#: and none hides the title in the window and the menu-bar. + +macos_custom_beam_cursor no + +#: Enable/disable custom mouse cursor for macOS that is easier to see +#: on both light and dark backgrounds. WARNING: this might make your +#: mouse cursor invisible on dual GPU machines. + +linux_display_server auto + +#: Choose between Wayland and X11 backends. By default, an appropriate +#: backend based on the system state is chosen automatically. Set it +#: to x11 or wayland to force the choice. + +#: }}} + +#: Keyboard shortcuts {{{ + +#: Keys are identified simply by their lowercase unicode characters. +#: For example: ``a`` for the A key, ``[`` for the left square bracket +#: key, etc. For functional keys, such as ``Enter or Escape`` the +#: names are present at https://sw.kovidgoyal.net/kitty/keyboard- +#: protocol.html#functional-key-definitions. For a list of modifier +#: names, see: GLFW mods +#: + +#: On Linux you can also use XKB key names to bind keys that are not +#: supported by GLFW. See XKB keys +#: for a list of key names. The name to use is the part +#: after the XKB_KEY_ prefix. Note that you can only use an XKB key +#: name for keys that are not known as GLFW keys. + +#: Finally, you can use raw system key codes to map keys, again only +#: for keys that are not known as GLFW keys. To see the system key +#: code for a key, start kitty with the kitty --debug-keyboard option. +#: Then kitty will output some debug text for every key event. In that +#: text look for ``native_code`` the value of that becomes the key +#: name in the shortcut. For example: + +#: .. code-block:: none + +#: on_key_input: glfw key: 65 native_code: 0x61 action: PRESS mods: 0x0 text: 'a' + +#: Here, the key name for the A key is 0x61 and you can use it with:: + +#: map ctrl+0x61 something + +#: to map ctrl+a to something. + +#: You can use the special action no_op to unmap a keyboard shortcut +#: that is assigned in the default configuration:: + +#: map kitty_mod+space no_op + +#: You can combine multiple actions to be triggered by a single +#: shortcut, using the syntax below:: + +#: map key combine action1 action2 action3 ... + +#: For example:: + +#: map kitty_mod+e combine : new_window : next_layout + +#: this will create a new window and switch to the next available +#: layout + +#: You can use multi-key shortcuts using the syntax shown below:: + +#: map key1>key2>key3 action + +#: For example:: + +#: map ctrl+f>2 set_font_size 20 + +kitty_mod ctrl+shift + +#: The value of kitty_mod is used as the modifier for all default +#: shortcuts, you can change it in your kitty.conf to change the +#: modifiers for all the default shortcuts. + +clear_all_shortcuts no + +#: You can have kitty remove all shortcut definition seen up to this +#: point. Useful, for instance, to remove the default shortcuts. + +# kitten_alias hints hints --hints-offset=0 + +#: You can create aliases for kitten names, this allows overriding the +#: defaults for kitten options and can also be used to shorten +#: repeated mappings of the same kitten with a specific group of +#: options. For example, the above alias changes the default value of +#: kitty +kitten hints --hints-offset to zero for all mappings, +#: including the builtin ones. + +#: Clipboard {{{ + +map kitty_mod+c copy_to_clipboard + +#: There is also a copy_or_interrupt action that can be optionally +#: mapped to Ctrl+c. It will copy only if there is a selection and +#: send an interrupt otherwise. Similarly, copy_and_clear_or_interrupt +#: will copy and clear the selection or send an interrupt if there is +#: no selection. + +map kitty_mod+v paste_from_clipboard +map kitty_mod+s paste_from_selection +map shift+insert paste_from_selection +map kitty_mod+o pass_selection_to_program + +#: You can also pass the contents of the current selection to any +#: program using pass_selection_to_program. By default, the system's +#: open program is used, but you can specify your own, the selection +#: will be passed as a command line argument to the program, for +#: example:: + +#: map kitty_mod+o pass_selection_to_program firefox + +#: You can pass the current selection to a terminal program running in +#: a new kitty window, by using the @selection placeholder:: + +#: map kitty_mod+y new_window less @selection + +#: }}} + +#: Scrolling {{{ + +map kitty_mod+up scroll_line_up +map kitty_mod+k scroll_line_up +map kitty_mod+down scroll_line_down +map kitty_mod+j scroll_line_down +map kitty_mod+page_up scroll_page_up +map kitty_mod+page_down scroll_page_down +map kitty_mod+home scroll_home +map kitty_mod+end scroll_end +map kitty_mod+h show_scrollback + +#: You can pipe the contents of the current screen + history buffer as +#: STDIN to an arbitrary program using the ``launch`` function. For +#: example, the following opens the scrollback buffer in less in an +#: overlay window:: + +#: map f1 launch --stdin-source=@screen_scrollback --stdin-add-formatting --type=overlay less +G -R + +#: For more details on piping screen and buffer contents to external +#: programs, see launch. + +#: }}} + +#: Window management {{{ + +map kitty_mod+enter new_window + +#: You can open a new window running an arbitrary program, for +#: example:: + +#: map kitty_mod+y launch mutt + +#: You can open a new window with the current working directory set to +#: the working directory of the current window using:: + +#: map ctrl+alt+enter launch --cwd=current + +#: You can open a new window that is allowed to control kitty via the +#: kitty remote control facility by prefixing the command line with @. +#: Any programs running in that window will be allowed to control +#: kitty. For example:: + +#: map ctrl+enter launch --allow-remote-control some_program + +#: You can open a new window next to the currently active window or as +#: the first window, with:: + +#: map ctrl+n launch --location=neighbor some_program +#: map ctrl+f launch --location=first some_program + +#: For more details, see launch. + +map kitty_mod+n new_os_window + +#: Works like new_window above, except that it opens a top level OS +#: kitty window. In particular you can use new_os_window_with_cwd to +#: open a window with the current working directory. + +map kitty_mod+w close_window +map kitty_mod+] next_window +map kitty_mod+[ previous_window +map kitty_mod+f move_window_forward +map kitty_mod+b move_window_backward +map kitty_mod+` move_window_to_top +map kitty_mod+r start_resizing_window +map kitty_mod+1 first_window +map kitty_mod+2 second_window +map kitty_mod+3 third_window +map kitty_mod+4 fourth_window +map kitty_mod+5 fifth_window +map kitty_mod+6 sixth_window +map kitty_mod+7 seventh_window +map kitty_mod+8 eighth_window +map kitty_mod+9 ninth_window +map kitty_mod+0 tenth_window +#: }}} + +#: Tab management {{{ + +map kitty_mod+right next_tab +map kitty_mod+left previous_tab +map kitty_mod+t new_tab +map kitty_mod+q close_tab +map kitty_mod+. move_tab_forward +map kitty_mod+, move_tab_backward +map kitty_mod+alt+t set_tab_title + +#: You can also create shortcuts to go to specific tabs, with 1 being +#: the first tab, 2 the second tab and -1 being the previously active +#: tab, and any number larger than the last tab being the last tab:: + +#: map ctrl+alt+1 goto_tab 1 +#: map ctrl+alt+2 goto_tab 2 + +#: Just as with new_window above, you can also pass the name of +#: arbitrary commands to run when using new_tab and use +#: new_tab_with_cwd. Finally, if you want the new tab to open next to +#: the current tab rather than at the end of the tabs list, use:: + +#: map ctrl+t new_tab !neighbor [optional cmd to run] +#: }}} + +#: Layout management {{{ + +map kitty_mod+l next_layout + +#: You can also create shortcuts to switch to specific layouts:: + +#: map ctrl+alt+t goto_layout tall +#: map ctrl+alt+s goto_layout stack + +#: Similarly, to switch back to the previous layout:: + +#: map ctrl+alt+p last_used_layout +#: }}} + +#: Font sizes {{{ + +#: You can change the font size for all top-level kitty OS windows at +#: a time or only the current one. + +map kitty_mod+equal change_font_size all +2.0 +map kitty_mod+plus change_font_size all +2.0 +map kitty_mod+kp_add change_font_size all +2.0 +map kitty_mod+minus change_font_size all -2.0 +map kitty_mod+kp_subtract change_font_size all -2.0 +map kitty_mod+backspace change_font_size all 0 + +#: To setup shortcuts for specific font sizes:: + +#: map kitty_mod+f6 change_font_size all 10.0 + +#: To setup shortcuts to change only the current OS window's font +#: size:: + +#: map kitty_mod+f6 change_font_size current 10.0 +#: }}} + +#: Select and act on visible text {{{ + +#: Use the hints kitten to select text and either pass it to an +#: external program or insert it into the terminal or copy it to the +#: clipboard. + +map kitty_mod+e kitten hints + +#: Open a currently visible URL using the keyboard. The program used +#: to open the URL is specified in open_url_with. + +map kitty_mod+p>f kitten hints --type path --program - + +#: Select a path/filename and insert it into the terminal. Useful, for +#: instance to run git commands on a filename output from a previous +#: git command. + +map kitty_mod+p>shift+f kitten hints --type path + +#: Select a path/filename and open it with the default open program. + +map kitty_mod+p>l kitten hints --type line --program - + +#: Select a line of text and insert it into the terminal. Use for the +#: output of things like: ls -1 + +map kitty_mod+p>w kitten hints --type word --program - + +#: Select words and insert into terminal. + +map kitty_mod+p>h kitten hints --type hash --program - + +#: Select something that looks like a hash and insert it into the +#: terminal. Useful with git, which uses sha1 hashes to identify +#: commits + +map kitty_mod+p>n kitten hints --type linenum + +#: Select something that looks like filename:linenum and open it in +#: vim at the specified line number. + +map kitty_mod+p>y kitten hints --type hyperlink + +#: Select a hyperlink (i.e. a URL that has been marked as such by the +#: terminal program, for example, by ls --hyperlink=auto). + + +#: The hints kitten has many more modes of operation that you can map +#: to different shortcuts. For a full description see kittens/hints. +#: }}} + +#: Miscellaneous {{{ + +map kitty_mod+f11 toggle_fullscreen +map kitty_mod+f10 toggle_maximized +map kitty_mod+u kitten unicode_input +map kitty_mod+f2 edit_config_file +map kitty_mod+escape kitty_shell window + +#: Open the kitty shell in a new window/tab/overlay/os_window to +#: control kitty using commands. + +map kitty_mod+a>m set_background_opacity +0.1 +map kitty_mod+a>l set_background_opacity -0.1 +map kitty_mod+a>1 set_background_opacity 1 +map kitty_mod+a>d set_background_opacity default +map kitty_mod+delete clear_terminal reset active + +#: You can create shortcuts to clear/reset the terminal. For example:: + +#: # Reset the terminal +#: map kitty_mod+f9 clear_terminal reset active +#: # Clear the terminal screen by erasing all contents +#: map kitty_mod+f10 clear_terminal clear active +#: # Clear the terminal scrollback by erasing it +#: map kitty_mod+f11 clear_terminal scrollback active +#: # Scroll the contents of the screen into the scrollback +#: map kitty_mod+f12 clear_terminal scroll active + +#: If you want to operate on all windows instead of just the current +#: one, use all instead of active. + +#: It is also possible to remap Ctrl+L to both scroll the current +#: screen contents into the scrollback buffer and clear the screen, +#: instead of just clearing the screen:: + +#: map ctrl+l combine : clear_terminal scroll active : send_text normal,application \x0c + + +#: You can tell kitty to send arbitrary (UTF-8) encoded text to the +#: client program when pressing specified shortcut keys. For example:: + +#: map ctrl+alt+a send_text all Special text + +#: This will send "Special text" when you press the ctrl+alt+a key +#: combination. The text to be sent is a python string literal so you +#: can use escapes like \x1b to send control codes or \u21fb to send +#: unicode characters (or you can just input the unicode characters +#: directly as UTF-8 text). The first argument to send_text is the +#: keyboard modes in which to activate the shortcut. The possible +#: values are normal or application or kitty or a comma separated +#: combination of them. The special keyword all means all modes. The +#: modes normal and application refer to the DECCKM cursor key mode +#: for terminals, and kitty refers to the special kitty extended +#: keyboard protocol. + +#: Another example, that outputs a word and then moves the cursor to +#: the start of the line (same as pressing the Home key):: + +#: map ctrl+alt+a send_text normal Word\x1b[H +#: map ctrl+alt+a send_text application Word\x1bOH + +#: }}} + +# }}} diff --git a/.config/lf/lf-icons.sh b/.config/lf/lf-icons.sh new file mode 100644 index 0000000..791383a --- /dev/null +++ b/.config/lf/lf-icons.sh @@ -0,0 +1,163 @@ +#!/bin/sh + +export LF_ICONS="\ +di=:\ +fi=:\ +ln=:\ +or=:\ +ex=:\ +*.c=:\ +*.cc=:\ +*.clj=:\ +*.coffee=:\ +*.cpp=:\ +*.css=:\ +*.d=:\ +*.dart=:\ +*.erl=:\ +*.exs=:\ +*.fs=:\ +*.go=:\ +*.gitignore=:\ +*.h=:\ +*.hh=:\ +*.hpp=:\ +*.hs=:\ +*.html=:\ +*.java=:\ +*.jl=:\ +*.js=:\ +*.json=:\ +*.lua=:\ +*.md=:\ +*.php=:\ +*.pl=:\ +*.pro=:\ +*.py=:\ +*.rb=:\ +*.rs=:\ +*.scala=:\ +*.ts=:\ +*.vim=:\ +*.cmd=:\ +*.ps1=:\ +*.sh=:\ +*.bash=:\ +*.zsh=:\ +*.fish=:\ +*.tar=:\ +*.tgz=:\ +*.arc=:\ +*.arj=:\ +*.taz=:\ +*.lha=:\ +*.lz4=:\ +*.lzh=:\ +*.lzma=:\ +*.tlz=:\ +*.txz=:\ +*.tzo=:\ +*.t7z=:\ +*.zip=:\ +*.z=:\ +*.dz=:\ +*.gz=:\ +*.lrz=:\ +*.lz=:\ +*.lzo=:\ +*.xz=:\ +*.zst=:\ +*.tzst=:\ +*.bz2=:\ +*.bz=:\ +*.tbz=:\ +*.tbz2=:\ +*.tz=:\ +*.deb=:\ +*.rpm=:\ +*.jar=:\ +*.war=:\ +*.ear=:\ +*.sar=:\ +*.rar=:\ +*.alz=:\ +*.ace=:\ +*.zoo=:\ +*.cpio=:\ +*.7z=:\ +*.rz=:\ +*.cab=:\ +*.wim=:\ +*.swm=:\ +*.dwm=:\ +*.esd=:\ +*.exe=🍷:\ +*.jpg=:\ +*.jpeg=:\ +*.mjpg=:\ +*.mjpeg=:\ +*.gif=:\ +*.bmp=:\ +*.pbm=:\ +*.pgm=:\ +*.ppm=:\ +*.tga=:\ +*.xbm=:\ +*.xpm=:\ +*.tif=:\ +*.tiff=:\ +*.png=:\ +*.svg=:\ +*.svgz=:\ +*.mng=:\ +*.pcx=:\ +*.mov=:\ +*.mpg=:\ +*.mpeg=:\ +*.m2v=:\ +*.mkv=:\ +*.webm=:\ +*.ogm=:\ +*.mp4=:\ +*.m4v=:\ +*.mp4v=:\ +*.vob=:\ +*.qt=:\ +*.nuv=:\ +*.wmv=:\ +*.asf=:\ +*.rm=:\ +*.rmvb=:\ +*.flc=:\ +*.avi=:\ +*.fli=:\ +*.flv=:\ +*.gl=:\ +*.dl=:\ +*.xcf=:\ +*.xwd=:\ +*.yuv=:\ +*.cgm=:\ +*.emf=:\ +*.ogv=:\ +*.ogx=:\ +*.aac=:\ +*.au=:\ +*.flac=:\ +*.m4a=:\ +*.mid=:\ +*.midi=:\ +*.mka=:\ +*.mp3=:\ +*.mpc=:\ +*.ogg=:\ +*.ra=:\ +*.wav=:\ +*.oga=:\ +*.opus=:\ +*.spx=:\ +*.xspf=:\ +*.pdf=:\ +*.nix=:\ + " + diff --git a/.config/lf/lfrc b/.config/lf/lfrc new file mode 100644 index 0000000..af0acd5 --- /dev/null +++ b/.config/lf/lfrc @@ -0,0 +1,99 @@ +# interpreter for shell commands (needs to be POSIX compatible) +set shell sh + +set color256 true +set icons true +set ignorecase true +#set drawbox true + + +set previewer ~/.config/lf/pv.sh +map i $~/.config/lf/pv.sh $f | less -R + +# set '-eu' options for shell commands +# These options are used to have safer shell commands. Option '-e' is used to +# exit on error and option '-u' is used to give error for unset variables. +# Option '-f' disables pathname expansion which can be useful when $f, $fs, and +# $fx variables contain names with '*' or '?' characters. However, this option +# is used selectively within individual commands as it can be limiting at +# times. +set shellopts '-eu' + +# set internal field separator (IFS) to "\n" for shell commands +# This is useful to automatically split file names in $fs and $fx properly +# since default file separator used in these variables (i.e. 'filesep' option) +# is newline. You need to consider the values of these options and create your +# commands accordingly. +set ifs "\n" + +# leave some space at the top and the bottom of the screen +set scrolloff 10 + +# use enter for shell commands +map shell + +# execute current file (must be executable) +map x $$f +map X !$f + +# dedicated keys for file opener actions +map o &mimeo $f +map O $mimeopen --ask $f + +# define a custom 'open' command +# This command is called when current file is not a directory. You may want to +# use either file extensions and/or mime types here. Below uses an editor for +# text files and a file opener for the rest. +cmd open ${{ + case $(file --mime-type $f -b) in + text/*) $EDITOR $fx;; + audio/*) mpv --input-ipc-server=/tmp/mpvsoc$(date +%%s) $f ;; + application/pdf) setsid zathura $fx >/dev/null 2>&1 & ;; + application/zip) setsid unzip -l $f | less;; + application/rar) setsid unrar l $f | less;; + image/gif) setsid mpv $f --loop=inf ;; + image/jpeg) setsid imv $f ;; + image/png) setsid imv $f ;; + image/*) setsid imv $f ;; + video/*) setsid mpv $f --loop=inf ;; + application/json) $EDITOR $f;; + *) for f in $fx; do setsid $OPENER $f > /dev/null 2> /dev/null & done;; + esac +}} + +# define a custom 'rename' command without prompt for overwrite +# cmd rename %[ -e $1 ] && printf "file exists" || mv $f $1 +# map r push :rename + +# make sure trash folder exists +%mkdir -p ~/.trash + +# move current file or selected files to trash folder +# (also see 'man mv' for backup/overwrite options) +cmd trash %set -f; mv $fx ~/.trash/ + +# define a custom 'delete' command +cmd delete ${{ + set -f + printf "$fx\n" + printf "delete?[y/n]" + read ans + [ $ans = "y" ] && rm -rf $fx +}} + +# use '' key for either 'trash' or 'delete' command + map trash +# map delete + +# extract the current file with the right command +# (xkcd link: https://xkcd.com/1168/) +cmd extract ${{ + compress.sh -e "$fx" +}} + +cmd compress ${{ + compress.sh -c "$fx" +}} + +map c compress $fx +map C extract $f diff --git a/.config/lf/pv.sh b/.config/lf/pv.sh new file mode 100755 index 0000000..122415d --- /dev/null +++ b/.config/lf/pv.sh @@ -0,0 +1,22 @@ +#!/bin/sh + +W="$(($(tput cols)/2 - 10))" +#H="$(tput lines)" + +fn="$1" +w="$2" +h="$3" +x="$4" +y="$5" + +case "$fn" in + *.tar*) tar tf "$1";; + *.zip) unzip -l "$1";; + *.rar) unrar l "$1";; + *.7z) 7z l "$1";; + *.jpg | *.JPG | *.jpeg) chafa "$fn" --size="$w"x"$h" ;;#viu -t "$1" -w "$2" ;; + *.png | *.svg | *.gif) chafa "$fn" --size="$w"x"$h" ;; + *.mp4 | *.mkv | *.webm | *.avi | *.mpg | *.mpeg | *.ogv | *.flv | *.wmv | *.WMV) ffmpegthumbnailer -i "$fn" -c jpeg -o - | chafa - --size="$w"x"$h";; + *.pdf) pdftotext "$1" -;; + *) bat -f "$1";; #*) highlight -O ansi "$1" || cat "$1";; +esac diff --git a/.config/luakit/userconf.lua b/.config/luakit/userconf.lua new file mode 100644 index 0000000..f020228 --- /dev/null +++ b/.config/luakit/userconf.lua @@ -0,0 +1,56 @@ +local modes = require("modes") +local settings = require("settings") +local downloads = require("downloads") +local webview = require("webview") + +---set download dir, and stop prompt for download +downloads.default_dir = os.getenv("HOME") .. "/dl" +downloads.add_signal("download-location", function (uri, file) + luakit.spawn(string.format("notify-send 'Luakit' 'file downloaded to ~/dl/'")) + if not file or file == "" then + file = (string.match(uri, "/([^/]+)$") + or string.match(uri, "^%w+://(.+)") + or string.gsub(uri, "/", "_") + or "untitled") + end + return downloads.default_dir .. "/" .. file +end) + +---set how to handle various schemes (from luakit FAQ) +webview.add_signal("init", function (view) + view:add_signal("navigation-request", function (v, uri) +---open magnet links with transadd + if string.match(string.lower(uri), "^magnet:") then + luakit.spawn(string.format("%s %q", "transadd", uri)) + return false + end + --- Check URI and open program here + end) +end) + + +---set home page +settings.window.home_page = os.getenv("HOME") .. "/.config/startpage/index.html" + + +---open webpage in mpv with: ; + shift + m +local video_cmd_fmt = "mpv '%s' --loop" +modes.add_binds("ex-follow", { + { "m", "Hint all links and open the video behind that link externally with MPV.", + function (w) + w:set_mode("follow", { + prompt = "open with MPV", selector = "uri", evaluator = "uri", + func = function (uri) + assert(type(uri) == "string") + luakit.spawn(string.format(video_cmd_fmt, uri)) + w:notify("Launched MPV") + end + }) + end }, + { "M", "Open the video on the current page externally with MPV.", + function (w) + local uri = string.gsub(w.view.uri or "", " ", "%%20") + luakit.spawn(string.format(video_cmd_fmt, uri)) + w:notify("Launched MPV") + end }, +}) diff --git a/.config/moc/cache/moc_version_tag b/.config/moc/cache/moc_version_tag new file mode 100644 index 0000000..84eff89 --- /dev/null +++ b/.config/moc/cache/moc_version_tag @@ -0,0 +1 @@ +1 5 3 r2930 \ No newline at end of file diff --git a/.config/moc/cache/tags.db b/.config/moc/cache/tags.db new file mode 100644 index 0000000..cb282eb Binary files /dev/null and b/.config/moc/cache/tags.db differ diff --git a/.config/moc/config b/.config/moc/config new file mode 100644 index 0000000..dbd1323 --- /dev/null +++ b/.config/moc/config @@ -0,0 +1,690 @@ +# This is a configuration file for the MOC player. It should be named +# 'config' and placed in the ~/.moc directory. As this file can specify +# commands which invoke other applications, MOC will refuse to start if it +# is not owned by either root or the current user, or if it is writable by +# anyone other than its owner. All options are given with their default +# values, and therefore commented. + +# Comments begin with '#'. +# You can use quotes and escape ('\') in parameters. +# +# You can have variable values substituted by enclosing the variable name +# as "${...}". (This only applies to the portion of the option following +# the '='.) Variables are substituted first from the environment then, +# if not found, from the configuration options. (Note that the value of +# a configuration option substituted is that which it has at the time the +# substitution variable is encountered.) If there is a naming conflict +# between an environment and configuration variable, you may be able to +# resolve it by using lowercase as the environment variable matches are +# case-sensitive whereas the configuration variables are not. +# +# You can also use the form "${...:-...}" where the value in the second +# position will be substituted if the variable name given in the first +# position is unset or null. +# +# So, for example: +# +# MusicDir = /music/${USER:-public} +# Fastdir1 = ${MusicDir}/mp3/rock +# Fastdir2 = ${MusicDir}/mp3/electronic +# Fastdir3 = ${MusicDir}/mp3/rap +# Fastdir4 = ${MusicDir}/mp3/etc +# +# Variable names are limited to those accepted by the BASH shell; that +# is, those comprising the upper- and lowercase ASCII characters, digits +# and the underscore. +# +# If you need to use the "${" sequence for any other purpose, write "$${" +# and it will be replaced by "${" and not treated as a substitution. +# +# Some options take lists of strings as their values. The strings are +# separated by colons. Additional strings can be appended to the list +# using "+=" in place of a plain "=" to assign the value. For an example, +# see the XTerms option. +# +# You can override any configuration option when you run MOC using the +# '-O' command line option: +# +# mocp -O AutoNext=no -O messagelingertime=1 -O XTerms+=xxt:xwt +# +# This command line option can be repeated as many times as needed and +# the configuration option name is not case sensitive. (Note that MOC +# does not perform variable substitution on the value of such overridden +# configuration options.) Most option values are set before the +# configuration file is processed (which allows the new values to be +# picked up by substitutions), however list-valued options are overridden +# afterwards (which gives the choice of whether the configured values are +# replaced or added to). + +# Remember that the client and server are separate processes and the +# server will retain the configuration values formed from the environment +# within which it was originally started. + +# Show file titles (title, author, album) instead of file names? +#ReadTags = yes + +# In which directory do you store your music files? If you specify it +# you will be able to jump straight to this directory with the '-m' +# parameter or the 'm' command. This can also point to a playlist. +# +# Example: MusicDir = "/home/joe/music" +# +MusicDir = $HOME/media/audio/ + +# Start in the music directory by default? If set to 'no', start +# in the current directory by default. A single directory on +# the command line takes precedence. +#StartInMusicDir = no + +# How to sort? FileName is the option's only value for now. +#Sort = FileName + +# Show errors in the streams (for example, broken frames in MP3 files)? +#ShowStreamErrors = no + +# Ignore CRC errors in MP3 files? Most players do that, so the default +# value is 'yes'. +#MP3IgnoreCRCErrors = yes + +# Set playback toggles. +#Repeat = no +#Shuffle = no +#AutoNext = yes + +# Default FormatString: +# +# %n - Track number +# %a - Artist +# %A - Album +# %t - Title +# %(X:TRUE:FALSE) - Ternary expression: if X exists, do TRUE, +# otherwise FALSE. The escape character must +# be doubled (i.e., '\\'). (See zshmisc +# documentation for more information.) +# +#FormatString = "%(n:%n :)%(a:%a - :)%(t:%t:)%(A: \(%A\):)" + +# Input and output buffer sizes (in kilobytes). +#InputBuffer = 512 # Minimum value is 32KB +#OutputBuffer = 512 # Minimum value is 128KB + +# How much to fill the input buffer before playing (in kilobytes)? +# This can't be greater than the value of InputBuffer. While this has +# a positive effect for network streams, it also causes the broadcast +# audio to be delayed. +#Prebuffering = 64 + +# Use this HTTP proxy server for internet streams. If not set, the +# environment variables http_proxy and ALL_PROXY will be used if present. +# +# Format: HTTPProxy = PROXY_NAME:PORT +# +#HTTPProxy = + +# Sound driver - OSS, ALSA, JACK, SNDIO (on OpenBSD) or null (only for +# debugging). You can enter more than one driver as a colon-separated +# list. The first working driver will be used. +#SoundDriver = JACK:ALSA:OSS + +# Jack output settings. +#JackClientName = "moc" +#JackStartServer = no +#JackOutLeft = "system:playback_1" +#JackOutRight = "system:playback_2" + +# OSS output settings. +#OSSDevice = /dev/dsp +#OSSMixerDevice = /dev/mixer +#OSSMixerChannel1 = pcm # 'pcm', 'master' or 'speaker' +#OSSMixerChannel2 = master # 'pcm', 'master' or 'speaker' + +# ALSA output settings. If you need to dump the audio produced by MOC +# to a file for diagnostic purposes, the following setting of 'ALSADevice' +# should do that: +# +# ALSADevice=tee:hw,'/tmp/out.wav',wav +# +#ALSADevice = default +#ALSAMixer1 = PCM +#ALSAMixer2 = Master + +# Under some circumstances on 32-bit systems, audio played continously +# for long periods of time may begin to stutter. Setting this option to +# 'yes' will force MOC to avoid ALSA's dmix resampling and prevent this +# stutter. But it also has other implications: +# +# - You may experience unacceptably high CPU load. +# - ALSA's resampler plug-ins will not be used. +# - The resampling may be of lower quality than ALSA would provide. +# - You may need to try different "ResampleMethod" option settings. +# - The "ForceSampleRate" option may be ineffective. +# - If libsamplerate is not configured, many audios may be unplayable. +# +#ALSAStutterDefeat = no + +# Save software mixer state? +# If enabled, a file 'softmixer' will be created in '~/.moc/' storing the +# mixersetting set when the server is shut down. +# Note that there is a "hidden" 'Amplification' setting in that file. +# Amplification (0-200) is used to scale the mixer setting (0-100). This +# results in a higher signal amplitude but may also produce clipping. +#Softmixer_SaveState = yes + +# Save equalizer state? +# If enabled, a file 'equalizer' will be created in '~/.moc/' storing the +# equalizer settings when the server is shut down. +# Note that there is a "hidden" 'Mixin' setting in that file. +# Mixin (0.0-1.0) is used to determine how much of the original signal is +# used after equalizing. 0 means to only use the equalized sound, while 1 +# effectively disabled the mixer. The default is 0.25. +#Equalizer_SaveState = yes + +# Show files with dot at the beginning? +#ShowHiddenFiles = no + +# Hide file name extensions? +#HideFileExtension = no + +# Show file format in menu? +#ShowFormat = yes + +# Show file time in menu? Possible values: 'yes', 'no' and 'IfAvailable' +# (meaning show the time only when it is already known, which often works +# faster). +#ShowTime = IfAvailable + +# Show time played as a percentage in the time progress bar. +#ShowTimePercent = no + +# Values of the TERM environment variable which are deemed to be managed by +# screen(1). If you are setting a specific terminal using screen(1)'s +# '-T ' option, then you will need to add 'screen.' to this list. +# Note that this is only a partial test; the value of the WINDOW environment +# variable must also be a number (which screen(1) sets). +#ScreenTerms = screen:screen-w:vt100 + +# Values of the TERM environment variable which are deemed to be xterms. If +# you are using MOC within screen(1) under an xterm, then add screen(1)'s +# TERM setting here as well to cause MOC to update the xterm's title. +#XTerms = xterm +#XTerms += xterm-colour:xterm-color +#XTerms += xterm-256colour:xterm-256color +#XTerms += rxvt:rxvt-unicode +#XTerms += rxvt-unicode-256colour:rxvt-unicode-256color +#XTerms += eterm + +# Theme file to use. This can be absolute path or relative to +# /usr/share/moc/themes/ (depends on installation prefix) or +# ~/.moc/themes/ . +# +# Example: Theme = laras_theme +# +Theme = transparent-background + +# The theme used when running on an xterm. +# +# Example: XTermTheme = transparent-background +# +#XTermTheme = + +# Should MOC try to autoload the default lyrics file for an audio? (The +# default lyrics file is a text file with the same file name as the audio +# file name with any trailing "extension" removed.) +#AutoLoadLyrics = yes + +# MOC directory (where pid file, socket and state files are stored). +# You can use ~ at the beginning. +#MOCDir = ~/.moc + +# Use mmap() to read files. mmap() is much slower on NFS. +#UseMMap = no + +# Use MIME to identify audio files. This can make for slower loading +# of playlists but is more accurate than using "extensions". +#UseMimeMagic = no + +# Assume this encoding for ID3 version 1/1.1 tags (MP3 files). Unlike +# ID3v2, UTF-8 is not used here and MOC can't guess how tags are encoded. +# Another solution is using librcc (see the next option). This option is +# ignored if UseRCC is set to 'yes'. +#ID3v1TagsEncoding = WINDOWS-1250 + +# Use librcc to fix ID3 version 1/1.1 tags encoding. +#UseRCC = yes + +# Use librcc to filenames and directory names encoding. +#UseRCCForFilesystem = yes + +# When this option is set the player assumes that if the encoding of +# ID3v2 is set to ISO-8859-1 then the ID3v1TagsEncoding is actually +# that and applies appropriate conversion. +#EnforceTagsEncoding = no + +# Enable the conversion of filenames from the local encoding to UTF-8. +#FileNamesIconv = no + +# Enable the conversion of the xterm title from UTF-8 to the local encoding. +#NonUTFXterm = no + +# Should MOC precache files to assist gapless playback? +#Precache = yes + +# Remember the playlist after exit? +#SavePlaylist = yes + +# When using more than one client (interface) at a time, do they share +# the playlist? +#SyncPlaylist = yes + +# Choose a keymap file (relative to '~/.moc/' or using an absolute path). +# An annotated example keymap file is included ('keymap.example'). +# +# Example: Keymap = my_keymap +# +#Keymap = + +# Use ASCII rather than graphic characters for drawing lines. This +# helps on some terminals. +#ASCIILines = no + +# FastDirs, these allow you to jump directly to a directory, the key +# bindings are in the keymap file. +# +# Examples: Fastdir1 = /mp3/rock +# Fastdir2 = /mp3/electronic +# Fastdir3 = /mp3/rap +# Fastdir4 = /mp3/etc +# +#Fastdir1 = +#Fastdir2 = +#Fastdir3 = +#Fastdir4 = +#Fastdir5 = +#Fastdir6 = +#Fastdir7 = +#Fastdir8 = +#Fastdir9 = +#Fastdir10 = + +# How fast to seek (in number of seconds per keystroke). The first +# option is for normal seek and the second for silent seek. +#SeekTime = 1 +#SilentSeekTime = 5 + +# PreferredDecoders allows you to specify which decoder should be used +# for any given audio format. It is a colon-separated list in which +# each entry is of the general form 'code(decoders)', where 'code' +# identifies the audio format and 'decoders' is a comma-separated list +# of decoders in order of preference. +# +# The audio format identifier may be either a filename extension or a +# MIME media type. If the latter, the format is 'type/subtype' (e.g., +# 'audio/flac'). Because different systems may give different MIME +# media types, any 'x-' prefix of the subtype is ignored both here and +# in the actual file MIME type (so all combinations of 'audio/flac' and +# 'audio/x-flac' match each other). +# +# For Internet streams the matching is done on MIME media type and on +# actual content. For files the matches are made on MIME media type +# (if the 'UseMimeMagic' option is set) and on filename extension. The +# MIME media type of a file is not determined until the first entry for +# MIME is encountered in the list. +# +# The matching is done in the order of appearance in the list with any +# entries added from the command line being matched before those listed +# here. Therefore, if you place all filename extension entries before +# all MIME entries you will speed up MOC's processing of directories +# (which could be significant for remote file systems). +# +# The decoder list may be empty, in which case no decoders will be used +# for files (and files with that audio format ignored) while Internet +# streams will be assessed on the actual content. Any decoder position +# may contain an asterisk, in which case any decoder not otherwise listed +# which can handle the audio format will be used. It is not an error to +# list the same decoder twice, but neither does it make sense to do so. +# +# If you have a mix of audio and non-audio files in your directories, you +# may wish to include entries at top of the list which ignore non-audio +# files by extension. +# +# In summary, the PreferredDecoders option provides fine control over the +# type of matching which is performed (filename extension, MIME media +# type and streamed media content) and which decoder(s) (if any) are used +# based on the option's list entries and their ordering. +# +# Examples: aac(aac,ffmpeg) first try FAAD2 for AACs then FFmpeg +# mp3() ignore MP3 files +# wav(*,sndfile) use sndfile for WAV as a last resort +# ogg(vorbis,*):flac(flac,*) try Xiph decoders first +# ogg():audio/ogg() ignore OGG files, and +# force Internet selection by content +# gz():html() ignore some non-audio files +# +# Any unspecified audio formats default to trying all decoders. +# Any unknown (or misspelt) drivers are ignored. +# All names are case insensitive. +# The default setting reflects the historical situation modified by +# the experience of users. +# +#PreferredDecoders = aac(aac,ffmpeg):m4a(ffmpeg) +#PreferredDecoders += mpc(musepack,*,ffmpeg):mpc8(musepack,*,ffmpeg) +#PreferredDecoders += sid(sidplay2):mus(sidplay2) +#PreferredDecoders += wav(sndfile,*,ffmpeg) +#PreferredDecoders += wv(wavpack,*,ffmpeg) +#PreferredDecoders += audio/aac(aac):audio/aacp(aac):audio/m4a(ffmpeg) +#PreferredDecoders += audio/wav(sndfile,*) + +# The following PreferredDecoders attempt to handle the ambiguity surrounding +# container types such as OGG for files. The first two entries will force +# a local file to the correct decoder (assuming the .ogg file contains Vorbis +# audio), while the MIME media types will cause Internet audio streams to +# be assessed on content (which may be either Vorbis or Speex). +# +#PreferredDecoders += ogg(vorbis,ffmpeg):oga(vorbis,ffmpeg):ogv(ffmpeg) +#PreferredDecoders += opus(ffmpeg) +#PreferredDecoders += spx(speex) +#PreferredDecoders += application/ogg(vorbis):audio/ogg(vorbis) + +# Which resampling method to use. There are a few methods of resampling +# sound supported by libresamplerate. The default is 'Linear') which is +# also the fastest. A better description can be found at: +# +# http://www.mega-nerd.com/libsamplerate/api_misc.html#Converters +# +# but briefly, the following methods are based on bandlimited interpolation +# and are higher quality, but also slower: +# +# SincBestQuality - really slow (I know you probably have an xx GHz +# processor, but it's still not enough to not see +# this in the top output :) The worst case +# Signal-to-Noise Ratio is 97dB. +# SincMediumQuality - much faster. +# SincFastest - the fastest bandlimited interpolation. +# +# And these are lower quality, but much faster methods: +# +# ZeroOrderHold - really poor quality, but it's really fast. +# Linear - a bit better and a bit slower. +# +#ResampleMethod = Linear + +# Always use this sample rate (in Hz) when opening the audio device (and +# resample the sound if necessary). When set to 0 the device is opened +# with the file's rate. +#ForceSampleRate = 0 + +# By default, even if the sound card reports that it can output 24bit samples +# MOC converts 24bit PCM to 16bit. Setting this option to 'yes' allows MOC +# to use 24bit output. (The MP3 decoder, for example, uses this format.) +# This is disabled by default because there were reports that it prevents +# MP3 files from playing on some soundcards. +#Allow24bitOutput = no + +# Use realtime priority for output buffer thread. This will prevent gaps +# while playing even with heavy load. The user who runs MOC must have +# permissions to set such a priority. This could be dangerous, because it +# is possible that a bug in MOC will freeze your computer. +#UseRealtimePriority = no + +# The number of audio files for which MOC will cache tags. When this limit +# is reached, file tags are discarded on a least recently used basis (with +# one second resolution). You can disable the cache by giving it a size of +# zero. Note that if you decrease the cache size below the number of items +# currently in the cache, the number will not decrease immediately (if at +# all). +#TagsCacheSize = 256 + +# Number items in the playlist. +#PlaylistNumbering = yes + +# Main window layouts can be configured. You can change the position and +# size of the menus (directory and playlist). You have three layouts and +# can switch between then using the 'l' key (standard mapping). By default, +# only two layouts are configured. +# +# The format is as follows: +# +# - Each layout is described as a list of menu entries. +# - Each menu entry is of the form: +# +# menu(position_x, position_y, width, height) +# +# where 'menu' is either 'directory' or 'playlist'. +# - The parameters define position and size of the menu. They can +# be absolute numbers (like 10) or a percentage of the screen size +# (like 45%). +# - 'width' and 'height' can have also value of 'FILL' which means +# fill the screen from the menu's position to the border. +# - Menus may overlap. +# +# You must describe at least one menu (default is to fill the whole window). +# There must be at least one layout (Layout1) defined; others can be empty. +# +# Example: Layout1 = playlist(50%,50%,50%,50%) +# Layout2 = "" +# Layout3 = "" +# +# Just one layout, the directory will occupy the whole +# screen, the playlist will have 1/4 of the screen size +# and be positioned at lower right corner. (Note that +# because the playlist will be hidden by the directory +# you will have to use the TAB key to make the playlist +# visible.) +# +# Example: Layout1 = playlist(0,0,100%,10):directory(0,10,100%,FILL) +# +# The screen is split into two parts: playlist at the top +# and the directory menu at the bottom. Playlist will +# occupy 10 lines and the directory menu the rest. +# +#Layout1 = directory(0,0,50%,100%):playlist(50%,0,FILL,100%) +#Layout2 = directory(0,0,100%,100%):playlist(0,0,100%,100%) +#Layout3 = "" + +# When the song changes, should the menu be scrolled so that the currently +# played file is visible? +#FollowPlayedFile = yes + +# What to do if the interface was started and the server is already playing +# something from the playlist? If CanStartInPlaylist is set to 'yes', the +# interface will switch to the playlist. When set to 'no' it will start +# from the last directory. +#CanStartInPlaylist = yes + +# Executing external commands (1 - 10) invoked with key commands (F1 - F10 +# by default). +# +# Some arguments are substituted before executing: +# +# %f - file path +# %i - title made from tags +# %S - start block mark (in seconds) +# %E - end block mark (in seconds) +# +# Data from tags can also be substituted: +# +# %t - title +# %a - album +# %r - artist +# %n - track +# %m - time of the file (in seconds) +# +# The parameters above apply to the currently selected file. If you change +# them to capital letters, they are taken from the file currently playing. +# +# Programs are run using execv(), not a shell, so you can't do things like +# redirecting the output to a file. The command string is split using blank +# characters as separators; the first element is the command to be executed +# and the rest are its parameters, so if you use "echo Playing: %I" we run +# program 'echo' (from $PATH) with 2 parameters: the string 'Playing:' and +# the title of the file currently playing. Even if the title contains +# spaces, it's still one parameter and it's safe if it contains `rm -rf /`. +# +# Examples: ExecCommand1 = "cp %f /mnt/usb_drive" +# ExecCommand2 = "/home/joe/now_playing %I" +# +#ExecCommand1 = +#ExecCommand2 = +#ExecCommand3 = +#ExecCommand4 = +#ExecCommand5 = +#ExecCommand6 = +#ExecCommand7 = +#ExecCommand8 = +#ExecCommand9 = +#ExecCommand10 = + +# Display the cursor in the line with the selected file. Some braille +# readers (the Handy Tech modular series ZMU 737, for example) use the +# cursor to focus and can make use of it to present the file line even +# when other fields are changing. +#UseCursorSelection = no + +# Set the terminal title when running under xterm. +#SetXtermTitle = yes + +# Set the terminal title when running under screen(1). If MOC can detect +# that it is running under screen(1), then it will set an appropriate +# title (see description of ScreenTerms above). However, if multiple +# levels of screen management are involved, detection might fail and this +# could cause a screen upset. In that situation you can use this option +# to force screen titles off. +#SetScreenTitle = yes + +# Display full paths instead of just file names in the playlist. +#PlaylistFullPaths = yes + +# The following setting describes how block markers are displayed in +# the play time progress bar. Its value is a string of exactly three +# characters. The first character is displayed in a position which +# corresponds to the time marked as the start of a block and the last +# character to the time marked as the end of the block. The middle +# character is displayed instead if both the start and the end of the block +# would fall in the same position (within the resolution of the interface). +# You can turn off the displaying of these block marker positions by using +# three space characters. +#BlockDecorators = "`\"'" + +# How long (in seconds) to leave a message displayed on the screen. +# Setting this to a high value allows you to scroll through the messages +# using the 'hide_message' key. Setting it to zero means you'll have to +# be quick to see any message at all. Any new messages will be queued up +# and displayed after the current message's linger time expires. +#MessageLingerTime = 3 + +# Does MOC display a prefix on delayed messages indicating +# the number of queued messages still to be displayed? +#PrefixQueuedMessages = yes + +# String to append to the queued message count if any +# error messages are still waiting to be displayed. +#ErrorMessagesQueued = "!" + +# Self-describing ModPlug options (with 'yes' or 'no' values). +#ModPlug_Oversampling = yes +#ModPlug_NoiseReduction = yes +#ModPlug_Reverb = no +#ModPlug_MegaBass = no +#ModPlug_Surround = no + +# ModPlug resampling mode. +# Valid values are: +# +# FIR - 8 tap fir filter (extremely high quality) +# SPLINE - Cubic spline interpolation (high quality) +# LINEAR - Linear interpolation (fast, good quality) +# NEAREST - No interpolation (very fast, extremely bad sound quality) +# +#ModPlug_ResamplingMode = FIR + +# Other self-describing ModPlug audio characteristic options. +# (Note that the 32 bit sample size seems to be buggy.) +#ModPlug_Channels = 2 # 1 or 2 channels +#ModPlug_Bits = 16 # 8, 16 or 32 bits +#ModPlug_Frequency = 44100 # 11025, 22050, 44100 or 48000 Hz +#ModPlug_ReverbDepth = 0 # 0 (quiet) to 100 (loud) +#ModPlug_ReverbDelay = 0 # Delay in ms (usually 40-200ms) +#ModPlug_BassAmount = 0 # 0 (quiet) to 100 (loud). +#ModPlug_BassRange = 10 # Cutoff in Hz (10-100). +#ModPlug_SurroundDepth = 0 # Surround level 0(quiet)-100(heavy). +#ModPlug_SurroundDelay = 0 # Surround delay in ms, usually 5-40ms. +#ModPlug_LoopCount = 0 # 0 (never), n (times) or -1 (forever) + +# Self-describing TiMidity audio characteristic options. +#TiMidity_Rate = 44100 # Between 8000 and 48000 +#TiMidity_Bits = 16 # 8 or 16 +#TiMidity_Channels = 2 # 1 or 2 +#TiMidity_Volume = 100 # 0 to 800 + +# You can setup a TiMidity-Config-File here. +# Leave it unset to use library defaults (/etc/timidity.cfg mostly). +# Setting it to 'yes' also uses the library defaults. +# Set it to 'no' if you don't have any configuration file. +# Otherwise set it to the name of a specific file. +#TiMidity_Config = + +# Self-describing SidPlay2 audio characteristic options. +#SidPlay2_DefaultSongLength = 180 # If not in database (in seconds) +#SidPlay2_MinimumSongLength = 0 # Play at least n (in seconds) +#SidPlay2_Frequency = 44100 # 4000 to 48000 +#SidPlay2_Bits = 16 # 8 or 16 +#SidPlay2_Optimisation = 0 # 0 (worst quality) to 2 (best quality) + +# Set path to a HVSC-compatible database (if not set, database is disabled). +#SidPlay2_Database = + +# SidPlay2 playback Mode: +# +# "M": Mono (best for many SIDs) +# "S": Stereo +# "L"/"R": Left / Right +# +#SidPlay2_PlayMode = "M" + +# Use start-song information from SID ('yes') or start at first song +# ('no'). Songs before the start-song won't be played. (Note that this +# option previously took the values 1 and 0; these are now deprecated +# in favour of 'yes' and 'no'.) +#SidPlay2_StartAtStart = yes + +# Play sub-tunes. (Note that this option previously took the values 1 +# and 0; these are now deprecated in favour of 'yes' and 'no'.) +#SidPlay2_PlaySubTunes = yes + +# Run the OnSongChange command when a new song starts playing. +# Specify the full path (i.e. no leading '~') of an executable to run. +# Arguments will be passed, and you can use the following escapes: +# +# %a artist +# %r album +# %f filename +# %t title +# %n track +# %d file duration in XX:YY form +# %D file duration, number of seconds +# +# No pipes/redirects can be used directly, but writing a shell script +# can do the job. +# +# Example: OnSongChange = "/home/jack/.moc/myscript %a %r" +# +#OnSongChange = + +# If RepeatSongChange is 'yes' then MOC will execute the command every time +# a song starts playing regardless of whether or not it is just repeating. +# Otherwise the command will only be executed when a different song is +# started. +#RepeatSongChange = no + +# Run the OnStop command (full path, no arguments) when MOC changes state +# to stopped (i.e., when user stopped playing or changes a song). +#OnStop = "/home/jack/.moc/myscript_on_stop" + +# This option determines which song to play after finishing all the songs +# in the queue. Setting this to 'yes' causes MOC to play the song which +# follows the song being played before queue playing started. If set to +# 'no', MOC will play the song following the last song in the queue if it +# is in the playlist. The default is 'yes' because this is the way other +# players usually behave. (Note that this option previously took the +# values 1 and 0; these are now deprecated in favour of 'yes' and 'no'.) +#QueueNextSongReturn = yes diff --git a/.config/moc/equalizer b/.config/moc/equalizer new file mode 100644 index 0000000..7efeafd --- /dev/null +++ b/.config/moc/equalizer @@ -0,0 +1,2 @@ +Active: 1 +Mixin: 0.250000 diff --git a/.config/moc/keymap b/.config/moc/keymap new file mode 100644 index 0000000..4fe0ad1 --- /dev/null +++ b/.config/moc/keymap @@ -0,0 +1,188 @@ +# This is the example keymap file for MOC. You can define your own key +# bindings for MOC commands by creating your own keymap file and setting +# the 'Keymap' option in ~/.moc/config. +# +# The format of this file is: +# +# - Lines beginning with # are comments. +# - Blank lines are ignored. +# - Every other line is expected to be in one of the formats: +# +# COMMAND = [KEY ...] +# COMMAND += KEY ... +# +# The KEY can be: +# +# - Just a char, like i, L, ", * +# - CTRL-KEY sequence: ^k (CTRL-k), ^4 +# - ALT-KEY (meta) sequence: M-j (ALT-j), M-/ +# - Special keys: DOWN, UP +# LEFT, RIGHT +# HOME, END +# BACKSPACE +# INS, DEL +# ENTER +# PAGE_UP, PAGE_DOWN +# SPACE, TAB +# KEYPAD_CENTER +# ESCAPE +# F1 - F12 +# +# Note that the use of a digit as a KEY is deprecated. +# +# Maximum number of KEYs for one COMMAND is 5. +# +# Omitting the KEY for a COMMAND will unbind all its default keys. They +# will also be automatically unbound when you bind new KEYs to it. Individual +# default KEYs will be automatically unbound when they are explicitly bound +# to some other COMMAND. +# +# Using the '+=' form will cause the KEYs to be appended to any existing +# (default or explicit) bindings for the COMMAND. Appending an existing +# default binding for the same COMMAND will cause MOC to think of that KEY +# as then being explicitly bound. +# +# Only one binding for any given COMMAND can appear in the keymap file. One +# exception to this is that if the default keys for a COMMAND are explicitly +# unbound then a subsequent binding may appear for it. A second exception +# is that multiple appending bindings may appear. +# +# Meta-key detection is sensitive to the ESCDELAY environment variable (see +# the manpage for ncurses(3)). In its absence, MOC resets the default +# delay to 25ms. If you need to emulate meta-key sequences using the ESC +# key, then you may need to set the value of ESCDELAY back to its ncurses +# default of 1000ms (but doing so will make the response to the ESC key +# sluggish). +# +# If MOC's keypresses are being filtered through some other program (in a +# GUI environment, for example) which also does meta-key detection, then +# MOC is at the mercy of the timings with which that program presents them. +# +# Default key configuration for MOC (and a list of all available commands): + +# MOC control keys: +quit_client = q +quit = Q + +# Menu and interface control keys: +go = ENTER +menu_down = DOWN +menu_up = UP +menu_page_down = PAGE_DOWN +menu_page_up = PAGE_UP +menu_first_item = HOME +menu_last_item = END +search_menu = g / +toggle_read_tags = f +toggle_show_time = ^t +toggle_show_format = ^f +toggle_menu = TAB +toggle_layout = l +toggle_hidden_files = H +next_search = ^g ^n +show_lyrics = L +theme_menu = T +help = h ? +refresh = ^r +reload = r + +# Audio playing and positioning keys: +seek_forward = RIGHT +seek_backward = LEFT +seek_forward_fast = ] +seek_backward_fast = [ +pause = p SPACE +stop = s +next = n +previous = b +toggle_shuffle = S +toggle_repeat = R +toggle_auto_next = X +toggle_mixer = x +go_url = o + +# Volume control keys: +volume_down_1 = < +volume_up_1 = > +volume_down_5 = , +volume_up_5 = . +volume_10 = M-1 +volume_20 = M-2 +volume_30 = M-3 +volume_40 = M-4 +volume_50 = M-5 +volume_60 = M-6 +volume_70 = M-7 +volume_80 = M-8 +volume_90 = M-9 + +# Directory navigation keys: defaults are Shift-number +# (i.e., 'shift 1' -> '!' -> 'Fastdir1'). +go_to_a_directory = i +go_to_music_directory = m +go_to_fast_dir1 = ! +go_to_fast_dir2 = @ +go_to_fast_dir3 = # +go_to_fast_dir4 = $ +go_to_fast_dir5 = % +go_to_fast_dir6 = ^ +go_to_fast_dir7 = & +go_to_fast_dir8 = * +go_to_fast_dir9 = ( +go_to_fast_dir10 = ) +go_to_playing_file = G +go_up = U + +# Playlist specific keys: +add_file = a +add_directory = A +plist_add_stream = ^u +delete_from_playlist = d +playlist_full_paths = P +plist_move_up = u +plist_move_down = j +save_playlist = V +remove_dead_entries = Y +clear_playlist = C + +# Queue manipulation keys: +enqueue_file = z +clear_queue = Z + +# User interaction control: +history_up = UP +history_down = DOWN +delete_to_start = ^u +delete_to_end = ^k +cancel = ^x ESCAPE +hide_message = M + +# Softmixer specific keys: +toggle_softmixer = w +toggle_make_mono = J + +# Equalizer specific keys: +toggle_equalizer = E +equalizer_refresh = e +equalizer_prev = K +equalizer_next = k + +# External commands: +mark_start = ' +mark_end = " +exec_command1 = F1 +exec_command2 = F2 +exec_command3 = F3 +exec_command4 = F4 +exec_command5 = F5 +exec_command6 = F6 +exec_command7 = F7 +exec_command8 = F8 +exec_command9 = F9 +exec_command10 = F10 + +# The following commands are available but not assigned to any keys by +# default: +# +# toggle_percent Switch on/off play progress bar time percentage +# diff --git a/.config/moc/last_directory b/.config/moc/last_directory new file mode 100644 index 0000000..e197c2f --- /dev/null +++ b/.config/moc/last_directory @@ -0,0 +1 @@ +/home/alex/media/audio/music/compilations \ No newline at end of file diff --git a/.config/moc/playlist.m3u b/.config/moc/playlist.m3u new file mode 100644 index 0000000..7c67240 --- /dev/null +++ b/.config/moc/playlist.m3u @@ -0,0 +1,4 @@ +#EXTM3U +#MOCSERIAL: 768 +#EXTINF:18965,/home/alex/media/audio/music/compilations/The Best Of Folk Metal Mix. Compilation 2.-wClxK8r_Sj0.webm +/home/alex/media/audio/music/compilations/The Best Of Folk Metal Mix. Compilation 2.-wClxK8r_Sj0.webm diff --git a/.config/moc/softmixer b/.config/moc/softmixer new file mode 100644 index 0000000..ae858e1 --- /dev/null +++ b/.config/moc/softmixer @@ -0,0 +1,4 @@ +Active: 0 +Amplification: 100 +Value: 100 +Mono: 0 diff --git a/.config/moc/themes/transparent-background b/.config/moc/themes/transparent-background new file mode 100644 index 0000000..a73ffa5 --- /dev/null +++ b/.config/moc/themes/transparent-background @@ -0,0 +1,34 @@ +# Transparent background theme by Marcin Michałowski + +background = default default +frame = white default +window_title = white default +directory = white default bold +selected_directory = white blue bold +playlist = white default bold +selected_playlist = white blue bold +file = white default +selected_file = white blue +marked_file = green default bold +marked_selected_file = green blue bold +info = blue default bold +status = white default +title = white default bold +state = white default bold +current_time = white default bold +time_left = white default bold +total_time = white default bold +time_total_frames = white default +sound_parameters = white default bold +legend = white default +disabled = blue default bold +enabled = white default bold +empty_mixer_bar = white default +filled_mixer_bar = black cyan +empty_time_bar = white default +filled_time_bar = black cyan +entry = white default +entry_title = black cyan +error = red default bold +message = green default bold +plist_time = white default bold diff --git a/.config/mpd/mpd.conf b/.config/mpd/mpd.conf new file mode 100644 index 0000000..efc11ff --- /dev/null +++ b/.config/mpd/mpd.conf @@ -0,0 +1,22 @@ +music_directory "~/media/audio" +playlist_directory "~/.config/mpd/playlists/" + +auto_update "yes" +bind_to_address "127.0.0.1" +restore_paused "yes" +max_output_buffer_size "16384" + +audio_output { + type "pulse" + name "pulse audio" + #device "pulse" + #mixer_type "hardware" +} + + +audio_output { + type "fifo" + name "Visualizer feed" + path "/tmp/mpd.fifo" + format "44100:16:2" +} diff --git a/.config/mpv/mpv.conf b/.config/mpv/mpv.conf new file mode 100755 index 0000000..9a049d7 --- /dev/null +++ b/.config/mpv/mpv.conf @@ -0,0 +1,16 @@ +hwdec=vaapi +gpu-context=wayland +osc=no +alang=jpn +slang=eng + +[extension.gif] +loop-file=inf + +[extension.webm] +loop-file=inf + +[idle] +profile-cond=p["idle-active"] +profile-restore=copy-equal +background=1 diff --git a/.config/mpv/scripts/morden.lua b/.config/mpv/scripts/morden.lua new file mode 100644 index 0000000..ef51938 --- /dev/null +++ b/.config/mpv/scripts/morden.lua @@ -0,0 +1,2042 @@ +-- by maoiscat +-- email:valarmor@163.com +-- https://github.com/maoiscat/mpv-osc-morden + +local assdraw = require 'mp.assdraw' +local msg = require 'mp.msg' +local opt = require 'mp.options' +local utils = require 'mp.utils' + +-- +-- Parameters +-- +-- default user option values +-- may change them in osc.conf +local user_opts = { + showwindowed = true, -- show OSC when windowed? + showfullscreen = true, -- show OSC when fullscreen? + scalewindowed = 1, -- scaling of the controller when windowed + scalefullscreen = 1, -- scaling of the controller when fullscreen + scaleforcedwindow = 2, -- scaling when rendered on a forced window + vidscale = false, -- scale the controller with the video? + hidetimeout = 1000, -- duration in ms until the OSC hides if no + -- mouse movement. enforced non-negative for the + -- user, but internally negative is 'always-on'. + fadeduration = 500, -- duration of fade out in ms, 0 = no fade + minmousemove = 3, -- minimum amount of pixels the mouse has to + -- move between ticks to make the OSC show up + iamaprogrammer = false, -- use native mpv values and disable OSC + -- internal track list management (and some + -- functions that depend on it) + font = 'mpv-osd-symbols', -- default osc font + seekbarhandlesize = 1.0, -- size ratio of the slider handle, range 0 ~ 1 + seekrange = true, -- show seekrange overlay + seekrangealpha = 128, -- transparency of seekranges + seekbarkeyframes = true, -- use keyframes when dragging the seekbar + title = '${media-title}', -- string compatible with property-expansion + -- to be shown as OSC title + showtitle = true, -- show title and no hide timeout on pause + timetotal = true, -- display total time instead of remaining time? + visibility = 'auto', -- only used at init to set visibility_mode(...) + windowcontrols = 'no', -- whether to show window controls + language = 'eng', -- eng=English, chs=Chinese +} + +-- Localization +local language = { + ['eng'] = { + welcome = '{\\fs24\\1c&H0&\\3c&HFFFFFF&}Drop files or URLs to play here.', -- this text appears when mpv starts + off = 'OFF', + na = 'n/a', + none = 'none', + video = 'Video', + audio = 'Audio', + subtitle = 'Subtitle', + available = 'Available ', + track = ' Tracks:', + playlist = 'Playlist', + nolist = 'Empty playlist.', + chapter = 'Chapter', + nochapter = 'No chapters.', + }, + ['chs'] = { + welcome = '{\\1c&H00\\bord0\\fs30\\fn微软雅黑 light\\fscx125}MPV{\\fscx100} 播放器', -- this text appears when mpv starts + off = '关闭', + na = 'n/a', + none = '无', + video = '视频', + audio = '音频', + subtitle = '字幕', + available = '可选', + track = ':', + playlist = '播放列表', + nolist = '无列表信息', + chapter = '章节', + nochapter = '无章节信息', + } +} +-- read options from config and command-line +opt.read_options(user_opts, 'osc', function(list) update_options(list) end) +-- apply lang opts +local texts = language[user_opts.language] +local osc_param = { -- calculated by osc_init() + playresy = 0, -- canvas size Y + playresx = 0, -- canvas size X + display_aspect = 1, + unscaled_y = 0, + areas = {}, +} + +local osc_styles = { + TransBg = '{\\blur100\\bord140\\1c&H000000&\\3c&H000000&}', + SeekbarBg = '{\\blur0\\bord0\\1c&HFFFFFF&}', + SeekbarFg = '{\\blur1\\bord1\\1c&HE39C42&}', + Ctrl1 = '{\\blur0\\bord0\\1c&HFFFFFF&\\3c&HFFFFFF&\\fs36\\fnmaterial-design-iconic-font}', + Ctrl2 = '{\\blur0\\bord0\\1c&HFFFFFF&\\3c&HFFFFFF&\\fs24\\fnmaterial-design-iconic-font}', + Ctrl3 = '{\\blur0\\bord0\\1c&HFFFFFF&\\3c&HFFFFFF&\\fs24\\fnmaterial-design-iconic-font}', + Time = '{\\blur0\\bord0\\1c&HFFFFFF&\\3c&H000000&\\fs17\\fn' .. user_opts.font .. '}', + Tooltip = '{\\blur1\\bord0.5\\1c&HFFFFFF&\\3c&H000000&\\fs18\\fn' .. user_opts.font .. '}', + Title = '{\\blur1\\bord0.5\\1c&HFFFFFF&\\3c&H0\\fs48\\q2\\fn' .. user_opts.font .. '}', + WinCtrl = '{\\blur1\\bord0.5\\1c&HFFFFFF&\\3c&H0\\fs20\\fnmpv-osd-symbols}', + elementDown = '{\\1c&H999999&}', +} + +-- internal states, do not touch +local state = { + showtime, -- time of last invocation (last mouse move) + osc_visible = false, + anistart, -- time when the animation started + anitype, -- current type of animation + animation, -- current animation alpha + mouse_down_counter = 0, -- used for softrepeat + active_element = nil, -- nil = none, 0 = background, 1+ = see elements[] + active_event_source = nil, -- the 'button' that issued the current event + rightTC_trem = not user_opts.timetotal, -- if the right timecode should display total or remaining time + mp_screen_sizeX, mp_screen_sizeY, -- last screen-resolution, to detect resolution changes to issue reINITs + initREQ = false, -- is a re-init request pending? + last_mouseX, last_mouseY, -- last mouse position, to detect significant mouse movement + mouse_in_window = false, + message_text, + message_hide_timer, + fullscreen = false, + tick_timer = nil, + tick_last_time = 0, -- when the last tick() was run + hide_timer = nil, + cache_state = nil, + idle = false, + enabled = true, + input_enabled = true, + showhide_enabled = false, + dmx_cache = 0, + border = true, + maximized = false, + osd = mp.create_osd_overlay('ass-events'), + lastvisibility = user_opts.visibility, -- save last visibility on pause if showtitle +} + +local window_control_box_width = 138 +local tick_delay = 0.03 + +-- +-- Helperfunctions +-- + +function set_osd(res_x, res_y, text) + if state.osd.res_x == res_x and + state.osd.res_y == res_y and + state.osd.data == text then + return + end + state.osd.res_x = res_x + state.osd.res_y = res_y + state.osd.data = text + state.osd.z = 1000 + state.osd:update() +end + +-- scale factor for translating between real and virtual ASS coordinates +function get_virt_scale_factor() + local w, h = mp.get_osd_size() + if w <= 0 or h <= 0 then + return 0, 0 + end + return osc_param.playresx / w, osc_param.playresy / h +end + +-- return mouse position in virtual ASS coordinates (playresx/y) +function get_virt_mouse_pos() + if state.mouse_in_window then + local sx, sy = get_virt_scale_factor() + local x, y = mp.get_mouse_pos() + return x * sx, y * sy + else + return -1, -1 + end +end + +function set_virt_mouse_area(x0, y0, x1, y1, name) + local sx, sy = get_virt_scale_factor() + mp.set_mouse_area(x0 / sx, y0 / sy, x1 / sx, y1 / sy, name) +end + +function scale_value(x0, x1, y0, y1, val) + local m = (y1 - y0) / (x1 - x0) + local b = y0 - (m * x0) + return (m * val) + b +end + +-- returns hitbox spanning coordinates (top left, bottom right corner) +-- according to alignment +function get_hitbox_coords(x, y, an, w, h) + + local alignments = { + [1] = function () return x, y-h, x+w, y end, + [2] = function () return x-(w/2), y-h, x+(w/2), y end, + [3] = function () return x-w, y-h, x, y end, + + [4] = function () return x, y-(h/2), x+w, y+(h/2) end, + [5] = function () return x-(w/2), y-(h/2), x+(w/2), y+(h/2) end, + [6] = function () return x-w, y-(h/2), x, y+(h/2) end, + + [7] = function () return x, y, x+w, y+h end, + [8] = function () return x-(w/2), y, x+(w/2), y+h end, + [9] = function () return x-w, y, x, y+h end, + } + + return alignments[an]() +end + +function get_hitbox_coords_geo(geometry) + return get_hitbox_coords(geometry.x, geometry.y, geometry.an, + geometry.w, geometry.h) +end + +function get_element_hitbox(element) + return element.hitbox.x1, element.hitbox.y1, + element.hitbox.x2, element.hitbox.y2 +end + +function mouse_hit(element) + return mouse_hit_coords(get_element_hitbox(element)) +end + +function mouse_hit_coords(bX1, bY1, bX2, bY2) + local mX, mY = get_virt_mouse_pos() + return (mX >= bX1 and mX <= bX2 and mY >= bY1 and mY <= bY2) +end + +function limit_range(min, max, val) + if val > max then + val = max + elseif val < min then + val = min + end + return val +end + +-- translate value into element coordinates +function get_slider_ele_pos_for(element, val) + + local ele_pos = scale_value( + element.slider.min.value, element.slider.max.value, + element.slider.min.ele_pos, element.slider.max.ele_pos, + val) + + return limit_range( + element.slider.min.ele_pos, element.slider.max.ele_pos, + ele_pos) +end + +-- translates global (mouse) coordinates to value +function get_slider_value_at(element, glob_pos) + + local val = scale_value( + element.slider.min.glob_pos, element.slider.max.glob_pos, + element.slider.min.value, element.slider.max.value, + glob_pos) + + return limit_range( + element.slider.min.value, element.slider.max.value, + val) +end + +-- get value at current mouse position +function get_slider_value(element) + return get_slider_value_at(element, get_virt_mouse_pos()) +end + +function countone(val) + if not (user_opts.iamaprogrammer) then + val = val + 1 + end + return val +end + +-- multiplies two alpha values, formular can probably be improved +function mult_alpha(alphaA, alphaB) + return 255 - (((1-(alphaA/255)) * (1-(alphaB/255))) * 255) +end + +function add_area(name, x1, y1, x2, y2) + -- create area if needed + if (osc_param.areas[name] == nil) then + osc_param.areas[name] = {} + end + table.insert(osc_param.areas[name], {x1=x1, y1=y1, x2=x2, y2=y2}) +end + +function ass_append_alpha(ass, alpha, modifier) + local ar = {} + + for ai, av in pairs(alpha) do + av = mult_alpha(av, modifier) + if state.animation then + av = mult_alpha(av, state.animation) + end + ar[ai] = av + end + + ass:append(string.format('{\\1a&H%X&\\2a&H%X&\\3a&H%X&\\4a&H%X&}', + ar[1], ar[2], ar[3], ar[4])) +end + +function ass_draw_cir_cw(ass, x, y, r) + ass:round_rect_cw(x-r, y-r, x+r, y+r, r) +end + +function ass_draw_rr_h_cw(ass, x0, y0, x1, y1, r1, hexagon, r2) + if hexagon then + ass:hexagon_cw(x0, y0, x1, y1, r1, r2) + else + ass:round_rect_cw(x0, y0, x1, y1, r1, r2) + end +end + +function ass_draw_rr_h_ccw(ass, x0, y0, x1, y1, r1, hexagon, r2) + if hexagon then + ass:hexagon_ccw(x0, y0, x1, y1, r1, r2) + else + ass:round_rect_ccw(x0, y0, x1, y1, r1, r2) + end +end + + +-- +-- Tracklist Management +-- + +local nicetypes = {video = texts.video, audio = texts.audio, sub = texts.subtitle} + +-- updates the OSC internal playlists, should be run each time the track-layout changes +function update_tracklist() + local tracktable = mp.get_property_native('track-list', {}) + + -- by osc_id + tracks_osc = {} + tracks_osc.video, tracks_osc.audio, tracks_osc.sub = {}, {}, {} + -- by mpv_id + tracks_mpv = {} + tracks_mpv.video, tracks_mpv.audio, tracks_mpv.sub = {}, {}, {} + for n = 1, #tracktable do + if not (tracktable[n].type == 'unknown') then + local type = tracktable[n].type + local mpv_id = tonumber(tracktable[n].id) + + -- by osc_id + table.insert(tracks_osc[type], tracktable[n]) + + -- by mpv_id + tracks_mpv[type][mpv_id] = tracktable[n] + tracks_mpv[type][mpv_id].osc_id = #tracks_osc[type] + end + end +end + +-- return a nice list of tracks of the given type (video, audio, sub) +function get_tracklist(type) + local msg = texts.available .. nicetypes[type] .. texts.track + if #tracks_osc[type] == 0 then + msg = msg .. texts.none + else + for n = 1, #tracks_osc[type] do + local track = tracks_osc[type][n] + local lang, title, selected = 'unknown', '', '○' + if not(track.lang == nil) then lang = track.lang end + if not(track.title == nil) then title = track.title end + if (track.id == tonumber(mp.get_property(type))) then + selected = '●' + end + msg = msg..'\n'..selected..' '..n..': ['..lang..'] '..title + end + end + return msg +end + +-- relatively change the track of given by tracks + --(+1 -> next, -1 -> previous) +function set_track(type, next) + local current_track_mpv, current_track_osc + if (mp.get_property(type) == 'no') then + current_track_osc = 0 + else + current_track_mpv = tonumber(mp.get_property(type)) + current_track_osc = tracks_mpv[type][current_track_mpv].osc_id + end + local new_track_osc = (current_track_osc + next) % (#tracks_osc[type] + 1) + local new_track_mpv + if new_track_osc == 0 then + new_track_mpv = 'no' + else + new_track_mpv = tracks_osc[type][new_track_osc].id + end + + mp.commandv('set', type, new_track_mpv) + +-- if (new_track_osc == 0) then +-- show_message(nicetypes[type] .. ' Track: none') +-- else +-- show_message(nicetypes[type] .. ' Track: ' +-- .. new_track_osc .. '/' .. #tracks_osc[type] +-- .. ' ['.. (tracks_osc[type][new_track_osc].lang or 'unknown') ..'] ' +-- .. (tracks_osc[type][new_track_osc].title or '')) +-- end +end + +-- get the currently selected track of , OSC-style counted +function get_track(type) + local track = mp.get_property(type) + if track ~= 'no' and track ~= nil then + local tr = tracks_mpv[type][tonumber(track)] + if tr then + return tr.osc_id + end + end + return 0 +end + +-- WindowControl helpers +function window_controls_enabled() + val = user_opts.windowcontrols + if val == 'auto' then + return (not state.border) or state.fullscreen + else + return val ~= 'no' + end +end + +-- +-- Element Management +-- + +local elements = {} + +function prepare_elements() + + -- remove elements without layout or invisble + local elements2 = {} + for n, element in pairs(elements) do + if not (element.layout == nil) and (element.visible) then + table.insert(elements2, element) + end + end + elements = elements2 + + function elem_compare (a, b) + return a.layout.layer < b.layout.layer + end + + table.sort(elements, elem_compare) + + + for _,element in pairs(elements) do + + local elem_geo = element.layout.geometry + + -- Calculate the hitbox + local bX1, bY1, bX2, bY2 = get_hitbox_coords_geo(elem_geo) + element.hitbox = {x1 = bX1, y1 = bY1, x2 = bX2, y2 = bY2} + + local style_ass = assdraw.ass_new() + + -- prepare static elements + style_ass:append('{}') -- hack to troll new_event into inserting a \n + style_ass:new_event() + style_ass:pos(elem_geo.x, elem_geo.y) + style_ass:an(elem_geo.an) + style_ass:append(element.layout.style) + + element.style_ass = style_ass + + local static_ass = assdraw.ass_new() + + + if (element.type == 'box') then + --draw box + static_ass:draw_start() + ass_draw_rr_h_cw(static_ass, 0, 0, elem_geo.w, elem_geo.h, + element.layout.box.radius, element.layout.box.hexagon) + static_ass:draw_stop() + + elseif (element.type == 'slider') then + --draw static slider parts + local slider_lo = element.layout.slider + -- calculate positions of min and max points + element.slider.min.ele_pos = user_opts.seekbarhandlesize * elem_geo.h / 2 + element.slider.max.ele_pos = elem_geo.w - element.slider.min.ele_pos + element.slider.min.glob_pos = element.hitbox.x1 + element.slider.min.ele_pos + element.slider.max.glob_pos = element.hitbox.x1 + element.slider.max.ele_pos + + static_ass:draw_start() + -- a hack which prepares the whole slider area to allow center placements such like an=5 + static_ass:rect_cw(0, 0, elem_geo.w, elem_geo.h) + static_ass:rect_ccw(0, 0, elem_geo.w, elem_geo.h) + -- marker nibbles + if not (element.slider.markerF == nil) and (slider_lo.gap > 0) then + local markers = element.slider.markerF() + for _,marker in pairs(markers) do + if (marker >= element.slider.min.value) and (marker <= element.slider.max.value) then + local s = get_slider_ele_pos_for(element, marker) + if (slider_lo.gap > 5) then -- draw triangles + --top + if (slider_lo.nibbles_top) then + static_ass:move_to(s - 3, slider_lo.gap - 5) + static_ass:line_to(s + 3, slider_lo.gap - 5) + static_ass:line_to(s, slider_lo.gap - 1) + end + --bottom + if (slider_lo.nibbles_bottom) then + static_ass:move_to(s - 3, elem_geo.h - slider_lo.gap + 5) + static_ass:line_to(s, elem_geo.h - slider_lo.gap + 1) + static_ass:line_to(s + 3, elem_geo.h - slider_lo.gap + 5) + end + else -- draw 2x1px nibbles + --top + if (slider_lo.nibbles_top) then + static_ass:rect_cw(s - 1, 0, s + 1, slider_lo.gap); + end + --bottom + if (slider_lo.nibbles_bottom) then + static_ass:rect_cw(s - 1, elem_geo.h-slider_lo.gap, s + 1, elem_geo.h); + end + end + end + end + end + end + + element.static_ass = static_ass + + -- if the element is supposed to be disabled, + -- style it accordingly and kill the eventresponders + if not (element.enabled) then + element.layout.alpha[1] = 136 + element.eventresponder = nil + end + end +end + +-- +-- Element Rendering +-- +function render_elements(master_ass) + + for n=1, #elements do + local element = elements[n] + local style_ass = assdraw.ass_new() + style_ass:merge(element.style_ass) + ass_append_alpha(style_ass, element.layout.alpha, 0) + + if element.eventresponder and (state.active_element == n) then + -- run render event functions + if not (element.eventresponder.render == nil) then + element.eventresponder.render(element) + end + if mouse_hit(element) then + -- mouse down styling + if (element.styledown) then + style_ass:append(osc_styles.elementDown) + end + if (element.softrepeat) and (state.mouse_down_counter >= 15 + and state.mouse_down_counter % 5 == 0) then + + element.eventresponder[state.active_event_source..'_down'](element) + end + state.mouse_down_counter = state.mouse_down_counter + 1 + end + end + + local elem_ass = assdraw.ass_new() + elem_ass:merge(style_ass) + + if not (element.type == 'button') then + elem_ass:merge(element.static_ass) + end + + if (element.type == 'slider') then + + local slider_lo = element.layout.slider + local elem_geo = element.layout.geometry + local s_min = element.slider.min.value + local s_max = element.slider.max.value + -- draw pos marker + local pos = element.slider.posF() + local seekRanges = element.slider.seekRangesF() + local rh = user_opts.seekbarhandlesize * elem_geo.h / 2 -- Handle radius + local xp + + if pos then + xp = get_slider_ele_pos_for(element, pos) + ass_draw_cir_cw(elem_ass, xp, elem_geo.h/2, rh) + elem_ass:rect_cw(0, slider_lo.gap, xp, elem_geo.h - slider_lo.gap) + end + + if seekRanges then + elem_ass:draw_stop() + elem_ass:merge(element.style_ass) + ass_append_alpha(elem_ass, element.layout.alpha, user_opts.seekrangealpha) + elem_ass:merge(element.static_ass) + + for _,range in pairs(seekRanges) do + local pstart = get_slider_ele_pos_for(element, range['start']) + local pend = get_slider_ele_pos_for(element, range['end']) + elem_ass:rect_cw(pstart - rh, slider_lo.gap, pend + rh, elem_geo.h - slider_lo.gap) + end + end + + elem_ass:draw_stop() + + -- add tooltip + if not (element.slider.tooltipF == nil) then + if mouse_hit(element) then + local sliderpos = get_slider_value(element) + local tooltiplabel = element.slider.tooltipF(sliderpos) + local an = slider_lo.tooltip_an + local ty + if (an == 2) then + ty = element.hitbox.y1 + else + ty = element.hitbox.y1 + elem_geo.h/2 + end + + local tx = get_virt_mouse_pos() + if (slider_lo.adjust_tooltip) then + if (an == 2) then + if (sliderpos < (s_min + 3)) then + an = an - 1 + elseif (sliderpos > (s_max - 3)) then + an = an + 1 + end + elseif (sliderpos > (s_max-s_min)/2) then + an = an + 1 + tx = tx - 5 + else + an = an - 1 + tx = tx + 10 + end + end + + -- tooltip label + elem_ass:new_event() + elem_ass:pos(tx, ty) + elem_ass:an(an) + elem_ass:append(slider_lo.tooltip_style) + ass_append_alpha(elem_ass, slider_lo.alpha, 0) + elem_ass:append(tooltiplabel) + end + end + + elseif (element.type == 'button') then + + local buttontext + if type(element.content) == 'function' then + buttontext = element.content() -- function objects + elseif not (element.content == nil) then + buttontext = element.content -- text objects + end + + buttontext = buttontext:gsub(':%((.?.?.?)%) unknown ', ':%(%1%)') --gsub('%) unknown %(\'', '') + + local maxchars = element.layout.button.maxchars + -- 认为1个中文字符约等于1.5个英文字符 + -- local charcount = buttontext:len()- (buttontext:len()-select(2, buttontext:gsub('[^\128-\193]', '')))/1.5 + local charcount = (buttontext:len() + select(2, buttontext:gsub('[^\128-\193]', ''))*2) / 3 + if not (maxchars == nil) and (charcount > maxchars) then + local limit = math.max(0, maxchars - 3) + if (charcount > limit) then + while (charcount > limit) do + buttontext = buttontext:gsub('.[\128-\191]*$', '') + charcount = (buttontext:len() + select(2, buttontext:gsub('[^\128-\193]', ''))*2) / 3 + end + buttontext = buttontext .. '...' + end + end + + elem_ass:append(buttontext) + + -- add tooltip + if not (element.tooltipF == nil) and element.enabled then + if mouse_hit(element) then + local tooltiplabel = element.tooltipF + local an = 1 + local ty = element.hitbox.y1 + local tx = get_virt_mouse_pos() + + if ty < osc_param.playresy / 2 then + ty = element.hitbox.y2 + an = 7 + end + + -- tooltip label + if type(element.tooltipF) == 'function' then + tooltiplabel = element.tooltipF() + else + tooltiplabel = element.tooltipF + end + elem_ass:new_event() + elem_ass:pos(tx, ty) + elem_ass:an(an) + elem_ass:append(element.tooltip_style) + elem_ass:append(tooltiplabel) + end + end + end + + master_ass:merge(elem_ass) + end +end + +-- +-- Message display +-- + +-- pos is 1 based +function limited_list(prop, pos) + local proplist = mp.get_property_native(prop, {}) + local count = #proplist + if count == 0 then + return count, proplist + end + + local fs = tonumber(mp.get_property('options/osd-font-size')) + local max = math.ceil(osc_param.unscaled_y*0.75 / fs) + if max % 2 == 0 then + max = max - 1 + end + local delta = math.ceil(max / 2) - 1 + local begi = math.max(math.min(pos - delta, count - max + 1), 1) + local endi = math.min(begi + max - 1, count) + + local reslist = {} + for i=begi, endi do + local item = proplist[i] + item.current = (i == pos) and true or nil + table.insert(reslist, item) + end + return count, reslist +end + +function get_playlist() + local pos = mp.get_property_number('playlist-pos', 0) + 1 + local count, limlist = limited_list('playlist', pos) + if count == 0 then + return texts.nolist + end + + local message = string.format(texts.playlist .. ' [%d/%d]:\n', pos, count) + for i, v in ipairs(limlist) do + local title = v.title + local _, filename = utils.split_path(v.filename) + if title == nil then + title = filename + end + message = string.format('%s %s %s\n', message, + (v.current and '●' or '○'), title) + end + return message +end + +function get_chapterlist() + local pos = mp.get_property_number('chapter', 0) + 1 + local count, limlist = limited_list('chapter-list', pos) + if count == 0 then + return texts.nochapter + end + + local message = string.format(texts.chapter.. ' [%d/%d]:\n', pos, count) + for i, v in ipairs(limlist) do + local time = mp.format_time(v.time) + local title = v.title + if title == nil then + title = string.format(texts.chapter .. ' %02d', i) + end + message = string.format('%s[%s] %s %s\n', message, time, + (v.current and '●' or '○'), title) + end + return message +end + +function show_message(text, duration) + + --print('text: '..text..' duration: ' .. duration) + if duration == nil then + duration = tonumber(mp.get_property('options/osd-duration')) / 1000 + elseif not type(duration) == 'number' then + print('duration: ' .. duration) + end + + -- cut the text short, otherwise the following functions + -- may slow down massively on huge input + text = string.sub(text, 0, 4000) + + -- replace actual linebreaks with ASS linebreaks + text = string.gsub(text, '\n', '\\N') + + state.message_text = text + + if not state.message_hide_timer then + state.message_hide_timer = mp.add_timeout(0, request_tick) + end + state.message_hide_timer:kill() + state.message_hide_timer.timeout = duration + state.message_hide_timer:resume() + request_tick() +end + +function render_message(ass) + if state.message_hide_timer and state.message_hide_timer:is_enabled() and + state.message_text + then + local _, lines = string.gsub(state.message_text, '\\N', '') + + local fontsize = tonumber(mp.get_property('options/osd-font-size')) + local outline = tonumber(mp.get_property('options/osd-border-size')) + local maxlines = math.ceil(osc_param.unscaled_y*0.75 / fontsize) + local counterscale = osc_param.playresy / osc_param.unscaled_y + + fontsize = fontsize * counterscale / math.max(0.65 + math.min(lines/maxlines, 1), 1) + outline = outline * counterscale / math.max(0.75 + math.min(lines/maxlines, 1)/2, 1) + + local style = '{\\bord' .. outline .. '\\fs' .. fontsize .. '}' + + + ass:new_event() + ass:append(style .. state.message_text) + else + state.message_text = nil + end +end + +-- +-- Initialisation and Layout +-- + +function new_element(name, type) + elements[name] = {} + elements[name].type = type + + -- add default stuff + elements[name].eventresponder = {} + elements[name].visible = true + elements[name].enabled = true + elements[name].softrepeat = false + elements[name].styledown = (type == 'button') + elements[name].state = {} + + if (type == 'slider') then + elements[name].slider = {min = {value = 0}, max = {value = 100}} + end + + + return elements[name] +end + +function add_layout(name) + if not (elements[name] == nil) then + -- new layout + elements[name].layout = {} + + -- set layout defaults + elements[name].layout.layer = 50 + elements[name].layout.alpha = {[1] = 0, [2] = 255, [3] = 255, [4] = 255} + + if (elements[name].type == 'button') then + elements[name].layout.button = { + maxchars = nil, + } + elseif (elements[name].type == 'slider') then + -- slider defaults + elements[name].layout.slider = { + border = 1, + gap = 1, + nibbles_top = true, + nibbles_bottom = true, + adjust_tooltip = true, + tooltip_style = '', + tooltip_an = 2, + alpha = {[1] = 0, [2] = 255, [3] = 88, [4] = 255}, + } + elseif (elements[name].type == 'box') then + elements[name].layout.box = {radius = 0, hexagon = false} + end + + return elements[name].layout + else + msg.error('Can\'t add_layout to element \''..name..'\', doesn\'t exist.') + end +end + +-- Window Controls +function window_controls() + local wc_geo = { + x = 0, + y = 32, + an = 1, + w = osc_param.playresx, + h = 32, + } + + local controlbox_w = window_control_box_width + local titlebox_w = wc_geo.w - controlbox_w + + -- Default alignment is 'right' + local controlbox_left = wc_geo.w - controlbox_w + local titlebox_left = wc_geo.x + local titlebox_right = wc_geo.w - controlbox_w + + add_area('window-controls', + get_hitbox_coords(controlbox_left, wc_geo.y, wc_geo.an, + controlbox_w, wc_geo.h)) + + local lo + + local button_y = wc_geo.y - (wc_geo.h / 2) + local first_geo = + {x = controlbox_left + 27, y = button_y, an = 5, w = 40, h = wc_geo.h} + local second_geo = + {x = controlbox_left + 69, y = button_y, an = 5, w = 40, h = wc_geo.h} + local third_geo = + {x = controlbox_left + 115, y = button_y, an = 5, w = 40, h = wc_geo.h} + + -- Window control buttons use symbols in the custom mpv osd font + -- because the official unicode codepoints are sufficiently + -- exotic that a system might lack an installed font with them, + -- and libass will complain that they are not present in the + -- default font, even if another font with them is available. + + -- Close: ?? + ne = new_element('close', 'button') + ne.content = '\238\132\149' + ne.eventresponder['mbtn_left_up'] = + function () mp.commandv('quit') end + lo = add_layout('close') + lo.geometry = third_geo + lo.style = osc_styles.WinCtrl + lo.alpha[3] = 0 + + -- Minimize: ?? + ne = new_element('minimize', 'button') + ne.content = '\\n\238\132\146' + ne.eventresponder['mbtn_left_up'] = + function () mp.commandv('cycle', 'window-minimized') end + lo = add_layout('minimize') + lo.geometry = first_geo + lo.style = osc_styles.WinCtrl + lo.alpha[3] = 0 + + -- Maximize: ?? /?? + ne = new_element('maximize', 'button') + if state.maximized or state.fullscreen then + ne.content = '\238\132\148' + else + ne.content = '\238\132\147' + end + ne.eventresponder['mbtn_left_up'] = + function () + if state.fullscreen then + mp.commandv('cycle', 'fullscreen') + else + mp.commandv('cycle', 'window-maximized') + end + end + lo = add_layout('maximize') + lo.geometry = second_geo + lo.style = osc_styles.WinCtrl + lo.alpha[3] = 0 +end + +-- +-- Layouts +-- + +local layouts = {} + +-- Default layout +layouts = function () + + local osc_geo = {w, h} + + osc_geo.w = osc_param.playresx + osc_geo.h = 180 + + -- origin of the controllers, left/bottom corner + local posX = 0 + local posY = osc_param.playresy + + osc_param.areas = {} -- delete areas + + -- area for active mouse input + add_area('input', get_hitbox_coords(posX, posY, 1, osc_geo.w, 104)) + + -- area for show/hide + add_area('showhide', 0, 0, osc_param.playresx, osc_param.playresy) + + -- fetch values + local osc_w, osc_h= + osc_geo.w, osc_geo.h + + -- + -- Controller Background + -- + local lo + + new_element('TransBg', 'box') + lo = add_layout('TransBg') + lo.geometry = {x = posX, y = posY, an = 7, w = osc_w, h = 1} + lo.style = osc_styles.TransBg + lo.layer = 10 + lo.alpha[3] = 0 + + -- + -- Alignment + -- + local refX = osc_w / 2 + local refY = posY + local geo + + -- + -- Seekbar + -- + new_element('bgbar1', 'box') + lo = add_layout('bgbar1') + lo.geometry = {x = refX , y = refY - 96 , an = 5, w = osc_geo.w - 50, h = 2} + lo.layer = 13 + lo.style = osc_styles.SeekbarBg + lo.alpha[1] = 128 + lo.alpha[3] = 128 + + lo = add_layout('seekbar') + lo.geometry = {x = refX, y = refY - 96 , an = 5, w = osc_geo.w - 50, h = 16} + lo.style = osc_styles.SeekbarFg + lo.slider.gap = 7 + lo.slider.tooltip_style = osc_styles.Tooltip + lo.slider.tooltip_an = 2 + + -- buttons + lo = add_layout('pl_prev') + lo.geometry = {x = refX - 120, y = refY - 40 , an = 5, w = 30, h = 24} + lo.style = osc_styles.Ctrl2 + + lo = add_layout('skipback') + lo.geometry = {x = refX - 60, y = refY - 40 , an = 5, w = 30, h = 24} + lo.style = osc_styles.Ctrl2 + + + lo = add_layout('playpause') + lo.geometry = {x = refX, y = refY - 40 , an = 5, w = 45, h = 45} + lo.style = osc_styles.Ctrl1 + + lo = add_layout('skipfrwd') + lo.geometry = {x = refX + 60, y = refY - 40 , an = 5, w = 30, h = 24} + lo.style = osc_styles.Ctrl2 + + lo = add_layout('pl_next') + lo.geometry = {x = refX + 120, y = refY - 40 , an = 5, w = 30, h = 24} + lo.style = osc_styles.Ctrl2 + + + -- Time + lo = add_layout('tc_left') + lo.geometry = {x = 25, y = refY - 84, an = 7, w = 64, h = 20} + lo.style = osc_styles.Time + + + lo = add_layout('tc_right') + lo.geometry = {x = osc_geo.w - 25 , y = refY -84, an = 9, w = 64, h = 20} + lo.style = osc_styles.Time + + lo = add_layout('cy_audio') + lo.geometry = {x = 37, y = refY - 40, an = 5, w = 24, h = 24} + lo.style = osc_styles.Ctrl3 + + lo = add_layout('cy_sub') + lo.geometry = {x = 87, y = refY - 40, an = 5, w = 24, h = 24} + lo.style = osc_styles.Ctrl3 + + lo = add_layout('tog_fs') + lo.geometry = {x = osc_geo.w - 37, y = refY - 40, an = 5, w = 24, h = 24} + lo.style = osc_styles.Ctrl3 + + lo = add_layout('tog_info') + lo.geometry = {x = osc_geo.w - 87, y = refY - 40, an = 5, w = 24, h = 24} + lo.style = osc_styles.Ctrl3 + + geo = { x = 25, y = refY - 132, an = 1, w = osc_geo.w - 50, h = 48 } + lo = add_layout('title') + lo.geometry = geo + lo.style = string.format('%s{\\clip(%f,%f,%f,%f)}', osc_styles.Title, + geo.x, geo.y - geo.h, geo.x + geo.w , geo.y) + lo.alpha[3] = 0 +end + +-- Validate string type user options +function validate_user_opts() + if user_opts.windowcontrols ~= 'auto' and + user_opts.windowcontrols ~= 'yes' and + user_opts.windowcontrols ~= 'no' then + msg.warn('windowcontrols cannot be \'' .. + user_opts.windowcontrols .. '\'. Ignoring.') + user_opts.windowcontrols = 'auto' + end +end + +function update_options(list) + validate_user_opts() + request_tick() + visibility_mode(user_opts.visibility, true) + request_init() +end + +-- OSC INIT +function osc_init() + msg.debug('osc_init') + + -- set canvas resolution according to display aspect and scaling setting + local baseResY = 720 + local display_w, display_h, display_aspect = mp.get_osd_size() + local scale = 1 + + if (mp.get_property('video') == 'no') then -- dummy/forced window + scale = user_opts.scaleforcedwindow + elseif state.fullscreen then + scale = user_opts.scalefullscreen + else + scale = user_opts.scalewindowed + end + + if user_opts.vidscale then + osc_param.unscaled_y = baseResY + else + osc_param.unscaled_y = display_h + end + osc_param.playresy = osc_param.unscaled_y / scale + if (display_aspect > 0) then + osc_param.display_aspect = display_aspect + end + osc_param.playresx = osc_param.playresy * osc_param.display_aspect + + -- stop seeking with the slider to prevent skipping files + state.active_element = nil + + elements = {} + + -- some often needed stuff + local pl_count = mp.get_property_number('playlist-count', 0) + local have_pl = (pl_count > 1) + local pl_pos = mp.get_property_number('playlist-pos', 0) + 1 + local have_ch = (mp.get_property_number('chapters', 0) > 0) + local loop = mp.get_property('loop-playlist', 'no') + + local ne + + -- playlist buttons + -- prev + ne = new_element('pl_prev', 'button') + + ne.content = '\xEF\x8E\xB5' + ne.enabled = (pl_pos > 1) or (loop ~= 'no') + ne.eventresponder['mbtn_left_up'] = + function () + mp.commandv('playlist-prev', 'weak') + end + ne.eventresponder['mbtn_right_up'] = + function () show_message(get_playlist()) end + + --next + ne = new_element('pl_next', 'button') + + ne.content = '\xEF\x8E\xB4' + ne.enabled = (have_pl and (pl_pos < pl_count)) or (loop ~= 'no') + ne.eventresponder['mbtn_left_up'] = + function () + mp.commandv('playlist-next', 'weak') + end + ne.eventresponder['mbtn_right_up'] = + function () show_message(get_playlist()) end + + + --play control buttons + --playpause + ne = new_element('playpause', 'button') + + ne.content = function () + if mp.get_property('pause') == 'yes' then + return ('\xEF\x8E\xAA') + else + + return ('\xEF\x8E\xA7') + end + end + ne.eventresponder['mbtn_left_up'] = + function () mp.commandv('cycle', 'pause') end + --ne.eventresponder['mbtn_right_up'] = + -- function () mp.commandv('script-binding', 'open-file-dialog') end + + --skipback + ne = new_element('skipback', 'button') + + ne.softrepeat = true + ne.content = '\xEF\x8E\xA0' + ne.eventresponder['mbtn_left_down'] = + --function () mp.command('seek -5') end + function () mp.commandv('seek', -5, 'relative', 'keyframes') end + ne.eventresponder['shift+mbtn_left_down'] = + function () mp.commandv('frame-back-step') end + ne.eventresponder['mbtn_right_down'] = + --function () mp.command('seek -60') end + function () mp.commandv('seek', -60, 'relative', 'keyframes') end + + --skipfrwd + ne = new_element('skipfrwd', 'button') + + ne.softrepeat = true + ne.content = '\xEF\x8E\x9F' + ne.eventresponder['mbtn_left_down'] = + --function () mp.command('seek +5') end + function () mp.commandv('seek', 5, 'relative', 'keyframes') end + ne.eventresponder['shift+mbtn_left_down'] = + function () mp.commandv('frame-step') end + ne.eventresponder['mbtn_right_down'] = + --function () mp.command('seek +60') end + function () mp.commandv('seek', 60, 'relative', 'keyframes') end + + -- + update_tracklist() + + --cy_audio + ne = new_element('cy_audio', 'button') + ne.enabled = (#tracks_osc.audio > 0) + ne.visible = (osc_param.playresx >= 540) + ne.content = '\xEF\x8E\xB7' + ne.tooltip_style = osc_styles.Tooltip + ne.tooltipF = function () + local msg = texts.off + if not (get_track('audio') == 0) then + msg = (texts.audio .. ' [' .. get_track('audio') .. ' ∕ ' .. #tracks_osc.audio .. '] ') + local prop = mp.get_property('current-tracks/audio/lang') + if not prop then + prop = texts.na + end + msg = msg .. '[' .. prop .. ']' + prop = mp.get_property('current-tracks/audio/title') + if prop then + msg = msg .. ' ' .. prop + end + return msg + end + return msg + end + ne.eventresponder['mbtn_left_up'] = + function () set_track('audio', 1) end + ne.eventresponder['mbtn_right_up'] = + function () set_track('audio', -1) end + ne.eventresponder['mbtn_mid_up'] = + function () show_message(get_tracklist('audio')) end + + --cy_sub + ne = new_element('cy_sub', 'button') + ne.enabled = (#tracks_osc.sub > 0) + ne.visible = (osc_param.playresx >= 600) + ne.content = '\xEF\x8F\x93' + ne.tooltip_style = osc_styles.Tooltip + ne.tooltipF = function () + local msg = texts.off + if not (get_track('sub') == 0) then + msg = (texts.subtitle .. ' [' .. get_track('sub') .. ' ∕ ' .. #tracks_osc.sub .. '] ') + local prop = mp.get_property('current-tracks/sub/lang') + if not prop then + prop = texts.na + end + msg = msg .. '[' .. prop .. ']' + prop = mp.get_property('current-tracks/sub/title') + if prop then + msg = msg .. ' ' .. prop + end + return msg + end + return msg + end + ne.eventresponder['mbtn_left_up'] = + function () set_track('sub', 1) end + ne.eventresponder['mbtn_right_up'] = + function () set_track('sub', -1) end + ne.eventresponder['mbtn_mid_up'] = + function () show_message(get_tracklist('sub')) end + + --tog_fs + ne = new_element('tog_fs', 'button') + ne.content = function () + if (state.fullscreen) then + return ('\xEF\x85\xAC') + else + return ('\xEF\x85\xAD') + end + end + ne.visible = (osc_param.playresx >= 540) + ne.eventresponder['mbtn_left_up'] = + function () mp.commandv('cycle', 'fullscreen') end + + --tog_info + ne = new_element('tog_info', 'button') + ne.content = '' + ne.visible = (osc_param.playresx >= 600) + ne.eventresponder['mbtn_left_up'] = + function () mp.commandv('script-binding', 'stats/display-stats-toggle') end + + -- title + ne = new_element('title', 'button') + ne.content = function () + local title = mp.command_native({'expand-text', user_opts.title}) + if state.paused then + title = title:gsub('\\n', ' '):gsub('\\$', ''):gsub('{','\\{') + else + title = ' ' + end + return not (title == '') and title or ' ' + end + ne.visible = osc_param.playresy >= 320 and user_opts.showtitle + + --seekbar + ne = new_element('seekbar', 'slider') + + ne.enabled = not (mp.get_property('percent-pos') == nil) + ne.slider.markerF = function () + local duration = mp.get_property_number('duration', nil) + if not (duration == nil) then + local chapters = mp.get_property_native('chapter-list', {}) + local markers = {} + for n = 1, #chapters do + markers[n] = (chapters[n].time / duration * 100) + end + return markers + else + return {} + end + end + ne.slider.posF = + function () return mp.get_property_number('percent-pos', nil) end + ne.slider.tooltipF = function (pos) + local duration = mp.get_property_number('duration', nil) + if not ((duration == nil) or (pos == nil)) then + possec = duration * (pos / 100) + return mp.format_time(possec) + else + return '' + end + end + ne.slider.seekRangesF = function() + if not user_opts.seekrange then + return nil + end + local cache_state = state.cache_state + if not cache_state then + return nil + end + local duration = mp.get_property_number('duration', nil) + if (duration == nil) or duration <= 0 then + return nil + end + local ranges = cache_state['seekable-ranges'] + if #ranges == 0 then + return nil + end + local nranges = {} + for _, range in pairs(ranges) do + nranges[#nranges + 1] = { + ['start'] = 100 * range['start'] / duration, + ['end'] = 100 * range['end'] / duration, + } + end + return nranges + end + ne.eventresponder['mouse_move'] = --keyframe seeking when mouse is dragged + function (element) + if not element.state.mbtnleft then return end -- allow drag for mbtnleft only! + -- mouse move events may pile up during seeking and may still get + -- sent when the user is done seeking, so we need to throw away + -- identical seeks + local seekto = get_slider_value(element) + if (element.state.lastseek == nil) or + (not (element.state.lastseek == seekto)) then + local flags = 'absolute-percent' + if not user_opts.seekbarkeyframes then + flags = flags .. '+exact' + end + mp.commandv('seek', seekto, flags) + element.state.lastseek = seekto + end + + end + ne.eventresponder['mbtn_left_down'] = --exact seeks on single clicks + function (element) + mp.commandv('seek', get_slider_value(element), 'absolute-percent', 'exact') + element.state.mbtnleft = true + end + ne.eventresponder['mbtn_left_up'] = + function (element) element.state.mbtnleft = false end + ne.eventresponder['mbtn_right_down'] = --seeks to chapter start + function (element) + local duration = mp.get_property_number('duration', nil) + if not (duration == nil) then + local chapters = mp.get_property_native('chapter-list', {}) + if #chapters > 0 then + local pos = get_slider_value(element) + local ch = #chapters + for n = 1, ch do + if chapters[n].time / duration * 100 >= pos then + ch = n - 1 + break + end + end + mp.commandv('set', 'chapter', ch - 1) + --if chapters[ch].title then show_message(chapters[ch].time) end + end + end + end + ne.eventresponder['reset'] = + function (element) element.state.lastseek = nil end + + + -- tc_left (current pos) + ne = new_element('tc_left', 'button') + ne.content = function () return (mp.get_property_osd('playback-time')) end + + -- tc_right (total/remaining time) + ne = new_element('tc_right', 'button') + ne.content = function () + if (mp.get_property_number('duration', 0) <= 0) then return '--:--:--' end + if (state.rightTC_trem) then + return ('-'..mp.get_property_osd('playtime-remaining')) + else + return (mp.get_property_osd('duration')) + end + end + ne.eventresponder['mbtn_left_up'] = + function () state.rightTC_trem = not state.rightTC_trem end + + -- load layout + layouts() + + -- load window controls + if window_controls_enabled() then + window_controls() + end + + --do something with the elements + prepare_elements() +end + +function shutdown() + +end + +-- +-- Other important stuff +-- + + +function show_osc() + -- show when disabled can happen (e.g. mouse_move) due to async/delayed unbinding + if not state.enabled then return end + + msg.trace('show_osc') + --remember last time of invocation (mouse move) + state.showtime = mp.get_time() + + osc_visible(true) + + if (user_opts.fadeduration > 0) then + state.anitype = nil + end +end + +function hide_osc() + msg.trace('hide_osc') + if not state.enabled then + -- typically hide happens at render() from tick(), but now tick() is + -- no-op and won't render again to remove the osc, so do that manually. + state.osc_visible = false + render_wipe() + elseif (user_opts.fadeduration > 0) then + if not(state.osc_visible == false) then + state.anitype = 'out' + request_tick() + end + else + osc_visible(false) + end +end + +function osc_visible(visible) + if state.osc_visible ~= visible then + state.osc_visible = visible + end + request_tick() +end + +function pause_state(name, enabled) + state.paused = enabled + if user_opts.showtitle then + if enabled then + state.lastvisibility = user_opts.visibility + visibility_mode("always", true) + show_osc() + else + visibility_mode(state.lastvisibility, true) + end + end + request_tick() +end + +function cache_state(name, st) + state.cache_state = st + request_tick() +end + +-- Request that tick() is called (which typically re-renders the OSC). +-- The tick is then either executed immediately, or rate-limited if it was +-- called a small time ago. +function request_tick() + if state.tick_timer == nil then + state.tick_timer = mp.add_timeout(0, tick) + end + + if not state.tick_timer:is_enabled() then + local now = mp.get_time() + local timeout = tick_delay - (now - state.tick_last_time) + if timeout < 0 then + timeout = 0 + end + state.tick_timer.timeout = timeout + state.tick_timer:resume() + end +end + +function mouse_leave() + if get_hidetimeout() >= 0 then + hide_osc() + end + -- reset mouse position + state.last_mouseX, state.last_mouseY = nil, nil + state.mouse_in_window = false +end + +function request_init() + state.initREQ = true + request_tick() +end + +-- Like request_init(), but also request an immediate update +function request_init_resize() + request_init() + -- ensure immediate update + state.tick_timer:kill() + state.tick_timer.timeout = 0 + state.tick_timer:resume() +end + +function render_wipe() + msg.trace('render_wipe()') + state.osd:remove() +end + +function render() + msg.trace('rendering') + local current_screen_sizeX, current_screen_sizeY, aspect = mp.get_osd_size() + local mouseX, mouseY = get_virt_mouse_pos() + local now = mp.get_time() + + -- check if display changed, if so request reinit + if not (state.mp_screen_sizeX == current_screen_sizeX + and state.mp_screen_sizeY == current_screen_sizeY) then + + request_init_resize() + + state.mp_screen_sizeX = current_screen_sizeX + state.mp_screen_sizeY = current_screen_sizeY + end + + -- init management + if state.initREQ then + osc_init() + state.initREQ = false + + -- store initial mouse position + if (state.last_mouseX == nil or state.last_mouseY == nil) + and not (mouseX == nil or mouseY == nil) then + + state.last_mouseX, state.last_mouseY = mouseX, mouseY + end + end + + + -- fade animation + if not(state.anitype == nil) then + + if (state.anistart == nil) then + state.anistart = now + end + + if (now < state.anistart + (user_opts.fadeduration/1000)) then + + if (state.anitype == 'in') then --fade in + osc_visible(true) + state.animation = scale_value(state.anistart, + (state.anistart + (user_opts.fadeduration/1000)), + 255, 0, now) + elseif (state.anitype == 'out') then --fade out + state.animation = scale_value(state.anistart, + (state.anistart + (user_opts.fadeduration/1000)), + 0, 255, now) + end + + else + if (state.anitype == 'out') then + osc_visible(false) + end + state.anistart = nil + state.animation = nil + state.anitype = nil + end + else + state.anistart = nil + state.animation = nil + state.anitype = nil + end + + --mouse show/hide area + for k,cords in pairs(osc_param.areas['showhide']) do + set_virt_mouse_area(cords.x1, cords.y1, cords.x2, cords.y2, 'showhide') + end + if osc_param.areas['showhide_wc'] then + for k,cords in pairs(osc_param.areas['showhide_wc']) do + set_virt_mouse_area(cords.x1, cords.y1, cords.x2, cords.y2, 'showhide_wc') + end + else + set_virt_mouse_area(0, 0, 0, 0, 'showhide_wc') + end + do_enable_keybindings() + + --mouse input area + local mouse_over_osc = false + + for _,cords in ipairs(osc_param.areas['input']) do + if state.osc_visible then -- activate only when OSC is actually visible + set_virt_mouse_area(cords.x1, cords.y1, cords.x2, cords.y2, 'input') + end + if state.osc_visible ~= state.input_enabled then + if state.osc_visible then + mp.enable_key_bindings('input') + else + mp.disable_key_bindings('input') + end + state.input_enabled = state.osc_visible + end + + if (mouse_hit_coords(cords.x1, cords.y1, cords.x2, cords.y2)) then + mouse_over_osc = true + end + end + + if osc_param.areas['window-controls'] then + for _,cords in ipairs(osc_param.areas['window-controls']) do + if state.osc_visible then -- activate only when OSC is actually visible + set_virt_mouse_area(cords.x1, cords.y1, cords.x2, cords.y2, 'window-controls') + mp.enable_key_bindings('window-controls') + else + mp.disable_key_bindings('window-controls') + end + + if (mouse_hit_coords(cords.x1, cords.y1, cords.x2, cords.y2)) then + mouse_over_osc = true + end + end + end + + if osc_param.areas['window-controls-title'] then + for _,cords in ipairs(osc_param.areas['window-controls-title']) do + if (mouse_hit_coords(cords.x1, cords.y1, cords.x2, cords.y2)) then + mouse_over_osc = true + end + end + end + + -- autohide + if not (state.showtime == nil) and (get_hidetimeout() >= 0) then + local timeout = state.showtime + (get_hidetimeout()/1000) - now + if timeout <= 0 then + if (state.active_element == nil) and not (mouse_over_osc) then + hide_osc() + end + else + -- the timer is only used to recheck the state and to possibly run + -- the code above again + if not state.hide_timer then + state.hide_timer = mp.add_timeout(0, tick) + end + state.hide_timer.timeout = timeout + -- re-arm + state.hide_timer:kill() + state.hide_timer:resume() + end + end + + + -- actual rendering + local ass = assdraw.ass_new() + + -- Messages + render_message(ass) + + -- actual OSC + if state.osc_visible then + render_elements(ass) + end + + -- submit + set_osd(osc_param.playresy * osc_param.display_aspect, + osc_param.playresy, ass.text) +end + +-- +-- Eventhandling +-- + +local function element_has_action(element, action) + return element and element.eventresponder and + element.eventresponder[action] +end + +function process_event(source, what) + local action = string.format('%s%s', source, + what and ('_' .. what) or '') + + if what == 'down' or what == 'press' then + + for n = 1, #elements do + + if mouse_hit(elements[n]) and + elements[n].eventresponder and + (elements[n].eventresponder[source .. '_up'] or + elements[n].eventresponder[action]) then + + if what == 'down' then + state.active_element = n + state.active_event_source = source + end + -- fire the down or press event if the element has one + if element_has_action(elements[n], action) then + elements[n].eventresponder[action](elements[n]) + end + + end + end + + elseif what == 'up' then + + if elements[state.active_element] then + local n = state.active_element + + if n == 0 then + --click on background (does not work) + elseif element_has_action(elements[n], action) and + mouse_hit(elements[n]) then + + elements[n].eventresponder[action](elements[n]) + end + + --reset active element + if element_has_action(elements[n], 'reset') then + elements[n].eventresponder['reset'](elements[n]) + end + + end + state.active_element = nil + state.mouse_down_counter = 0 + + elseif source == 'mouse_move' then + + state.mouse_in_window = true + + local mouseX, mouseY = get_virt_mouse_pos() + if (user_opts.minmousemove == 0) or + (not ((state.last_mouseX == nil) or (state.last_mouseY == nil)) and + ((math.abs(mouseX - state.last_mouseX) >= user_opts.minmousemove) + or (math.abs(mouseY - state.last_mouseY) >= user_opts.minmousemove) + ) + ) then + show_osc() + end + state.last_mouseX, state.last_mouseY = mouseX, mouseY + + local n = state.active_element + if element_has_action(elements[n], action) then + elements[n].eventresponder[action](elements[n]) + end + request_tick() + end +end + +function show_logo() + local osd_w, osd_h = 640, 360 + local logo_x, logo_y = osd_w/2, osd_h/2-20 + local ass = assdraw.ass_new() + ass:new_event() + ass:pos(logo_x, logo_y) + ass:append('{\\1c&H8E348D&\\3c&H0&\\3a&H60&\\blur1\\bord0.5}') + ass:draw_start() + ass_draw_cir_cw(ass, 0, 0, 100) + ass:draw_stop() + + ass:new_event() + ass:pos(logo_x, logo_y) + ass:append('{\\1c&H632462&\\bord0}') + ass:draw_start() + ass_draw_cir_cw(ass, 6, -6, 75) + ass:draw_stop() + + ass:new_event() + ass:pos(logo_x, logo_y) + ass:append('{\\1c&HFFFFFF&\\bord0}') + ass:draw_start() + ass_draw_cir_cw(ass, -4, 4, 50) + ass:draw_stop() + + ass:new_event() + ass:pos(logo_x, logo_y) + ass:append('{\\1c&H632462&\\bord&}') + ass:draw_start() + ass:move_to(-20, -20) + ass:line_to(23.3, 5) + ass:line_to(-20, 30) + ass:draw_stop() + + ass:new_event() + ass:pos(logo_x, logo_y+110) + ass:an(8) + ass:append(texts.welcome) + set_osd(osd_w, osd_h, ass.text) +end + +-- called by mpv on every frame +function tick() + if (not state.enabled) then return end + + if (state.idle) then + show_logo() + -- render idle message + msg.trace('idle message') + + if state.showhide_enabled then + mp.disable_key_bindings('showhide') + mp.disable_key_bindings('showhide_wc') + state.showhide_enabled = false + end + + + elseif (state.fullscreen and user_opts.showfullscreen) + or (not state.fullscreen and user_opts.showwindowed) then + + -- render the OSC + render() + else + -- Flush OSD + set_osd(osc_param.playresy, osc_param.playresy, '') + end + + state.tick_last_time = mp.get_time() + + if state.anitype ~= nil then + request_tick() + end +end + +function do_enable_keybindings() + if state.enabled then + if not state.showhide_enabled then + mp.enable_key_bindings('showhide', 'allow-vo-dragging+allow-hide-cursor') + mp.enable_key_bindings('showhide_wc', 'allow-vo-dragging+allow-hide-cursor') + end + state.showhide_enabled = true + end +end + +function enable_osc(enable) + state.enabled = enable + if enable then + do_enable_keybindings() + else + hide_osc() -- acts immediately when state.enabled == false + if state.showhide_enabled then + mp.disable_key_bindings('showhide') + mp.disable_key_bindings('showhide_wc') + end + state.showhide_enabled = false + end +end + +validate_user_opts() + +mp.register_event('shutdown', shutdown) +mp.register_event('start-file', request_init) +mp.observe_property('track-list', nil, request_init) +mp.observe_property('playlist', nil, request_init) + +mp.register_script_message('osc-message', show_message) +mp.register_script_message('osc-chapterlist', function(dur) + show_message(get_chapterlist(), dur) +end) +mp.register_script_message('osc-playlist', function(dur) + show_message(get_playlist(), dur) +end) +mp.register_script_message('osc-tracklist', function(dur) + local msg = {} + for k,v in pairs(nicetypes) do + table.insert(msg, get_tracklist(k)) + end + show_message(table.concat(msg, '\n\n'), dur) +end) + +mp.observe_property('fullscreen', 'bool', + function(name, val) + state.fullscreen = val + request_init_resize() + end +) +mp.observe_property('border', 'bool', + function(name, val) + state.border = val + request_init_resize() + end +) +mp.observe_property('window-maximized', 'bool', + function(name, val) + state.maximized = val + request_init_resize() + end +) +mp.observe_property('idle-active', 'bool', + function(name, val) + state.idle = val + request_tick() + end +) +mp.observe_property('pause', 'bool', pause_state) +mp.observe_property('demuxer-cache-state', 'native', cache_state) +mp.observe_property('vo-configured', 'bool', function(name, val) + request_tick() +end) +mp.observe_property('playback-time', 'number', function(name, val) + request_tick() +end) +mp.observe_property('osd-dimensions', 'native', function(name, val) + -- (we could use the value instead of re-querying it all the time, but then + -- we might have to worry about property update ordering) + request_init_resize() +end) + +-- mouse show/hide bindings +mp.set_key_bindings({ + {'mouse_move', function(e) process_event('mouse_move', nil) end}, + {'mouse_leave', mouse_leave}, +}, 'showhide', 'force') +mp.set_key_bindings({ + {'mouse_move', function(e) process_event('mouse_move', nil) end}, + {'mouse_leave', mouse_leave}, +}, 'showhide_wc', 'force') +do_enable_keybindings() + +--mouse input bindings +mp.set_key_bindings({ + {'mbtn_left', function(e) process_event('mbtn_left', 'up') end, + function(e) process_event('mbtn_left', 'down') end}, + {'mbtn_right', function(e) process_event('mbtn_right', 'up') end, + function(e) process_event('mbtn_right', 'down') end}, + {'mbtn_mid', function(e) process_event('mbtn_mid', 'up') end, + function(e) process_event('mbtn_mid', 'down') end}, + {'wheel_up', function(e) process_event('wheel_up', 'press') end}, + {'wheel_down', function(e) process_event('wheel_down', 'press') end}, + {'mbtn_left_dbl', 'ignore'}, + {'mbtn_right_dbl', 'ignore'}, +}, 'input', 'force') +mp.enable_key_bindings('input') + +mp.set_key_bindings({ + {'mbtn_left', function(e) process_event('mbtn_left', 'up') end, + function(e) process_event('mbtn_left', 'down') end}, +}, 'window-controls', 'force') +mp.enable_key_bindings('window-controls') + +function get_hidetimeout() + if user_opts.visibility == 'always' then + return -1 -- disable autohide + end + return user_opts.hidetimeout +end + +function always_on(val) + if state.enabled then + if val then + show_osc() + else + hide_osc() + end + end +end + +-- mode can be auto/always/never/cycle +-- the modes only affect internal variables and not stored on its own. +function visibility_mode(mode, no_osd) + if mode == 'auto' then + always_on(false) + enable_osc(true) + elseif mode == 'always' then + enable_osc(true) + always_on(true) + elseif mode == 'never' then + enable_osc(false) + else + msg.warn('Ignoring unknown visibility mode \"' .. mode .. '\"') + return + end + + user_opts.visibility = mode + + if not no_osd and tonumber(mp.get_property('osd-level')) >= 1 then + mp.osd_message('OSC visibility: ' .. mode) + end + + -- Reset the input state on a mode change. The input state will be + -- recalcuated on the next render cycle, except in 'never' mode where it + -- will just stay disabled. + mp.disable_key_bindings('input') + mp.disable_key_bindings('window-controls') + state.input_enabled = false + request_tick() +end + +visibility_mode(user_opts.visibility, true) +mp.register_script_message('osc-visibility', visibility_mode) +mp.add_key_binding(nil, 'visibility', function() visibility_mode('cycle') end) + +set_virt_mouse_area(0, 0, 0, 0, 'input') +set_virt_mouse_area(0, 0, 0, 0, 'window-controls') diff --git a/.config/mutt/mutt-wizard.muttrc b/.config/mutt/mutt-wizard.muttrc new file mode 100644 index 0000000..c08c969 --- /dev/null +++ b/.config/mutt/mutt-wizard.muttrc @@ -0,0 +1,163 @@ +# vim: filetype=neomuttrc +# This file contains all of mutt-wizard's default settings. +# mutt-wizard will have this file sourced from your muttrc. +# In the interest of seamless updating, do not edit this file. +# If you want to override any settings, set those in your muttrc. +set mailcap_path = /nix/store/szhf8qsrw2y077kj7frl6i804mghd6y3-mutt-wizard-3.2.1/share/mutt-wizard/mailcap:$mailcap_path +set mime_type_query_command = "file --mime-type -b %s" +set date_format="%y/%m/%d %I:%M%p" +set index_format="%2C %Z %?X?A& ? %D %-15.15F %s (%-4.4c)" +set sort = 'reverse-date' +set smtp_authenticators = 'gssapi:login' +set query_command = "abook --mutt-query '%s'" +set rfc2047_parameters = yes +set sleep_time = 0 # Pause 0 seconds for informational messages +set markers = no # Disables the `+` displayed at line wraps +set mark_old = no # Unread mail stay unread until read +set mime_forward = yes # attachments are forwarded with mail +set wait_key = no # mutt won't ask "press key to continue" +set fast_reply # skip to compose when replying +set fcc_attach # save attachments with the body +set forward_format = "Fwd: %s" # format of subject when forwarding +set forward_quote # include message in forwards +set reverse_name # reply as whomever it was to +set include # include message in replies +set mail_check=60 # to avoid lags using IMAP with some email providers (yahoo for example) +auto_view text/html # automatically show html (mailcap uses lynx) +auto_view application/pgp-encrypted +#set display_filter = "tac | sed '/\\\[-- Autoview/,+1d' | tac" # Suppress autoview messages. +alternative_order text/plain text/enriched text/html +bind index,pager i noop +bind index,pager g noop +bind index \Cf noop + +# General rebindings +bind index j next-entry +bind index k previous-entry +bind attach view-mailcap +bind attach l view-mailcap +bind editor noop +bind index G last-entry +bind index gg first-entry +bind pager,attach h exit +bind pager j next-line +bind pager k previous-line +bind pager l view-attachments +bind index D delete-message +bind index U undelete-message +bind index L limit +bind index h noop +bind index l display-message +bind index,query tag-entry +#bind browser h goto-parent +macro browser h '..' "Go to parent folder" +bind index,pager H view-raw-message +bind browser l select-entry +bind pager,browser gg top-page +bind pager,browser G bottom-page +bind index,pager,browser d half-down +bind index,pager,browser u half-up +bind index,pager S sync-mailbox +bind index,pager R group-reply +bind index \031 previous-undeleted # Mouse wheel +bind index \005 next-undeleted # Mouse wheel +bind pager \031 previous-line # Mouse wheel +bind pager \005 next-line # Mouse wheel +bind editor complete-query + +#set crypt_autosign = yes +#set crypt_opportunistic_encrypt = yes +#set pgp_self_encrypt = yes +#set pgp_default_key = 'your@gpgemailaddre.ss' + +macro index,pager a "set my_pipe_decode=\$pipe_decode pipe_decodeabook --add-emailset pipe_decode=\$my_pipe_decode; unset my_pipe_decode" "add the sender address to abook" +macro index \Cr "T~UN." "mark all messages as read" +macro index O "mw -Y" "run mw -Y to sync all mail" +macro index \Cf "unset wait_keyprintf 'Enter a search term to find with notmuch: '; read x; echo \$x >~/.cache/mutt_terms~i \"\`notmuch search --output=messages \$(cat ~/.cache/mutt_terms) | head -n 600 | perl -le '@a=<>;s/\^id:// for@a;$,=\"|\";print@a' | perl -le '@a=<>; chomp@a; s/\\+/\\\\+/ for@a;print@a' \`\"" "show only messages matching a notmuch pattern" +macro index A "all\n" "show all messages (undo limit)" + +# Sidebar mappings +set sidebar_visible = yes +set sidebar_width = 20 +set sidebar_short_path = yes +set sidebar_next_new_wrap = yes +set mail_check_stats +set sidebar_format = '%D%?F? [%F]?%* %?N?%N/? %?S?%S?' +bind index,pager \Ck sidebar-prev +bind index,pager \Cj sidebar-next +bind index,pager \Co sidebar-open +bind index,pager \Cp sidebar-prev-new +bind index,pager \Cn sidebar-next-new +bind index,pager B sidebar-toggle-visible + +# Default index colors: +color index yellow default '.*' +color index_author red default '.*' +color index_number blue default +color index_subject cyan default '.*' + +# New mail is boldened: +color index brightyellow black "~N" +color index_author brightred black "~N" +color index_subject brightcyan black "~N" + +# Tagged mail is highlighted: +color index brightyellow blue "~T" +color index_author brightred blue "~T" +color index_subject brightcyan blue "~T" + +# Other colors and aesthetic settings: +mono bold bold +mono underline underline +mono indicator reverse +mono error bold +color normal default default +color indicator brightblack white +color sidebar_highlight red default +color sidebar_divider brightblack black +color sidebar_flagged red black +color sidebar_new green black +color normal brightyellow default +color error red default +color tilde black default +color message cyan default +color markers red white +color attachment white default +color search brightmagenta default +color status brightyellow black +color hdrdefault brightgreen default +color quoted green default +color quoted1 blue default +color quoted2 cyan default +color quoted3 yellow default +color quoted4 red default +color quoted5 brightred default +color signature brightgreen default +color bold black default +color underline black default +color normal default default + +# Regex highlighting: +color header blue default ".*" +color header brightmagenta default "^(From)" +color header brightcyan default "^(Subject)" +color header brightwhite default "^(CC|BCC)" +color body brightred default "[\-\.+_a-zA-Z0-9]+@[\-\.a-zA-Z0-9]+" # Email addresses +color body brightblue default "(https?|ftp)://[\-\.,/%~_:?&=\#a-zA-Z0-9]+" # URL +color body green default "\`[^\`]*\`" # Green text between ` and ` +color body brightblue default "^# \.*" # Headings as bold blue +color body brightcyan default "^## \.*" # Subheadings as bold cyan +color body brightgreen default "^### \.*" # Subsubheadings as bold green +color body yellow default "^(\t| )*(-|\\*) \.*" # List items as yellow +color body brightcyan default "[;:][-o][)/(|]" # emoticons +color body brightcyan default "[;:][)(|]" # emoticons +color body brightcyan default "[ ][*][^*]*[*][ ]?" # more emoticon? +color body brightcyan default "[ ]?[*][^*]*[*][ ]" # more emoticon? +color body red default "(BAD signature)" +color body cyan default "(Good signature)" +color body brightblack default "^gpg: Good signature .*" +color body brightyellow default "^gpg: " +color body brightyellow red "^gpg: BAD signature from.*" +mono body bold "^gpg: Good signature" +mono body bold "^gpg: BAD signature from.*" +color body red default "([a-z][a-z0-9+-]*://(((([a-z0-9_.!~*'();:&=+$,-]|%[0-9a-f][0-9a-f])*@)?((([a-z0-9]([a-z0-9-]*[a-z0-9])?)\\.)*([a-z]([a-z0-9-]*[a-z0-9])?)\\.?|[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+)(:[0-9]+)?)|([a-z0-9_.!~*'()$,;:@&=+-]|%[0-9a-f][0-9a-f])+)(/([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*(;([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*)*(/([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*(;([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*)*)*)?(\\?([a-z0-9_.!~*'();/?:@&=+$,-]|%[0-9a-f][0-9a-f])*)?(#([a-z0-9_.!~*'();/?:@&=+$,-]|%[0-9a-f][0-9a-f])*)?|(www|ftp)\\.(([a-z0-9]([a-z0-9-]*[a-z0-9])?)\\.)*([a-z]([a-z0-9-]*[a-z0-9])?)\\.?(:[0-9]+)?(/([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*(;([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*)*(/([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*(;([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*)*)*)?(\\?([-a-z0-9_.!~*'();/?:@&=+$,]|%[0-9a-f][0-9a-f])*)?(#([-a-z0-9_.!~*'();/?:@&=+$,]|%[0-9a-f][0-9a-f])*)?)[^].,:;!)? \t\r\n<>\"]" diff --git a/.config/ncmpcpp/bindings b/.config/ncmpcpp/bindings new file mode 100644 index 0000000..d2cf224 --- /dev/null +++ b/.config/ncmpcpp/bindings @@ -0,0 +1,479 @@ +############################################################## +## This is the example bindings file. Copy it to ## +## ~/.ncmpcpp/bindings or $XDG_CONFIG_HOME/ncmpcpp/bindings ## +## and set up your preferences ## +############################################################## +# +#def_key "mouse" +# mouse_event +# +#def_key "up" +# scroll_up +# +#def_key "shift-up" +# select_item +# scroll_up +# +#def_key "down" +# scroll_down +# +#def_key "shift-down" +# select_item +# scroll_down +# +#def_key "[" +# scroll_up_album +# +#def_key "]" +# scroll_down_album +# +#def_key "{" +# scroll_up_artist +# +#def_key "}" +# scroll_down_artist +# +#def_key "page_up" +# page_up +# +#def_key "page_down" +# page_down +# +#def_key "home" +# move_home +# +#def_key "end" +# move_end +# +#def_key "insert" +# select_item +# +#def_key "enter" +# enter_directory +# +#def_key "enter" +# toggle_output +# +#def_key "enter" +# run_action +# +#def_key "enter" +# play_item +# +#def_key "space" +# add_item_to_playlist +# +#def_key "space" +# toggle_lyrics_update_on_song_change +# +#def_key "space" +# toggle_visualization_type +# +#def_key "delete" +# delete_playlist_items +# +#def_key "delete" +# delete_browser_items +# +#def_key "delete" +# delete_stored_playlist +# +#def_key "right" +# next_column +# +#def_key "right" +# slave_screen +# +#def_key "right" +# volume_up +# +#def_key "+" +# volume_up +# +#def_key "left" +# previous_column +# +#def_key "left" +# master_screen +# +#def_key "left" +# volume_down +# +#def_key "-" +# volume_down +# +#def_key ":" +# execute_command +# +#def_key "tab" +# next_screen +# +#def_key "shift-tab" +# previous_screen +# +#def_key "f1" +# show_help +# +#def_key "1" +# show_playlist +# +#def_key "2" +# show_browser +# +#def_key "2" +# change_browse_mode +# +#def_key "3" +# show_search_engine +# +#def_key "3" +# reset_search_engine +# +#def_key "4" +# show_media_library +# +#def_key "4" +# toggle_media_library_columns_mode +# +#def_key "5" +# show_playlist_editor +# +#def_key "6" +# show_tag_editor +# +#def_key "7" +# show_outputs +# +#def_key "8" +# show_visualizer +# +#def_key "=" +# show_clock +# +#def_key "@" +# show_server_info +# +#def_key "s" +# stop +# +#def_key "p" +# pause +# +#def_key ">" +# next +# +#def_key "<" +# previous +# +#def_key "ctrl-h" +# jump_to_parent_directory +# +#def_key "ctrl-h" +# replay_song +# +#def_key "backspace" +# jump_to_parent_directory +# +#def_key "backspace" +# replay_song +# +def_key "f" + seek_forward +# +def_key "b" + seek_backward +# +#def_key "r" +# toggle_repeat +# +#def_key "z" +# toggle_random +# +#def_key "y" +# save_tag_changes +# +#def_key "y" +# start_searching +# +#def_key "y" +# toggle_single +# +#def_key "R" +# toggle_consume +# +#def_key "Y" +# toggle_replay_gain_mode +# +#def_key "T" +# toggle_add_mode +# +#def_key "|" +# toggle_mouse +# +#def_key "#" +# toggle_bitrate_visibility +# +#def_key "Z" +# shuffle +# +#def_key "x" +# toggle_crossfade +# +#def_key "X" +# set_crossfade +# +#def_key "u" +# update_database +# +#def_key "ctrl-s" +# sort_playlist +# +#def_key "ctrl-s" +# toggle_browser_sort_mode +# +#def_key "ctrl-s" +# toggle_media_library_sort_mode +# +#def_key "ctrl-r" +# reverse_playlist +# +#def_key "ctrl-f" +# apply_filter +# +#def_key "ctrl-_" +# select_found_items +# +#def_key "/" +# find +# +#def_key "/" +# find_item_forward +# +#def_key "?" +# find +# +#def_key "?" +# find_item_backward +# +#def_key "." +# next_found_item +# +#def_key "," +# previous_found_item +# +#def_key "w" +# toggle_find_mode +# +#def_key "e" +# edit_song +# +#def_key "e" +# edit_library_tag +# +#def_key "e" +# edit_library_album +# +#def_key "e" +# edit_directory_name +# +#def_key "e" +# edit_playlist_name +# +#def_key "e" +# edit_lyrics +# +#def_key "i" +# show_song_info +# +#def_key "I" +# show_artist_info +# +#def_key "g" +# jump_to_position_in_song +# +#def_key "l" +# show_lyrics +# +#def_key "ctrl-v" +# select_range +# +#def_key "v" +# reverse_selection +# +#def_key "V" +# remove_selection +# +#def_key "B" +# select_album +# +#def_key "a" +# add_selected_items +# +#def_key "c" +# clear_playlist +# +#def_key "c" +# clear_main_playlist +# +#def_key "C" +# crop_playlist +# +#def_key "C" +# crop_main_playlist +# +#def_key "m" +# move_sort_order_up +# +#def_key "m" +# move_selected_items_up +# +#def_key "n" +# move_sort_order_down +# +#def_key "n" +# move_selected_items_down +# +#def_key "M" +# move_selected_items_to +# +#def_key "A" +# add +# +#def_key "S" +# save_playlist +# +#def_key "o" +# jump_to_playing_song +# +#def_key "G" +# jump_to_browser +# +#def_key "G" +# jump_to_playlist_editor +# +#def_key "~" +# jump_to_media_library +# +#def_key "E" +# jump_to_tag_editor +# +#def_key "U" +# toggle_playing_song_centering +# +#def_key "P" +# toggle_display_mode +# +#def_key "\\" +# toggle_interface +# +#def_key "!" +# toggle_separators_between_albums +# +#def_key "L" +# toggle_lyrics_fetcher +# +#def_key "F" +# fetch_lyrics_in_background +# +#def_key "alt-l" +# toggle_fetching_lyrics_in_background +# +#def_key "ctrl-l" +# toggle_screen_lock +# +#def_key "`" +# toggle_library_tag_type +# +#def_key "`" +# refetch_lyrics +# +#def_key "`" +# add_random_items +# +#def_key "ctrl-p" +# set_selected_items_priority +# +#def_key "q" +# quit +# +# +#def_key "f" +# find +#def_key "f" +# find_item_forward + +def_key "+" + show_clock +def_key "=" + volume_up + +def_key "j" + scroll_down +def_key "k" + scroll_up + +def_key "ctrl-u" + page_up +#push_characters "kkkkkkkkkkkkkkk" +def_key "ctrl-d" + page_down +#push_characters "jjjjjjjjjjjjjjj" +def_key "u" + page_up +#push_characters "kkkkkkkkkkkkkkk" +def_key "d" + page_down +#push_characters "jjjjjjjjjjjjjjj" +def_key "h" + previous_column +def_key "l" + next_column + +def_key "." + show_lyrics + +def_key "n" + next_found_item +def_key "N" + previous_found_item + +# not used but bound +def_key "J" + move_sort_order_down +def_key "K" + move_sort_order_up +def_key "h" + jump_to_parent_directory +def_key "l" + enter_directory +def_key "l" + run_action +def_key "l" + play_item +def_key "m" + show_media_library +def_key "m" + toggle_media_library_columns_mode +def_key "t" + show_tag_editor +def_key "v" + show_visualizer +def_key "G" + move_end +def_key "g" + move_home +#jump_to_position_in_song +def_key "U" + update_database +def_key "s" + reset_search_engine +def_key "s" + show_search_engine +#def_key "f" +# show_browser +#def_key "f" +# change_browse_mode +def_key "x" + delete_playlist_items +def_key "P" + show_playlist diff --git a/.config/ncmpcpp/config b/.config/ncmpcpp/config new file mode 100644 index 0000000..f78ad71 --- /dev/null +++ b/.config/ncmpcpp/config @@ -0,0 +1,32 @@ +# vim: filetype=conf + +ncmpcpp_directory = "~/.config/ncmpcpp/" +lyrics_directory = "~/.local/share/lyrics/" +mpd_music_dir = "~/media/audio/" +message_delay_time = "1" +visualizer_type = "wave" +song_list_format = {$4%a - }{%t}|{$8%f$9}$R{$3(%l)$9} +song_status_format = $b{{$8"%t"}} $3by {$4%a{ $3in $7%b{ (%y)}} $3}|{$8%f} +song_library_format = {%n - }{%t}|{%f} +alternative_header_first_line_format = $b$1$aqqu$/a$9 {%t}|{%f} $1$atqq$/a$9$/b +alternative_header_second_line_format = {{$4$b%a$/b$9}{ - $7%b$9}{ ($4%y$9)}}|{%D} +current_item_prefix = $(cyan)$r$b +current_item_suffix = $/r$(end)$/b +current_item_inactive_column_prefix = $(magenta)$r +current_item_inactive_column_suffix = $/r$(end) +playlist_display_mode = columns +browser_display_mode = columns +progressbar_look = -> +media_library_primary_tag = album_artist +media_library_albums_split_by_date = no +startup_screen = "browser" +display_volume_level = no +ignore_leading_the = yes +external_editor = nvim +use_console_editor = yes +empty_tag_color = magenta +main_window_color = white +progressbar_color = black:b +progressbar_elapsed_color = blue:b +statusbar_color = red +statusbar_time_color = cyan:b diff --git a/.config/ncmpcpp/error.log b/.config/ncmpcpp/error.log new file mode 100644 index 0000000..e69de29 diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim new file mode 100644 index 0000000..0db5725 --- /dev/null +++ b/.config/nvim/init.vim @@ -0,0 +1,62 @@ +if empty(glob('~/.local/share/nvim/site/autoload/plug.vim')) + silent !curl -fLo ~/.local/share/nvim/site/autoload/plug.vim --create-dirs + \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim + autocmd VimEnter * PlugInstall --sync | source $MYVIMRC +endif + + +call plug#begin('~/.local/share/nvim/plugged') + Plug 'vim-airline/vim-airline' + Plug 'vim-airline/vim-airline-themes' + + Plug 'tpope/vim-fugitive' + Plug 'dense-analysis/ale' + Plug 'chriskempson/base16-vim' + + "language support + Plug 'tbastos/vim-lua' +call plug#end() + +"enable ale completion +let g:ale_completion_enabled = 1 + +"airline setup + "let g:airline_extensions = [] + let g:airline#extensions#tabline#enabled = 1 + let g:airline#extensions#ale#enabled = 1 + let g:airline_powerline_fonts = 1 + let g:airline_theme='base16_atlas' + +"syntax numbers, wildmode + syntax on + set ruler + set number "relativenumber + set wildmode=longest,list,full + +"Tab Config + set expandtab "converts tabs to spaces + set shiftwidth=4 + set tabstop=4 + +"split navigation + nnoremap :if &modifiable && !&readonly && &modified :write :endif:bnext + nnoremap :if &modifiable && !&readonly && &modified :write :endif:bprevious + +"make vim use system clipboard by default. ONLY FOR NEOVIM + set clipboard+=unnamedplus + + let vim_markdown_preview_browser='librewolf' + let vim_markdown_preview_use_xdg_open=1 + +"enable unicode support if possible +if has("multi_byte") + if &termencoding == "" + let &termencoding = &encoding + endif + set encoding=utf-8 + setglobal fileencoding=utf-8 + " Uncomment to have 'bomb' on by default for new files. + " Note, this will not apply to the first, empty buffer created at Vim startup. + "setglobal bomb + set fileencodings=ucs-bom,utf-8,latin1 +endif diff --git a/.config/picom/grayscale.glsl b/.config/picom/grayscale.glsl new file mode 100644 index 0000000..2e69632 --- /dev/null +++ b/.config/picom/grayscale.glsl @@ -0,0 +1,10 @@ +uniform float opacity; +uniform bool invert_color; +uniform sampler2D tex; + +void main() { +vec4 c = texture2D(tex, gl_TexCoord[0].xy); +float y = dot(c.rgb, vec3(0.299, 0.587, 0.114)); +// y = 1.0 -y; +gl_FragColor = vec4(y, y, y, 1.0); +} diff --git a/.config/picom/picom.conf b/.config/picom/picom.conf new file mode 100644 index 0000000..7c82e60 --- /dev/null +++ b/.config/picom/picom.conf @@ -0,0 +1,419 @@ +################################# +# Shadows # +################################# + + +# Enabled client-side shadows on windows. Note desktop windows +# (windows with '_NET_WM_WINDOW_TYPE_DESKTOP') never get shadow, +# unless explicitly requested using the wintypes option. +# +# shadow = false +shadow = true; + +# The blur radius for shadows, in pixels. (defaults to 12) +# shadow-radius = 12 +shadow-radius = 7; + +# The opacity of shadows. (0.0 - 1.0, defaults to 0.75) +# shadow-opacity = .75 + +# The left offset for shadows, in pixels. (defaults to -15) +# shadow-offset-x = -15 +shadow-offset-x = -7; + +# The top offset for shadows, in pixels. (defaults to -15) +# shadow-offset-y = -15 +shadow-offset-y = -7; + +# Red color value of shadow (0.0 - 1.0, defaults to 0). +# shadow-red = 0 + +# Green color value of shadow (0.0 - 1.0, defaults to 0). +# shadow-green = 0 + +# Blue color value of shadow (0.0 - 1.0, defaults to 0). +# shadow-blue = 0 + +# Hex string color value of shadow (#000000 - #FFFFFF, defaults to #000000). This option will override options set shadow-(red/green/blue) +# shadow-color = "#000000" + +# Specify a list of conditions of windows that should have no shadow. +# +# examples: +# shadow-exclude = "n:e:Notification"; +# +# shadow-exclude = [] +shadow-exclude = [ + "name = 'Notification'", + "class_g = 'Conky'", + "class_g ?= 'Notify-osd'", + "class_g = 'Cairo-clock'", + "_GTK_FRAME_EXTENTS@:c" +]; + +# Specify a list of conditions of windows that should have no shadow painted over, such as a dock window. +# clip-shadow-above = [] + +# Specify a X geometry that describes the region in which shadow should not +# be painted in, such as a dock window region. Use +# shadow-exclude-reg = "x10+0+0" +# for example, if the 10 pixels on the bottom of the screen should not have shadows painted on. +# +# shadow-exclude-reg = "" + +# Crop shadow of a window fully on a particular Xinerama screen to the screen. +# xinerama-shadow-crop = false + + +################################# +# Fading # +################################# + + +# Fade windows in/out when opening/closing and when opacity changes, +# unless no-fading-openclose is used. +# fading = false +fading = true; + +# Opacity change between steps while fading in. (0.01 - 1.0, defaults to 0.028) +# fade-in-step = 0.028 +fade-in-step = 0.03; + +# Opacity change between steps while fading out. (0.01 - 1.0, defaults to 0.03) +# fade-out-step = 0.03 +fade-out-step = 0.03; + +# The time between steps in fade step, in milliseconds. (> 0, defaults to 10) +# fade-delta = 10 + +# Specify a list of conditions of windows that should not be faded. +# fade-exclude = [] + +# Do not fade on window open/close. +# no-fading-openclose = false + +# Do not fade destroyed ARGB windows with WM frame. Workaround of bugs in Openbox, Fluxbox, etc. +# no-fading-destroyed-argb = false + + +################################# +# Transparency / Opacity # +################################# + + +# Opacity of inactive windows. (0.1 - 1.0, defaults to 1.0) +# inactive-opacity = 1 +inactive-opacity = 0.8; + +# Opacity of window titlebars and borders. (0.1 - 1.0, disabled by default) +# frame-opacity = 1.0 +frame-opacity = 0.7; + +# Let inactive opacity set by -i override the '_NET_WM_OPACITY' values of windows. +# inactive-opacity-override = true +inactive-opacity-override = false; + +# Default opacity for active windows. (0.0 - 1.0, defaults to 1.0) +# active-opacity = 1.0 + +# Dim inactive windows. (0.0 - 1.0, defaults to 0.0) +# inactive-dim = 0.0 + +# Specify a list of conditions of windows that should never be considered focused. +# focus-exclude = [] +focus-exclude = [ "class_g = 'Cairo-clock'" ]; + +# Use fixed inactive dim value, instead of adjusting according to window opacity. +# inactive-dim-fixed = 1.0 + +# Specify a list of opacity rules, in the format `PERCENT:PATTERN`, +# like `50:name *= "Firefox"`. picom-trans is recommended over this. +# Note we don't make any guarantee about possible conflicts with other +# programs that set '_NET_WM_WINDOW_OPACITY' on frame or client windows. +# example: +# opacity-rule = [ "80:class_g = 'URxvt'" ]; +# +# opacity-rule = [] + + +################################# +# Corners # +################################# + +# Sets the radius of rounded window corners. When > 0, the compositor will +# round the corners of windows. Does not interact well with +# `transparent-clipping`. +corner-radius = 0 + +# Exclude conditions for rounded corners. +rounded-corners-exclude = [ + "window_type = 'dock'", + "window_type = 'desktop'" +]; + + +################################# +# Background-Blurring # +################################# + + +# Parameters for background blurring, see the *BLUR* section for more information. +# blur-method = +# blur-size = 12 +# +# blur-deviation = false +# +# blur-strength = 5 + +# Blur background of semi-transparent / ARGB windows. +# Bad in performance, with driver-dependent behavior. +# The name of the switch may change without prior notifications. +# +# blur-background = false + +# Blur background of windows when the window frame is not opaque. +# Implies: +# blur-background +# Bad in performance, with driver-dependent behavior. The name may change. +# +# blur-background-frame = false + + +# Use fixed blur strength rather than adjusting according to window opacity. +# blur-background-fixed = false + + +# Specify the blur convolution kernel, with the following format: +# example: +# blur-kern = "5,5,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1"; +# +# blur-kern = "" +blur-kern = "3x3box"; + + +# Exclude conditions for background blur. +# blur-background-exclude = [] +blur-background-exclude = [ + "window_type = 'dock'", + "window_type = 'desktop'", + "_GTK_FRAME_EXTENTS@:c" +]; + +################################# +# General Settings # +################################# + +# Daemonize process. Fork to background after initialization. Causes issues with certain (badly-written) drivers. +# daemon = false + +# Specify the backend to use: `xrender`, `glx`, or `xr_glx_hybrid`. +# `xrender` is the default one. +# + backend = "glx"; +#backend = "xrender"; + +# Enable/disable VSync. +# vsync = false +vsync = true; + +# Enable remote control via D-Bus. See the *D-BUS API* section below for more details. +# dbus = false + +# Try to detect WM windows (a non-override-redirect window with no +# child that has 'WM_STATE') and mark them as active. +# +# mark-wmwin-focused = false +mark-wmwin-focused = true; + +# Mark override-redirect windows that doesn't have a child window with 'WM_STATE' focused. +# mark-ovredir-focused = false +mark-ovredir-focused = true; + +# Try to detect windows with rounded corners and don't consider them +# shaped windows. The accuracy is not very high, unfortunately. +# +# detect-rounded-corners = false +detect-rounded-corners = true; + +# Detect '_NET_WM_OPACITY' on client windows, useful for window managers +# not passing '_NET_WM_OPACITY' of client windows to frame windows. +# +# detect-client-opacity = false +detect-client-opacity = true; + +# Specify refresh rate of the screen. If not specified or 0, picom will +# try detecting this with X RandR extension. +# +# refresh-rate = 60 +refresh-rate = 0; + +# Use EWMH '_NET_ACTIVE_WINDOW' to determine currently focused window, +# rather than listening to 'FocusIn'/'FocusOut' event. Might have more accuracy, +# provided that the WM supports it. +# +# use-ewmh-active-win = false + +# Unredirect all windows if a full-screen opaque window is detected, +# to maximize performance for full-screen windows. Known to cause flickering +# when redirecting/unredirecting windows. +# +# unredir-if-possible = false + +# Delay before unredirecting the window, in milliseconds. Defaults to 0. +# unredir-if-possible-delay = 0 + +# Conditions of windows that shouldn't be considered full-screen for unredirecting screen. +# unredir-if-possible-exclude = [] + +# Use 'WM_TRANSIENT_FOR' to group windows, and consider windows +# in the same group focused at the same time. +# +# detect-transient = false +detect-transient = true; + +# Use 'WM_CLIENT_LEADER' to group windows, and consider windows in the same +# group focused at the same time. 'WM_TRANSIENT_FOR' has higher priority if +# detect-transient is enabled, too. +# +# detect-client-leader = false +detect-client-leader = true; + +# Resize damaged region by a specific number of pixels. +# A positive value enlarges it while a negative one shrinks it. +# If the value is positive, those additional pixels will not be actually painted +# to screen, only used in blur calculation, and such. (Due to technical limitations, +# with use-damage, those pixels will still be incorrectly painted to screen.) +# Primarily used to fix the line corruption issues of blur, +# in which case you should use the blur radius value here +# (e.g. with a 3x3 kernel, you should use `--resize-damage 1`, +# with a 5x5 one you use `--resize-damage 2`, and so on). +# May or may not work with *--glx-no-stencil*. Shrinking doesn't function correctly. +# +# resize-damage = 1 + +# Specify a list of conditions of windows that should be painted with inverted color. +# Resource-hogging, and is not well tested. +# +# invert-color-include = [] + +# GLX backend: Avoid using stencil buffer, useful if you don't have a stencil buffer. +# Might cause incorrect opacity when rendering transparent content (but never +# practically happened) and may not work with blur-background. +# My tests show a 15% performance boost. Recommended. +# +glx-no-stencil = true + +# GLX backend: Avoid rebinding pixmap on window damage. +# Probably could improve performance on rapid window content changes, +# but is known to break things on some drivers (LLVMpipe, xf86-video-intel, etc.). +# Recommended if it works. +# +#glx-no-rebind-pixmap = true + +# Disable the use of damage information. +# This cause the whole screen to be redrawn everytime, instead of the part of the screen +# has actually changed. Potentially degrades the performance, but might fix some artifacts. +# The opposing option is use-damage +# +# no-use-damage = false +use-damage = true; + +# Use X Sync fence to sync clients' draw calls, to make sure all draw +# calls are finished before picom starts drawing. Needed on nvidia-drivers +# with GLX backend for some users. +# +xrender-sync-fence = true + +# GLX backend: Use specified GLSL fragment shader for rendering window contents. +# See `compton-default-fshader-win.glsl` and `compton-fake-transparency-fshader-win.glsl` +# in the source tree for examples. +# +# glx-fshader-win = "" + +# Force all windows to be painted with blending. Useful if you +# have a glx-fshader-win that could turn opaque pixels transparent. +# +# force-win-blend = false + +# Do not use EWMH to detect fullscreen windows. +# Reverts to checking if a window is fullscreen based only on its size and coordinates. +# +# no-ewmh-fullscreen = false + +# Dimming bright windows so their brightness doesn't exceed this set value. +# Brightness of a window is estimated by averaging all pixels in the window, +# so this could comes with a performance hit. +# Setting this to 1.0 disables this behaviour. Requires --use-damage to be disabled. (default: 1.0) +# +# max-brightness = 1.0 + +# Make transparent windows clip other windows like non-transparent windows do, +# instead of blending on top of them. +# +# transparent-clipping = false + +# Set the log level. Possible values are: +# "trace", "debug", "info", "warn", "error" +# in increasing level of importance. Case doesn't matter. +# If using the "TRACE" log level, it's better to log into a file +# using *--log-file*, since it can generate a huge stream of logs. +# +# log-level = "debug" +log-level = "warn"; + +# Set the log file. +# If *--log-file* is never specified, logs will be written to stderr. +# Otherwise, logs will to written to the given file, though some of the early +# logs might still be written to the stderr. +# When setting this option from the config file, it is recommended to use an absolute path. +# +# log-file = "/path/to/your/log/file" + +# Show all X errors (for debugging) +# show-all-xerrors = false + +# Write process ID to a file. +# write-pid-path = "/path/to/your/log/file" + +# Window type settings +# +# 'WINDOW_TYPE' is one of the 15 window types defined in EWMH standard: +# "unknown", "desktop", "dock", "toolbar", "menu", "utility", +# "splash", "dialog", "normal", "dropdown_menu", "popup_menu", +# "tooltip", "notification", "combo", and "dnd". +# +# Following per window-type options are available: :: +# +# fade, shadow::: +# Controls window-type-specific shadow and fade settings. +# +# opacity::: +# Controls default opacity of the window type. +# +# focus::: +# Controls whether the window of this type is to be always considered focused. +# (By default, all window types except "normal" and "dialog" has this on.) +# +# full-shadow::: +# Controls whether shadow is drawn under the parts of the window that you +# normally won't be able to see. Useful when the window has parts of it +# transparent, and you want shadows in those areas. +# +# clip-shadow-above::: +# Controls wether shadows that would have been drawn above the window should +# be clipped. Useful for dock windows that should have no shadow painted on top. +# +# redir-ignore::: +# Controls whether this type of windows should cause screen to become +# redirected again after been unredirected. If you have unredir-if-possible +# set, and doesn't want certain window to cause unnecessary screen redirection, +# you can set this to `true`. +# +wintypes: +{ + tooltip = { fade = true; shadow = true; opacity = 0.75; focus = true; full-shadow = false; }; + dock = { shadow = false; clip-shadow-above = true; } + dnd = { shadow = false; } + popup_menu = { opacity = 0.8; } + dropdown_menu = { opacity = 0.8; } +}; diff --git a/.config/picom/picom.conf.old b/.config/picom/picom.conf.old new file mode 100644 index 0000000..83ab6bb --- /dev/null +++ b/.config/picom/picom.conf.old @@ -0,0 +1,90 @@ +# Shadow +shadow = true; +shadow-radius = 7; +shadow-offset-x = -7; +shadow-offset-y = -7; +log-level = "warn"; +# log-file = "/path/to/your/log/file"; +# shadow-opacity = 0.7; +# shadow-red = 0.0; +# shadow-green = 0.0; +# shadow-blue = 0.0; +shadow-exclude = [ + "name = 'Notification'", + "class_g = 'Conky'", + "class_g ?= 'Notify-osd'", + "class_g = 'Cairo-clock'", + "_GTK_FRAME_EXTENTS@:c" +]; +# shadow-exclude = "n:e:Notification"; +# shadow-exclude-reg = "x10+0+0"; +# xinerama-shadow-crop = true; + +# Opacity +#uncomment for window transparency +menu-opacity = 0.8; +inactive-opacity = 0.8; +# active-opacity = 0.8; +frame-opacity = 0.7; +inactive-opacity-override = false; +# inactive-dim = 0.2; +# inactive-dim-fixed = true; +# blur-background = true; +# blur-background-frame = true; +blur-kern = "3x3box"; +# blur-kern = "5,5,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1"; +# blur-background-fixed = true; +blur-background-exclude = [ + "window_type = 'dock'", + "window_type = 'desktop'", + "_GTK_FRAME_EXTENTS@:c" +]; +# opacity-rule = [ "80:class_g = 'URxvt'" ]; + +# max-brightness = 0.66 + +# Fading +fading = true; +# fade-delta = 30; +fade-in-step = 0.03; +fade-out-step = 0.03; +# no-fading-openclose = true; +# no-fading-destroyed-argb = true; +fade-exclude = [ ]; + +# Other +backend = "glx"; + + +mark-wmwin-focused = true; +mark-ovredir-focused = true; +# use-ewmh-active-win = true; +detect-rounded-corners = true; +detect-client-opacity = true; +refresh-rate = 0; +vsync = true; +# sw-opti = true; +# unredir-if-possible = true; +# unredir-if-possible-delay = 5000; +# unredir-if-possible-exclude = [ ]; +focus-exclude = [ "class_g = 'Cairo-clock'" ]; +detect-transient = true; +detect-client-leader = true; +invert-color-include = [ ]; +# resize-damage = 1; + +# GLX backend + glx-no-stencil = true; + glx-no-rebind-pixmap = true; + xrender-sync-fence = true; +use-damage = true; + +# Window type settings +wintypes: +{ + tooltip = { fade = true; shadow = true; opacity = 0.75; focus = true; full-shadow = false; }; + dock = { shadow = false; } + dnd = { shadow = false; } + popup_menu = { opacity = 0.8; } + dropdown_menu = { opacity = 0.8; } +}; diff --git a/.config/redshift/redshift.conf b/.config/redshift/redshift.conf new file mode 100644 index 0000000..dfb4ab5 --- /dev/null +++ b/.config/redshift/redshift.conf @@ -0,0 +1,24 @@ +; Global settings +[redshift] +temp-day=6500 +temp-night=2000 +transition=1 +;gamma=0.8:0.7:0.8 +gamma=1.000:1.000:1.000 +;location-provider=geoclue +location-provider=manual +adjustment-method=vidmode +;brightness=1.0:0.5 + +; The location provider and adjustment method settings +; are in their own sections. +; This is an example lat long for Portland, OR +[manual] +lat=34.73 +lon=-86.58 + +; In this example screen 1 is adjusted by vidmode. Note +; that the numbering starts from 0, so this is actually +; the second screen. +;[vidmode] +;screen=1 diff --git a/.config/rofi/config.rasi b/.config/rofi/config.rasi new file mode 100644 index 0000000..d0ab824 --- /dev/null +++ b/.config/rofi/config.rasi @@ -0,0 +1,149 @@ +configuration { +/* modes: "drun,run,ssh";*/ +/* font: "mono 12";*/ +/* location: 0;*/ +/* yoffset: 0;*/ +/* xoffset: 0;*/ +/* fixed-num-lines: true;*/ +/* show-icons: false;*/ +/* terminal: "rofi-sensible-terminal";*/ +/* ssh-client: "ssh";*/ +/* ssh-command: "{terminal} -e {ssh-client} {host} [-p {port}]";*/ +/* run-command: "{cmd}";*/ +/* run-list-command: "";*/ +/* run-shell-command: "{terminal} -e {cmd}";*/ +/* window-command: "wmctrl -i -R {window}";*/ +/* window-match-fields: "all";*/ +/* icon-theme: ;*/ +/* drun-match-fields: "name,generic,exec,categories,keywords";*/ +/* drun-categories: ;*/ +/* drun-show-actions: false;*/ +/* drun-display-format: "{name} [({generic})]";*/ +/* drun-url-launcher: "xdg-open";*/ +/* disable-history: false;*/ +/* ignored-prefixes: "";*/ +/* sort: false;*/ +/* sorting-method: "normal";*/ +/* case-sensitive: false;*/ +/* cycle: true;*/ +/* sidebar-mode: false;*/ +/* hover-select: false;*/ +/* eh: 1;*/ +/* auto-select: false;*/ +/* parse-hosts: false;*/ +/* parse-known-hosts: true;*/ +/* combi-modes: "window,run";*/ +/* matching: "normal";*/ +/* tokenize: true;*/ +/* m: "-5";*/ +/* filter: ;*/ +/* dpi: -1;*/ +/* threads: 0;*/ +/* scroll-method: 0;*/ +/* window-format: "{w} {c} {t}";*/ +/* click-to-exit: true;*/ +/* max-history-size: 25;*/ +/* combi-hide-mode-prefix: false;*/ +/* combi-display-format: "{mode} {text}";*/ +/* matching-negate-char: '-' /* unsupported */;*/ +/* cache-dir: ;*/ +/* window-thumbnail: false;*/ +/* drun-use-desktop-cache: false;*/ +/* drun-reload-desktop-cache: false;*/ +/* normalize-match: false;*/ +/* steal-focus: false;*/ +/* application-fallback-icon: ;*/ +/* pid: "/run/user/1000/rofi.pid";*/ +/* display-run: ;*/ +/* display-ssh: ;*/ +/* display-drun: ;*/ +/* display-combi: ;*/ +/* display-keys: ;*/ +/* display-filebrowser: ;*/ +/* kb-primary-paste: "Control+V,Shift+Insert";*/ +/* kb-secondary-paste: "Control+v,Insert";*/ +/* kb-clear-line: "Control+w";*/ +/* kb-move-front: "Control+a";*/ +/* kb-move-end: "Control+e";*/ +/* kb-move-word-back: "Alt+b,Control+Left";*/ +/* kb-move-word-forward: "Alt+f,Control+Right";*/ +/* kb-move-char-back: "Left,Control+b";*/ +/* kb-move-char-forward: "Right,Control+f";*/ +/* kb-remove-word-back: "Control+Alt+h,Control+BackSpace";*/ +/* kb-remove-word-forward: "Control+Alt+d";*/ +/* kb-remove-char-forward: "Delete,Control+d";*/ +/* kb-remove-char-back: "BackSpace,Shift+BackSpace,Control+h";*/ +/* kb-remove-to-eol: "Control+k";*/ +/* kb-remove-to-sol: "Control+u";*/ +/* kb-accept-entry: "Control+j,Control+m,Return,KP_Enter";*/ +/* kb-accept-custom: "Control+Return";*/ +/* kb-accept-custom-alt: "Control+Shift+Return";*/ +/* kb-accept-alt: "Shift+Return";*/ +/* kb-delete-entry: "Shift+Delete";*/ +/* kb-mode-next: "Shift+Right,Control+Tab";*/ +/* kb-mode-previous: "Shift+Left,Control+ISO_Left_Tab";*/ +/* kb-mode-complete: "Control+l";*/ +/* kb-row-left: "Control+Page_Up";*/ +/* kb-row-right: "Control+Page_Down";*/ +/* kb-row-up: "Up,Control+p";*/ +/* kb-row-down: "Down,Control+n";*/ +/* kb-row-tab: "";*/ +/* kb-element-next: "Tab";*/ +/* kb-element-prev: "ISO_Left_Tab";*/ +/* kb-page-prev: "Page_Up";*/ +/* kb-page-next: "Page_Down";*/ +/* kb-row-first: "Home,KP_Home";*/ +/* kb-row-last: "End,KP_End";*/ +/* kb-row-select: "Control+space";*/ +/* kb-screenshot: "Alt+S";*/ +/* kb-ellipsize: "Alt+period";*/ +/* kb-toggle-case-sensitivity: "grave,dead_grave";*/ +/* kb-toggle-sort: "Alt+grave";*/ +/* kb-cancel: "Escape,Control+g,Control+bracketleft";*/ +/* kb-custom-1: "Alt+1";*/ +/* kb-custom-2: "Alt+2";*/ +/* kb-custom-3: "Alt+3";*/ +/* kb-custom-4: "Alt+4";*/ +/* kb-custom-5: "Alt+5";*/ +/* kb-custom-6: "Alt+6";*/ +/* kb-custom-7: "Alt+7";*/ +/* kb-custom-8: "Alt+8";*/ +/* kb-custom-9: "Alt+9";*/ +/* kb-custom-10: "Alt+0";*/ +/* kb-custom-11: "Alt+exclam";*/ +/* kb-custom-12: "Alt+at";*/ +/* kb-custom-13: "Alt+numbersign";*/ +/* kb-custom-14: "Alt+dollar";*/ +/* kb-custom-15: "Alt+percent";*/ +/* kb-custom-16: "Alt+dead_circumflex";*/ +/* kb-custom-17: "Alt+ampersand";*/ +/* kb-custom-18: "Alt+asterisk";*/ +/* kb-custom-19: "Alt+parenleft";*/ +/* kb-select-1: "Super+1";*/ +/* kb-select-2: "Super+2";*/ +/* kb-select-3: "Super+3";*/ +/* kb-select-4: "Super+4";*/ +/* kb-select-5: "Super+5";*/ +/* kb-select-6: "Super+6";*/ +/* kb-select-7: "Super+7";*/ +/* kb-select-8: "Super+8";*/ +/* kb-select-9: "Super+9";*/ +/* kb-select-10: "Super+0";*/ +/* ml-row-left: "ScrollLeft";*/ +/* ml-row-right: "ScrollRight";*/ +/* ml-row-up: "ScrollUp";*/ +/* ml-row-down: "ScrollDown";*/ +/* me-select-entry: "MousePrimary";*/ +/* me-accept-entry: "MouseDPrimary";*/ +/* me-accept-custom: "Control+MouseDPrimary";*/ + timeout { + action: "kb-cancel"; + delay: 0; + } + filebrowser { + directories-first: true; + sorting-method: "name"; + } +} + +@theme "base16-gruvbox-dark-medium" diff --git a/.config/sfeed/sfeedrc b/.config/sfeed/sfeedrc new file mode 100644 index 0000000..0f0a6a0 --- /dev/null +++ b/.config/sfeed/sfeedrc @@ -0,0 +1,79 @@ +sfeedpath="$HOME/.local/share/sfeed/feeds" + +! [ -f "$SFEED_URL_FILE" ] && echo "Creating sfeed url file." && mkdir -p "$(echo $SFEED_URL_FILE | sed 's/\/[a-z]*$//g')" && touch "$SFEED_URL_FILE" + +#override fetch command to fix some feeds not downloading +fetch() { + # fail on redirects, hide User-Agent, timeout is 15 seconds. + curl -L --max-redirs 5 -H "User-Agent:" -f -s -m 15 \ + "$2" 2>/dev/null +} + +# list of feeds to fetch: +feeds() { +# feed [basesiteurl] [encoding] +# sfeedpath +# get youtube Atom feed: curl -s -L 'https://www.youtube.com/user/gocoding/videos' | sfeed_web | cut -f 1 +# + +#NEWS + #feed "Breaking911" "https://breaking911.com/feed" + feed "Revolver News" "https://www.revolver.news/feed/" + +#Tech + feed "NEWS Phoronix" "https://www.phoronix.com/rss.php" + feed "TheHackerNews" "https://feeds.feedburner.com/TheHackersNews" + feed "Arch Linux News" "https://archlinux.org/feeds/news/" + feed "Suckless" "http://suckless.org/atom.xml" + feed "Codemadness" "https://www.codemadness.nl/atom.xml" + +#Linux Distros + #feed "LibreELEC" "https://libreelec.tv/feed/" + #feed "Artix Linux" "https://artixlinux.org/feed.php" + feed "Alpine Linux" "https://www.alpinelinux.org/atom.xml" + +#Youtube + #feed "VIDS YT HydeWars" "https://www.youtube.com/feeds/videos.xml?channel_id=UCfUaZ8Ra7m7BqUEACv2jySw" + #feed "VIDS YT MilleniaThinker" "https://www.youtube.com/feeds/videos.xml?channel_id=UC3TUCGI-7rSjvHsE4ONXRww" + #feed "VIDS YT MentalOutlaw" "https://www.youtube.com/feeds/videos.xml?channel_id=UC7YOGHUfC1Tb6E4pudI9STA" + #feed "VIDS YT The Bioneer" "https://www.youtube.com/feeds/videos.xml?channel_id=UCIh_TPYPqjJuS_-nOfAIlfg" +#Bitchute + feed "VIDS BIT Paul Joseph Watson" "https://www.bitchute.com/feeds/rss/channel/pauljosephwatson/" + feed "VIDS BIT Liberum Arbitrium" "https://www.bitchute.com/feeds/rss/channel/liberum-arbitrium/" + #feed "VIDS BIT Keith Woods" "https://www.bitchute.com/feeds/rss/channel/keithwoods/" + feed "VIDS BIT PaxTube" "https://www.bitchute.com/feeds/rss/channel/paxtube/" + #feed "VIDS BIT MisterMetokur" "https://www.bitchute.com/feeds/rss/channel/mistermetokur/" + +#Anime + #feed "VIDS YT RetroCrush" "https://www.youtube.com/feeds/videos.xml?channel_id=UCPZkYpT5XIUou8sV8zk-3jQ" + feed "VIDS YT DemolitionD" "https://www.youtube.com/feeds/videos.xml?channel_id=UCcAvljdM2NMdMYq_pvT9pBw" + feed "VIDS YT Merryweather Comics" "https://www.youtube.com/feeds/videos.xml?channel_id=UCvCtIO1it51jSkZGibS9R3w" + #feed "VIDS YT Super Eyepatch Wolf" "https://www.youtube.com/feeds/videos.xml?channel_id=UCtGoikgbxP4F3rgI9PldI9g" + #feed "VIDS YT Pikamee" "https://www.youtube.com/feeds/videos.xml?channel_id=UCajhBT4nMrg3DLS-bLL2RCg" + #feed "VIDS YT ChoobiePatootie" "https://www.youtube.com/feeds/videos.xml?channel_id=UCESCrvsa2H5hNMmBbgkAWdQ" + +#Podcasts + #feed "POD The Dick Show" "https://thedickshow.com/feed/podcast/rss" + feed "POD Not Related" "https://notrelated.xyz/rss" + +#Baisudo + feed "Luke Smith Vids" "https://videos.lukesmith.xyz/feeds/videos.xml?accountId=3" + feed "Luke Smith" "https://lukesmith.xyz/rss.xml" + feed "Stonetoss" "https://stonetoss.com/index.php/comic/feed/" + #feed "VIDS YT John Doyle" "https://www.youtube.com/feeds/videos.xml?channel_id=UCzZpgppwC_XQMe8lFiI77-Q" + #feed "VIDS YT The New Pill" "https://www.youtube.com/feeds/videos.xml?channel_id=UCiUkcNS6W0n8QdosuZASduQ" + +#Boogaloo + #feed "VIDS YT Booligan Shooting Sports" "https://www.youtube.com/feeds/videos.xml?channel_id=UCzcWHu-x6oWOHxwZTfhrXug" + feed "CtrlPew" "https://ctrlpew.com/feed" + #feed "VIDS YT Bushradical" "https://www.youtube.com/feeds/videos.xml?channel_id=UCo698VL13Dip93yh0f4Rc5Q" + +#Crypto + #feed "Chainlink Blog" "https://blog.chain.link/rss/" + feed "GetMonero" "https://www.getmonero.org/feed.xml" + +#Misc + #feed "VIDS YT Primitive Technology" "https://www.youtube.com/feeds/videos.xml?channel_id=UCAL3JXZSzSm8AlZyD3nQdBA" + + feed "based.cooking" "https://based.cooking/index.xml" +} diff --git a/.config/shell/cleanup.sh b/.config/shell/cleanup.sh new file mode 100755 index 0000000..ac88e72 --- /dev/null +++ b/.config/shell/cleanup.sh @@ -0,0 +1,33 @@ +#!/bin/sh + +#remove things from $HOME +export XDG_CONFIG_HOME="$HOME/.config" +export XDG_CONFIG_DIRS="$HOME/.config" +export XDG_DATA_HOME="$HOME/.local/share" +export XDG_CACHE_HOME="$HOME/.cache" +export XDG_DOCUMENTS_DIR="$HOME/docs" +export XDG_DOWNLOAD_DIR="$HOME/dl" +export XDG_MUSIC_DIR="$HOME/media/audio/music" +export XDG_PICTURES_DIR="$HOME/media/img" +export XDG_VIDEOS_DIR="$HOME/media/video" +export HISTFILE="$XDG_DATA_HOME"/bash/history +#XDG_DESKTOP_DIR="$HOME/Desktop" +#XDG_PUBLICSHARE_DIR="$HOME/Public" +#XDG_TEMPLATES_DIR="$HOME/Templates" + +export NOTMUCH_CONFIG="${XDG_CONFIG_HOME:-$HOME/.config}/notmuch-config" +export GTK2_RC_FILES="${XDG_CONFIG_HOME:-$HOME/.config}/gtk-2.0/gtkrc-2.0" +export WGETRC="${XDG_CONFIG_HOME:-$HOME/.config}/wget/wgetrc" +export INPUTRC="${XDG_CONFIG_HOME:-$HOME/.config}/inputrc" +#export ALSA_CONFIG_PATH="$XDG_CONFIG_HOME/alsa/asoundrc" +export WINEPREFIX="$XDG_DATA_HOME/wineprefixes/default" +export STACK_ROOT="$XDG_DATA_HOME"/stack +export PASSWORD_STORE_DIR="${XDG_DATA_HOME:-$HOME/.local/share}/password-store" +export GNUPGHOME="$XDG_DATA_HOME/gnupg" +export CARGO_HOME="${XDG_DATA_HOME:-$HOME/.local/share}/cargo" +export GOPATH="${XDG_DATA_HOME:-$HOME/.local/share}/go" +export ANSIBLE_CONFIG="${XDG_CONFIG_HOME:-$HOME/.config}/ansible/ansible.cfg" +export TMUX_TMPDIR="$XDG_RUNTIME_DIR" +export ANDROID_SDK_HOME="${XDG_CONFIG_HOME:-$HOME/.config}/android" +export MBSYNCRC="${XDG_CONFIG_HOME:-$HOME/.config}/mbsync/config" +export ELECTRUMDIR="${XDG_DATA_HOME:-$HOME/.local/share}/electrum" diff --git a/.config/shell/wayland.sh b/.config/shell/wayland.sh new file mode 100755 index 0000000..714c1f1 --- /dev/null +++ b/.config/shell/wayland.sh @@ -0,0 +1,10 @@ +#!/bin/sh + +BEMENU_CONF="$HOME/.config/bemenu/bemenu_opts.sh" +[ -f "$BEMENU_CONF" ] && . "$BEMENU_CONF" +#End wayland config + +#make librewolf use wayland +export GDK_BACKEND=wayland +export MOZ_ENABLE_WAYLAND=1 + diff --git a/.config/sway/colors/base16-atlas b/.config/sway/colors/base16-atlas new file mode 100644 index 0000000..acb448a --- /dev/null +++ b/.config/sway/colors/base16-atlas @@ -0,0 +1,19 @@ +## Base16 Atlas +# Author: Alex Lende (https://ajlende.com) + +set $base00 #002635 +set $base01 #00384d +set $base02 #517F8D +set $base03 #6C8B91 +set $base04 #869696 +set $base05 #a1a19a +set $base06 #e6e6dc +set $base07 #fafaf8 +set $base08 #ff5a67 +set $base09 #f08e48 +set $base0A #ffcc1b +set $base0B #7fc06e +set $base0C #14747e +set $base0D #5dd7b9 +set $base0E #9a70a4 +set $base0F #c43060 diff --git a/.config/sway/colors/colorscheme-darkula b/.config/sway/colors/colorscheme-darkula new file mode 100644 index 0000000..3e2ceb7 --- /dev/null +++ b/.config/sway/colors/colorscheme-darkula @@ -0,0 +1,16 @@ +set $base00 #2b2b2b +set $base01 #323232 +set $base02 #323232 +set $base03 #606366 +set $base04 #a4a3a3 +set $base05 #a9b7c6 +set $base06 #ffc66d +set $base07 #ffffff +set $base08 #4eade5 +set $base09 #689757 +set $base0A #bbb529 +set $base0B #6a8759 +set $base0C #629755 +set $base0D #9876aa +set $base0E #cc7832 +set $base0F #808080 diff --git a/.config/sway/colors/colorscheme-default b/.config/sway/colors/colorscheme-default new file mode 100644 index 0000000..1661264 --- /dev/null +++ b/.config/sway/colors/colorscheme-default @@ -0,0 +1,19 @@ +## Base16 Default Dark +# Author: Chris Kempson (http://chriskempson.com) + +set $base00 #181818 +set $base01 #282828 +set $base02 #383838 +set $base03 #585858 +set $base04 #b8b8b8 +set $base05 #d8d8d8 +set $base06 #e8e8e8 +set $base07 #f8f8f8 +set $base08 #ab4642 +set $base09 #dc9656 +set $base0A #f7ca88 +set $base0B #a1b56c +set $base0C #86c1b9 +set $base0D #7cafc2 +set $base0E #ba8baf +set $base0F #a16946 diff --git a/.config/sway/colors/colorscheme-dracula b/.config/sway/colors/colorscheme-dracula new file mode 100644 index 0000000..b853d1a --- /dev/null +++ b/.config/sway/colors/colorscheme-dracula @@ -0,0 +1,16 @@ +set $base00 #282936 +set $base01 #3a3c4e +set $base02 #4d4f68 +set $base03 #626483 +set $base04 #62d6e8 +set $base05 #e9e9f4 +set $base06 #f1f2f8 +set $base07 #f7f7fb +set $base08 #ea51b2 +set $base09 #b45bcf +set $base0A #00f769 +set $base0B #ebff87 +set $base0C #a1efe4 +set $base0D #62d6e8 +set $base0E #b45bcf +set $base0F #00f769 diff --git a/.config/sway/colors/colorscheme-dracula-mine b/.config/sway/colors/colorscheme-dracula-mine new file mode 100644 index 0000000..25c18e2 --- /dev/null +++ b/.config/sway/colors/colorscheme-dracula-mine @@ -0,0 +1,19 @@ +#dracula colorscheme for sway +#based on base16 (https://github.com/rkubosz/base16-sway) + +set $base00 #282936 +set $base01 #3a3c4e +set $base02 #F7CA88 +set $base03 #626483 +set $base04 #62d6e8 +set $base05 #e9e9f4 +set $base06 #f1f2f8 +set $base07 #f7f7fb +set $base08 #ea51b2 +set $base09 #b45bcf +set $base0A #00f769 +set $base0B #ebff87 +set $base0C #a1efe4 +set $base0D #62d6e8 +set $base0E #b45bcf +set $base0F #00f769 diff --git a/.config/sway/colors/colorscheme-gruvbox-dark-soft b/.config/sway/colors/colorscheme-gruvbox-dark-soft new file mode 100644 index 0000000..70ffcbd --- /dev/null +++ b/.config/sway/colors/colorscheme-gruvbox-dark-soft @@ -0,0 +1,16 @@ +set $base00 #32302f +set $base01 #3c3836 +set $base02 #504945 +set $base03 #665c54 +set $base04 #bdae93 +set $base05 #d5c4a1 +set $base06 #ebdbb2 +set $base07 #fbf1c7 +set $base08 #fb4934 +set $base09 #fe8019 +set $base0A #fabd2f +set $base0B #b8bb26 +set $base0C #8ec07c +set $base0D #83a598 +set $base0E #d3869b +set $base0F #d65d0e diff --git a/.config/sway/config b/.config/sway/config new file mode 100644 index 0000000..e83fcfb --- /dev/null +++ b/.config/sway/config @@ -0,0 +1,305 @@ +# Default config for sway +# +# Copy this to ~/.config/sway/config and edit it to your liking. +# +# Read `man 5 sway` for a complete reference. + +### Variables +# +# Logo key. Use Mod1 for Alt. +set $mod Mod1 +# Home row direction keys, like vim +set $left h +set $down j +set $up k +set $right l +# Your preferred terminal emulator +set $term alacritty +# Your preferred application launcher +# Note: it's recommended that you pass the final command to sway +#set $menu bemenu-run | xargs swaymsg exec -- +set $menu rofi -show run | xargs swaymsg exec -- + +### Output configuration +# +# Default wallpaper +#output * bg ~/.config/sway/backgrounds/Sway_Wallpaper_Blue_1920x1080.png fill +# +# Example configuration: +# +#output HDMI-A-1 resolution 1920x1080 position 1920,0 +#output HDMI-A-1 bg ~/.config/wall fill +#output DP-1 resolution 1920x1080 position 0,0 +#output DP-1 bg ~/.config/wall fill +output * bg ~/.config/wall fill +output VGA-1 disable + + +# +# You can get the names of your outputs by running: swaymsg -t get_outputs + +### Idle configuration +# +# Example configuration: +# + exec swayidle -w \ + timeout 900 'swaylock -f -c 000000' \ + timeout 1200 'swaymsg "output * dpms off"' \ + resume 'swaymsg "output * dpms on"' \ + before-sleep 'swaylock -f -c 000000' +# +# This will lock your screen after 300 seconds of inactivity, then turn off +# your displays after another 300 seconds, and turn your screens back on when +# resumed. It will also lock your screen before your computer goes to sleep. + +#set transparency +set $opacity 0.9 +#for_window [class=".*"] opacity 1.0 +#for_window [app_id=".*"] opacity 1.0 + +#for_window [class='alacritty'] opacity $opacity +#for_window [class="bash"] opacity $opacity +#for_window [app_id="alacritty"] opacity $opacity + +font pango:mononoki Nerd Font Regular 10 + +### Input configuration +# +# Example configuration: +# +# input "2:14:SynPS/2_Synaptics_TouchPad" { +# dwt enabled +# tap enabled +# natural_scroll enabled +# middle_emulation enabled +# } +# +# You can get the names of your inputs by running: swaymsg -t get_inputs +# Read `man 5 sway-input` for more information about this section. + +xwayland enable + +### Key bindings +# +# Basics: +# + # Start a terminal + bindsym $mod+Return exec $term + + # Kill focused window + bindsym $mod+Shift+q kill + + # Start your launcher + bindsym $mod+d exec $menu + + # Drag floating windows by holding down $mod and left mouse button. + # Resize them with right mouse button + $mod. + # Despite the name, also works for non-floating windows. + # Change normal to inverse to use left mouse button for resizing and right + # mouse button for dragging. + floating_modifier $mod normal + + # Reload the configuration file + bindsym $mod+Shift+c reload + + # Exit sway (logs you out of your Wayland session) + bindsym $mod+Shift+e exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -B 'Yes, exit sway' 'exec "$HOME"/.local/init/init.sh -c' +# +# Moving around: +# + # Move your focus around + bindsym $mod+$left focus left + bindsym $mod+$down focus down + bindsym $mod+$up focus up + bindsym $mod+$right focus right + # Or use $mod+[up|down|left|right] + bindsym $mod+Left focus left + bindsym $mod+Down focus down + bindsym $mod+Up focus up + bindsym $mod+Right focus right + + # Move the focused window with the same, but add Shift + bindsym $mod+Shift+$left move left + bindsym $mod+Shift+$down move down + bindsym $mod+Shift+$up move up + bindsym $mod+Shift+$right move right + # Ditto, with arrow keys + bindsym $mod+Shift+Left move left + bindsym $mod+Shift+Down move down + bindsym $mod+Shift+Up move up + bindsym $mod+Shift+Right move right +# +# Workspaces: +# + # Switch to workspace + bindsym $mod+1 workspace 1 + bindsym $mod+2 workspace 2 + bindsym $mod+3 workspace 3 + bindsym $mod+4 workspace 4 + bindsym $mod+5 workspace 5 + bindsym $mod+6 workspace 6 + bindsym $mod+7 workspace 7 + bindsym $mod+8 workspace 8 + bindsym $mod+9 workspace 9 + bindsym $mod+0 workspace 10 + # Move focused container to workspace + bindsym $mod+Shift+1 move container to workspace 1 + bindsym $mod+Shift+2 move container to workspace 2 + bindsym $mod+Shift+3 move container to workspace 3 + bindsym $mod+Shift+4 move container to workspace 4 + bindsym $mod+Shift+5 move container to workspace 5 + bindsym $mod+Shift+6 move container to workspace 6 + bindsym $mod+Shift+7 move container to workspace 7 + bindsym $mod+Shift+8 move container to workspace 8 + bindsym $mod+Shift+9 move container to workspace 9 + bindsym $mod+Shift+0 move container to workspace 10 + # Note: workspaces can have any name you want, not just numbers. + # We just use 1-10 as the default. +# +# Layout stuff: +# + # You can "split" the current object of your focus with + # $mod+b or $mod+v, for horizontal and vertical splits + # respectively. + bindsym $mod+b splith + bindsym $mod+v splitv + + # Switch the current container between different layout styles + bindsym $mod+s layout stacking + bindsym $mod+w layout tabbed + bindsym $mod+e layout toggle split + + # Make the current focus fullscreen + bindsym $mod+f fullscreen + + # Toggle the current focus between tiling and floating mode + bindsym $mod+Shift+space floating toggle + + # Swap focus between the tiling area and the floating area + bindsym $mod+space focus mode_toggle + + # Move focus to the parent container + bindsym $mod+a focus parent +# +# Scratchpad: +# + # Sway has a "scratchpad", which is a bag of holding for windows. + # You can send windows there and get them back later. + + # Move the currently focused window to the scratchpad + bindsym $mod+Shift+minus move scratchpad + + # Show the next scratchpad window or hide the focused scratchpad window. + # If there are multiple scratchpad windows, this command cycles through them. + bindsym $mod+minus scratchpad show +# +# Resizing containers: +# +mode "resize" { + # left will shrink the containers width + # right will grow the containers width + # up will shrink the containers height + # down will grow the containers height + bindsym $left resize shrink width 10px + bindsym $down resize grow height 10px + bindsym $up resize shrink height 10px + bindsym $right resize grow width 10px + + # Ditto, with arrow keys + bindsym Left resize shrink width 10px + bindsym Down resize grow height 10px + bindsym Up resize shrink height 10px + bindsym Right resize grow width 10px + + # Return to default mode + bindsym Return mode "default" + bindsym Escape mode "default" +} +bindsym $mod+r mode "resize" + +#custom keybinds +bindsym XF86AudioRaiseVolume exec vol.sh -i 0.02 +bindsym XF86AudioLowerVolume exec vol.sh -d 0.02 +bindsym XF86AudioMute exec vol.sh --toggle-mute +bindsym $mod+p exec fixscr.sh --menu +bindsym $mod+o exec browser.sh +bindsym $mod+shift+s exec ss.sh -s +bindsym ctrl+alt+delete exec waylogout + + + +#include ~/.config/sway/colors/base16-atlas +include ~/.local/src/base16-sway/themes/base16-gruvbox-dark-medium.config +#include ~/.local/src/base16-sway/themes/base16-atlas.config +#include ~/.local/src/base16-sway/themes/base16-gruvbox-dark-hard.config +#include ~/.local/src/base16-sway/themes/base16-nord.config + + +# +# Status Bar: +# +# Read `man 5 sway-bar` for more information about this section. +bar { + position top + + # When the status_command prints a new line to stdout, swaybar updates. + # The default just shows the current date and time. + #status_command while date +'%Y-%m-%d %l:%M:%S %p'; do sleep 1; done + status_command sh $HOME/.local/scripts/sway-bar.sh -l + + colors { + background $base00 + separator $base01 + statusline $base04 + + # State Border BG Text + focused_workspace $base05 $base0D $base00 + active_workspace $base05 $base03 $base00 + inactive_workspace $base03 $base01 $base05 + urgent_workspace $base08 $base08 $base00 + binding_mode $base00 $base0A $base00 + } +} + + +# Basic color configuration using the Base16 variables for windows and borders. +# Property Name Border BG Text Indicator Child Border +client.focused $base05 $base0D $base00 $base0D $base0D +client.focused_inactive $base01 $base01 $base05 $base03 $base01 +client.unfocused $base01 $base00 $base05 $base01 $base01 +client.urgent $base08 $base08 $base00 $base08 $base08 +client.placeholder $base00 $base00 $base05 $base00 $base00 +client.background $base07 + +#GTK theme +set $gnome_schema "org.gnome.desktop.interface" +exec_always { + gsettings set $gnome_schema gtk-theme 'Nordic-standard-buttons' + gsettings set $gnome_schema icon-theme 'ePapirus-Dark' + gsettings set $gnome_schema cursor-theme 'Adwaita' + gsettings set $gnome_schema font-name 'Noto Sans' +} + + +#gaps +gaps inner 10 +gaps outer 10 + +#border +default_border pixel 2 + +#set windows to float by default +for_window [class="Matplotlib"] floating enable + +#input config +input type:pointer accel_profile flat +input type:pointer pointer_accel -0.5 +seat seat0 xcursor_theme Adwaita 10 + +include /etc/sway/config.d/* + +exec ~/.local/init/init.sh -i ~/.local/init/startup + +#do any computer specific setup here, monitor configs, etc. +exec_always ~/.init.sh + diff --git a/.config/swaylock/config b/.config/swaylock/config new file mode 100644 index 0000000..439e4a6 --- /dev/null +++ b/.config/swaylock/config @@ -0,0 +1,10 @@ +font=mono +color=3B4252 +inside-color=2E3440 +inside-caps-lock-color=88c0d0 +inside-ver-color=88c0d0 +inside-wrong-color=BF616A +ring-color=A3BE8C +ring-caps-lock-color=5E81AC +key-hl-color=E5E9F0 +bs-hl-color=D08770 diff --git a/.config/waylogout/config b/.config/waylogout/config new file mode 100644 index 0000000..db6bb2e --- /dev/null +++ b/.config/waylogout/config @@ -0,0 +1,21 @@ +ring-color=A3BE8Caa +inside-color=2E344066 +text-color=eaeaeaaa +line-color=00000000 +ring-selection-color=88c0d0aa +inside-selection-color=88c0d066 +text-selection-color=eaeaeaaa +line-selection-color=00000000 +font=mono +effect-blur=7x5 +indicator-thickness=20 +lock-command="exec swaylock -f" +logout-command="exec swaymsg exit" +suspend-command="echo suspend" +hibernate-command="echo hibernate" +poweroff-command="doas /sbin/poweroff" +reboot-command="doas /sbin/reboot" +switch-user-command="echo switch" +hide-cancel +screenshots +selection-label diff --git a/.config/wget/wgetrc b/.config/wget/wgetrc new file mode 100644 index 0000000..4fd7999 --- /dev/null +++ b/.config/wget/wgetrc @@ -0,0 +1 @@ +hsts-file=~/.cache/wget-hsts diff --git a/.config/zathura/zathurarc b/.config/zathura/zathurarc new file mode 100644 index 0000000..ac55bc8 --- /dev/null +++ b/.config/zathura/zathurarc @@ -0,0 +1,15 @@ +set statusbar-h-padding 50 +set statusbar-v-padding 0 +set page-padding 10 + +map i recolor + +#KEYBINDINGS +#map shortcut_function +#map shortcut_function +# A - Alt +# C - Control +# S - Shift +#map zoom out +#map zoom in + diff --git a/.config/zsh/.zshrc b/.config/zsh/.zshrc new file mode 100644 index 0000000..0b8d6b5 --- /dev/null +++ b/.config/zsh/.zshrc @@ -0,0 +1,92 @@ +# Luke's config for the Zoomer Shell + +# Enable colors and change prompt: +autoload -U colors && colors + +#PS1="%B%{$fg[red]%}[%{$fg[yellow]%}%n%{$fg[green]%}@%{$fg[blue]%}%M %{$fg[magenta]%}%~%{$fg[red]%}]%{$reset_color%}$%b " +PS1="%{$fg[yellow]%}%n%{$fg[green]%}@%{$fg[blue]%}%M %{$fg[magenta]%}%~% %{$fg[yellow]%} -> " +# History in cache directory: +HISTSIZE=10000 +SAVEHIST=10000 +HISTFILE=~/.cache/zsh/history + +# Basic auto/tab complete: +autoload -U compinit +zstyle ':completion:*' menu select +zmodload zsh/complist +compinit +_comp_options+=(globdots) # Include hidden files. + +# vi mode +bindkey -v +export KEYTIMEOUT=1 + +# Use vim keys in tab complete menu: +bindkey -M menuselect 'h' vi-backward-char +bindkey -M menuselect 'k' vi-up-line-or-history +bindkey -M menuselect 'l' vi-forward-char +bindkey -M menuselect 'j' vi-down-line-or-history +bindkey -v '^?' backward-delete-char + +# Change cursor shape for different vi modes. +function zle-keymap-select { + if [[ ${KEYMAP} == vicmd ]] || + [[ $1 = 'block' ]]; then + echo -ne '\e[1 q' + elif [[ ${KEYMAP} == main ]] || + [[ ${KEYMAP} == viins ]] || + [[ ${KEYMAP} = '' ]] || + [[ $1 = 'beam' ]]; then + echo -ne '\e[5 q' + fi +} +zle -N zle-keymap-select +zle-line-init() { + zle -K viins # initiate `vi insert` as keymap (can be removed if `bindkey -V` has been set elsewhere) + echo -ne "\e[5 q" +} +zle -N zle-line-init +echo -ne '\e[5 q' # Use beam shape cursor on startup. +preexec() { echo -ne '\e[5 q' ;} # Use beam shape cursor for each new prompt. + +# Use lf to switch directories and bind it to ctrl-o +lfcd () { + tmp="$(mktemp)" + lf -last-dir-path="$tmp" "$@" + if [ -f "$tmp" ]; then + dir="$(cat "$tmp")" + rm -f "$tmp" + [ -d "$dir" ] && [ "$dir" != "$(pwd)" ] && cd "$dir" + fi +} +bindkey -s '^o' 'lfcd\n' + +# Edit line in vim with ctrl-e: +autoload edit-command-line; zle -N edit-command-line +bindkey '^e' edit-command-line + +# Load aliases and shortcuts if existent. +[ -f "$HOME/.config/shortcutrc" ] && source "$HOME/.config/shortcutrc" +[ -f "$HOME/.config/aliasrc" ] && source "$HOME/.config/aliasrc" + +#my additions +unsetopt nomatch + + +#source haskell file if it exists +[ -f "$HOME/.ghcup/env" ] && source "$HOME/.ghcup/env" + +if ! [ -f $HOME/.local/share/zsh/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh ]; then + mkdir -p $HOME/.local/share/zsh/ + git clone https://github.com/zsh-users/zsh-syntax-highlighting.git $HOME/.local/share/zsh/zsh-syntax-highlighting +fi + +# prompt stuff +pfetch + +#if [ -f "/usr/bin/starship" ]; then +# eval "$(starship init zsh)" +#fi + +# Load zsh-syntax-highlighting; should be last. +source $HOME/.local/share/zsh/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh 2>/dev/null