aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config/alacritty/alacritty.darwin.yml (renamed from config/alacritty/alacritty.yml)0
-rw-r--r--config/alacritty/alacritty.linux.yml80
-rw-r--r--config/nvim/lua/mappings.lua12
-rw-r--r--config/qutebrowser/config.py2
-rw-r--r--config/xmonad/xmonad.hs2
-rwxr-xr-xinstall15
6 files changed, 99 insertions, 12 deletions
diff --git a/config/alacritty/alacritty.yml b/config/alacritty/alacritty.darwin.yml
index 1e1debc..1e1debc 100644
--- a/config/alacritty/alacritty.yml
+++ b/config/alacritty/alacritty.darwin.yml
diff --git a/config/alacritty/alacritty.linux.yml b/config/alacritty/alacritty.linux.yml
new file mode 100644
index 0000000..6c3b53e
--- /dev/null
+++ b/config/alacritty/alacritty.linux.yml
@@ -0,0 +1,80 @@
+#############
+# alacritty #
+#############
+
+# font
+font:
+ size: 9.0
+ offset:
+ x: 0
+ y: 0
+ normal:
+ family: Fira Code
+ style: Regular
+ italic:
+ style: Italic
+ bold:
+ style: Bold
+ use_thin_strokes: false
+
+
+key_bindings:
+ - { key: J, mods: Alt, chars: "\e[B" }
+ - { key: K, mods: Alt, chars: "\e[A" }
+ - { key: J, mods: Alt|Shift, action: ScrollHalfPageDown }
+ - { key: K, mods: Alt|Shift, action: ScrollHalfPageUp }
+
+
+# gruvbox_dark: https://github.com/eendroroy/alacritty-theme/blob/master/schemes.yaml
+colors:
+ primary:
+ # hard contrast: background = '0x1d2021'
+ background: '0x282828'
+ # soft contrast: background = '0x32302f'
+ foreground: '0xebdbb2'
+ normal:
+ black: '0x282828'
+ red: '0xcc241d'
+ green: '0x98971a'
+ yellow: '0xd79921'
+ blue: '0x458588'
+ magenta: '0xb16286'
+ cyan: '0x689d6a'
+ white: '0xa89984'
+ bright:
+ black: '0x928374'
+ red: '0xfb4934'
+ green: '0xb8bb26'
+ yellow: '0xfabd2f'
+ blue: '0x83a598'
+ magenta: '0xd3869b'
+ cyan: '0x8ec07c'
+ white: '0xebdbb2'
+
+
+# # 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/nvim/lua/mappings.lua b/config/nvim/lua/mappings.lua
index 73a91c7..08e9862 100644
--- a/config/nvim/lua/mappings.lua
+++ b/config/nvim/lua/mappings.lua
@@ -6,6 +6,7 @@ map('', 'Q', '<nop>', {}) -- remove visual mode keybin
map('n', '<leader>sc', '<cmd>source $MYVIMRC<cr>', {}) -- source vimrc
map('n', '<leader>;', 'mqA;<esc>`q', {}) -- put semicolon at the end of line
map('n', 'cu', 'ct_', {}) -- common change until
+map('n', '<leader>ss', '<cmd>setlocal spell!<cr>', {}) -- toggle spelling check
-- split navigation
map('n', '<C-j>', '<C-w><C-j>', {})
@@ -46,15 +47,14 @@ vim.cmd [[ autocmd FileType python nmap <leader>bd :g/^\s*breakpoint()$/d<cr> ]]
vim.cmd [[ autocmd FileType python nmap <leader>ba mqobreakpoint()<esc>`q ]]
-- pluggins
---
--- eazy-align
+
map('x', 'ga', '<cmd>EasyAlign<cr>', {})
map('n', 'ga', '<cmd>EasyAlign<cr>', {})
--- nnoremap <leader>l :SidewaysRight<CR>
--- nnoremap <leader>h :SidewaysLeft<CR>
--- nnoremap <leader>w :ArgWrap<CR>
--- nnoremap <leader>ss :setlocal spell!<CR>
+map('n', '<leader>l', '<cmd>SidewaysRight<cr>', {})
+map('n', '<leader>h', '<cmd>SidewaysLeft<cr>', {})
+
+map('n', '<leader>w', '<cmd>ArgWrap<cr>', {})
map('n', '<C-p>', '<cmd>Telescope git_files<cr>', {})
map('n', '<f2>', '<cmd>Telescope help_tags<cr>', {})
diff --git a/config/qutebrowser/config.py b/config/qutebrowser/config.py
index 11fced5..15b0343 100644
--- a/config/qutebrowser/config.py
+++ b/config/qutebrowser/config.py
@@ -437,3 +437,5 @@ c.colors.tabs.selected.even.bg = base05
# Background color for webpages if unset (or empty to use the theme"s
# color).
c.colors.webpage.bg = base00
+
+# vim:TSBufDisable highlight
diff --git a/config/xmonad/xmonad.hs b/config/xmonad/xmonad.hs
index b0f47a6..a94df43 100644
--- a/config/xmonad/xmonad.hs
+++ b/config/xmonad/xmonad.hs
@@ -22,7 +22,7 @@ import XMonad.Hooks.InsertPosition (Focus (..), Position (..),
insertPosition)
-myTerminal = "st"
+myTerminal = "alacritty"
-- xmonad :: XConfig -> IO ()
-- https://hackage.haskell.org/package/xmonad-0.15/docs/XMonad-Core.html#t:XConfig
diff --git a/install b/install
index 4a2fb5a..fa0c195 100755
--- a/install
+++ b/install
@@ -27,7 +27,7 @@ mkdir -pv "$XDG_CONFIG_HOME"
mkdir -pv "$XDG_DATA_HOME"
mkdir -pv "$XDG_CACHE_HOME"
# xmonad uses ~/.xmonad if those directories don't already exists
-if [ $(uname) = Linux ]
+if [ "$(uname)" = Linux ]
then
mkdir -pv "$XMONAD_CONFIG_HOME"
mkdir -pv "$XMONAD_DATA_HOME"
@@ -40,10 +40,13 @@ link_home_files() {
rice_dir="$1"
dest_dir="$2"
paths=$(mktemp)
+ platform="$(uname | tr '[:upper:]' '[:lower:]')"
+ other_platform="$([ "$platform" = 'linux' ] && echo darwin || echo linux)"
# generate a file with the file path in this repo and the link for the real path
# each line is in the format: TARGET LINKNAME
find "$rice_dir" -type f |
- sed -e 'p' -e 's:^'"$rice_dir"':'"$dest_dir"':' |
+ sed "/\.$other_platform\./ d" |
+ sed -e 'p' -e "s:^$rice_dir:$dest_dir:" -e "s/\.$platform\././" |
awk '{ if (NR % 2 == 1) { print "'"$(pwd)"'" "/" $0 } else print }' |
xargs -L 2 > "$paths"
< "$paths" cut -d ' ' -f 2 | xargs -L 1 dirname | xargs -L 1 mkdir -pv
@@ -72,12 +75,13 @@ echo '---------------------------- INSTALL VIM PLUG ----------------------------
PLUGFILE="$XDG_DATA_HOME/vim/autoload/plug.vim"
PLUGURL='https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
[ ! -f "$PLUGFILE" ] && curl -fLo "$PLUGFILE" --create-dirs "$PLUGURL"
-vim -c "PlugInstall" -c "qa"
+vim -c 'PlugInstall' -c 'qa'
+echo '---------------------------- INSTALL NVIM PACKER -------------------------'
PACKERDIR="$XDG_DATA_HOME/nvim/site/pack/packer/start/packer.nvim"
PACKERURL='https://github.com/wbthomason/packer.nvim'
[ ! -d "$PACKERDIR" ] && git clone --depth 1 "$PACKERURL" "$PACKERDIR"
-vim -c "PackerInstall" -c "qa"
+nvim -c 'PackerInstall' -c 'PackerUpdate' -c "qa"
###############################################################################
# zsh pluggins
@@ -100,7 +104,7 @@ parallel_start update_zsh_plugin 'https://github.com/zsh-users/zsh-syntax-highli
parallel_start update_zsh_plugin 'https://github.com/MichaelAquilina/zsh-you-should-use'
parallel_wait
-[ $(uname) = Darwin ] && exit
+[ "$(uname)" = Darwin ] && exit
###############################################################################
# Linux specific
@@ -116,6 +120,7 @@ if [ "$(cat /etc/hostname)" = 'charleslaptopcarbon' ]
then
cat crontab/user.crontab crontab/laptop.crontab | crontab -
elif [ "$(cat /etc/hostname)" = 'cacharle-main' ]
+then
crontab crontab/user.crontab
fi