div updates

This commit is contained in:
Henrik Bakken
2020-08-17 18:51:37 +02:00
parent 4981ad888c
commit 6cdb7ecc61
16 changed files with 345 additions and 500 deletions
+22
View File
@@ -1 +1,23 @@
thefuck --alias | source thefuck --alias | source
set -x VISUAL /usr/bin/nvim
set -x EDITOR /usr/bin/nvim
set -x BROWSER /usr/bin/chromium
set -x QT_QPA_PLATFORMTHEME "qt5ct"
set -x GTK2_RC_FILES "$HOME/.gtkrc-2.0"
set -x PYTHONBREAKPOINT ipdb.set_trace
set -x JAVA_HOME "/usr/lib/jvm/java-14-openjdk/bin/javac"
# cuda stuff
set -x CUDA_HOME /opt/cuda
set -x LD_LIBRARY_PATH $LD_LIBRARY_PATH:$CUDA_HOME/lib64
set -x PATH $CUDA_HOME/bin:/home/hjalmarlucius/.local/bin/:$PATH
# Base16 Shell
if status --is-interactive
set BASE16_SHELL "$HOME/.config/base16-shell/"
source "$BASE16_SHELL/profile_helper.fish"
end
# MKL AMD fix
set -x MKL_DEBUG_CPU_TYPE 5
+27
View File
@@ -0,0 +1,27 @@
function fish_prompt --description 'Write out the prompt'
set -l last_pipestatus $pipestatus
set -l last_status $status
set -l normal (set_color normal)
# Color the prompt differently when we're root
set -l color_cwd $fish_color_cwd
set -l prefix
set -l suffix '>'
if contains -- $USER root toor
if set -q fish_color_cwd_root
set color_cwd $fish_color_cwd_root
end
set suffix '#'
end
# If we're running via SSH, change the host color.
set -l color_host $fish_color_host
if set -q SSH_TTY
set color_host $fish_color_host_remote
end
# Write pipestatus
set -l prompt_status (__fish_print_pipestatus " [" "]" "|" (set_color $fish_color_status) (set_color --bold $fish_color_status) $last_pipestatus)
echo -n -s (set_color $fish_color_user) "$USER" $normal @ (set_color $color_host) (prompt_hostname) $normal ' ' (set_color $color_cwd) (prompt_pwd) $normal (fish_vcs_prompt) $normal $prompt_status $suffix " "
end
+33
View File
@@ -0,0 +1,33 @@
# This file contains fish universal variable definitions.
# VERSION: 3.0
SETUVAR __fish_initialized:3100
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_host_remote:yellow
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_status:red
SETUVAR fish_color_user:brgreen
SETUVAR fish_color_valid_path:\x2d\x2dunderline
SETUVAR fish_greeting:Welcome\x20to\x20fish\x2c\x20the\x20friendly\x20interactive\x20shell\x0aType\x20\x60help\x60\x20for\x20instructions\x20on\x20how\x20to\x20use\x20fish
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
SETUVAR fish_user_paths:/home/hjalmarlucius/\x2efzf/bin
+2
View File
@@ -0,0 +1,2 @@
sync_dir="/home/hjalmarlucius/Onedrive"
skip_dir="Bilder|Pictures|Videos|Backup|Music|Datasets|tmp|Programming/logs"
+37
View File
@@ -0,0 +1,37 @@
# Configuration for OneDrive Linux Client
# This file contains the list of supported configuration fields
# with their default values.
# All values need to be enclosed in quotes
# When changing a config option below, remove the '#' from the start of the line
# For explanations of all config options below see docs/USAGE.md or the man page.
#
sync_dir = "/mnt/storage/Onedrive"
# skip_file = "~*|.~*|*.tmp"
# monitor_interval = "45"
# skip_dir = "Videos"
# log_dir = "/var/log/onedrive/"
# drive_id = ""
# upload_only = "false"
# check_nomount = "false"
# check_nosync = "false"
# download_only = "false"
# disable_notifications = "false"
# disable_upload_validation = "false"
# enable_logging = "false"
# force_http_11 = "false"
# force_http_2 = "false"
# local_first = "false"
# no_remote_delete = "false"
# skip_symlinks = "false"
# debug_https = "false"
# skip_dotfiles = "false"
# dry_run = "false"
# min_notify_changes = "5"
# monitor_log_frequency = "5"
# monitor_fullscan_frequency = "10"
# sync_root_files = "false"
# classify_as_big_delete = "1000"
# user_agent = ""
# remove_source_files = "false"
# skip_dir_strict_match = "false"
# application_id = ""
@@ -1,420 +0,0 @@
# Configuration file for jupyter-qtconsole.
#------------------------------------------------------------------------------
# ConnectionFileMixin(LoggingConfigurable) configuration
#------------------------------------------------------------------------------
## Mixin for configurable classes that work with connection files
## JSON file in which to store connection info [default: kernel-<pid>.json]
#
# This file will contain the IP, ports, and authentication key needed to connect
# clients to this kernel. By default, this file will be created in the security
# dir of the current profile, but can be specified by absolute path.
#c.ConnectionFileMixin.connection_file = ''
## set the control (ROUTER) port [default: random]
#c.ConnectionFileMixin.control_port = 0
## set the heartbeat port [default: random]
#c.ConnectionFileMixin.hb_port = 0
## set the iopub (PUB) port [default: random]
#c.ConnectionFileMixin.iopub_port = 0
## Set the kernel's IP address [default localhost]. If the IP address is
# something other than localhost, then Consoles on other machines will be able
# to connect to the Kernel, so be careful!
#c.ConnectionFileMixin.ip = ''
## set the shell (ROUTER) port [default: random]
#c.ConnectionFileMixin.shell_port = 0
## set the stdin (ROUTER) port [default: random]
#c.ConnectionFileMixin.stdin_port = 0
##
#c.ConnectionFileMixin.transport = 'tcp'
#------------------------------------------------------------------------------
# JupyterConsoleApp(ConnectionFileMixin) configuration
#------------------------------------------------------------------------------
## Set to display confirmation dialog on exit. You can always use 'exit' or
# 'quit', to force a direct exit without any confirmation.
#c.JupyterConsoleApp.confirm_exit = True
## Connect to an already running kernel
#c.JupyterConsoleApp.existing = ''
## The kernel manager class to use.
#c.JupyterConsoleApp.kernel_manager_class = 'jupyter_client.manager.KernelManager'
## The name of the default kernel to start.
#c.JupyterConsoleApp.kernel_name = 'python'
## Path to the ssh key to use for logging in to the ssh server.
#c.JupyterConsoleApp.sshkey = ''
## The SSH server to use to connect to the kernel.
#c.JupyterConsoleApp.sshserver = ''
#------------------------------------------------------------------------------
# Application(SingletonConfigurable) configuration
#------------------------------------------------------------------------------
## This is an application.
## The date format used by logging formatters for %(asctime)s
#c.Application.log_datefmt = '%Y-%m-%d %H:%M:%S'
## The Logging format template
#c.Application.log_format = '[%(name)s]%(highlevel)s %(message)s'
## Set the log level by value or name.
#c.Application.log_level = 30
#------------------------------------------------------------------------------
# JupyterApp(Application) configuration
#------------------------------------------------------------------------------
## Base class for Jupyter applications
## Answer yes to any prompts.
#c.JupyterApp.answer_yes = False
## Full path of a config file.
#c.JupyterApp.config_file = ''
## Specify a config file to load.
#c.JupyterApp.config_file_name = ''
## Generate default config file.
#c.JupyterApp.generate_config = False
#------------------------------------------------------------------------------
# JupyterQtConsoleApp(JupyterApp,JupyterConsoleApp) configuration
#------------------------------------------------------------------------------
## Whether to display a banner upon starting the QtConsole.
#c.JupyterQtConsoleApp.display_banner = True
## Start the console window with the menu bar hidden.
#c.JupyterQtConsoleApp.hide_menubar = False
## Start the console window maximized.
#c.JupyterQtConsoleApp.maximize = False
## Use a plaintext widget instead of rich text (plain can't print/save).
#c.JupyterQtConsoleApp.plain = False
## path to a custom CSS stylesheet
#c.JupyterQtConsoleApp.stylesheet = ''
#------------------------------------------------------------------------------
# ConsoleWidget(NewBase) configuration
#------------------------------------------------------------------------------
## An abstract base class for console-type widgets. This class has functionality
# for:
#
# * Maintaining a prompt and editing region
# * Providing the traditional Unix-style console keyboard shortcuts
# * Performing tab completion
# * Paging text
# * Handling ANSI escape codes
#
# ConsoleWidget also provides a number of utility methods that will be
# convenient to implementors of a console-style widget.
## Whether to process ANSI escape codes.
#c.ConsoleWidget.ansi_codes = True
## The maximum number of lines of text before truncation. Specifying a non-
# positive number disables text truncation (not recommended).
#c.ConsoleWidget.buffer_size = 500
## The height of the console at start time in number of characters (will double
# with `vsplit` paging)
#c.ConsoleWidget.console_height = 25
## The width of the console at start time in number of characters (will double
# with `hsplit` paging)
#c.ConsoleWidget.console_width = 81
## Whether to automatically execute on syntactically complete input.
#
# If False, Shift-Enter is required to submit each execution. Disabling this is
# mainly useful for non-Python kernels, where the completion check would be
# wrong.
#c.ConsoleWidget.execute_on_complete_input = True
## The font family to use for the console. On OSX this defaults to Monaco, on
# Windows the default is Consolas with fallback of Courier, and on other
# platforms the default is Monospace.
#c.ConsoleWidget.font_family = ''
## The font size. If unconfigured, Qt will be entrusted with the size of the
# font.
#c.ConsoleWidget.font_size = 0
## The type of completer to use. Valid values are:
#
# 'plain' : Show the available completion as a text list
# Below the editing area.
# 'droplist': Show the completion in a drop down list navigable
# by the arrow keys, and from which you can select
# completion by pressing Return.
# 'ncurses' : Show the completion as a text list which is navigable by
# `tab` and arrow keys.
#c.ConsoleWidget.gui_completion = 'ncurses'
## Whether to include output from clients other than this one sharing the same
# kernel.
#
# Outputs are not displayed until enter is pressed.
c.ConsoleWidget.include_other_output = True
## The type of underlying text widget to use. Valid values are 'plain', which
# specifies a QPlainTextEdit, and 'rich', which specifies a QTextEdit.
#c.ConsoleWidget.kind = 'plain'
## Prefix to add to outputs coming from clients other than this one.
#
# Only relevant if include_other_output is True.
#c.ConsoleWidget.other_output_prefix = '[remote] '
## The type of paging to use. Valid values are:
#
# 'inside'
# The widget pages like a traditional terminal.
# 'hsplit'
# When paging is requested, the widget is split horizontally. The top
# pane contains the console, and the bottom pane contains the paged text.
# 'vsplit'
# Similar to 'hsplit', except that a vertical splitter is used.
# 'custom'
# No action is taken by the widget beyond emitting a
# 'custom_page_requested(str)' signal.
# 'none'
# The text is written directly to the console.
#c.ConsoleWidget.paging = 'inside'
## The visibility of the scrollar. If False then the scrollbar will be invisible.
#c.ConsoleWidget.scrollbar_visibility = True
#------------------------------------------------------------------------------
# HistoryConsoleWidget(ConsoleWidget) configuration
#------------------------------------------------------------------------------
## A ConsoleWidget that keeps a history of the commands that have been executed
# and provides a readline-esque interface to this history.
##
#c.HistoryConsoleWidget.history_lock = False
#------------------------------------------------------------------------------
# FrontendWidget(HistoryConsoleWidget,BaseFrontendMixin) configuration
#------------------------------------------------------------------------------
## A Qt frontend for a generic Python kernel.
##
#c.FrontendWidget.banner = ''
## Whether to clear the console when the kernel is restarted
#c.FrontendWidget.clear_on_kernel_restart = True
## Whether to ask for user confirmation when restarting kernel
#c.FrontendWidget.confirm_restart = True
## Whether to draw information calltips on open-parentheses.
#c.FrontendWidget.enable_calltips = True
## The pygments lexer class to use.
#c.FrontendWidget.lexer_class = traitlets.Undefined
#------------------------------------------------------------------------------
# IPythonWidget(FrontendWidget) configuration
#------------------------------------------------------------------------------
## Dummy class for config inheritance. Destroyed below.
#------------------------------------------------------------------------------
# JupyterWidget(IPythonWidget) configuration
#------------------------------------------------------------------------------
## A FrontendWidget for a Jupyter kernel.
## A command for invoking a GUI text editor. If the string contains a {filename}
# format specifier, it will be used. Otherwise, the filename will be appended to
# the end the command. To use a terminal text editor, the command should launch
# a new terminal, e.g. ``"gnome-terminal -- vim"``.
#c.JupyterWidget.editor = ''
## The editor command to use when a specific line number is requested. The string
# should contain two format specifiers: {line} and {filename}. If this parameter
# is not specified, the line number option to the %edit magic will be ignored.
#c.JupyterWidget.editor_line = ''
##
#c.JupyterWidget.in_prompt = 'In [<span class="in-prompt-number">%i</span>]: '
##
#c.JupyterWidget.input_sep = '\n'
##
#c.JupyterWidget.out_prompt = 'Out[<span class="out-prompt-number">%i</span>]: '
##
#c.JupyterWidget.output_sep = ''
##
#c.JupyterWidget.output_sep2 = ''
## A CSS stylesheet. The stylesheet can contain classes for:
# 1. Qt: QPlainTextEdit, QFrame, QWidget, etc
# 2. Pygments: .c, .k, .o, etc. (see PygmentsHighlighter)
# 3. QtConsole: .error, .in-prompt, .out-prompt, etc
#c.JupyterWidget.style_sheet = ''
## If not empty, use this Pygments style for syntax highlighting. Otherwise, the
# style sheet is queried for Pygments style information.
#c.JupyterWidget.syntax_style = ''
#------------------------------------------------------------------------------
# KernelManager(ConnectionFileMixin) configuration
#------------------------------------------------------------------------------
## Manages a single kernel in a subprocess on this host.
#
# This version starts kernels with Popen.
## Should we autorestart the kernel if it dies.
#c.KernelManager.autorestart = True
## DEPRECATED: Use kernel_name instead.
#
# The Popen Command to launch the kernel. Override this if you have a custom
# kernel. If kernel_cmd is specified in a configuration file, Jupyter does not
# pass any arguments to the kernel, because it cannot make any assumptions about
# the arguments that the kernel understands. In particular, this means that the
# kernel does not receive the option --debug if it given on the Jupyter command
# line.
#c.KernelManager.kernel_cmd = []
## Time to wait for a kernel to terminate before killing it, in seconds.
#c.KernelManager.shutdown_wait_time = 5.0
#------------------------------------------------------------------------------
# KernelRestarter(LoggingConfigurable) configuration
#------------------------------------------------------------------------------
## Monitor and autorestart a kernel.
## Whether to include every poll event in debugging output.
#
# Has to be set explicitly, because there will be *a lot* of output.
#c.KernelRestarter.debug = False
## Whether to choose new random ports when restarting before the kernel is alive.
#c.KernelRestarter.random_ports_until_alive = True
## The number of consecutive autorestarts before the kernel is presumed dead.
#c.KernelRestarter.restart_limit = 5
## Kernel heartbeat interval in seconds.
#c.KernelRestarter.time_to_dead = 3.0
#------------------------------------------------------------------------------
# Session(Configurable) configuration
#------------------------------------------------------------------------------
## Object for handling serialization and sending of messages.
#
# The Session object handles building messages and sending them with ZMQ sockets
# or ZMQStream objects. Objects can communicate with each other over the
# network via Session objects, and only need to work with the dict-based IPython
# message spec. The Session will handle serialization/deserialization, security,
# and metadata.
#
# Sessions support configurable serialization via packer/unpacker traits, and
# signing with HMAC digests via the key/keyfile traits.
#
# Parameters ----------
#
# debug : bool
# whether to trigger extra debugging statements
# packer/unpacker : str : 'json', 'pickle' or import_string
# importstrings for methods to serialize message parts. If just
# 'json' or 'pickle', predefined JSON and pickle packers will be used.
# Otherwise, the entire importstring must be used.
#
# The functions must accept at least valid JSON input, and output *bytes*.
#
# For example, to use msgpack:
# packer = 'msgpack.packb', unpacker='msgpack.unpackb'
# pack/unpack : callables
# You can also set the pack/unpack callables for serialization directly.
# session : bytes
# the ID of this Session object. The default is to generate a new UUID.
# username : unicode
# username added to message headers. The default is to ask the OS.
# key : bytes
# The key used to initialize an HMAC signature. If unset, messages
# will not be signed or checked.
# keyfile : filepath
# The file containing a key. If this is set, `key` will be initialized
# to the contents of the file.
## Threshold (in bytes) beyond which an object's buffer should be extracted to
# avoid pickling.
#c.Session.buffer_threshold = 1024
## Whether to check PID to protect against calls after fork.
#
# This check can be disabled if fork-safety is handled elsewhere.
#c.Session.check_pid = True
## Threshold (in bytes) beyond which a buffer should be sent without copying.
#c.Session.copy_threshold = 65536
## Debug output in the Session
#c.Session.debug = False
## The maximum number of digests to remember.
#
# The digest history will be culled when it exceeds this value.
#c.Session.digest_history_size = 65536
## The maximum number of items for a container to be introspected for custom
# serialization. Containers larger than this are pickled outright.
#c.Session.item_threshold = 64
## execution key, for signing messages.
#c.Session.key = b''
## path to file containing execution key.
#c.Session.keyfile = ''
## Metadata dictionary, which serves as the default top-level metadata dict for
# each message.
#c.Session.metadata = {}
## The name of the packer for serializing messages. Should be one of 'json',
# 'pickle', or an import name for a custom callable serializer.
#c.Session.packer = 'json'
## The UUID identifying this session.
#c.Session.session = ''
## The digest scheme used to construct the message signatures. Must have the form
# 'hmac-HASH'.
#c.Session.signature_scheme = 'hmac-sha256'
## The name of the unpacker for unserializing messages. Only used with custom
# functions for `packer`.
#c.Session.unpacker = 'json'
## Username for the Session. Default is your system username.
#c.Session.username = 'hjalmarlucius'
+26 -17
View File
@@ -1,25 +1,29 @@
# linux # linux
* storage * yay stuff
* `yay megasync` * AUR `sudo pacman -S yay`
* `yay onedrive-abraunegg` * `yay onedrive-abraunegg dropbox slack-desktop ncspot-git nvidia-vulkan`
* `yay dropbox`
* nvidia
* `sudo pacman -S cuda`
* `yay nvidia-vulkan`
* applications * applications
* `sudo pacman -S npm nodejs` * helpers `sudo pacman -S zathura-pdf-mupdf trash-cli rofi`
* `sudo pacman -S ninja the_silver_searcher` * base16 shell `git clone https://github.com/chriskempson/base16-shell.git ~/.config/base16-shell`
* `sudo pacman -S zathura-pdf-mupdf redshift yay trash-cli rofi` * night colors `sudo pacman -S redshift`
* `yay ncspot-git` * gaming `sudo pacman -S steam-manjaro steam-native`
* code
* `sudo pacman -S neovim powerline tmux diff-so-fancy ttf-inconsolata` # coding
* gaming * cuda `sudo pacman -S cuda`
* `sudo pacman -S steam-manjaro steam-native` * core `sudo pacman -S neovim tmux`
* fonts `sudo pacman -S ttf-inconsolata powerline`
* git addons `sudo pacman -S diff-so-fancy`
* search `sudo pacman -S the_silver_searcher ripgrep`
* syntax highlighting `sudo pacman -S bat`
* javascript `sudo pacman -S npm nodejs yarn`
* c++ `sudo pacman -S ninja`
# settings
* set shell to 'fish' via `bmenu`
* replace caps with esc `setxkbmap -option 'caps:escape' `
* ssh setup * ssh setup
* enable SSH `sudo systemctl enable --now sshd.service` * enable SSH `sudo systemctl enable --now sshd.service`
* enable X11 forwarding in `/etc/ssh/sshd_config` * enable X11 forwarding in `/etc/ssh/sshd_config`
* set shell to 'fish' via `bmenu`
* replace caps with esc `setxkbmap -option 'caps:escape`
# python # python
* `pip install --pre torch torchvision -f https://download.pytorch.org/whl/nightly/cu101/torch_nightly.html` * `pip install --pre torch torchvision -f https://download.pytorch.org/whl/nightly/cu101/torch_nightly.html`
@@ -34,3 +38,8 @@
# IP # IP
* hjalmar-droneship 88.89.64.249 10.0.0.2 * hjalmar-droneship 88.89.64.249 10.0.0.2
OMF
* curl -L https://get.oh-my.fish | fish
* omf install https://github.com/FabioAntunes/fish-nvm
* omf install https://github.com/edc/bass
+6 -2
View File
@@ -1,12 +1,16 @@
{ {
"signature.target": "echo", "signature.target": "echo",
"python.jediEnabled": true,
"suggest.autoTrigger": "always", "suggest.autoTrigger": "always",
"python.jediEnabled": true,
"python.autoComplete.addBrackets": true, "python.autoComplete.addBrackets": true,
"python.linting.pylintEnabled": false, "python.linting.pylintEnabled": false,
"python.linting.flake8Enabled": true, "python.linting.flake8Enabled": true,
"python.linting.pylintArgs": ["--disable=all", "--enable=F,E,unreachable,duplicate-key,unnecessary-semicolon,global-variable-not-assigned,unused-variable,binary-op-exception,bad-format-string,anomalous-backslash-in-string,bad-open-mode"], "python.linting.pylintArgs": ["--disable=all", "--enable=F,E,unreachable,duplicate-key,unnecessary-semicolon,global-variable-not-assigned,unused-variable,binary-op-exception,bad-format-string,anomalous-backslash-in-string,bad-open-mode"],
"python.linting.flake8Args": ["--ignore=E226,E231,E241,E501,E701,E704"], "python.linting.flake8Args": ["--ignore=E226,E231,E241,E501,E701,E704"],
"python.linting.enabled": true, "python.linting.enabled": true,
"git.enableGutters": true "git.enableGutters": true,
"tabnine.shortcut": "TN",
"yaml.format.enable": true,
"yaml.format.singleQuote": true
} }
+59 -59
View File
@@ -7,6 +7,14 @@ if ! filereadable(expand('~/.config/nvim/autoload/plug.vim'))
silent !mkdir -p ~/.config/nvim/autoload/ silent !mkdir -p ~/.config/nvim/autoload/
silent !curl "https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim" > ~/.config/nvim/autoload/plug.vim silent !curl "https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim" > ~/.config/nvim/autoload/plug.vim
endif endif
let g:coc_global_extensions = [
\ 'coc-fzf-preview',
\ 'coc-python',
\ 'coc-git',
\ 'coc-tsserver',
\ 'coc-diagnostic',
\ 'coc-yaml'
\ ]
call plug#begin('~/.config/nvim/plugged') call plug#begin('~/.config/nvim/plugged')
" tools " tools
@@ -54,11 +62,18 @@ call plug#end()
" ----------------------------------------------------------------------------- " -----------------------------------------------------------------------------
" format " format
" ----------------------------------------------------------------------------- " -----------------------------------------------------------------------------
"if has("nvim") set t_Co=256 " Use 256 colors
" set termguicolors if filereadable(expand("~/.vimrc_background"))
"endif let base16colorspace=256
let base16colorspace=256 source ~/.vimrc_background
colorscheme seoul256 endif
if has("nvim")
if $TERM =~ '^\(rxvt\)\(-.*\)\?$'
set notermguicolors
else
set termguicolors
endif
endif
"let g:airline_theme='molokai' "let g:airline_theme='molokai'
"let g:airline_theme='qwq' "let g:airline_theme='qwq'
let g:airline_theme='badwolf' let g:airline_theme='badwolf'
@@ -79,6 +94,8 @@ let g:BASH_Ctrl_l='off' " avoid 'C-l' being overridden to newline
set updatetime=300 set updatetime=300
set timeoutlen=500 set timeoutlen=500
set lazyredraw set lazyredraw
" set shell=/usr/bin/bash
" let $SHELL = "/usr/bin/bash"
" fold config " fold config
set foldmethod=indent set foldmethod=indent
@@ -103,6 +120,10 @@ autocmd BufWritePre * %s/\s\+$//e
" default new file is markdown " default new file is markdown
autocmd BufEnter * if &filetype == "" | setlocal ft=markdown | endif autocmd BufEnter * if &filetype == "" | setlocal ft=markdown | endif
set tabstop=4
set softtabstop=4
set shiftwidth=4
set expandtab
set fileformat=unix set fileformat=unix
au Filetype python set au Filetype python set
\ tabstop=4 \ tabstop=4
@@ -196,22 +217,36 @@ nmap <silent> <C-Left> :execute 'silent! tabmove ' . (tabpagenr()-2)<cr>
nmap <silent> <C-Right> :execute 'silent! tabmove ' . (tabpagenr()+1)<cr> nmap <silent> <C-Right> :execute 'silent! tabmove ' . (tabpagenr()+1)<cr>
" fzf " fzf
nmap <C-p>g :GitFiles<ENTER> "nmap <C-p>g :GitFiles<ENTER>
nmap <C-p>f :Files<ENTER> "nmap <C-p>f :Files<ENTER>
nmap <C-p>l :Fag<ENTER> "nmap <C-p>l :Ag<ENTER>
nmap <C-p>l :Ag<ENTER> "nmap <C-p>L :Lines<ENTER>
nmap <C-p>L :Lines<ENTER> "nmap <C-p>r :Rg<ENTER>
nmap <C-p>r :Rg<ENTER> "nmap <C-p>b :Buffers<ENTER>
nmap <C-p>b :Buffers<ENTER> "nmap <C-p>c :Commands<ENTER>
nmap <C-p>c :Commands<ENTER>
nmap <C-p>t :Colors<ENTER> nmap <C-p>t :Colors<ENTER>
nmap <C-p>m :Marks<ENTER> "nmap <C-p>m :Marks<ENTER>
nmap <C-p>w :Windows<ENTER> "nmap <C-p>w :Windows<ENTER>
nmap <F2> :Maps<ENTER> "nmap <F2> :Maps<ENTER>
let g:fzf_action={ nmap <C-p> [fzf-p]
\ 'ctrl-o': 'tab split', xmap <C-p> [fzf-p]
\ 'ctrl-h': 'split',
\ 'ctrl-l': 'vsplit' } nnoremap <silent> [fzf-p]f :<C-u>CocCommand fzf-preview.FromResources project_mru git<CR>
nnoremap <silent> [fzf-p]F :<C-u>CocCommand fzf-preview.DirectoryFiles<CR>
nnoremap <silent> [fzf-p]g :<C-u>CocCommand fzf-preview.GitStatus<CR>
nnoremap <silent> [fzf-p]G :<C-u>CocCommand fzf-preview.GitActions<CR>
nnoremap <silent> [fzf-p]b :<C-u>CocCommand fzf-preview.Buffers<CR>
nnoremap <silent> [fzf-p]B :<C-u>CocCommand fzf-preview.AllBuffers<CR>
" nnoremap <silent> [fzf-p]o :<C-u>CocCommand fzf-preview.FromResources buffer project_mru<CR>
" nnoremap <silent> [fzf-p]<C-o> :<C-u>CocCommand fzf-preview.Jumps<CR>
" nnoremap <silent> [fzf-p]g; :<C-u>CocCommand fzf-preview.Changes<CR>
nnoremap <silent> [fzf-p]/ :<C-u>CocCommand fzf-preview.Lines --add-fzf-arg=--no-sort --add-fzf-arg=--query="'"<CR>
nnoremap <silent> [fzf-p]* :<C-u>CocCommand fzf-preview.Lines --add-fzf-arg=--no-sort --add-fzf-arg=--query="'<C-r>=expand('<cword>')<CR>"<CR>
nnoremap [fzf-p]l :<C-u>CocCommand fzf-preview.ProjectGrep<Space>
xnoremap [fzf-p]l "sy:CocCommand fzf-preview.ProjectGrep<Space>-F<Space>"<C-r>=substitute(substitute(@s, '\n', '', 'g'), '/', '\\/', 'g')<CR>"
nnoremap <silent> [fzf-p]t :<C-u>CocCommand fzf-preview.BufferTags<CR>
"nnoremap <silent> [fzf-p]q :<C-u>CocCommand fzf-preview.QuickFix<CR>
"nnoremap <silent> [fzf-p]l :<C-u>CocCommand fzf-preview.LocationList<CR>
" Close preview window when completion is done " Close preview window when completion is done
autocmd! CompleteDone * if pumvisible() == 0 | pclose | endif autocmd! CompleteDone * if pumvisible() == 0 | pclose | endif
@@ -246,17 +281,6 @@ nmap <leader>gg :vertical Gstatus<cr>:vertical resize 60<cr>
" nerdtree " nerdtree
map <leader>N :NERDTreeToggle<cr> map <leader>N :NERDTreeToggle<cr>
" ranger.vim
"map <leader>rr :RangerEdit<cr>
"map <leader>rv :RangerVSplit<cr>
"map <leader>rs :RangerSplit<cr>
"map <leader>rt :RangerTab<cr>
"map <leader>ri :RangerInsert<cr>
"map <leader>ra :RangerAppend<cr>
"map <leader>rc :set operatorfunc=RangerChangeOperator<cr>g@
"map <leader>rd :RangerCD<cr>
"map <leader>rld :RangerLCD<cr>
" nerdcommenter " nerdcommenter
" '<leader>c ', '<leader>cl' aligned and '<leader>cu>' remove " '<leader>c ', '<leader>cl' aligned and '<leader>cu>' remove
@@ -371,10 +395,8 @@ function! s:check_back_space() abort
return !col || getline('.')[col - 1] =~# '\s' return !col || getline('.')[col - 1] =~# '\s'
endfunction endfunction
nmap <silent> K :call <SID>show_documentation()<CR> nmap <silent> K :call <SID>show_documentation()<CR>
let g:coc_node_path = '/usr/bin/node'
" fzf files with preview let g:fzf_preview_command = 'bat --color=always --plain {-1}' " Installed bat
command! -bang -nargs=? -complete=dir Files
\ call fzf#vim#files(<q-args>, {'options': ['--info=default', '--preview', 'cat {}']}, <bang>1)
" vim asterisk " vim asterisk
let g:asterisk#keeppos = 1 let g:asterisk#keeppos = 1
@@ -400,22 +422,6 @@ function! s:show_documentation()
endif endif
endfunction endfunction
" fzf
let s:TYPE={'dict': type({}), 'funcref': type(function('call')), 'string': type(''), 'list': type([])}
if !exists("*s:fag")
function! s:fag(query, ...)
if type(a:query) != s:TYPE.string
return s:warn('Invalid query argument')
endif
let query=empty(a:query) ? '^(?=.)' : a:query
let args=copy(a:000)
let ag_opts=len(args) > 1 && type(args[0]) == s:TYPE.string ? remove(args, 0) : '--follow'
let command=ag_opts . ' ' . fzf#shellescape(query)
return call('fzf#vim#ag_raw', insert(args, command, 0))
endfunction
endif
" for moving of tabs " for moving of tabs
if !exists("*MoveToPrevTab") if !exists("*MoveToPrevTab")
function MoveToPrevTab() function MoveToPrevTab()
@@ -525,7 +531,6 @@ set splitbelow " Puts new split windows to the bottom of the current
set autowrite " Automatically write a file when leaving a modified buffer set autowrite " Automatically write a file when leaving a modified buffer
set mousehide " Hide the mouse cursor while typing set mousehide " Hide the mouse cursor while typing
set hidden " Allow buffer switching without saving set hidden " Allow buffer switching without saving
set t_Co=256 " Use 256 colors
set ruler " Show the ruler set ruler " Show the ruler
set showcmd " Show partial commands in status line and Selected characters/lines in visual mode set showcmd " Show partial commands in status line and Selected characters/lines in visual mode
set showmode " Show current mode in command-line set showmode " Show current mode in command-line
@@ -535,10 +540,6 @@ set report=0 " Always report changed lines
set linespace=0 " No extra spaces between rows set linespace=0 " No extra spaces between rows
set pumheight=20 " Avoid the pop up menu occupying the whole screen set pumheight=20 " Avoid the pop up menu occupying the whole screen
if !exists('g:vim_better_default_tabs_as_spaces') || g:vim_better_default_tabs_as_spaces
set expandtab " Tabs are spaces, not tabs
end
" http://stackoverflow.com/questions/6427650/vim-in-tmux-background-color-changes-when-paging/15095377#15095377 " http://stackoverflow.com/questions/6427650/vim-in-tmux-background-color-changes-when-paging/15095377#15095377
set t_ut= set t_ut=
@@ -608,7 +609,6 @@ endif
set cursorline " Highlight current line set cursorline " Highlight current line
set fileformats=unix,dos,mac " Use Unix as the standard file type set fileformats=unix,dos,mac " Use Unix as the standard file type
set number " Line numbers on set number " Line numbers on
"set relativenumber " Relative numbers on
set fillchars=vert:│,stl:\ ,stlnc:\ set fillchars=vert:│,stl:\ ,stlnc:\
" Annoying temporary files " Annoying temporary files
@@ -706,14 +706,14 @@ if get(g:, 'vim_better_default_key_mapping', 1)
" } " }
" File { " File {
if get(g:, 'vim_better_default_file_key_mapping', 1) if get(g:, 'vim_better_default_file_key_mapping', 0)
" File save " File save
nnoremap <Leader>fs :update<CR> nnoremap <Leader>fs :update<CR>
endif endif
" } " }
" Fold { " Fold {
if get(g:, 'vim_better_default_fold_key_mapping', 1) if get(g:, 'vim_better_default_fold_key_mapping', 0)
nnoremap <Leader>f0 :set foldlevel=0<CR> nnoremap <Leader>f0 :set foldlevel=0<CR>
nnoremap <Leader>f1 :set foldlevel=1<CR> nnoremap <Leader>f1 :set foldlevel=1<CR>
nnoremap <Leader>f2 :set foldlevel=2<CR> nnoremap <Leader>f2 :set foldlevel=2<CR>
+3 -1
View File
@@ -614,7 +614,9 @@ tmap <delete> eval -q fm.ui.taskview.task_remove()
tmap <C-l> redraw_window tmap <C-l> redraw_window
tmap <ESC> taskview_close tmap <ESC> taskview_close
copytmap <ESC> q Q w <C-c> copytmap <ESC> q Q w <C-c>
default_linemode devicons
# find # find
map <C-f> fzf_select map <C-f> fzf_select
# plugins
default_linemode devicons
+121
View File
@@ -0,0 +1,121 @@
#!/usr/bin/env bash
# ranger supports enhanced previews. If the option "use_preview_script"
# is set to True and this file exists, this script will be called and its
# output is displayed in ranger. ANSI color codes are supported.
# NOTES: This script is considered a configuration file. If you upgrade
# ranger, it will be left untouched. (You must update it yourself.)
# Also, ranger disables STDIN here, so interactive scripts won't work properly
# Meanings of exit codes:
# code | meaning | action of ranger
# -----+------------+-------------------------------------------
# 0 | success | success. display stdout as preview
# 1 | no preview | failure. display no preview at all
# 2 | plain text | display the plain content of the file
# 3 | fix width | success. Don't reload when width changes
# 4 | fix height | success. Don't reload when height changes
# 5 | fix both | success. Don't ever reload
# 6 | image | success. display the image $cached points to as an image preview
# 7 | image | success. display the file directly as an image
# Meaningful aliases for arguments:
path="$1" # Full path of the selected file
width="$2" # Width of the preview pane (number of fitting characters)
height="$3" # Height of the preview pane (number of fitting characters)
cached="$4" # Path that should be used to cache image previews
preview_images="$5" # "True" if image previews are enabled, "False" otherwise.
maxln=200 # Stop after $maxln lines. Can be used like ls | head -n $maxln
# Find out something about the file:
mimetype=$(file --mime-type -Lb "$path")
extension=$(/bin/echo "${path##*.}" | awk '{print tolower($0)}')
# Functions:
# runs a command and saves its output into $output. Useful if you need
# the return value AND want to use the output in a pipe
try() { output=$(eval '"$@"'); }
# writes the output of the previously used "try" command
dump() { /bin/echo "$output"; }
# a common post-processing function used after most commands
trim() { head -n "$maxln"; }
# wraps highlight to treat exit code 141 (killed by SIGPIPE) as success
safepipe() { "$@"; test $? = 0 -o $? = 141; }
# Image previews, if enabled in ranger.
if [ "$preview_images" = "True" ]; then
case "$mimetype" in
# Image previews for SVG files, disabled by default.
image/svg+xml)
convert "$path" "$cached" && exit 6 || exit 1;;
# Image previews for image files. w3mimgdisplay will be called for all
# image files (unless overriden as above), but might fail for
# unsupported types.
image/*)
exit 7;;
# Image preview for video, disabled by default.:
video/*)
ffmpegthumbnailer -i "$path" -o "$cached" -s 0 && exit 6 || exit 1;;
esac
fi
case "$extension" in
# Archive extensions:
a|ace|alz|arc|arj|bz|bz2|cab|cpio|deb|gz|jar|lha|lz|lzh|lzma|lzo|\
rpm|rz|t7z|tar|tbz|tbz2|tgz|tlz|txz|tZ|tzo|war|xpi|xz|Z|zip)
try als "$path" && { dump | trim; exit 0; }
try acat "$path" && { dump | trim; exit 3; }
try bsdtar -lf "$path" && { dump | trim; exit 0; }
exit 1;;
rar)
# avoid password prompt by providing empty password
try unrar -p- lt "$path" && { dump | trim; exit 0; } || exit 1;;
7z)
# avoid password prompt by providing empty password
try 7z -p l "$path" && { dump | trim; exit 0; } || exit 1;;
# PDF documents:
pdf)
try pdftotext -l 10 -nopgbrk -q "$path" - && \
{ dump | trim | fmt -s -w $width; exit 0; } || exit 1;;
# BitTorrent Files
torrent)
try transmission-show "$path" && { dump | trim; exit 5; } || exit 1;;
# ODT Files
odt|ods|odp|sxw)
try odt2txt "$path" && { dump | trim; exit 5; } || exit 1;;
# HTML Pages:
htm|html|xhtml)
try w3m -dump "$path" && { dump | trim | fmt -s -w $width; exit 4; }
try lynx -dump "$path" && { dump | trim | fmt -s -w $width; exit 4; }
try elinks -dump "$path" && { dump | trim | fmt -s -w $width; exit 4; }
;; # fall back to highlight/cat if the text browsers fail
esac
case "$mimetype" in
# Syntax highlight for text files:
text/* | */xml)
if [ "$(tput colors)" -ge 256 ]; then
pygmentize_format=terminal256
highlight_format=xterm256
else
pygmentize_format=terminal
highlight_format=ansi
fi
try safepipe highlight --out-format=${highlight_format} "$path" && { dump | trim; exit 5; }
try safepipe pygmentize -f ${pygmentize_format} "$path" && { dump | trim; exit 5; }
exit 2;;
# Ascii-previews of images:
image/*)
img2txt --gamma=0.6 --width="$width" "$path" && exit 4 || exit 1;;
# Display information about media files:
video/* | audio/*)
exiftool "$path" && exit 5
# Use sed to remove spaces so the output fits into the narrow window
try mediainfo "$path" && { dump | trim | sed 's/ \+:/: /;'; exit 5; } || exit 1;;
esac
exit 1
+7
View File
@@ -140,3 +140,10 @@ ex ()
[ -f ~/.fzf.bash ] && source ~/.fzf.bash [ -f ~/.fzf.bash ] && source ~/.fzf.bash
# Base16 Shell
BASE16_SHELL="$HOME/.config/base16-shell/"
[ -n "$PS1" ] && \
[ -s "$BASE16_SHELL/profile_helper.sh" ] && \
eval "$("$BASE16_SHELL/profile_helper.sh")"
source /usr/share/nvm/init-vnm.sh
+1 -1
View File
@@ -1,6 +1,6 @@
[core] [core]
autocrlf = input autocrlf = input
fileMode = false filemode = false
pager = diff-so-fancy | less --tabs=4 -RFX pager = diff-so-fancy | less --tabs=4 -RFX
autorcrlf = true autorcrlf = true
[user] [user]
+1
View File
@@ -4,6 +4,7 @@ export BROWSER=/usr/bin/chromium
export QT_QPA_PLATFORMTHEME="qt5ct" export QT_QPA_PLATFORMTHEME="qt5ct"
export GTK2_RC_FILES="$HOME/.gtkrc-2.0" export GTK2_RC_FILES="$HOME/.gtkrc-2.0"
export PYTHONBREAKPOINT=ipdb.set_trace export PYTHONBREAKPOINT=ipdb.set_trace
export JAVA_HOME="/usr/lib/jvm/java-14-openjdk/bin/javac"
# cuda stuff # cuda stuff