aboutsummaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
Diffstat (limited to 'config')
-rw-r--r--config/alacritty/alacritty.linux.yml3
-rw-r--r--config/git/config.linux6
-rw-r--r--config/nvim/lua/plugins.lua53
-rw-r--r--config/nvim/lua/telescope-config.lua2
-rw-r--r--config/tmux/tmux.conf6
-rwxr-xr-xconfig/x11/xinitrc5
-rw-r--r--config/xmonad/xmonad.hs18
-rw-r--r--config/zsh/.zshrc32
-rw-r--r--config/zsh/aliases.zsh7
-rwxr-xr-xconfig/zsh/zprofile5
10 files changed, 65 insertions, 72 deletions
diff --git a/config/alacritty/alacritty.linux.yml b/config/alacritty/alacritty.linux.yml
index fc50a27..d50a166 100644
--- a/config/alacritty/alacritty.linux.yml
+++ b/config/alacritty/alacritty.linux.yml
@@ -30,6 +30,9 @@ key_bindings:
- { key: K, mods: Alt, chars: "\e[A" }
- { key: J, mods: Alt|Shift, action: ScrollHalfPageDown }
- { key: K, mods: Alt|Shift, action: ScrollHalfPageUp }
+ - { key: Plus, mods: Alt|Shift, action: IncreaseFontSize }
+ - { key: Minus, mods: Alt, action: DecreaseFontSize }
+ - { key: Key0, mods: Alt, action: ResetFontSize }
# gruvbox_dark: https://github.com/eendroroy/alacritty-theme/blob/master/schemes.yaml
diff --git a/config/git/config.linux b/config/git/config.linux
index 0dbbd8f..3c72be1 100644
--- a/config/git/config.linux
+++ b/config/git/config.linux
@@ -12,3 +12,9 @@
gpgsign = true
[init]
defaultBranch = master
+[difftool "bat"]
+ cmd = "/usr/bin/bat --diff $REMOTE"
+[difftool]
+ prompt = false
+[diff]
+ tool = bat
diff --git a/config/nvim/lua/plugins.lua b/config/nvim/lua/plugins.lua
index ddfd50f..6eae912 100644
--- a/config/nvim/lua/plugins.lua
+++ b/config/nvim/lua/plugins.lua
@@ -257,7 +257,6 @@ return require("packer").startup(function()
end
}
-
-- comment text objects
use {
"numToStr/Comment.nvim",
@@ -265,34 +264,37 @@ return require("packer").startup(function()
require("Comment").setup()
end
}
+
-- gruvbox color scheme
- -- use {
- -- "ellisonleao/gruvbox.nvim",
- -- requires = {"rktjmp/lush.nvim"},
- -- config = function()
- -- vim.opt.termguicolors = true
- -- vim.opt.background = "dark"
- -- -- vim.cmd [[ colorscheme gruvbox ]]
- -- vim.g.gruvbox_italic = 1
- -- vim.g.gruvbox_bold = 1
- -- vim.g.gruvbox_termcolors = 256
- -- vim.g.gruvbox_contrast_dark = "medium"
- -- vim.g.gruvbox_contrast_light = "hard"
- -- vim.g.gruvbox_invert_selection = 0
- -- end
- -- }
- -- nord color scheme
use {
- "shaunsingh/nord.nvim",
+ "ellisonleao/gruvbox.nvim",
+ requires = {"rktjmp/lush.nvim"},
config = function()
vim.opt.termguicolors = true
vim.opt.background = "dark"
- vim.cmd [[ colorscheme nord ]]
- vim.g.nord_contrast = true
- vim.g.nord_borders = true
- vim.g.nord_italic = true
+ vim.cmd [[ colorscheme gruvbox ]]
+ vim.g.gruvbox_italic = 1
+ vim.g.gruvbox_bold = 1
+ vim.g.gruvbox_termcolors = 256
+ vim.g.gruvbox_contrast_dark = "medium"
+ vim.g.gruvbox_contrast_light = "hard"
+ vim.g.gruvbox_invert_selection = 0
end
}
+
+ -- nord color scheme
+ -- use {
+ -- "shaunsingh/nord.nvim",
+ -- config = function()
+ -- vim.opt.termguicolors = true
+ -- vim.opt.background = "dark"
+ -- vim.cmd [[ colorscheme nord ]]
+ -- vim.g.nord_contrast = true
+ -- vim.g.nord_borders = true
+ -- vim.g.nord_italic = true
+ -- end
+ -- }
+
-- status line
use {
"nvim-lualine/lualine.nvim",
@@ -300,8 +302,8 @@ return require("packer").startup(function()
config = function()
require("lualine").setup {
options = {
- -- theme = "gruvbox",
- theme = "nord",
+ theme = "gruvbox",
+ -- theme = "nord",
icons_enabled = true,
section_separators = '',
component_separators = '',
@@ -309,6 +311,7 @@ return require("packer").startup(function()
}
end
}
+
-- better syntax highlight for everything
use {
"nvim-treesitter/nvim-treesitter",
@@ -333,6 +336,7 @@ return require("packer").startup(function()
vim.cmd [[ highlight link pythonTSKeywordOperator Keyword ]]
end
}
+
-- fuzzy finder (replace fzf.vim or ctrlp.vim)
use {
"nvim-telescope/telescope.nvim",
@@ -369,6 +373,7 @@ return require("packer").startup(function()
end
}
+
-- todos,fix,etc.. highlight and list
use {
"folke/todo-comments.nvim",
diff --git a/config/nvim/lua/telescope-config.lua b/config/nvim/lua/telescope-config.lua
index fbb0c79..5f3fac4 100644
--- a/config/nvim/lua/telescope-config.lua
+++ b/config/nvim/lua/telescope-config.lua
@@ -2,7 +2,7 @@
local M = {}
M.project_files = function()
- local opts = {} -- define here if you want to define something
+ local opts = { show_untracked = true }
local ok = pcall(require"telescope.builtin".git_files, opts)
if not ok then
require"telescope.builtin".find_files(opts)
diff --git a/config/tmux/tmux.conf b/config/tmux/tmux.conf
index 777810f..eb20984 100644
--- a/config/tmux/tmux.conf
+++ b/config/tmux/tmux.conf
@@ -29,9 +29,9 @@ bind R source-file ~/.config/tmux/tmux.conf
set -g status-right-length 100
set -g @plugin 'tmux-plugins/tpm'
-# set -g @plugin 'egel/tmux-gruvbox'
-# set -g @tmux-gruvbox 'dark'
-set -g @plugin 'arcticicestudio/nord-tmux'
+set -g @plugin 'egel/tmux-gruvbox'
+set -g @tmux-gruvbox 'dark'
+# set -g @plugin 'arcticicestudio/nord-tmux'
set -g @plugin 'tmux-plugins/tmux-prefix-highlight'
set -g @plugin 'wfxr/tmux-fzf-url'
diff --git a/config/x11/xinitrc b/config/x11/xinitrc
index 2771e72..f5b65f5 100755
--- a/config/x11/xinitrc
+++ b/config/x11/xinitrc
@@ -1,10 +1,5 @@
#!/bin/sh
-# certain event cause rate to reset (https://wiki.archlinux.org/title/Xorg/Keyboard_configuration)
-# -ardelay milliseconds
-# -arinterval milliseconds
-xset r rate 200 50 # delay before keyrepeat and keyrepeat rate
-
keynav daemonize # moving the cursor around without the mouse
redshift & # filter blue light
dunst & # notification daemon
diff --git a/config/xmonad/xmonad.hs b/config/xmonad/xmonad.hs
index a94df43..ea547f1 100644
--- a/config/xmonad/xmonad.hs
+++ b/config/xmonad/xmonad.hs
@@ -5,6 +5,7 @@ import System.Exit
import XMonad
import XMonad.Config.Desktop (desktopConfig)
+import XMonad.ManageHook (composeAll, doFloat, className, (-->), (=?), (<+>))
-- Utilities
import XMonad.Util.Dmenu (menuArgs)
@@ -36,7 +37,7 @@ main = xmonad $ desktopConfig
, borderWidth = 2
, focusFollowsMouse = False -- don't change window based on mouse position (need to click)
, workspaces = ["code", "web"] ++ map show [3..9]
- , startupHook = startupHook'
+ -- , startupHook = startupHook'
} `additionalKeysP` keys'
@@ -49,7 +50,12 @@ layoutHook' = spacing' 4 $ reflectHoriz tiledVerticalBigMaster -- main monitor
tiledHorizontalEven = Tall 1 (3 / 100) (1 / 2)
spacing' x = spacingRaw True (Border x x x x) False (Border x x x x) True
-manageHook' = insertPosition End Newer -- insert new window at the end of the current layout
+manageHook' = composeAll
+ [ className =? "Anki" --> doFloat
+ , className =? "Steam" --> doFloat
+ , className =? "Gimp" --> doFloat
+ ]
+ <+> insertPosition End Newer -- insert new window at the end of the current layout
keys' = [ ("<XF86AudioLowerVolume>", spawn "pulseaudio-ctl down")
, ("<XF86AudioRaiseVolume>", spawn "pulseaudio-ctl up")
@@ -73,10 +79,10 @@ keys' = [ ("<XF86AudioLowerVolume>", spawn "pulseaudio-ctl down")
, ("M-S-q", confirm "Are you sure you want to shutdown?" $ io (exitWith ExitSuccess))
]
-startupHook' :: X ()
-startupHook' = do
- spawnOnOnce "code" myTerminal
- spawnOnOnce "web" "qutebrowser"
+-- startupHook' :: X ()
+-- startupHook' = do
+ -- spawnOnOnce "code" myTerminal
+ -- spawnOnOnce "web" "qutebrowser"
confirm :: String -> X () -> X ()
confirm prompt f = do
diff --git a/config/zsh/.zshrc b/config/zsh/.zshrc
index e7dac3d..dbaaa90 100644
--- a/config/zsh/.zshrc
+++ b/config/zsh/.zshrc
@@ -9,7 +9,7 @@ case $(tty) in
/dev/tty[1-9])
# %~ path ('~' if $HOME)
# %B/%b start/stop bold
- # %B/%b start/stop color
+ # %F/%f start/stop color
# shellcheck disable=SC2039,SC3003
NEWLINE=$'\n'
export PROMPT="${NEWLINE}%B%F{blue}%~%f${NEWLINE}%F{red}> %f%b"
@@ -109,31 +109,5 @@ then
. /usr/share/doc/pkgfile/command-not-found.zsh
fi
-# upload-config() {
-# scp -qr "$HOME/.vim" cce424r@ds-train:
-# scp -q "$HOME/.config/vim/vimrc" cce424r@ds-train:.vimrc
-#
-# scp -qr "$HOME/.vim" cce424r@ds-attic:
-# scp -q "$HOME/.config/vim/vimrc" cce424r@ds-attic:.vimrc
-# }
-
-# >>> conda initialize >>>
-# !! Contents within this block are managed by 'conda init' !!
-__conda_setup="$('/usr/local/anaconda3/bin/conda' 'shell.zsh' 'hook' 2> /dev/null)"
-if [ $? -eq 0 ]; then
- eval "$__conda_setup"
-else
- if [ -f "/usr/local/anaconda3/etc/profile.d/conda.sh" ]; then
- . "/usr/local/anaconda3/etc/profile.d/conda.sh"
- else
- export PATH="/usr/local/anaconda3/bin:$PATH"
- fi
-fi
-unset __conda_setup
-
-if [ -f "/usr/local/anaconda3/etc/profile.d/mamba.sh" ]; then
- . "/usr/local/anaconda3/etc/profile.d/mamba.sh"
-fi
-# <<< conda initialize <<<
-
-eval "$(opam env)"
+export ROS_DOMAIN_ID=42
+. /opt/ros2/galactic/setup.zsh
diff --git a/config/zsh/aliases.zsh b/config/zsh/aliases.zsh
index 54c9f99..d386ac6 100644
--- a/config/zsh/aliases.zsh
+++ b/config/zsh/aliases.zsh
@@ -35,7 +35,7 @@ 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'"
+alias ti="tree --matchdirs -I __pycache__ -I node_modules -I '*.o' -I build"
# man
alias ma="man"
@@ -70,8 +70,9 @@ 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"
+alias grv='git remote -v'
+alias gra='git remote add'
+alias gb='git branch'
gpa() {
branch="$1"
[ -z "$branch" ] && branch=$(git branch | grep '^\* .*$' | cut -d ' ' -f 2)
diff --git a/config/zsh/zprofile b/config/zsh/zprofile
index ecf3ca7..f05d43e 100755
--- a/config/zsh/zprofile
+++ b/config/zsh/zprofile
@@ -83,6 +83,9 @@ export CLOUT_SYNC_PATH="${XDG_DATA_HOME:-$HOME/.sync}/$CLOUT_SYNC_DIR"
if [ "$(uname)" = 'Linux' ] && [ "$(tty)" = '/dev/tty1' ]
then
- startx "$XDG_CONFIG_HOME/x11/xinitrc"
+ # https://wiki.archlinux.org/title/Xorg/Keyboard_configuration
+ # setting the keyrepeat delay and interval here as the default ones
+ # since some applications reset the those if we use xset r rate 200 30 instead
+ startx "$XDG_CONFIG_HOME/x11/xinitrc" -- -ardelay 200 -arinterval 30
poweroff
fi