From abe0b5fa47d26f1eaa281fbb0dd1c8b758f61998 Mon Sep 17 00:00:00 2001 From: Charles Cabergs Date: Wed, 19 Jan 2022 16:53:32 +0100 Subject: Disabling xmonad starting qutebrowser on start --- config/xmonad/xmonad.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/xmonad/xmonad.hs b/config/xmonad/xmonad.hs index a94df43..3fe2ee8 100644 --- a/config/xmonad/xmonad.hs +++ b/config/xmonad/xmonad.hs @@ -76,7 +76,7 @@ keys' = [ ("", spawn "pulseaudio-ctl down") startupHook' :: X () startupHook' = do spawnOnOnce "code" myTerminal - spawnOnOnce "web" "qutebrowser" + -- spawnOnOnce "web" "qutebrowser" confirm :: String -> X () -> X () confirm prompt f = do -- cgit From f0ff92c55833a14de9d3fdcccdc29378768a9ba9 Mon Sep 17 00:00:00 2001 From: Charles Cabergs Date: Sat, 12 Feb 2022 17:43:36 +0100 Subject: Added alacritty font size change shortcuts --- config/alacritty/alacritty.linux.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/config/alacritty/alacritty.linux.yml b/config/alacritty/alacritty.linux.yml index 7ca4f80..fbeb1ed 100644 --- a/config/alacritty/alacritty.linux.yml +++ b/config/alacritty/alacritty.linux.yml @@ -29,6 +29,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 -- cgit From d78b602efc5b525f178b8e1b265b89f6dfda1580 Mon Sep 17 00:00:00 2001 From: Charles Cabergs Date: Sat, 9 Apr 2022 18:46:47 +0200 Subject: Better keyrepeat rate settings, added nvim live grep shortcut --- config/git/config.linux | 6 ++++++ config/nvim/lua/plugins.lua | 1 + config/x11/xinitrc | 5 ----- config/zsh/.zshrc | 2 +- config/zsh/aliases.zsh | 2 +- config/zsh/zprofile | 5 ++++- 6 files changed, 13 insertions(+), 8 deletions(-) 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 71498e9..a5cd5ce 100644 --- a/config/nvim/lua/plugins.lua +++ b/config/nvim/lua/plugins.lua @@ -181,6 +181,7 @@ return require('packer').startup(function() map('n', '', 'Telescope git_files', {}) map('n', 'H', 'Telescope help_tags', {}) map('n', ';', 'Telescope commands', {}) + map('n', 'g', 'Telescope live_grep', {}) end } 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/zsh/.zshrc b/config/zsh/.zshrc index 92c55c5..8ee4622 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" diff --git a/config/zsh/aliases.zsh b/config/zsh/aliases.zsh index 7832558..7488ac1 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" diff --git a/config/zsh/zprofile b/config/zsh/zprofile index b64522f..c9466d1 100755 --- a/config/zsh/zprofile +++ b/config/zsh/zprofile @@ -81,6 +81,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 -- cgit From 51a15d298c69fb50c39913877d6933a4885cb1f7 Mon Sep 17 00:00:00 2001 From: Charles Cabergs Date: Sat, 13 Aug 2022 16:22:56 +0200 Subject: Updated nvim theme to gruvbox --- config/nvim/lua/plugins.lua | 53 +++++++++++++++++++++++++-------------------- 1 file changed, 29 insertions(+), 24 deletions(-) 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", -- cgit From 1157a7ff99dae87d783dbac2a3b06b48d3c0b091 Mon Sep 17 00:00:00 2001 From: Charles Cabergs Date: Sat, 13 Aug 2022 16:29:49 +0200 Subject: Removing conda and opam from zshrc --- config/tmux/tmux.conf | 10 +++++----- config/zsh/.zshrc | 30 ------------------------------ 2 files changed, 5 insertions(+), 35 deletions(-) diff --git a/config/tmux/tmux.conf b/config/tmux/tmux.conf index 777810f..afaff80 100644 --- a/config/tmux/tmux.conf +++ b/config/tmux/tmux.conf @@ -29,11 +29,11 @@ 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 'tmux-plugins/tmux-prefix-highlight' -set -g @plugin 'wfxr/tmux-fzf-url' +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' # show copy/sync mode with tmux-prefix-highlight set -g @prefix_highlight_show_copy_mode 'on' diff --git a/config/zsh/.zshrc b/config/zsh/.zshrc index 57b49c5..39dd01b 100644 --- a/config/zsh/.zshrc +++ b/config/zsh/.zshrc @@ -108,33 +108,3 @@ if [ "$(uname)" = 'Linux' ] 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)" -# shellcheck disable=SC2181 -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)" -- cgit From dabec265b3eef63a96e14392e3918fcc3b154585 Mon Sep 17 00:00:00 2001 From: Charles Cabergs Date: Sun, 14 Aug 2022 20:50:21 +0200 Subject: Updated neovim telescope to also list untracked git files --- config/nvim/lua/telescope-config.lua | 2 +- config/tmux/tmux.conf | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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 afaff80..eb20984 100644 --- a/config/tmux/tmux.conf +++ b/config/tmux/tmux.conf @@ -32,8 +32,8 @@ 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 'tmux-plugins/tmux-prefix-highlight' -# set -g @plugin 'wfxr/tmux-fzf-url' +set -g @plugin 'tmux-plugins/tmux-prefix-highlight' +set -g @plugin 'wfxr/tmux-fzf-url' # show copy/sync mode with tmux-prefix-highlight set -g @prefix_highlight_show_copy_mode 'on' -- cgit From f1183f6d47892201f364a67c6ced3cedb3e4d788 Mon Sep 17 00:00:00 2001 From: Charles Cabergs Date: Mon, 15 Aug 2022 07:16:02 +0200 Subject: Removed spawning terminal on XMonad start --- config/xmonad/xmonad.hs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/config/xmonad/xmonad.hs b/config/xmonad/xmonad.hs index 3fe2ee8..aa90778 100644 --- a/config/xmonad/xmonad.hs +++ b/config/xmonad/xmonad.hs @@ -36,7 +36,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' @@ -73,9 +73,9 @@ keys' = [ ("", 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 +-- startupHook' :: X () +-- startupHook' = do + -- spawnOnOnce "code" myTerminal -- spawnOnOnce "web" "qutebrowser" confirm :: String -> X () -> X () -- cgit From 963d84a23c23b80fa3fa00c72b580adb636cf8e6 Mon Sep 17 00:00:00 2001 From: Charles Cabergs Date: Sun, 28 Aug 2022 09:58:35 +0200 Subject: Updated xmonad config to let come application use floating windows --- config/xmonad/xmonad.hs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/config/xmonad/xmonad.hs b/config/xmonad/xmonad.hs index aa90778..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) @@ -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' = [ ("", spawn "pulseaudio-ctl down") , ("", spawn "pulseaudio-ctl up") -- cgit From d54e8f15d776e59b2f8b70bb94c5041509b391f0 Mon Sep 17 00:00:00 2001 From: Charles Cabergs Date: Mon, 5 Sep 2022 16:40:13 +0200 Subject: Added ros zsh setup, Added git branch alias --- config/zsh/.zshrc | 3 +++ config/zsh/aliases.zsh | 5 +++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/config/zsh/.zshrc b/config/zsh/.zshrc index 39dd01b..dbaaa90 100644 --- a/config/zsh/.zshrc +++ b/config/zsh/.zshrc @@ -108,3 +108,6 @@ if [ "$(uname)" = 'Linux' ] then . /usr/share/doc/pkgfile/command-not-found.zsh fi + +export ROS_DOMAIN_ID=42 +. /opt/ros2/galactic/setup.zsh diff --git a/config/zsh/aliases.zsh b/config/zsh/aliases.zsh index d478fe3..a288c7f 100644 --- a/config/zsh/aliases.zsh +++ b/config/zsh/aliases.zsh @@ -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) -- cgit