From 9a4b3313ac8afc0c4882c7b8917bb256e0c9320a Mon Sep 17 00:00:00 2001 From: olari Date: Sun, 29 Sep 2019 08:13:03 +0300 Subject: [PATCH] Add files --- .config/alacritty/alacritty.yml | 19 ++++++++++ .config/fish/fish_variables | 33 ++++++++++++++++ .../fish/functions/installed_packages.fish | 3 ++ .config/fish/functions/unused_packages.fish | 3 ++ .config/fish/functions/wget_od.fish | 3 ++ .config/fish/functions/ytdl_channel.fish | 3 ++ .config/fish/functions/ytdl_playlist.fish | 3 ++ .config/fish/functions/ytdl_video.fish | 3 ++ .config/htop/htoprc | 26 +++++++++++++ .config/mpv/input.conf | 38 +++++++++++++++++++ .config/mpv/mpv.conf | 18 +++++++++ .config/nvim/coc-settings.json | 16 ++++++++ .config/nvim/init.vim | 24 ++++++++++++ .config/ranger/rc.conf | 2 + .config/zathura/zathurarc | 1 + .tmux.conf | 3 ++ install.sh | 11 ++++++ 17 files changed, 209 insertions(+) create mode 100644 .config/alacritty/alacritty.yml create mode 100644 .config/fish/fish_variables create mode 100644 .config/fish/functions/installed_packages.fish create mode 100644 .config/fish/functions/unused_packages.fish create mode 100644 .config/fish/functions/wget_od.fish create mode 100644 .config/fish/functions/ytdl_channel.fish create mode 100644 .config/fish/functions/ytdl_playlist.fish create mode 100644 .config/fish/functions/ytdl_video.fish create mode 100644 .config/htop/htoprc create mode 100644 .config/mpv/input.conf create mode 100644 .config/mpv/mpv.conf create mode 100644 .config/nvim/coc-settings.json create mode 100644 .config/nvim/init.vim create mode 100644 .config/ranger/rc.conf create mode 100644 .config/zathura/zathurarc create mode 100644 .tmux.conf create mode 100644 install.sh diff --git a/.config/alacritty/alacritty.yml b/.config/alacritty/alacritty.yml new file mode 100644 index 0000000..3e5c127 --- /dev/null +++ b/.config/alacritty/alacritty.yml @@ -0,0 +1,19 @@ +window: + decorations: none + startup_mode: Maximized + +font: + normal: + family: Consolas + + size: 8.0 + +background_opacity: 0.85 + +# Disable scrolling (use tmux) +scrolling: + history: 0 + +# Disable visual bell +visual_bell: + duration: 0 diff --git a/.config/fish/fish_variables b/.config/fish/fish_variables new file mode 100644 index 0000000..f1dc191 --- /dev/null +++ b/.config/fish/fish_variables @@ -0,0 +1,33 @@ +# This file contains fish universal variable definitions. +# VERSION: 3.0 +SETUVAR --export EDITOR:nvim +SETUVAR __fish_init_2_39_8:\x1d +SETUVAR __fish_init_2_3_0:\x1d +SETUVAR __fish_init_3_x:\x1d +SETUVAR fish_color_autosuggestion:969896 +SETUVAR fish_color_cancel:\x2dr +SETUVAR fish_color_command:c397d8 +SETUVAR fish_color_comment:e7c547 +SETUVAR fish_color_cwd:green +SETUVAR fish_color_cwd_root:red +SETUVAR fish_color_end:c397d8 +SETUVAR fish_color_error:d54e53 +SETUVAR fish_color_escape:00a6b2 +SETUVAR fish_color_history_current:\x2d\x2dbold +SETUVAR fish_color_host:normal +SETUVAR fish_color_match:\x2d\x2dbackground\x3dbrblue +SETUVAR fish_color_normal:normal +SETUVAR fish_color_operator:00a6b2 +SETUVAR fish_color_param:7aa6da +SETUVAR fish_color_quote:b9ca4a +SETUVAR fish_color_redirection:70c0b1 +SETUVAR fish_color_search_match:bryellow\x1e\x2d\x2dbackground\x3dbrblack +SETUVAR fish_color_selection:white\x1e\x2d\x2dbold\x1e\x2d\x2dbackground\x3dbrblack +SETUVAR fish_color_user:brgreen +SETUVAR fish_color_valid_path:\x2d\x2dunderline +SETUVAR fish_greeting:\x1d +SETUVAR fish_key_bindings:fish_default_key_bindings +SETUVAR fish_pager_color_completion:normal +SETUVAR fish_pager_color_description:B3A06D\x1eyellow +SETUVAR fish_pager_color_prefix:white\x1e\x2d\x2dbold\x1e\x2d\x2dunderline +SETUVAR fish_pager_color_progress:brwhite\x1e\x2d\x2dbackground\x3dcyan diff --git a/.config/fish/functions/installed_packages.fish b/.config/fish/functions/installed_packages.fish new file mode 100644 index 0000000..c2900cf --- /dev/null +++ b/.config/fish/functions/installed_packages.fish @@ -0,0 +1,3 @@ +function installed_packages + pacman -Qeq | sort > /var/tmp/pcmntmp1; pacman -Qgq base base-devel | sort > /var/tmp/pcmntmp2; comm -23 /var/tmp/pcmntmp1 /var/tmp/pcmntmp2 +end diff --git a/.config/fish/functions/unused_packages.fish b/.config/fish/functions/unused_packages.fish new file mode 100644 index 0000000..fd9950d --- /dev/null +++ b/.config/fish/functions/unused_packages.fish @@ -0,0 +1,3 @@ +function unused_packages + pacman -Qtdq +end diff --git a/.config/fish/functions/wget_od.fish b/.config/fish/functions/wget_od.fish new file mode 100644 index 0000000..9de8896 --- /dev/null +++ b/.config/fish/functions/wget_od.fish @@ -0,0 +1,3 @@ +function wget_od + wget --user-agent="Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:21.0) Gecko/20100101 Firefox/21.0" -e robots=off -r -nc -np -R "*index.html*" $argv; +end diff --git a/.config/fish/functions/ytdl_channel.fish b/.config/fish/functions/ytdl_channel.fish new file mode 100644 index 0000000..9636c95 --- /dev/null +++ b/.config/fish/functions/ytdl_channel.fish @@ -0,0 +1,3 @@ +function ytdl_channel + youtube-dl -i --write-description --write-info-json --write-thumbnail -o "%(upload_date)s_%(title)s_%(id)s.%(ext)s" $argv; +end diff --git a/.config/fish/functions/ytdl_playlist.fish b/.config/fish/functions/ytdl_playlist.fish new file mode 100644 index 0000000..26a817d --- /dev/null +++ b/.config/fish/functions/ytdl_playlist.fish @@ -0,0 +1,3 @@ +function ytdl_playlist + youtube-dl -i --write-description --write-info-json --write-thumbnail -o "%(playlist_index)s_%(title)s_%(id)s.%(ext)s" $argv; +end diff --git a/.config/fish/functions/ytdl_video.fish b/.config/fish/functions/ytdl_video.fish new file mode 100644 index 0000000..dda5671 --- /dev/null +++ b/.config/fish/functions/ytdl_video.fish @@ -0,0 +1,3 @@ +function ytdl_video + youtube-dl -i --write-description --write-info-json --write-thumbnail -o "%(id)s_%(title)s.%(ext)s" $argv; +end diff --git a/.config/htop/htoprc b/.config/htop/htoprc new file mode 100644 index 0000000..fb512c4 --- /dev/null +++ b/.config/htop/htoprc @@ -0,0 +1,26 @@ +# Beware! This file is rewritten by htop when settings are changed in the interface. +# The parser is also very primitive, and not human-friendly. +fields=0 48 39 46 49 1 +sort_key=46 +sort_direction=1 +hide_threads=0 +hide_kernel_threads=1 +hide_userland_threads=1 +shadow_other_users=0 +show_thread_names=0 +show_program_path=1 +highlight_base_name=1 +highlight_megabytes=1 +highlight_threads=1 +tree_view=0 +header_margin=1 +detailed_cpu_time=0 +cpu_count_from_zero=0 +update_process_names=0 +account_guest_in_cpu_meter=0 +color_scheme=0 +delay=15 +left_meters=AllCPUs +left_meter_modes=1 +right_meters=Memory Swap Tasks Uptime +right_meter_modes=1 1 2 2 diff --git a/.config/mpv/input.conf b/.config/mpv/input.conf new file mode 100644 index 0000000..a65aa6c --- /dev/null +++ b/.config/mpv/input.conf @@ -0,0 +1,38 @@ +MBTN_LEFT ignore +MBTN_LEFT_DBL cycle fullscreen +MBTN_RIGHT cycle pause +WHEEL_UP seek +2 +WHEEL_DOWN seek -2 + +j add volume -2 +k add volume +2 +h seek -1 +l seek +1 + +PGUP add chapter +1 +PGDWN add chapter -1 +Shift+PGUP seek +125 +Shift+PGDWN seek -125 + +. frame-step +, frame-back-step + +[ add speed -0.25 +] add speed +0.25 + +q quit + +ESC set fullscreen no +f cycle fullscreen + +p cycle pause +SPACE cycle pause +m cycle mute + +Ctrl+a cycle audio +Ctrl+s cycle sub + +s async screenshot +S async screenshot video + +o show-progress diff --git a/.config/mpv/mpv.conf b/.config/mpv/mpv.conf new file mode 100644 index 0000000..3280ee1 --- /dev/null +++ b/.config/mpv/mpv.conf @@ -0,0 +1,18 @@ +no-input-default-bindings + +screenshot-format=png +screenshot-template=mpv-%tY%tM%tD-%n +screenshot-directory=~/Pictures/mpv + +#profile=gpu-hq +deband=no + +#scale=ewa_lanczossharp +#cscale=ewa_lanczossharp + +alang=jpn,jp +slang=eng,en + +#video-sync=display-resample +#interpolation +#tscale=oversample diff --git a/.config/nvim/coc-settings.json b/.config/nvim/coc-settings.json new file mode 100644 index 0000000..1e55e08 --- /dev/null +++ b/.config/nvim/coc-settings.json @@ -0,0 +1,16 @@ +{ + "python.jediEnabled": false, + + "languageserver": { + "ccls": { + "command": "ccls", + "filetypes": ["c", "cpp", "objc", "objcpp"], + "rootPatterns": [".ccls", "compile_commands.json", ".vim/", ".git/", ".hg/"], + "initializationOptions": { + "cache": { + "directory": "/tmp/ccls" + } + } + } + } +} diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim new file mode 100644 index 0000000..714c25a --- /dev/null +++ b/.config/nvim/init.vim @@ -0,0 +1,24 @@ +call plug#begin('~/.local/share/nvim/plugged') + +Plug 'neoclide/coc.nvim', {'branch': 'release'} +Plug 'scrooloose/nerdtree' +Plug 'jiangmiao/auto-pairs' + +Plug 'jsit/vim-tomorrow-theme' + +call plug#end() + +" Show line numbers +set number + +" Use 4 spaces for identation +set expandtab +set shiftwidth=4 +set softtabstop=4 + +" Set color theme +set termguicolors +color Tomorrow-Night-Bright + +" Toggle NERDTree with Ctrl+n +map :NERDTreeToggle diff --git a/.config/ranger/rc.conf b/.config/ranger/rc.conf new file mode 100644 index 0000000..bd7345b --- /dev/null +++ b/.config/ranger/rc.conf @@ -0,0 +1,2 @@ +set preview_images true +set preview_images_method ueberzug diff --git a/.config/zathura/zathurarc b/.config/zathura/zathurarc new file mode 100644 index 0000000..f6af1a4 --- /dev/null +++ b/.config/zathura/zathurarc @@ -0,0 +1 @@ +set recolor diff --git a/.tmux.conf b/.tmux.conf new file mode 100644 index 0000000..28d6d99 --- /dev/null +++ b/.tmux.conf @@ -0,0 +1,3 @@ +set -s escape-time 0 +set -g status-style "bg=black" +set -g window-status-current-style "bold" diff --git a/install.sh b/install.sh new file mode 100644 index 0000000..91ee76e --- /dev/null +++ b/install.sh @@ -0,0 +1,11 @@ +#!/bin/bash +set -euxo pipefail + +# Don't run if in home directory +[[ "$PWD" == "$HOME" ]] && exit 1 + +# Don't run if no .config directory +[[ -d .config/ ]] || exit 1 + +cp .tmux.conf "$HOME" +cp -r .config "$HOME"