diff options
| author | Charles Cabergs <me@cacharle.xyz> | 2021-02-24 17:07:33 +0100 |
|---|---|---|
| committer | Charles Cabergs <me@cacharle.xyz> | 2021-02-24 17:07:33 +0100 |
| commit | 468a789dbc4b1928c035d8590895efc533520a27 (patch) | |
| tree | 74cb056c37eaa50cd50491a7665608488ed4feb1 /config | |
| parent | f9883d2c3b3699d91e98feeffd7eece546f7c57e (diff) | |
| download | dotfiles-468a789dbc4b1928c035d8590895efc533520a27.tar.gz dotfiles-468a789dbc4b1928c035d8590895efc533520a27.tar.bz2 dotfiles-468a789dbc4b1928c035d8590895efc533520a27.zip | |
Updated file tree to match XDG base directory specification
Diffstat (limited to 'config')
| -rw-r--r-- | config/alacritty/alacritty.yml | 43 | ||||
| -rw-r--r-- | config/bash/bashrc | 33 | ||||
| -rw-r--r-- | config/dunst/dunstrc | 414 | ||||
| -rw-r--r-- | config/gdb/init | 5 | ||||
| -rw-r--r-- | config/ghc/ghci.conf | 1 | ||||
| -rw-r--r-- | config/git/config | 12 | ||||
| -rw-r--r-- | config/isync/mbsyncrc | 19 | ||||
| -rw-r--r-- | config/moc/config | 690 | ||||
| -rw-r--r-- | config/moc/keymap | 192 | ||||
| -rw-r--r-- | config/moc/themes/solarized | 45 | ||||
| -rw-r--r-- | config/mutt/mailcap | 2 | ||||
| -rw-r--r-- | config/mutt/muttrc | 57 | ||||
| -rw-r--r-- | config/nano/nanorc | 1 | ||||
| -rw-r--r-- | config/newsboat/config | 33 | ||||
| -rw-r--r-- | config/pulseaudio-ctl/config | 25 | ||||
| -rw-r--r-- | config/qutebrowser/config.py | 285 | ||||
| -rw-r--r-- | config/redshift/redshift.conf | 14 | ||||
| -rwxr-xr-x | config/startx/xinitrc | 25 | ||||
| -rw-r--r-- | config/sublime-text/Preferences.sublime-settings | 11 | ||||
| -rw-r--r-- | config/tmux/tmux.conf | 13 | ||||
| -rw-r--r-- | config/urlview/.urlview | 1 | ||||
| -rw-r--r-- | config/vim/pluggins.vim | 47 | ||||
| -rw-r--r-- | config/vim/vimrc | 315 | ||||
| -rw-r--r-- | config/xmonad/xmonad.hs | 76 | ||||
| -rw-r--r-- | config/zathura/zathurarc | 3 | ||||
| -rwxr-xr-x | config/zsh/.zprofile | 46 | ||||
| -rw-r--r-- | config/zsh/.zshrc | 80 | ||||
| -rw-r--r-- | config/zsh/aliases.zsh | 149 |
28 files changed, 2637 insertions, 0 deletions
diff --git a/config/alacritty/alacritty.yml b/config/alacritty/alacritty.yml new file mode 100644 index 0000000..ddfce65 --- /dev/null +++ b/config/alacritty/alacritty.yml @@ -0,0 +1,43 @@ +############# +# alacritty # +############# + +# font +font: + size: 9 + normal: + family: Fira Code + + + offset: + x: 0 + y: 0 + +# colorscheme (Dracula) +colors: + # Default colors + primary: + background: '#282a36' + foreground: '#f8f8f2' + + # Normal colors + normal: + black: '#000000' + red: '#ff5555' + green: '#50fa7b' + yellow: '#f1fa8c' + blue: '#caa9fa' + magenta: '#ff79c6' + cyan: '#8be9fd' + white: '#bfbfbf' + + # Bright colors + bright: + black: '#575b70' + red: '#ff6e67' + green: '#5af78e' + yellow: '#f4f99d' + blue: '#caa9fa' + magenta: '#ff92d0' + cyan: '#9aedfe' + white: '#e6e6e6' diff --git a/config/bash/bashrc b/config/bash/bashrc new file mode 100644 index 0000000..bc5b9ab --- /dev/null +++ b/config/bash/bashrc @@ -0,0 +1,33 @@ +########### +# .bashrc # +########### + +alias ls='ls --color=auto' +alias grep='grep --color=auto' +alias ll='ls -l' +alias la='ls -A' +alias v='vim' + +# adding superuser bin to PATH +export PATH="/sbin:$PATH" + +# man with color +export LESS_TERMCAP_mb=$'\e[1;32m' +export LESS_TERMCAP_md=$'\e[1;32m' +export LESS_TERMCAP_me=$'\e[0m' +export LESS_TERMCAP_se=$'\e[0m' +export LESS_TERMCAP_so=$'\e[01;33m' +export LESS_TERMCAP_ue=$'\e[0m' +export LESS_TERMCAP_us=$'\e[1;4;31m' + +export PS1="\n\[$(tput bold)$(tput setaf 2)\]\w\n\[$(tput setaf 1)\]❯ \[$( tput sgr0)\]" + +# set XDG paths +export XDG_CONFIG_HOME="$HOME/.config/" +export XDG_DATA_HOME="$HOME/.data/" + +# vim key bindings +set -o vi + +# Added by c_formatter_42 +export PATH="$PATH:/home/charles/git/c_formatter_42" diff --git a/config/dunst/dunstrc b/config/dunst/dunstrc new file mode 100644 index 0000000..0a8f19a --- /dev/null +++ b/config/dunst/dunstrc @@ -0,0 +1,414 @@ +[global] + ### Display ### + + # Which monitor should the notifications be displayed on. + monitor = 0 + + # Display notification on focused monitor. Possible modes are: + # mouse: follow mouse pointer + # keyboard: follow window with keyboard focus + # none: don't follow anything + # + # "keyboard" needs a window manager that exports the + # _NET_ACTIVE_WINDOW property. + # This should be the case for almost all modern window managers. + # + # If this option is set to mouse or keyboard, the monitor option + # will be ignored. + follow = keyboard + + # The geometry of the window: + # [{width}]x{height}[+/-{x}+/-{y}] + # The geometry of the message window. + # The height is measured in number of notifications everything else + # in pixels. If the width is omitted but the height is given + # ("-geometry x2"), the message window expands over the whole screen + # (dmenu-like). If width is 0, the window expands to the longest + # message displayed. A positive x is measured from the left, a + # negative from the right side of the screen. Y is measured from + # the top and down respectively. + # The width can be negative. In this case the actual width is the + # screen width minus the width defined in within the geometry option. + geometry = "0x0-30+20" + + # Show how many messages are currently hidden (because of geometry). + indicate_hidden = yes + + # Shrink window if it's smaller than the width. Will be ignored if + # width is 0. + shrink = no + + # The transparency of the window. Range: [0; 100]. + # This option will only work if a compositing window manager is + # present (e.g. xcompmgr, compiz, etc.). + transparency = 0 + + # The height of the entire notification. If the height is smaller + # than the font height and padding combined, it will be raised + # to the font height and padding. + notification_height = 0 + + # Draw a line of "separator_height" pixel height between two + # notifications. + # Set to 0 to disable. + separator_height = 2 + + # Padding between text and separator. + padding = 8 + + # Horizontal padding. + horizontal_padding = 8 + + # Defines width in pixels of frame around the notification window. + # Set to 0 to disable. + frame_width = 2 + + # Defines color of the frame around the notification window. + frame_color = "#aaaaaa" + + # Define a color for the separator. + # possible values are: + # * auto: dunst tries to find a color fitting to the background; + # * foreground: use the same color as the foreground; + # * frame: use the same color as the frame; + # * anything else will be interpreted as a X color. + separator_color = auto + + # Sort messages by urgency. + sort = yes + + # Don't remove messages, if the user is idle (no mouse or keyboard input) + # for longer than idle_threshold seconds. + # Set to 0 to disable. + # A client can set the 'transient' hint to bypass this. See the rules + # section for how to disable this if necessary + idle_threshold = 120 + + ### Text ### + + font = Noto 9 + + # The spacing between lines. If the height is smaller than the + # font height, it will get raised to the font height. + line_height = 4 + + # Possible values are: + # full: Allow a small subset of html markup in notifications: + # <b>bold</b> + # <i>italic</i> + # <s>strikethrough</s> + # <u>underline</u> + # + # For a complete reference see + # <http://developer.gnome.org/pango/stable/PangoMarkupFormat.html>. + # + # strip: This setting is provided for compatibility with some broken + # clients that send markup even though it's not enabled on the + # server. Dunst will try to strip the markup but the parsing is + # simplistic so using this option outside of matching rules for + # specific applications *IS GREATLY DISCOURAGED*. + # + # no: Disable markup parsing, incoming notifications will be treated as + # plain text. Dunst will not advertise that it has the body-markup + # capability if this is set as a global setting. + # + # It's important to note that markup inside the format option will be parsed + # regardless of what this is set to. + markup = full + + # The format of the message. Possible variables are: + # %a appname + # %s summary + # %b body + # %i iconname (including its path) + # %I iconname (without its path) + # %p progress value if set ([ 0%] to [100%]) or nothing + # %n progress value if set without any extra characters + # %% Literal % + # Markup is allowed + format = "<b>%s</b>\n%b%p" + + # Alignment of message text. + # Possible values are "left", "center" and "right". + alignment = left + + # Show age of message if message is older than show_age_threshold + # seconds. + # Set to -1 to disable. + show_age_threshold = 60 + + # Split notifications into multiple lines if they don't fit into + # geometry. + word_wrap = yes + + # When word_wrap is set to no, specify where to make an ellipsis in long lines. + # Possible values are "start", "middle" and "end". + ellipsize = middle + + # Ignore newlines '\n' in notifications. + ignore_newline = no + + # Stack together notifications with the same content + stack_duplicates = true + + # Hide the count of stacked notifications with the same content + hide_duplicate_count = false + + # Display indicators for URLs (U) and actions (A). + show_indicators = yes + + ### Icons ### + + # Align icons left/right/off + icon_position = right + + # Scale larger icons down to this size, set to 0 to disable + max_icon_size = 32 + + # Paths to default icons. + icon_path = /usr/share/icons/Adwaita/32x32/status/:/usr/share/icons/Adwaita/32x32/devices/:/usr/share/icons/Adwaita/32x32/legacy/:/usr/share/icons/Adwaita/32x32/mimetypes/ + + ### History ### + + # Should a notification popped up from history be sticky or timeout + # as if it would normally do. + sticky_history = yes + + # Maximum amount of notifications kept in history + history_length = 20 + + ### Misc/Advanced ### + + # dmenu path. + dmenu = /usr/bin/dmenu -p dunst: + + # Browser for opening urls in context menu. + browser = /usr/bin/qutebrowser + + # Always run rule-defined scripts, even if the notification is suppressed + always_run_script = true + + # Define the title of the windows spawned by dunst + title = Dunst + + # Define the class of the windows spawned by dunst + class = Dunst + + # Print a notification on startup. + # This is mainly for error detection, since dbus (re-)starts dunst + # automatically after a crash. + startup_notification = false + + # Manage dunst's desire for talking + # Can be one of the following values: + # crit: Critical features. Dunst aborts + # warn: Only non-fatal warnings + # mesg: Important Messages + # info: all unimportant stuff + # debug: all less than unimportant stuff + verbosity = mesg + + # Define the corner radius of the notification window + # in pixel size. If the radius is 0, you have no rounded + # corners. + # The radius will be automatically lowered if it exceeds half of the + # notification height to avoid clipping text and/or icons. + corner_radius = 0 + + ### Legacy + + # Use the Xinerama extension instead of RandR for multi-monitor support. + # This setting is provided for compatibility with older nVidia drivers that + # do not support RandR and using it on systems that support RandR is highly + # discouraged. + # + # By enabling this setting dunst will not be able to detect when a monitor + # is connected or disconnected which might break follow mode if the screen + # layout changes. + force_xinerama = false + + ### mouse + + # Defines action of mouse event + # Possible values are: + # * none: Don't do anything. + # * do_action: If the notification has exactly one action, or one is marked as default, + # invoke it. If there are multiple and no default, open the context menu. + # * close_current: Close current notification. + # * close_all: Close all notifications. + mouse_left_click = close_current + mouse_middle_click = do_action + mouse_right_click = close_all + +# Experimental features that may or may not work correctly. Do not expect them +# to have a consistent behaviour across releases. +[experimental] + # Calculate the dpi to use on a per-monitor basis. + # If this setting is enabled the Xft.dpi value will be ignored and instead + # dunst will attempt to calculate an appropriate dpi value for each monitor + # using the resolution and physical size. This might be useful in setups + # where there are multiple screens with very different dpi values. + per_monitor_dpi = false + +[shortcuts] + + # Shortcuts are specified as [modifier+][modifier+]...key + # Available modifiers are "ctrl", "mod1" (the alt-key), "mod2", + # "mod3" and "mod4" (windows-key). + # Xev might be helpful to find names for keys. + + # Close notification. + close = ctrl+space + + # Close all notifications. + close_all = ctrl+shift+space + + # Redisplay last message(s). + # On the US keyboard layout "grave" is normally above TAB and left + # of "1". Make sure this key actually exists on your keyboard layout, + # e.g. check output of 'xmodmap -pke' + history = ctrl+grave + + # Context menu. + context = ctrl+shift+period + +[urgency_low] + # IMPORTANT: colors have to be defined in quotation marks. + # Otherwise the "#" and following would be interpreted as a comment. + background = "#222222" + foreground = "#888888" + timeout = 10 + # Icon for notifications with low urgency, uncomment to enable + #icon = /path/to/icon + +[urgency_normal] + background = "#285577" + foreground = "#ffffff" + timeout = 10 + # Icon for notifications with normal urgency, uncomment to enable + #icon = /path/to/icon + +[urgency_critical] + background = "#900000" + foreground = "#ffffff" + frame_color = "#ff0000" + timeout = 15 + # Icon for notifications with critical urgency, uncomment to enable + #icon = /path/to/icon + +# Every section that isn't one of the above is interpreted as a rules to +# override settings for certain messages. +# +# Messages can be matched by +# appname (discouraged, see desktop_entry) +# body +# category +# desktop_entry +# icon +# match_transient +# msg_urgency +# stack_tag +# summary +# +# and you can override the +# background +# foreground +# format +# frame_color +# fullscreen +# new_icon +# set_stack_tag +# set_transient +# timeout +# urgency +# +# Shell-like globbing will get expanded. +# +# Instead of the appname filter, it's recommended to use the desktop_entry filter. +# GLib based applications export their desktop-entry name. In comparison to the appname, +# the desktop-entry won't get localized. +# +# SCRIPTING +# You can specify a script that gets run when the rule matches by +# setting the "script" option. +# The script will be called as follows: +# script appname summary body icon urgency +# where urgency can be "LOW", "NORMAL" or "CRITICAL". +# +# NOTE: if you don't want a notification to be displayed, set the format +# to "". +# NOTE: It might be helpful to run dunst -print in a terminal in order +# to find fitting options for rules. + +# Disable the transient hint so that idle_threshold cannot be bypassed from the +# client +#[transient_disable] +# match_transient = yes +# set_transient = no +# +# Make the handling of transient notifications more strict by making them not +# be placed in history. +#[transient_history_ignore] +# match_transient = yes +# history_ignore = yes + +# fullscreen values +# show: show the notifications, regardless if there is a fullscreen window opened +# delay: displays the new notification, if there is no fullscreen window active +# If the notification is already drawn, it won't get undrawn. +# pushback: same as delay, but when switching into fullscreen, the notification will get +# withdrawn from screen again and will get delayed like a new notification +#[fullscreen_delay_everything] +# fullscreen = delay +#[fullscreen_show_critical] +# msg_urgency = critical +# fullscreen = show + +#[espeak] +# summary = "*" +# script = dunst_espeak.sh + +#[script-test] +# summary = "*script*" +# script = dunst_test.sh + +#[ignore] +# # This notification will not be displayed +# summary = "foobar" +# format = "" + +#[history-ignore] +# # This notification will not be saved in history +# summary = "foobar" +# history_ignore = yes + +#[skip-display] +# # This notification will not be displayed, but will be included in the history +# summary = "foobar" +# skip_display = yes + +#[signed_on] +# appname = Pidgin +# summary = "*signed on*" +# urgency = low +# +#[signed_off] +# appname = Pidgin +# summary = *signed off* +# urgency = low +# +#[says] +# appname = Pidgin +# summary = *says* +# urgency = critical +# +#[twitter] +# appname = Pidgin +# summary = *twitter.com* +# urgency = normal + +[stack-volumes] + appname = "pulseaudio-ctl" + set_stack_tag = "volume" + +# vim: ft=cfg diff --git a/config/gdb/init b/config/gdb/init new file mode 100644 index 0000000..9d56111 --- /dev/null +++ b/config/gdb/init @@ -0,0 +1,5 @@ +set disassembly-flavor intel +set print pretty on +set prompt \ngdb> +set confirm off +set listsize 25 diff --git a/config/ghc/ghci.conf b/config/ghc/ghci.conf new file mode 100644 index 0000000..31f559e --- /dev/null +++ b/config/ghc/ghci.conf @@ -0,0 +1 @@ +:set prompt "λ " diff --git a/config/git/config b/config/git/config new file mode 100644 index 0000000..bb4fef3 --- /dev/null +++ b/config/git/config @@ -0,0 +1,12 @@ +[user] + name = Charles Cabergs + email = me@cacharle.xyz + signingkey = me@cacharle.xyz +[log] + decorate = full +[pull] + rebase = false +[merge] + tool = vimdiff +[commit] + gpgsign = true diff --git a/config/isync/mbsyncrc b/config/isync/mbsyncrc new file mode 100644 index 0000000..649e823 --- /dev/null +++ b/config/isync/mbsyncrc @@ -0,0 +1,19 @@ +IMAPStore cacharle-remote +Host mail.cacharle.xyz +Port 993 +User me +SSLType IMAPS +CertificateFile /etc/ssl/certs/ca-certificates.crt + +MaildirStore cacharle-local +Path ~/Mail/cacharle/ +Inbox ~/Mail/cacharle/INBOX +Subfolders Verbatim + +Channel cacharle +Master :cacharle-remote: +Slave :cacharle-local: +Create Both +Expunge Both +Patterns * +SyncState * diff --git a/config/moc/config b/config/moc/config new file mode 100644 index 0000000..37af912 --- /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 = ~/cacharle-sync/music + +# 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 = yes + +# 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 = "%t %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 = yes + +# 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 <term>' option, then you will need to add 'screen.<term>' 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 = solarized + +# 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 = 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 = 0 + +# 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/keymap b/config/moc/keymap new file mode 100644 index 0000000..50f854b --- /dev/null +++ b/config/moc/keymap @@ -0,0 +1,192 @@ +# 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 + +# EDITED +menu_down = j +menu_up = k + +# 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/themes/solarized b/config/moc/themes/solarized new file mode 100644 index 0000000..0e0244b --- /dev/null +++ b/config/moc/themes/solarized @@ -0,0 +1,45 @@ +############################################################################## +# +# based on solarized +# best viewed on shaded or black terminal +# from: https://github.com/wimstefan/mocp-themes/blob/master/solarized +# +############################################################################## + +# edited +frame = blue default + +background = default default +window_title = green default +directory = red default +selected_directory = blue default +playlist = blue default +selected_playlist = magenta default +file = green default +selected_file = cyan default +marked_file = green default bold +marked_selected_file = cyan default bold +info = cyan default +selected_info = cyan default +marked_info = green default bold +marked_selected_info = cyan default bold +status = magenta default +title = green default +state = magenta default +current_time = magenta default +time_left = cyan default +total_time = cyan default +time_total_frames = magenta default +sound_parameters = cyan default +legend = magenta default +disabled = black default +enabled = yellow default +empty_mixer_bar = green default +filled_mixer_bar = black green +empty_time_bar = green default +filled_time_bar = black green +entry = yellow default +entry_title = red default +error = red default +message = yellow default +plist_time = magenta default diff --git a/config/mutt/mailcap b/config/mutt/mailcap new file mode 100644 index 0000000..e00e02c --- /dev/null +++ b/config/mutt/mailcap @@ -0,0 +1,2 @@ +text/html; "$BROWSER" %s &: test=test -n "$DISPLAY"; needsterminal; +text/html; "$BROWSERCLI" -I %{charse} -T text/html; copiousoutput; diff --git a/config/mutt/muttrc b/config/mutt/muttrc new file mode 100644 index 0000000..b4b02a8 --- /dev/null +++ b/config/mutt/muttrc @@ -0,0 +1,57 @@ +############################################################################### +# muttrc +############################################################################### + +set from = 'me@cacharle.xyz' # address in new mail +set realname = 'Charles Cabergs' # name in new mail + +set smtp_url = 'smtp://me@mail.cacharle.xyz:587' # where to send +set folder = 'imaps://me@mail.cacharle.xyz:993' # mails folder +# set folder = "~/Mail/cacharle" + +# view html with terminal browser in .mailcap +auto_view text/html +alternative_order text/plain text/enriched text/html + +set spoolfile = '+INBOX' +set record = "+Sent" +set trash = "+Trash" +set postponed = "+Drafts" + +mailboxes =INBOX =Sent =Send =Trash =Drafts + +set editor = 'vim' +set sort = 'reverse-date' # newest at the top + +set date_format = "%d/%m %I:%M" +set index_format = "%2C %Z %d %-15.15F %s (%-4.4c)" # one line format in home + +# from https://github.com/LukeSmithxyz/mutt-wizard/blob/master/share/mutt-wizard.muttrc +set rfc2047_parameters = yes # decode non standard stuff +set sleep_time = 0 # don't pause +set markers = no # no '+' on line wrap +set mark_old = no # don't mark mail as read if not seen +set mime_forward = yes # attachements forwarded +set wait_key = no # no press to continue... +set forward_format = "Fwd: %s" # forward subject +set forward_quote # include previous message in forward + +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 = '%B%?F? [%F]?%* %?N?%N/? %?S?%S?' +set ssl_force_tls = yes +set send_charset = 'utf-8' + +set header_cache = "~/.mutt/cache/headers" +set message_cachedir = "~/.mutt/cache/bodies" +set certificate_file = "~/.mutt/certificates" + +# solarized color scheme +source "$DOTDIR/mutt-colors-solarized/mutt-colors-solarized-dark-16.muttrc" + +# password +source "gpg -d $HOME/.config/mutt/passwd.muttrc.gpg 2> /dev/null |" diff --git a/config/nano/nanorc b/config/nano/nanorc new file mode 100644 index 0000000..38059df --- /dev/null +++ b/config/nano/nanorc @@ -0,0 +1 @@ +include /usr/share/nano/c.nanorc diff --git a/config/newsboat/config b/config/newsboat/config new file mode 100644 index 0000000..f3ef9e1 --- /dev/null +++ b/config/newsboat/config @@ -0,0 +1,33 @@ +# auto-reload yes # reload feeds at startup +reload-threads 64 +max-items 100 +# pager less + +datetime-format "%d %b %Y" +# articlelist-format "%4i %f + +bind-key j down +bind-key k up +bind-key g home +bind-key G end + +# solarized color-scheme +color background default default +color listnormal default default +color listnormal_unread default default +color listfocus black cyan +color listfocus_unread black cyan +color info default black +color article default default + +highlight article "^(Title):.*$" blue default +highlight article "https?://[^ ]+" red default +highlight article "\\[image\\ [0-9]+\\]" green default +highlight all "---.*" yellow default +highlight all "===.*" yellow default +highlight feedlist ".*(0/0))" black default + +macro v set browser "mpv --ytdl-format=best %u"; open-in-browser; set browser qutebrowser + +notify-always yes +notify-program /usr/bin/notify-send diff --git a/config/pulseaudio-ctl/config b/config/pulseaudio-ctl/config new file mode 100644 index 0000000..51d65b4 --- /dev/null +++ b/config/pulseaudio-ctl/config @@ -0,0 +1,25 @@ +# +# $HOME/.config/pulseaudio-ctl/config +# + +# The default setting is for pulseaudio-ctl to NOT increase to volume level +# above 100 % but Some users may wish exceed this level. If this describes +# your use case, uncomment the UPPER_THRESHOLD variable below setting it to +# the new upper threshold. +# +#UPPER_THRESHOLD=150 + +# Push output through libnotify. Set to any value to enable this feature +# and note that you must have /usr/bin/notify-send to use this. On Arch +# libnotify provides this. Other distros may not name it as such. +# +NOTIFY=yes + +# Show a graphical progress-bar type visualization of the volume level in +# libnotify. No setting or commented out will show a simply percentage but +# a setting will convert the percentage to a progress-bar in libnotify. +# +BARCHART=yes + +# Use KDE OSD notification. Set to any value to enable this feature. +#KDE_OSD=yes diff --git a/config/qutebrowser/config.py b/config/qutebrowser/config.py new file mode 100644 index 0000000..bcbdc5a --- /dev/null +++ b/config/qutebrowser/config.py @@ -0,0 +1,285 @@ +import os + +from qutebrowser.api import interceptor + +config.load_autoconfig(True) + +# Youtube ad blocking +def filter_yt(info: interceptor.Request): + url = info.request_url + if ( + url.host() == 'www.youtube.com' + and url.path() == '/get_video_info' + and '&adformat=' in url.query() + ): + info.block() + +interceptor.register(filter_yt) + + +c.aliases = { + 'q': 'close', + 'sc': 'config-source' +} + +c.url.start_pages = ['https://searx.cacharle.xyz'] +c.url.searchengines = { + 'DEFAULT': 'https://searx.cacharle.xyz?q={}', + 'd': 'https://duckduckgo.com/?q={}', + 'g': 'https://google.com/?q={}', + 'y': 'https://www.youtube.com/results?search_query={}', + 'gh': 'https://github.com/search?q={}', + 'h': 'https://hoogle.haskell.org/?hoogle={}', + 'cpp': 'http://cplusplus.com/search.do?q={}', + 'lar': 'https://www.larousse.fr/dictionnaires/francais/{}' +} + +c.fonts.default_family = 'Fira Mono' +c.fonts.hints = 'bold 11pt default_family' + +c.hints.chars = 'asdfghjkl;' # use key in the main row for hints + +# c.statusbar.show = 'in-mode' + +c.editor.command = [ + '/usr/local/bin/st', '-e', + '/usr/bin/vim', '{file}', '+{line}', '-c', 'startinsert!' +] + +c.messages.timeout = 4000 + +config.bind(';v', 'hint links spawn /usr/bin/mpv --ytdl-format=best {hint-url} ;;' + 'message-info "opening in video player"') + +config.bind('<Ctrl-J>', 'completion-item-focus next', 'command') +config.bind('<Ctrl-K>', 'completion-item-focus prev', 'command') + +config.bind('J', 'tab-prev', 'normal') +config.bind('K', 'tab-next', 'normal') + +config.bind('<F12>', 'devtools', 'normal') + +c.colors.webpage.darkmode.enabled = True # Convert light themed sites to dark theme (very nice result) +c.colors.webpage.bg = 'black' # Disabling white flash before page loading + +# c.content.proxy = 'socks://localhost:9050/' # tor +c.content.autoplay = False +c.content.notifications = False +#c.content.cookies.accept = 'no-3rdparty' + +c.auto_save.session = True +c.session.lazy_restore = True + +home_path = os.environ.get('HOME') +if home_path is not None: + download_path = os.path.join(home_path, "downloads") + if not os.path.exists(download_path): + os.mkdir(download_path) + c.downloads.location.directory = download_path +c.downloads.remove_finished = 5000 + +# base16-qutebrowser (https://github.com/theova/base16-qutebrowser) +# Base16 qutebrowser template by theova +# Solarized Dark scheme by Ethan Schoonover (modified by aramisgithub) +base00 = '#002b36' +base01 = '#073642' +base02 = '#586e75' +base03 = '#657b83' +base04 = '#839496' +base05 = '#93a1a1' +base06 = '#eee8d5' +base07 = '#fdf6e3' +base08 = '#dc322f' +base09 = '#cb4b16' +base0A = '#b58900' +base0B = '#859900' +base0C = '#2aa198' +base0D = '#268bd2' +base0E = '#6c71c4' +base0F = '#d33682' +# set qutebrowser colors +# Text color of the completion widget. May be a single color to use for +# all columns or a list of three colors, one for each column. +c.colors.completion.fg = base05 +# Background color of the completion widget for odd rows. +c.colors.completion.odd.bg = base01 +# Background color of the completion widget for even rows. +c.colors.completion.even.bg = base00 +# Foreground color of completion widget category headers. +c.colors.completion.category.fg = base0A +# Background color of the completion widget category headers. +c.colors.completion.category.bg = base00 +# Top border color of the completion widget category headers. +c.colors.completion.category.border.top = base00 +# Bottom border color of the completion widget category headers. +c.colors.completion.category.border.bottom = base00 +# Foreground color of the selected completion item. +c.colors.completion.item.selected.fg = base05 +# Background color of the selected completion item. +c.colors.completion.item.selected.bg = base02 +# Top border color of the selected completion item. +c.colors.completion.item.selected.border.top = base02 +# Bottom border color of the selected completion item. +c.colors.completion.item.selected.border.bottom = base02 +# Foreground color of the matched text in the selected completion item. +c.colors.completion.item.selected.match.fg = base0B +# Foreground color of the matched text in the completion. +c.colors.completion.match.fg = base0B +# Color of the scrollbar handle in the completion view. +c.colors.completion.scrollbar.fg = base05 +# Color of the scrollbar in the completion view. +c.colors.completion.scrollbar.bg = base00 +# Background color of disabled items in the context menu. +c.colors.contextmenu.disabled.bg = base01 +# Foreground color of disabled items in the context menu. +c.colors.contextmenu.disabled.fg = base04 +# Background color of the context menu. If set to null, the Qt default is used. +c.colors.contextmenu.menu.bg = base00 +# Foreground color of the context menu. If set to null, the Qt default is used. +c.colors.contextmenu.menu.fg = base05 +# Background color of the context menu’s selected item. If set to null, the Qt default is used. +c.colors.contextmenu.selected.bg = base02 +#Foreground color of the context menu’s selected item. If set to null, the Qt default is used. +c.colors.contextmenu.selected.fg = base05 +# Background color for the download bar. +c.colors.downloads.bar.bg = base00 +# Color gradient start for download text. +c.colors.downloads.start.fg = base00 +# Color gradient start for download backgrounds. +c.colors.downloads.start.bg = base0D +# Color gradient end for download text. +c.colors.downloads.stop.fg = base00 +# Color gradient stop for download backgrounds. +c.colors.downloads.stop.bg = base0C +# Foreground color for downloads with errors. +c.colors.downloads.error.fg = base08 +# Font color for hints. +c.colors.hints.fg = base00 +# Background color for hints. Note that you can use a `rgba(...)` value +# for transparency. +c.colors.hints.bg = base0A +# Font color for the matched part of hints. +c.colors.hints.match.fg = base05 +# Text color for the keyhint widget. +c.colors.keyhint.fg = base05 +# Highlight color for keys to complete the current keychain. +c.colors.keyhint.suffix.fg = base05 +# Background color of the keyhint widget. +c.colors.keyhint.bg = base00 +# Foreground color of an error message. +c.colors.messages.error.fg = base00 +# Background color of an error message. +c.colors.messages.error.bg = base08 +# Border color of an error message. +c.colors.messages.error.border = base08 +# Foreground color of a warning message. +c.colors.messages.warning.fg = base00 +# Background color of a warning message. +c.colors.messages.warning.bg = base0E +# Border color of a warning message. +c.colors.messages.warning.border = base0E +# Foreground color of an info message. +c.colors.messages.info.fg = base05 +# Background color of an info message. +c.colors.messages.info.bg = base00 +# Border color of an info message. +c.colors.messages.info.border = base00 +# Foreground color for prompts. +c.colors.prompts.fg = base05 +# Border used around UI elements in prompts. +c.colors.prompts.border = base00 +# Background color for prompts. +c.colors.prompts.bg = base00 +# Background color for the selected item in filename prompts. +c.colors.prompts.selected.bg = base02 +# Foreground color of the statusbar. +c.colors.statusbar.normal.fg = base0B +# Background color of the statusbar. +c.colors.statusbar.normal.bg = base00 +# Foreground color of the statusbar in insert mode. +c.colors.statusbar.insert.fg = base00 +# Background color of the statusbar in insert mode. +c.colors.statusbar.insert.bg = base0D +# Foreground color of the statusbar in passthrough mode. +c.colors.statusbar.passthrough.fg = base00 +# Background color of the statusbar in passthrough mode. +c.colors.statusbar.passthrough.bg = base0C +# Foreground color of the statusbar in private browsing mode. +c.colors.statusbar.private.fg = base00 +# Background color of the statusbar in private browsing mode. +c.colors.statusbar.private.bg = base01 +# Foreground color of the statusbar in command mode. +c.colors.statusbar.command.fg = base05 +# Background color of the statusbar in command mode. +c.colors.statusbar.command.bg = base00 +# Foreground color of the statusbar in private browsing + command mode. +c.colors.statusbar.command.private.fg = base05 +# Background color of the statusbar in private browsing + command mode. +c.colors.statusbar.command.private.bg = base00 +# Foreground color of the statusbar in caret mode. +c.colors.statusbar.caret.fg = base00 +# Background color of the statusbar in caret mode. +c.colors.statusbar.caret.bg = base0E +# Foreground color of the statusbar in caret mode with a selection. +c.colors.statusbar.caret.selection.fg = base00 +# Background color of the statusbar in caret mode with a selection. +c.colors.statusbar.caret.selection.bg = base0D +# Background color of the progress bar. +c.colors.statusbar.progress.bg = base0D +# Default foreground color of the URL in the statusbar. +c.colors.statusbar.url.fg = base05 +# Foreground color of the URL in the statusbar on error. +c.colors.statusbar.url.error.fg = base08 +# Foreground color of the URL in the statusbar for hovered links. +c.colors.statusbar.url.hover.fg = base05 +# Foreground color of the URL in the statusbar on successful load +# (http). +c.colors.statusbar.url.success.http.fg = base0C +# Foreground color of the URL in the statusbar on successful load +# (https). +c.colors.statusbar.url.success.https.fg = base0B +# Foreground color of the URL in the statusbar when there's a warning. +c.colors.statusbar.url.warn.fg = base0E +# Background color of the tab bar. +c.colors.tabs.bar.bg = base00 +# Color gradient start for the tab indicator. +c.colors.tabs.indicator.start = base0D +# Color gradient end for the tab indicator. +c.colors.tabs.indicator.stop = base0C +# Color for the tab indicator on errors. +c.colors.tabs.indicator.error = base08 +# Foreground color of unselected odd tabs. +c.colors.tabs.odd.fg = base05 +# Background color of unselected odd tabs. +c.colors.tabs.odd.bg = base01 +# Foreground color of unselected even tabs. +c.colors.tabs.even.fg = base05 +# Background color of unselected even tabs. +c.colors.tabs.even.bg = base00 +# Background color of pinned unselected even tabs. +c.colors.tabs.pinned.even.bg = base0C +# Foreground color of pinned unselected even tabs. +c.colors.tabs.pinned.even.fg = base07 +# Background color of pinned unselected odd tabs. +c.colors.tabs.pinned.odd.bg = base0B +# Foreground color of pinned unselected odd tabs. +c.colors.tabs.pinned.odd.fg = base07 +# Background color of pinned selected even tabs. +c.colors.tabs.pinned.selected.even.bg = base02 +# Foreground color of pinned selected even tabs. +c.colors.tabs.pinned.selected.even.fg = base05 +# Background color of pinned selected odd tabs. +c.colors.tabs.pinned.selected.odd.bg = base02 +# Foreground color of pinned selected odd tabs. +c.colors.tabs.pinned.selected.odd.fg = base05 +# Foreground color of selected odd tabs. +c.colors.tabs.selected.odd.fg = base05 +# Background color of selected odd tabs. +c.colors.tabs.selected.odd.bg = base02 +# Foreground color of selected even tabs. +c.colors.tabs.selected.even.fg = base05 +# Background color of selected even tabs. +c.colors.tabs.selected.even.bg = base02 +# Background color for webpages if unset (or empty to use the theme's +# color). +# c.colors.webpage.bg = base00 diff --git a/config/redshift/redshift.conf b/config/redshift/redshift.conf new file mode 100644 index 0000000..1e540e3 --- /dev/null +++ b/config/redshift/redshift.conf @@ -0,0 +1,14 @@ +[redshift] +temp-day=3000 +temp-night=2800 + +; transition day/night +fade=1 + +; manual location (geo location not working) +location-provider=manual + +; latitude and longitude +[manual] +lat=50.8008858 +lon=4.2886091 diff --git a/config/startx/xinitrc b/config/startx/xinitrc new file mode 100755 index 0000000..860fed2 --- /dev/null +++ b/config/startx/xinitrc @@ -0,0 +1,25 @@ +#!/usr/bin/env sh + +# xinput disable 'ETPS/2 Elantech Touchpad' & + +echo 'Starting redshift' +redshift -c $HOME/.config/redshift.conf & +echo 'Starting dunst' +dunst & +xset r rate 200 50 + +case "$(cat /etc/hostname)" in + cacharle-main) + xrandr --output DVI-0 --auto --left-of DVI-1 \ + --output DVI-1 --mode 1920x1080 --primary --left-of HDMI-0 \ + --output HDMI-0 --mode 1920x1080 + ;; + + charles-laptop) + xrandr | grep 'VGA1.*connected' && + xrandr --output LVDS1 --primary --left-of VGA1 \ + --output VGA1 --mode 1280x1024 + ;; +esac + +exec xmonad diff --git a/config/sublime-text/Preferences.sublime-settings b/config/sublime-text/Preferences.sublime-settings new file mode 100644 index 0000000..684ad2e --- /dev/null +++ b/config/sublime-text/Preferences.sublime-settings @@ -0,0 +1,11 @@ +{ + "color_scheme": "Packages/Solarized Color Scheme/Solarized (dark).sublime-color-scheme", + "font_face": "Fira Code", + "highlight_line": true, + "ignored_packages": + [ + "Vintage" + ], + "line_padding_top": 5, + "theme": "Adaptive.sublime-theme" +} diff --git a/config/tmux/tmux.conf b/config/tmux/tmux.conf new file mode 100644 index 0000000..fc2fcb2 --- /dev/null +++ b/config/tmux/tmux.conf @@ -0,0 +1,13 @@ +unbind C-b +set -g prefix C-f +bind C-f send-prefix + +set -g default-terminal "screen.xterm-256color" +set -g mouse on +setw -g mode-keys vi + +unbind l +bind k select-pane -U +bind j select-pane -D +bind l select-pane -R +bind h select-pane -L diff --git a/config/urlview/.urlview b/config/urlview/.urlview new file mode 100644 index 0000000..f69970a --- /dev/null +++ b/config/urlview/.urlview @@ -0,0 +1 @@ +COMMAND $BROWSER %s diff --git a/config/vim/pluggins.vim b/config/vim/pluggins.vim new file mode 100644 index 0000000..c60ab84 --- /dev/null +++ b/config/vim/pluggins.vim @@ -0,0 +1,47 @@ +"""""""""""""""" +" vim pluggins " +"""""""""""""""" + +call plug#begin() + Plug 'ctrlpvim/ctrlp.vim' " Ctrl-P similar to vsc + Plug 'tpope/vim-eunuch' " basic unix command in vim + Plug 'tomtom/tcomment_vim' " mininal commenter + Plug 'itchyny/lightline.vim' " minimal status bar + Plug 'HappyTramp/vim-syntax-extra' " syntax highlight of C operators + Plug 'romainl/vim-cool' " disable highlight after search + Plug 'tpope/vim-fugitive' " git wrapper + Plug 'junegunn/vim-easy-align' " align + Plug 'ludovicchabant/vim-gutentags' " generate tags in project root + Plug 'junegunn/goyo.vim' " generate tags in project root + + " Plug 'easymotion/vim-easymotion' " TODO very intresting + " Plug 'mhinz/vim-rfc' " RFC download/syntax/tags + Plug 'skammer/vim-css-color' + + + " markdown preview in browser + " Plug 'iamcco/markdown-preview.nvim', { 'do': { -> mkdp#util#install() }, 'for': ['markdown', 'vim-plug']} + + " syntax highlight for languages that aren't supported by default + Plug 'tikhomirov/vim-glsl' " glsl + Plug 'cespare/vim-toml' " toml + Plug 'ziglang/zig.vim' " zig + Plug 'nikvdp/ejs-syntax' " ejs + + " s19 at home + Plug 'HappyTramp/vim-42header' " 42 header + + " themes + " Plug 'joshdick/onedark.vim' " onedark + Plug 'dracula/vim', {'as': 'vim'} " dracula + Plug 'altercation/vim-colors-solarized' " solarized + + " intresting but not used + " Plug 'sheerun/vim-polyglot' " better syntax highlight + " Plug 'unblevable/quick-scope' " highlight first char to jump to word + " Plug 'jez/vim-superman' " man pages in vim (too slow) + Plug 'vim-scripts/rfc-syntax' " rfc + " Plug 'tacahiroy/ctrlp-funky' " extension to search function + Plug '/home/charles/git/c_formatter_42.vim' + Plug 'cacharle/doxy42.vim' +call plug#end() diff --git a/config/vim/vimrc b/config/vim/vimrc new file mode 100644 index 0000000..6b1bcc2 --- /dev/null +++ b/config/vim/vimrc @@ -0,0 +1,315 @@ +"""""""""" +" vimrc " +"""""""""" + +" xdg {{{ +set runtimepath^=$XDG_CONFIG_HOME/vim +set runtimepath+=$XDG_DATA_HOME/vim +set runtimepath+=$XDG_CONFIG_HOME/vim/after + +set packpath^=$XDG_DATA_HOME/vim,$XDG_CONFIG_HOME/vim +set packpath+=$XDG_CONFIG_HOME/vim/after,$XDG_DATA_HOME/vim/after + +let g:netrw_home = $XDG_DATA_HOME . "/vim" +call mkdir($XDG_DATA_HOME."/vim/spell", 'p') +set viewdir=$XDG_DATA_HOME/vim/view | call mkdir(&viewdir, 'p') + +set backupdir=$XDG_CACHE_HOME/vim/backup | call mkdir(&backupdir, 'p') +set directory=$XDG_CACHE_HOME/vim/swap | call mkdir(&directory, 'p') +set undodir=$XDG_CACHE_HOME/vim/undo | call mkdir(&undodir, 'p') +" }}} + +source pluggins.vim " load pluggins + +" common {{{ +let mapleader = ' ' " set leader key to space +let maplocalleader = '-' " set file local leader key to backslash +set nocompatible " not compatible with vi +set number " line number +" set relativenumber " line number relative to cursor +set numberwidth=1 " line numbers gutter autowidth +set cursorline " highlight current line +set noshowmatch " dont jump to pair bracket +set autoread " reload files when changes happen outside vim +set autowrite " auto write buf on certain events +set hidden " keep change in buffer when quitting window +set noswapfile " disable swap files +set scrolloff=2 " line padding when scrolling +set textwidth=0 " when line wrap occurs +set wrapmargin=0 " disable auto line wrapping +set encoding=utf-8 " utf-8 encoding +set formatoptions-=t " do not auto break line > 89 character +filetype plugin indent on " allow to add specific rules for certain type of file +" set mouse=a " mouse scrolling (heretic) +" }}} + +" browse list with tab {{{ +set wildmode=longest,list,full +set wildmenu " tab to cycle through completion options +set path+=** " recursive :find +" }}} + +" intuitif split opening {{{ +set splitbelow +set splitright +set fcs+=vert:│ " split separator +" }}} + +" tab {{{ +set expandtab " tab to space +set tabstop=4 " tab size +set shiftwidth=4 +set smarttab +set autoindent +set smartindent +" }}} + +" file search {{{ +set ignorecase " case insensitive +set smartcase +set hlsearch " match highlight +set incsearch +" }}} + +" status {{{ +set laststatus=2 " always a statusline (all window) +set showcmd " show current partial command in the bottom right +set noshowmode " dont show current mode (i.e --INSERT--) +" }}} + +" fold {{{ +set foldmethod=indent " create fold based on the text indent +set nofoldenable " not folded by default +" }}} + +""""""""""""""" +" colorscheme " +""""""""""""""" + +" one {{{ +" let g:onedark_terminal_italics=1 +" colorscheme onedark +" }}} +" dracula {{{ +" let g:dracula_bold = 1 +" let g:dracula_italic = 1 +" let g:dracula_colorterm = 0 +" colorscheme dracula +" }}} +" solarized {{{ +set t_Co=16 +let g:solarized_termcolors=16 +let g:solarized_visibility='low' " visibility of invisible chars with set list +set background=dark +colorscheme solarized +" }}} +" lightline {{{ +let g:lightline = {} +" let g:lightline.colorscheme = 'solarized' " lightline theme to solarized +" let g:lightline.colorscheme = 'jellybeans' " lightline theme to onedark +let g:lightline = { + \ 'colorscheme': 'solarized', + \ 'active': { + \ 'left': [ [ 'mode', 'paste' ], + \ [ 'gitbranch', 'readonly', 'filename', 'modified' ] ] + \ }, + \ 'component_function': { + \ 'gitbranch': 'FugitiveHead' + \ }, + \ } +" }}} + +"""""""""""" +" mappings " +"""""""""""" + +" split navigation {{{ +nnoremap <C-J> <C-W><C-J> +nnoremap <C-K> <C-W><C-K> +nnoremap <C-L> <C-W><C-L> +nnoremap <C-H> <C-W><C-H> +" nnoremap <C-S-J> <C-W><S-J> +" nnoremap <C-S-K> <C-W><S-K> +" nnoremap <C-S-L> <C-W><S-L> +" nnoremap <C-S-H> <C-W><S-H> +nnoremap <leader>s= <C-W>= +" }}} + +" common {{{ +" 'Y' yank to the end of the line +noremap Y y$ +" solves annoying delay went exiting insert mode +inoremap <ESC> <C-C> +" kj to exit insert mode +inoremap kj <ESC> +" remove visual mode keybinding +noremap Q <nop> +" remove command line window keybinding +noremap q: <nop> +" search with very magic +nnoremap / /\v +nnoremap ? ?\v +" move line up and down +nnoremap _ ddkP +nnoremap + ddp +" long move up/down +nnoremap ( 10k +nnoremap ) 10j +" tag nagigation +nnoremap <leader>] <C-]> +nnoremap <leader>t <C-t> +" common change until +nnoremap cu ct_ +nnoremap cp ct) +nnoremap c, ct, +" }}} + +" buffer navigation {{{ +nnoremap <leader>bn :bn<CR> +nnoremap <leader>bp :bp<CR> +nnoremap <leader><TAB> :b#<CR> +nnoremap <leader>bl :ls<CR> +" }}} + +" vimrc {{{ +nnoremap <leader>rc :vsplit $DOTDIR/.vimrc<cr> +nnoremap <leader>sc :source $MYVIMRC<cr> +" }}} + +" c {{{ +" create c function body from prototype +nnoremap gcf A<BS><CR>{<CR><CR>}<ESC>j + +" initialise a school header file +function PutHeaderBoilerPlate() + let l:filename = join(split(toupper(expand('%:t')), '\.'), "_") + " echom l:filename + call append(12, "#ifndef " . l:filename) + call append(13, "# define " . l:filename) + call append(15, "#endif") +endfunction +nnoremap gch :Stdheader<CR>:call PutHeaderBoilerPlate()<CR> + +" put semicolon at the end of line +nnoremap <leader>; mqA;<ESC>`q +" doxygen format comments +autocmd Filetype c setlocal comments=s:/**,m:**,e:*/,s:/*,m:**,e:*/ +autocmd Filetype cpp setlocal comments=s:/**,m:**,e:*/,s:/*,m:**,e:*/ +" }}} + +" cpp {{{ +" Put Coplien Form boilerplate class +function PutCoplienFormFunc(name) + let l:default_constructor = a:name . "();\n" + let l:copy_constructor = a:name . "(const " . a:name . "& other);\n" + let l:copy_operator = a:name . "& operator=(const " . a:name . "& other);\n" + let l:destructor = "~" . a:name . "();\n" + + execute "normal iclass " . a:name . "\n{\npublic:\n" . l:default_constructor . l:copy_constructor . l:copy_operator . l:destructor . "\nprivate:\n};\n" + execute "normal <2{" +endfunction +" Put Coplien Form boilerplate according to filename +command! PutCoplienFormFile call PutCoplienFormFunc(split(expand('%:t'), '\.')[0]) +command! -nargs=1 PutCoplienForm call PutCoplienFormFunc("<args>") +" }}} + +" quickfix window toggle {{{ +nnoremap <leader>q :call QuickfixToggle()<CR> +nnoremap <leader>n :cnext <CR> +nnoremap <leader>p :cprevious <CR> +let g:quickfix_is_open = 0 +function! QuickfixToggle() + if g:quickfix_is_open + cclose + let g:quickfix_is_open = 0 + else + copen + let g:quickfix_is_open = 1 + endif +endfunction +" }}} + +function! CountScopeLines() + normal! mq + execute '/^}' + let l:end_brace = line('.') + execute '?^{' + let l:start_brace = line('.') + normal! k + let l:scope_len = l:end_brace - l:start_brace - 1 + let l:scope_name = substitute(getline('.'), '\t', ' ', 'g') + echom l:scope_len . ' lines in |' . l:scope_name . '|' + normal! `q +endfunction +command! CountScopeLines call CountScopeLines() + +" make {{{ +nnoremap <leader>m :make all <CR> +" }}} + +" hook {{{ +" remove trailing white space on save +autocmd BufWritePre * %s/\s\+$//e +" dirty hack to disable this feature on markdown (autocmd! wouldn't work) +autocmd BufReadPre *.md autocmd! BufWritePre +" }}} + +" filetype {{{ +" real tab in c file for school projects +let g:c_syntax_for_h = 1 " filetype=c in header files instead of filetype=cpp +autocmd Filetype c setlocal noexpandtab +" std::cout << ... << std::endl; shortcut +autocmd Filetype cpp nnoremap <leader>cout istd::cout << << std::endl;<ESC>2F<hi +" vim fold method to marker +autocmd Filetype vim setlocal foldmethod=marker + +autocmd FileType haskell set formatprg=stylish-haskell + +autocmd FileType lisp,html,css,htmldjango setlocal shiftwidth=2 +" }}} + +"""""""""""" +" pluggins " +"""""""""""" + +" ctrlp {{{ +" directory to ignore when searching in file tree +set wildignore=*/doc/*,*/tmp/*,*.o,*.so,*.a,*.swp,*.zip,*/node_modules/*,*/vendor/*,.bundle/*,bin/*,.git/*,*.pyc +" ctrlp ignore all stuff in the .gitignore +let g:ctrlp_user_command = ['.git', 'cd %s && git ls-files -co --exclude-standard'] +let g:ctrlp_working_path_mode = 'rw' +let g:ctrlp_mruf_case_sensitive = 0 + +nnoremap <leader>p :CtrlPTag<CR> +" }}} + +" quick-scope {{{ +" let g:qs_highlight_on_keys = ['f', 'F', 't', 'T'] +" }}} + +" man-plugin {{{ +" runtime! ftplugin/man.vim +" let g:ft_man_open_mode = 'vert' " open in a vertical split +" let g:ft_man_no_sect_fallback = 2 " if page specified fallback to page 2 (syscall pages) +" autocmd Filetype man unmap <buffer> q: hmmmm?? +" }}} + +" ctrlp-funky {{{ +" let g:ctrlp_funky_syntax_highlight = 1 +" nnoremap <C-f> :CtrlPFunky<CR> +" }}} + +" eazy-align {{{ +xmap ga <Plug>(EasyAlign) +nmap ga <Plug>(EasyAlign) +" }}} + +vnoremap <leader>c y:call system("xclip -selection clipboard", getreg("\""))<CR> +nnoremap <leader>v :call setreg("\"", system("xclip -selection clipboard -o"))<CR>p + +let g:c_formatter_42_format_on_save = 0 + +let g:gutentags_ctags_exclude = ['doc/*', 'Makefile'] +" let g:gutentags_ctags_exclude_wildignore = 1 + +let g:goyo_height = 90 diff --git a/config/xmonad/xmonad.hs b/config/xmonad/xmonad.hs new file mode 100644 index 0000000..b61bcea --- /dev/null +++ b/config/xmonad/xmonad.hs @@ -0,0 +1,76 @@ +import Control.Monad +import Data.List +import System.Exit + + +import XMonad +import XMonad.Config.Desktop + +-- Utilities +import XMonad.Util.EZConfig (additionalKeysP, additionalKeys) +import XMonad.Util.SpawnOnce +import XMonad.Util.Dmenu + +-- Layouts +import XMonad.Layout.NoBorders +import XMonad.Layout.Spacing +import XMonad.Layout.Grid + +-- Hooks +import XMonad.Hooks.InsertPosition + +-- xmonad :: XConfig -> IO () +-- https://hackage.haskell.org/package/xmonad-0.15/docs/XMonad-Core.html#t:XConfig +main = xmonad $ desktopConfig + { normalBorderColor = "#1c1c1c" + , focusedBorderColor = "#8a8a8a" + , terminal = "st" + , layoutHook = myLayouts + , manageHook = myManageHook + , modMask = mod4Mask -- mod key to super + , borderWidth = 2 + , focusFollowsMouse = False -- don't change window based on mouse position (need to click) + , workspaces = ["code", "compile", "web"] ++ map show [4..9] + } `additionalKeysP` myKeys + + +myLayouts = mySpacing 4 $ tiledVerticalBigMaster -- bigger master for code and smaller slave for compiling + ||| Mirror tiledHorizontalEven -- 50/50 horizontal split + ||| noBorders Full -- disable borders for fullscreen layout + ||| Grid + where tiledVerticalBigMaster = Tall 1 (3 / 100) (3 / 5) + tiledHorizontalEven = Tall 1 (3 / 100) (1 / 2) + mySpacing x = spacingRaw True (Border x x x x) False (Border x x x x) True + +myManageHook = insertPosition End Newer -- insert new window at the end of the current layout + +myKeys = [ ("<XF86AudioLowerVolume>", spawn "pulseaudio-ctl down") + , ("<XF86AudioRaiseVolume>", spawn "pulseaudio-ctl up") + , ("<XF86AudioMute>", spawn "pulseaudio-ctl mute") + , ("M-<F11>", spawn "pulseaudio-ctl down") + , ("M-<F12>", spawn "pulseaudio-ctl up") + + , ("<XF86MonBrightnessUp>", spawn "~/bin/backlight-ctl up") + , ("<XF86MonBrightnessDown>", spawn "~/bin/backlight-ctl down") + , ("<XF86ScreenSaver>", spawn "slock") + , ("<XF86TouchpadToggle>", spawn "~/bin/touchpad-toggle") + + , ("M-o", spawn "~/bin/project-open") + , ("M-m", spawn "st -e mocp") + , ("M-S-d", spawn "notify-send -i x-office-calendar \"$(date +\"%H:%M %A %d/%m/%Y %B\")\"") + , ("M-S-b", spawn "notify-send \"battery: $(cat /sys/class/power_supply/BAT0/capacity)\"") + , ("M-q", spawn "notify-send 'Restarting xmonad'" >> spawn restartCmd) + , ("M-S-q", confirm "Are you sure you want to shutdown?" $ io (exitWith ExitSuccess)) + ] + +confirm :: String -> X () -> X () +confirm prompt f = do + result <- menuArgs "dmenu" ["-p", prompt] ["yes", "no"] + when (result == "yes") f + +restartCmd :: String +restartCmd = intercalate "; " [ "if type xmonad" + , "then xmonad --recompile && xmonad --restart" + , "else xmessage xmonad not in \\$PATH: \"$PATH\"" + , "fi" + ] diff --git a/config/zathura/zathurarc b/config/zathura/zathurarc new file mode 100644 index 0000000..bac99f6 --- /dev/null +++ b/config/zathura/zathurarc @@ -0,0 +1,3 @@ +set selection-clipboard clipboard +map u scroll half-up +map d scroll half-down diff --git a/config/zsh/.zprofile b/config/zsh/.zprofile new file mode 100755 index 0000000..91b0c0b --- /dev/null +++ b/config/zsh/.zprofile @@ -0,0 +1,46 @@ +#!/bin/sh + +export PATH="/usr/local/sbin:/usr/local/bin:/usr/bin:$HOME/.local/bin" + +# applications +export EDITOR='vim' +export TERM='st-256color' +export TERMINAL='st' +export MAIL='me@cacharle.xyz' +export BROWSER='qutebrowser' +export BROWSERCLI='w3m' + +# XDG all the things +export XDG_CONFIG_HOME="$HOME/.config" +export XDG_DATA_HOME="$HOME/.local/share" +export XDG_CACHE_HOME="$HOME/.cache" + +export ZDOTDIT="$XDG_CONFIG_HOME/zsh" + +export HISTFILE="$XDG_CACHE_HOME/histfile" + +# color in man (less pager) +export LESS_TERMCAP_mb=$'\e[1;32m' +export LESS_TERMCAP_md=$'\e[1;32m' +export LESS_TERMCAP_me=$'\e[0m' +export LESS_TERMCAP_se=$'\e[0m' +export LESS_TERMCAP_so=$'\e[01;33m' +export LESS_TERMCAP_ue=$'\e[0m' +export LESS_TERMCAP_us=$'\e[1;4;31m' +export LESS_TERMCAP_mr=$(tput rev) +export LESS_TERMCAP_mh=$(tput dim) +export LESS_TERMCAP_ZN=$(tput ssubm) +export LESS_TERMCAP_ZV=$(tput rsubm) +export LESS_TERMCAP_ZO=$(tput ssupm) +export LESS_TERMCAP_ZW=$(tput rsupm) + + +export MINIKUBE_IN_STYLE=false # disable cringe minikube emojies + +# school env +export MINISHELL_TEST_BONUS=yes +export MINISHELL_TEST_PAGER=vim +export MINISHELL_TEST_FLAGS=-DMINISHELL_TEST +export WEBSERV_FLAGS=-DWEBSERV_CACHARLE + +[ "$(tty)" = '/dev/tty1' ] && exec startx diff --git a/config/zsh/.zshrc b/config/zsh/.zshrc new file mode 100644 index 0000000..9cd21b5 --- /dev/null +++ b/config/zsh/.zshrc @@ -0,0 +1,80 @@ +############### +# zshrc # +############### + + +[ -z $DOTDIR ] && export DOTDIR=$HOME/git/dotfiles # FIXME have to change path manually if install elsewhere + +# load aliases +source $DOTDIR/.zsh_aliases + +# prompt +case `tty` in + /dev/tty[1-9]) + # %~ path ('~' if $HOME) + # %B/%b start/stop bold + # %B/%b start/stop color + NEWLINE=$'\n' + export PROMPT="${NEWLINE}%B%F{blue}%~%f${NEWLINE}%F{red}> %f%b" + ;; + *) + # pure prompt + export FPATH="$FPATH:$HOME/.zsh/pure" + ZSH_THEME="pure" + autoload -U promptinit + promptinit + prompt pure + ;; +esac + +# auto complete +autoload -U compinit +zstyle ':completion:*' menu select # menu like +zstyle ':completion:*' matcher-list '' \ + 'm:{a-zA-Z}={A-Za-z}' 'r:|[._-]=*' 'r:|=* l:|=* r:|=*' # case insensitive +zmodload zsh/complist +compinit +# _comp_options+=(globdots) + +# vim keybindings in tab completion menu (https://www.youtube.com/watch?v=eLEo4OQ-cuQ) +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 + +# vim keybindings in prompt +bindkey -v +export KEYTIMEOUT=1 + +setopt auto_cd # cd without `cd` command +# setopt pushd_ignore_dups +setopt list_rows_first # cycle through row first in menu +# setopt extendedglob + +# executed when changing directory +function chpwd() { + content=$(ls | wc -l) + ([ "$content" -lt 20 ] && ls -l) || + echo "$(pwd) contains $content entries" + [ "$(stat -c "%U" .)" = "$USER" ] && touch . # to sort by last cd +} + +# add command-not-found package suggestion +#source /etc/zsh_command_not_found + + +# ignore filetypes in autocomplete +fignore=(o hi) + +# pluggins +source $XDG_DATA_HOME/zsh/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh # prompt syntax highlight + +export YSU_MESSAGE_POSITION="after" # you-should-use message after command output +source $XDG_DATA_HOME/zsh/zsh-you-should-use/you-should-use.plugin.zsh # alias reminder + +# set tab to 4 spaces +tabs 4 + + +export GPG_TTY=$(tty) # fixing gpg fatal error about tty diff --git a/config/zsh/aliases.zsh b/config/zsh/aliases.zsh new file mode 100644 index 0000000..790692e --- /dev/null +++ b/config/zsh/aliases.zsh @@ -0,0 +1,149 @@ +############### +# zsh aliases # +############### + +# color +alias grep='grep --color=auto' +alias tree='tree -C' +alias pacman='pacman --color=auto' +alias yay='yay --color=auto' +alias valgrindc='colour-valgrind' + +# common commands +alias less='less -N' # enable line number +alias v='vim' +# alias vim='nvim' +# alias mkdir='mkdir -p' +alias gdb='gdb -q' # disable long intro message +alias sudo='sudo ' # enable color (the search for aliases continues) +alias doas='doas ' # same for doas +alias info='info --vi-keys' + +# ls +alias ls='ls --color=auto -F' +alias ll="ls -lh" +alias la="ls -a" +alias lla="ls -alh" +alias lss="ls -Ssh" + +# tree +alias tree='tree -FCA' +alias t='tree' +alias ta='tree -a' +alias t1='tree -L 1' +alias t2='tree -L 2' +alias t3='tree -L 3' +alias ti="tree --matchdirs -I __pycache__ -I node_modules -I '*.o'" + +# man +alias ma="man" +alias ma1="man 1" +alias ma2="man 2" +alias ma3="man 3" + +# make +alias m='make' +alias mre='make re' +alias mclean='make clean' + +# git +alias ga='git add' +alias gaa='git add --all' +alias gau='git add --update' +alias gc='git commit' +alias gc!='git commit --amend' +alias gcmsg='git commit --message' +alias gd='git diff' +alias gds='git diff --staged' +alias gdt='git diff --stat' +alias gl='git pull' +alias glg='git log --abbrev-commit --stat' +alias glgg='git log --abbrev-commit --graph' +alias glgo='git log --oneline --no-decorate' +alias gp='git push' +alias gcl='git clone --recurse-submodules' +alias gst='git status' +alias gs='git status' +alias gss='git status --short' +alias gco='git checkout' +alias gsta='git stash push' +alias gstp='git stash pop' +alias grv="git remote -v" +alias gra="git remote add" +gpa() { + branch="$1" + [ -z "$branch" ] && branch=$(git branch | grep '^\* .*$' | cut -d ' ' -f 2) + git remote | xargs -I{} git push {} "$branch" +} +gpaf() { + branch="$1" + [ -z "$1" ] && branch=master + git remote | xargs -I{} git push -f {} "$branch" +} + +# lpass (lastpass-cli) +alias lpassp='lpass show --password --clip' # put password in clipboard + +# helper to switch between dual and single monitor setup +alias dual='xrandr --output LVDS1 --primary --left-of VGA1 --output VGA1 --mode 1280x1024' +alias single='xrandr --output VGA1 --off' + + +# edit config files +alias zshrc="vim $DOTDIR/.zshrc && source $DOTDIR/.zshrc" +alias zshaliasrc="vim $DOTDIR/.zsh_aliases && source $DOTDIR/.zshrc" +alias vimrc="vim $DOTDIR/.vimrc" +alias vimplugrc="vim $DOTDIR/.pluggins.vim" +alias xmonadrc="vim $DOTDIR/xmonad.hs" +alias muttrc="vim $DOTDIR/.muttrc" + +# other +#alias date="date -R" + +# parent directory jump +alias ..='cd ..' +alias ...='cd ../..' +alias ....='cd ../../..' + +alias norminette='ruby ~/git/norminette/norminette.rb' +alias norm='norminette' + +getrfc() { + curl "https://ietf.org/rfc/rfc$1.txt" > "$HOME/rfc/rfc$1.txt" +} + +# bluetooth +alias bt='bluetoothctl' +alias bton='echo power on | bluetoothctl' +alias btoff='echo power off | bluetoothctl' + +# pdf selector +# alias pdf-open="zathura \$(echo $HOME/Documents/*.pdf | tr ' ' '\\n' | dmenu)" + +alias cagob='RUSTFLAGS="$RUSTFLAGS -A dead_code" cargo build' +alias cagor='RUSTFLAGS="$RUSTFLAGS -A dead_code" cargo run' + +# wifi +wificonnect() { + nmcli device wifi connect $1 password $2 +} + +# alias mutt='neomutt' + +alias ytdl='youtube-dl --output "%(title)s.%(ext)s"' +alias ytdlp='youtube-dl --audio-format mp3 -i --output "%(playlist_index)s-%(title)s.%(ext)s"' +alias ytdla='youtube-dl --audio-format mp3 -i -x -f bestaudio/best --output "%(playlist_index)s-%(title)s.%(ext)s"' + +alias qmvdest='qmv --format=do' + +alias xclip='xclip -selection clipboard' + +pacman-url() { + pacman -Si "$1" | grep URL | tr -s ' ' | cut -d ' ' -f 3 +} + +grep-kill() { + ps aux | grep "$1" | tr -s ' ' | cut -d ' ' -f 2 | xargs kill +} + +alias filter-valgrind="sed -e 's/==[0-9]*==/==/' -e 's/0x[0-9A-F]*//'" |
