From 5f9662158c84ef69d591398408fea1f2b0e2ffe2 Mon Sep 17 00:00:00 2001 From: Henrik Bakken Date: Tue, 19 May 2020 14:38:04 +0200 Subject: [PATCH] updates --- fish/config.fish | 1 + i3/config | 41 +++++++++------- jupyter/jupyter_qtconsole_config.py | 3 +- manjaro.md | 20 +++----- moc/keymap | 2 +- nvim/init.vim | 47 +++--------------- onedrive/config | 2 +- ranger/rc.conf | 5 +- root/.profile | 2 + root/.tigrc | 76 +++++++++++++++++++++++++++++ 10 files changed, 126 insertions(+), 73 deletions(-) create mode 100644 fish/config.fish create mode 100644 root/.tigrc diff --git a/fish/config.fish b/fish/config.fish new file mode 100644 index 0000000..10595db --- /dev/null +++ b/fish/config.fish @@ -0,0 +1 @@ +thefuck --alias | source diff --git a/i3/config b/i3/config index b63bb84..9718723 100644 --- a/i3/config +++ b/i3/config @@ -8,7 +8,7 @@ set $mod Mod4 # workspace_layout tabbed # Configure border style -default_border pixel 1 +default_border pixel 3 default_floating_border normal # Hide borders @@ -19,6 +19,11 @@ bindsym $mod+u border none bindsym $mod+y border pixel 1 bindsym $mod+n border normal +# configure some stuff +focus_follows_mouse no +mouse_warping none +workspace_auto_back_and_forth no + # Font for window titles. Will also be used by the bar unless a different font # is used in the bar {} block below. # font xft:URWGothic-Book 11 @@ -34,7 +39,10 @@ bindsym $mod+Return exec terminal bindsym $mod+Shift+q kill # start program launcher -bindsym $mod+d exec --no-startup-id dmenu_recency +# bindsym $mod+d exec --no-startup-id dmenu_recency +bindsym $mod+d exec --no-startup-id rofi -show run +#-lines 10 -eh 2 -width 30 -padding 800 + # launch categorized menu bindsym $mod+z exec --no-startup-id morc_menu @@ -64,18 +72,14 @@ bindsym $mod+Ctrl+b exec terminal -e 'bmenu' bindsym $mod+F2 exec chromium bindsym $mod+F3 exec thunar bindsym $mod+Shift+F3 exec terminal -e 'ranger' -bindsym $mod+F5 exec terminal -e 'mocp' -bindsym $mod++Shift+F5 exec terminal -e 'ncspot' +bindsym $mod+F4 exec terminal -e 'mocp' +bindsym $mod++Shift+F4 exec terminal -e 'ncspot' bindsym $mod+t exec --no-startup-id pkill picom bindsym $mod+Shift+t exec --no-startup-id picom -b bindsym $mod+Shift+d --release exec "killall dunst; exec notify-send 'restart dunst'" -bindsym F12 exec --no-startup-id i3-scrot -bindsym $mod+F12 --release exec --no-startup-id i3-scrot -w -bindsym $mod+Shift+F12 --release exec --no-startup-id i3-scrot -s +bindsym $mod+F12 --release exec --no-startup-id i3-scrot -s bindsym $mod+Ctrl+x --release exec --no-startup-id xkill -# focus_follows_mouse no - # change focus bindsym $mod+h focus left bindsym $mod+j focus down @@ -93,9 +97,12 @@ bindsym $mod+Shift+h move left bindsym $mod+Shift+j move down bindsym $mod+Shift+k move up bindsym $mod+Shift+l move right +bindsym $mod+Shift+left move left +bindsym $mod+Shift+down move down +bindsym $mod+Shift+up move up +bindsym $mod+Shift+right move right # workspace back and forth (with/without active container) -workspace_auto_back_and_forth yes bindsym $mod+b workspace back_and_forth bindsym $mod+Shift+b move container to workspace back_and_forth; workspace back_and_forth @@ -271,24 +278,23 @@ bindsym $mod+9 exec --no-startup-id blurlock # Autostart applications exec --no-startup-id /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 -exec --no-startup-id nitrogen --random ~/Wallpapers/; sleep 1; picom -b -#exec --no-startup-id manjaro-hello exec --no-startup-id nm-applet +exec --no-startup-id nitrogen --restore exec --no-startup-id xfce4-power-manager exec --no-startup-id pamac-tray exec --no-startup-id clipit -# exec --no-startup-id blueman-applet -# exec_always --no-startup-id sbxkb -exec --no-startup-id start_conky_maia -# exec --no-startup-id start_conky_green +exec --no-startup-id start_conky_live_green exec --no-startup-id xautolock -time 10 -locker blurlock +exec_always --no-startup-id sbxkb exec_always --no-startup-id ff-theme-util exec_always --no-startup-id fix_xcursor +exec --no-startup-id xrandr --output HDMI-0 --primary --output DP-0 --rotate left --right-of HDMI-0 --output DP-2 --rotate left --left-of HDMI-0 # HB STARTUP ADDITIONS +bindsym Shift+Pause exec --no-startup-id setxkbmap -option "caps:escape" +bindsym Shift+Scroll_Lock exec --no-startup-id setxkbmap -option exec --no-startup-id setxkbmap -option "caps:escape" exec --no-startup-id redshift-gtk -exec --no-startup-id megasync & exec --no-startup-id dropbox start & exec --no-startup-id nvidia-settings -a GPUFanControlState=1 -a GPUTargetFanSpeed=60 @@ -331,6 +337,7 @@ bar { position bottom ## please set your primary output first. Example: 'xrandr --output eDP1 --primary' + # tray_output primary # tray_output eDP1 diff --git a/jupyter/jupyter_qtconsole_config.py b/jupyter/jupyter_qtconsole_config.py index cdc0170..805545f 100644 --- a/jupyter/jupyter_qtconsole_config.py +++ b/jupyter/jupyter_qtconsole_config.py @@ -280,7 +280,8 @@ c.ConsoleWidget.include_other_output = True ## If not empty, use this Pygments style for syntax highlighting. Otherwise, the # style sheet is queried for Pygments style information. -#c.JupyterWidget.syntax_style = '' +c.JupyterWidget.syntax_style = 'monokai' +# monokai, fruity, native, paraiso-dark, rrt, solarized-dark, stata-dark, vim #------------------------------------------------------------------------------ # KernelManager(ConnectionFileMixin) configuration diff --git a/manjaro.md b/manjaro.md index 9876ea7..ffecd4d 100644 --- a/manjaro.md +++ b/manjaro.md @@ -3,27 +3,23 @@ * `yay megasync` * `yay onedrive-abraunegg` * `yay dropbox` -* nvidia - * `sudo pacman -S cuda` - * `yay nvidia-vulkan` -* applications - * `sudo pacman -S npm nodejs` - * `sudo pacman -S ninja the_silver_searcher` - * `sudo pacman -S zathura-pdf-mupdf redshift yay trash-cli` - * `yay ncspot-git` -* code - * `sudo pacman -S neovim powerline tmux diff-so-fancy ttf-inconsolata` -* gaming - * `sudo pacman -S steam-manjaro steam-native` +* applications `sudo pacman -S npm nodejs ninja zathura-pdf-mupdf redshift yay trash-cli conky-manager feh pv fancontrol-gui thefuck ncdu` +* spotify `yay ncspot-git` +* code `sudo pacman -S neovim tig powerline the_silver_searcher tmux diff-so-fancy ttf-inconsolata` +* gaming `sudo pacman -S steam-manjaro steam-native` * ssh setup * enable SSH `sudo systemctl enable --now sshd.service` * enable X11 forwarding in `/etc/ssh/sshd_config` * set shell to 'fish' via `bmenu` * replace caps with esc `setxkbmap -option 'caps:escape` +* nvidia + * `sudo pacman -S cuda` + * `yay nvidia-vulkan` # python * `pip install --pre torch torchvision -f https://download.pytorch.org/whl/nightly/cu101/torch_nightly.html` * `pip install nodejs plotly flake8 numpy scipy sympy matplotlib seaborn pytorch-lightning ggplot ptvsd tensorboard torchtext ipython matplotlib-label-lines ipympl pytest qbstyles` +* `jupyter nbextension enable --py widgetsnbextension` # enable services * `systemctl enable --user onedrive --now` diff --git a/moc/keymap b/moc/keymap index 3877c4b..ea3f95c 100644 --- a/moc/keymap +++ b/moc/keymap @@ -56,7 +56,7 @@ toggle_read_tags = T toggle_shuffle = S toggle_repeat = R toggle_auto_next = X -toggle_menu = ^W +toggle_menu = TAB toggle_layout = ^l add_file = a add_directory = A diff --git a/nvim/init.vim b/nvim/init.vim index 78ddb9a..2200ee8 100644 --- a/nvim/init.vim +++ b/nvim/init.vim @@ -16,7 +16,6 @@ Plug 'junegunn/fzf.vim' Plug 'sheerun/vim-polyglot' " language syntax Plug 'godlygeek/tabular' " help aligning text on tabs Plug 'tpope/vim-fugitive' -Plug 'jupyter-vim/jupyter-vim' " markdown Plug 'iamcco/markdown-preview.nvim', { 'do': { -> mkdp#util#install() } } Plug 'plasticboy/vim-markdown' " markdown helper. @@ -212,13 +211,13 @@ imap imap pumvisible() ? "\" : "\" imap coc#refresh() " coc helpers -nmap gP (coc-diagnostic-prev) -nmap gp (coc-diagnostic-next) -nmap gd (coc-definition) -nmap gy (coc-type-definition) -nmap gi (coc-implementation) -nmap gr (coc-references) -nmap gR (coc-refactor) +nmap gP (coc-diagnostic-prev) +nmap gp (coc-diagnostic-next) +nmap gd (coc-definition) +nmap gy (coc-type-definition) +nmap gi (coc-implementation) +nmap gr (coc-references) +nmap gR (coc-refactor) " coc git nmap gn (coc-git-nextchunk) nmap gp (coc-git-prevchunk) @@ -275,21 +274,6 @@ map T :BuffergatorTabsClose nmap j :BuffergatorMruCyclePrev nmap k :BuffergatorMruCycleNext -" jupyter-vim -let g:jupyter_mapkeys = 0 -" Send a selection of lines -nmap qR :JupyterRunFile -nmap qQ :JupyterSendCell -nmap qq JupyterRunTextObj -vmap qq JupyterRunVisual -" nmap qr :JupyterSendRange -" other -nmap qc :JupyterConnect -nmap qi :PythonImportThisFile -nmap qu :JupyterUpdateShell -nmap qb :PythonSetBreak -nmap qd :JupyterCd %:p:h - " ----------------------------------------------------------------------------- " plugin config " ----------------------------------------------------------------------------- @@ -351,28 +335,13 @@ let g:mkdp_auto_start=0 " auto start on moving into let g:mkdp_auto_close=0 " auto close on moving away let g:mkdp_open_to_the_world=0 " available to others let g:mkdp_open_ip='' " use custom IP to open preview page -let g:mkdp_port='' " use a custom port to start server or random for empty -let g:mkdp_browser='google-chrome' " specify browser to open preview page -let g:mkdp_markdown_css='' " use a custom markdown style must be absolute path -let g:mkdp_highlight_css='' " use a custom highlight style must absolute path let g:mkdp_preview_options={ - \ 'mkit': {}, - \ 'katex': {}, - \ 'uml': {}, - \ 'maid': {}, \ 'disable_sync_scroll': 0, \ 'sync_scroll_type': 'middle', \ 'hide_yaml_meta': 1 \ } -" mkit: markdown-it options for render -" katex: katex options for math -" uml: markdown-it-plantuml options -" maid: mermaid options " disable_sync_scroll: if disable sync scroll, default 0 -" sync_scroll_type: 'middle', 'top' or 'relative', default value is 'middle' -" middle: mean the cursor position alway show at the middle of the preview page -" top: mean the vim top viewport alway show at the top of the preview page -" relative: mean the cursor position alway show at the relative positon of the preview page +" sync_scroll_type: 'middle', 'top' or 'relative' " hide_yaml_meta: if hide yaml metadata, default is 1 " peekaboo diff --git a/onedrive/config b/onedrive/config index c6830db..4921bc6 100644 --- a/onedrive/config +++ b/onedrive/config @@ -8,7 +8,7 @@ sync_dir = "/mnt/storage/Onedrive" # skip_file = "~*|.~*|*.tmp" # monitor_interval = "45" -skip_dir = "Videos" +# skip_dir = "Videos" # log_dir = "/var/log/onedrive/" # drive_id = "" # upload_only = "false" diff --git a/ranger/rc.conf b/ranger/rc.conf index 83f2586..ee59ce8 100644 --- a/ranger/rc.conf +++ b/ranger/rc.conf @@ -267,7 +267,7 @@ map ! console shell%space map @ console -p6 shell %%s map # console shell -p%space map s console shell%space -map r chain draw_possible_programs; console open_with%%space +map r chain draw_possible_programs; console open_with%space #map f console find%space map f console scout -ftsea%space map cd console cd%space @@ -310,7 +310,7 @@ map move to=-1 map move down=1 pages=True map move up=1 pages=True map move right=1 -map console delete +map shell -s trash-put %s map console touch%space # VIM-like @@ -379,6 +379,7 @@ map pht paste_hardlinked_subtree map pr paste_as_root map dD console delete +map dT shell -s trash-put %s map dd cut map ud uncut diff --git a/root/.profile b/root/.profile index d288c6a..fedc42a 100644 --- a/root/.profile +++ b/root/.profile @@ -3,6 +3,8 @@ export EDITOR=/usr/bin/nvim export BROWSER=/usr/bin/chromium export QT_QPA_PLATFORMTHEME="qt5ct" export GTK2_RC_FILES="$HOME/.gtkrc-2.0" +export PYTHONBREAKPOINT=ipdb.set_trace + # cuda stuff export CUDA_HOME=/opt/cuda diff --git a/root/.tigrc b/root/.tigrc new file mode 100644 index 0000000..aa4704c --- /dev/null +++ b/root/.tigrc @@ -0,0 +1,76 @@ +# Vim-style keybindings for Tig +# +# To use these keybindings copy the file to your HOME directory and include +# it from your ~/.tigrc file: +# +# $ cp contrib/vim.tigrc ~/.tigrc.vim +# $ echo "source ~/.tigrc.vim" >> ~/.tigrc + +bind generic h scroll-left +bind generic j move-down +bind generic k move-up +bind generic l scroll-right + +bind generic g none +bind generic gg move-first-line +bind generic J next +bind generic K previous +bind generic gp parent +bind generic gP back +bind generic gn view-next + +bind main G move-last-line +bind generic G move-last-line + +bind generic move-page-down +bind generic move-page-up + +bind generic v none +bind generic vm view-main +bind generic vd view-diff +bind generic vl view-log +bind generic vt view-tree +bind generic vb view-blob +bind generic vx view-blame +bind generic vr view-refs +bind generic vs view-status +bind generic vu view-stage +bind generic vy view-stash +bind generic vg view-grep +bind generic vp view-pager +bind generic vh view-help + +bind generic o none +bind generic oo :toggle sort-order +bind generic os :toggle sort-field +bind generic on :toggle line-number +bind generic od :toggle date +bind generic oa :toggle author +bind generic og :toggle line-graphics +bind generic of :toggle file-name +bind generic op :toggle ignore-space +bind generic oi :toggle id +bind generic ot :toggle commit-title-overflow +bind generic oF :toggle file-filter +bind generic or :toggle commit-title-refs + +bind generic @ none +bind generic @j :/^@@ +bind generic @k :?^@@ +bind generic @- :toggle diff-context -1 +bind generic @+ :toggle diff-context +1 + +bind status u none +bind stage u none +bind generic uu status-update +bind generic ur status-revert +bind generic um status-merge +bind generic ul stage-update-line +bind generic us stage-split-chunk + +bind generic c none +bind generic cc !git commit +bind generic ca !?@git commit --amend --no-edit + +bind generic ? view-help +bind generic view-next