Compare commits
17 commits
98d76b0abb
...
a6ff7a3296
Author | SHA1 | Date | |
---|---|---|---|
a6ff7a3296 | |||
31225cd3fb | |||
7eee477083 | |||
106857a82d | |||
ed10acc2fe | |||
de6e78ab66 | |||
da06c4398e | |||
bf838b7d7c | |||
0cfd63830c | |||
d13c07e1eb | |||
a4dc2143d6 | |||
1dc7138ccc | |||
d7b50a81f3 | |||
68dd9f9ed2 | |||
8bda12555b | |||
f56d6c5a37 | |||
2f7afb47de |
20 changed files with 87 additions and 58 deletions
|
@ -1,4 +1,6 @@
|
|||
require("core.variables")
|
||||
require("core.keymaps")
|
||||
require("core.autocmds")
|
||||
require('core.package_manager')
|
||||
require('winbar')
|
||||
require('core.theme')
|
||||
|
|
|
@ -35,10 +35,11 @@
|
|||
"oil.nvim": { "branch": "master", "commit": "2cb39e838e9dcd8b374f09a3a87a2e5ec9d372f6" },
|
||||
"pastify.nvim": { "branch": "main", "commit": "47317b9bb7bf5fb7dfd994a6eb9bec8f00628dc0" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "a3e3bc82a3f95c5ed0d7201546d5d2c19b20d683" },
|
||||
"presence.nvim": { "branch": "main", "commit": "87c857a56b7703f976d3a5ef15967d80508df6e6" },
|
||||
"todo-comments.nvim": { "branch": "main", "commit": "e1549807066947818113a7d7ed48f637e49620d3" },
|
||||
"undotree": { "branch": "master", "commit": "56c684a805fe948936cda0d1b19505b84ad7e065" },
|
||||
"vim-surround": { "branch": "master", "commit": "3d188ed2113431cf8dac77be61b842acb64433d9" },
|
||||
"vim-tpipeline": { "branch": "master", "commit": "5dd3832bd6e239feccb11cadca583cdcf9d5bda1" },
|
||||
"vimtex": { "branch": "master", "commit": "9665df7f51ee24aa81dbd81782e0a22480209753" }
|
||||
"vim-visual-multi": { "branch": "master", "commit": "b84a6d42c1c10678928b0bf8327f378c8bc8af5a" },
|
||||
"vimtex": { "branch": "master", "commit": "9665df7f51ee24aa81dbd81782e0a22480209753" },
|
||||
"zen-mode.nvim": { "branch": "main", "commit": "78557d972b4bfbb7488e17b5703d25164ae64e6a" }
|
||||
}
|
8
.config/nvim/lua/core/autocmds.lua
Normal file
8
.config/nvim/lua/core/autocmds.lua
Normal file
|
@ -0,0 +1,8 @@
|
|||
vim.api.nvim_create_autocmd("VimLeavePre", {
|
||||
pattern = "*",
|
||||
callback = function()
|
||||
if vim.g.savesession then
|
||||
vim.api.nvim_command("mks! .session.vim")
|
||||
end
|
||||
end
|
||||
})
|
11
.config/nvim/lua/core/keymaps.lua
Normal file
11
.config/nvim/lua/core/keymaps.lua
Normal file
|
@ -0,0 +1,11 @@
|
|||
--Move lines
|
||||
vim.keymap.set("v", "J", ":m '>+1<CR>gv=gv")
|
||||
vim.keymap.set("v", "K", ":m '<-2<CR>gv=gv")
|
||||
--quickfix keybinds
|
||||
vim.keymap.set("n", "<C-p>", "<cmd>cprev<CR>zz")
|
||||
vim.keymap.set("n", "<C-n>", "<cmd>cnext<CR>zz")
|
||||
--buffer keybinds
|
||||
vim.keymap.set("n", "<A-h>", "<cmd>bp<CR>")
|
||||
vim.keymap.set("n", "<A-l>", "<cmd>bn<CR>")
|
||||
--jk as escape
|
||||
vim.keymap.set("i", "jk","<esc>")
|
|
@ -9,9 +9,6 @@ vim.wo.relativenumber= true
|
|||
vim.opt.hlsearch = false
|
||||
vim.opt.incsearch = true
|
||||
vim.opt.smartindent = true
|
||||
--Move lines
|
||||
vim.keymap.set("v", "J", ":m '>+1<CR>gv=gv")
|
||||
vim.keymap.set("v", "K", ":m '<-2<CR>gv=gv")
|
||||
--Change word definition
|
||||
vim.opt.iskeyword:append("-")
|
||||
vim.opt.iskeyword:append("_")
|
||||
|
@ -24,16 +21,12 @@ vim.opt.tabstop = 4
|
|||
vim.opt.softtabstop = 4
|
||||
vim.opt.shiftwidth = 4
|
||||
vim.opt.expandtab = true
|
||||
--quickfix keybinds
|
||||
vim.keymap.set("n", "<C-p>", "<cmd>cprev<CR>zz")
|
||||
vim.keymap.set("n", "<C-n>", "<cmd>cnext<CR>zz")
|
||||
--buffer keybinds
|
||||
vim.keymap.set("n", "<A-h>", "<cmd>bp<CR>")
|
||||
vim.keymap.set("n", "<A-l>", "<cmd>bn<CR>")
|
||||
--Undo dir
|
||||
vim.opt.undodir = os.getenv("XDG_STATE_HOME") .. "/nvim/undodir"
|
||||
vim.opt.undofile = true
|
||||
--Backup dir
|
||||
vim.opt.backup = true
|
||||
vim.opt.backupdir = os.getenv("XDG_STATE_HOME") .. "/nvim/backupdir"
|
||||
--Org mode hide links
|
||||
vim.opt.conceallevel = 2
|
||||
vim.opt.concealcursor = 'nc'
|
||||
|
|
|
@ -23,4 +23,11 @@ return {
|
|||
event = "VeryLazy",
|
||||
ft = 'qf'
|
||||
},
|
||||
{
|
||||
"folke/zen-mode.nvim",
|
||||
event = "VeryLazy",
|
||||
opts = {
|
||||
vim.keymap.set("n", "<leader>z", "<Cmd> ZenMode <CR>", { noremap = true, silent = true }),
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
@ -21,11 +21,11 @@ function M.render()
|
|||
-- sure to pick the longest prefix).
|
||||
---@type table<string, string>
|
||||
local special_dirs = {
|
||||
DOTFILES = "/Users/afonso/.config",
|
||||
DOTFILES = "$HOME/.config",
|
||||
HOME = vim.env.HOME,
|
||||
PROJECTS = "/Users/afonso/projects",
|
||||
["University"] = "/Users/afonso/projects/University",
|
||||
["Personal"] = "/Users/afonso/projects/Personal",
|
||||
PROJECTS = "$HOME/projects",
|
||||
["University"] = "$HOME/projects/University",
|
||||
["Personal"] = "$HOME/projects/Personal",
|
||||
}
|
||||
for dir_name, dir_path in pairs(special_dirs) do
|
||||
if vim.startswith(path, vim.fs.normalize(dir_path)) and #dir_path > #prefix_path then
|
||||
|
|
|
@ -11,7 +11,7 @@ animation-dampening = 8;
|
|||
# Corners #
|
||||
#################################
|
||||
# requires: https://github.com/sdhand/compton or https://github.com/jonaburg/picom
|
||||
corner-radius = 16.0;
|
||||
corner-radius = 4.0;
|
||||
rounded-corners-exclude = [
|
||||
#"window_type = 'normal'",
|
||||
"class_g = 'Rofi'",
|
||||
|
|
|
@ -30,7 +30,3 @@ bind-key 's' display-popup -E -w 90% -h 90% "~/.local/bin/tms"
|
|||
#Lazygit
|
||||
unbind g
|
||||
bind-key 'g' display-popup -d '#{pane_current_path}' -E -w 90% -h 90% "lazygit"
|
||||
|
||||
# Edit vim config
|
||||
unbind e
|
||||
bind-key 'e' display-popup -d '/Users/afonso/.config/nvim/' -E -w 90% -h 90% "nvim ."
|
||||
|
|
4
.config/xmonad/.gitignore
vendored
4
.config/xmonad/.gitignore
vendored
|
@ -1,5 +1,5 @@
|
|||
*.hi
|
||||
*.o
|
||||
**/*.o
|
||||
**/*.hi
|
||||
.ghc.*
|
||||
.stack-work
|
||||
stack.*
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# ~/.config/xmonad/build
|
||||
#!/bin/sh
|
||||
exec stack ghc -- \
|
||||
exec $HOME/.ghcup/bin/stack ghc -- \
|
||||
--make xmonad.hs \
|
||||
-i \
|
||||
-ilib \
|
||||
|
|
|
@ -44,8 +44,7 @@ import Colors.Teal
|
|||
|
||||
|
||||
|
||||
myTerminal = "kitty"
|
||||
myTerminalTmux = myTerminal ++ " -e tmux a"
|
||||
myTerminal = "alacritty"
|
||||
myTextEditor = "nvim"
|
||||
myWebBrowser = "firefox"
|
||||
myModMask = mod4Mask
|
||||
|
@ -70,7 +69,7 @@ myWorkspaceIndices = zip myWorkspaces [1..]
|
|||
|
||||
myKeys :: [(String, X ())]
|
||||
myKeys =
|
||||
[ ("M-x" ,spawn myTerminalTmux )
|
||||
[ ("M-t" ,spawn myTerminal )
|
||||
, ("M-p", spawn "rofi -show drun -show-icons")
|
||||
, ("M-S-p", spawn "rofi -show p -modi p:rofi-power-menu")
|
||||
, ("M-s", spawn "selected=$(ls ~/scripts/|rofi -dmenu -p \"Run: \") && bash ~/.config/rofi/scripts/$selected")
|
||||
|
@ -83,14 +82,14 @@ myKeys =
|
|||
, ("<XF86MonBrightnessDown>", spawn "lux -s 10%")
|
||||
, ("M-n", spawn $ myTerminal ++ " -e nmtui")
|
||||
, ("M-q", kill)
|
||||
, ("M-S-<Space>", sendMessage NextLayout)
|
||||
, ("M-<Space>", sendMessage NextLayout)
|
||||
, ("M-<Down>", windows W.focusDown)
|
||||
, ("M-<Up>", windows W.focusUp )
|
||||
, ("M-m", windows W.focusMaster )
|
||||
, ("M-<Return>", windows W.swapMaster)
|
||||
, ("M-h", sendMessage Shrink)
|
||||
, ("M-l", sendMessage Expand)
|
||||
, ("M-t", withFocused $ windows . W.sink)
|
||||
, ("M-S-t", withFocused $ windows . W.sink)
|
||||
, ("M-S-u", io (exitWith ExitSuccess))
|
||||
, ("M-u", spawn "xmonad --recompile; xmonad --restart")
|
||||
]
|
||||
|
@ -123,7 +122,7 @@ myManageHook = composeAll
|
|||
, className =? "discord" --> doShift (myWorkspaces !! 4)
|
||||
, title =? "JetBrains Toolbox" --> doShift (myWorkspaces !! 3)
|
||||
, className =? "main" --> doFloat
|
||||
, className =? "Mailspring" --> doShift (myWorkspaces !! 5)
|
||||
, className =? "thunderbird" --> doShift (myWorkspaces !! 5)
|
||||
, className =? "Xmessage" --> doFloat
|
||||
, title =? "Steam - News" --> doFloat
|
||||
, title =? "Friends List" --> doFloat
|
||||
|
@ -133,19 +132,21 @@ myManageHook = composeAll
|
|||
myEventHook = ewmhDesktopsEventHook
|
||||
|
||||
myStartupHook = do
|
||||
spawnOnce "dunst &"
|
||||
spawnOnce "kwalletd6"
|
||||
spawnOnce "pasystray"
|
||||
spawnOnce "nitrogen --restore &"
|
||||
spawnOnce "playerctld"
|
||||
spawnOnce "qpwgraph"
|
||||
spawnOnce "picom &"
|
||||
setWMName "LG3D"
|
||||
spawnOnce "nm-applet"
|
||||
spawnOnce "$HOME/.local/bin/desktopres"
|
||||
spawnOnce "xsetroot -cursor_name left_ptr"
|
||||
spawnOnce "killall trayer ;sleep 1 && trayer --monitor 0 --edge top --align right --margin 4 --widthtype request --padding 8 --iconspacing 12 --SetDockType true --SetPartialStrut true --expand true --transparent true --alpha 0 --tint 0x2B2E37 --height 30 --distance 5 &"
|
||||
spawnOnce "slimbookbattery --minimize"
|
||||
spawnOnce "slimbookintelcontroller"
|
||||
spawnOnce "nextcloud"
|
||||
spawnOnOnce "web" myWebBrowser
|
||||
spawnOnOnce "main" myTerminalTmux
|
||||
spawnOnOnce "main" myTerminal
|
||||
|
||||
|
||||
mySB = statusBarProp "/home/afonso/.local/bin/xmobar /home/afonso/.config/xmobar/xmobarrc" (pure myXmobarPP)
|
||||
|
@ -163,6 +164,7 @@ myXmobarPP = def
|
|||
where
|
||||
wsIconFull = " <fn=2>\xf111</fn> "
|
||||
|
||||
myLayoutHook = (Tall 1 (3/100) (0.5)) ||| (Mirror $ Tall 1 (3/100) (0.5))
|
||||
|
||||
myConfig = def
|
||||
{
|
||||
|
@ -174,7 +176,7 @@ myConfig = def
|
|||
workspaces = myWorkspaces,
|
||||
normalBorderColor = myNormalBorderColor,
|
||||
focusedBorderColor = myFocusedBorderColor,
|
||||
layoutHook = avoidStruts $ smartBorders . smartSpacingWithEdge 5 $ layoutHook def,
|
||||
layoutHook = avoidStruts $ smartBorders $ myLayoutHook,
|
||||
manageHook = manageSpawn <+> myManageHook <+> manageHook def,
|
||||
handleEventHook = myEventHook <+> fullscreenEventHook,
|
||||
startupHook = myStartupHook
|
||||
|
|
3
.config/zsh-abbr/user-abbreviations
Normal file
3
.config/zsh-abbr/user-abbreviations
Normal file
|
@ -0,0 +1,3 @@
|
|||
abbr "i"="sudo pacman -S"
|
||||
abbr "r"="sudo pacman -Rns"
|
||||
abbr "s"="sudo pacman -Ss"
|
|
@ -1,3 +1,7 @@
|
|||
ZSH_AUTOSUGGEST_STRATEGY=(match_prev_cmd history completion)
|
||||
ZSH_TMUX_AUTOSTART=true
|
||||
|
||||
if [[ ! $(tty) =~ ^/dev/tty[0-9]*$ ]]; then
|
||||
ZSH_TMUX_AUTOSTART=true
|
||||
fi
|
||||
|
||||
zstyle ':fzf-tab:complete:cd:*' fzf-preview 'eza -1 --color=always $realpath'
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
# ~/.config/zsh/pacman.zsh
|
||||
|
||||
alias i="brew install"
|
||||
alias s="brew search"
|
||||
alias r="brew uninstall"
|
||||
|
|
@ -2,7 +2,18 @@
|
|||
|
||||
alias ls="eza --icons -l --sort type"
|
||||
|
||||
alias vim="nvim --listen /tmp/nvim.pipe"
|
||||
function vim {
|
||||
if [[ -z "$@" ]]; then
|
||||
if [[ -f "./.session.vim" ]]; then
|
||||
nvim -S .session.vim --listen /tmp/nvim.pipe -c 'lua vim.g.savesession = true'
|
||||
else
|
||||
nvim --listen /tmp/nvim.pipe -c 'lua vim.g.savesession = true'
|
||||
fi
|
||||
else
|
||||
nvim --listen /tmp/nvim.pipe "$@"
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
alias lg="lazygit"
|
||||
alias calcurse-caldav='CALCURSE_CALDAV_PASSWORD=$(keyring get caldav afonso) calcurse-caldav'
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/sh
|
||||
for id in `xinput --list | awk '/Razer Razer DeathAdder V3 Pro .*pointer/ {print $8}' | sed 's/id=\(.*\)/\1/'`; do
|
||||
notify-send "Applied Mouse Rotation"
|
||||
xinput set-prop $id "Coordinate Transformation Matrix" 0.9848 0.1736 0 -0.1736 0.9848 0 0 0 1
|
||||
xinput set-prop $id "libinput Rotation Angle" 350
|
||||
sleep 1
|
||||
done
|
||||
|
|
21
.xinitrc
21
.xinitrc
|
@ -32,22 +32,15 @@ if [ -d /etc/X11/xinit/xinitrc.d ] ; then
|
|||
fi
|
||||
|
||||
setxkbmap -layout us,pt
|
||||
setxkbmap -option grp:win_space_toggle
|
||||
setxkbmap -option grp:alt_space_toggle
|
||||
setxkbmap -option caps:escape
|
||||
xset r rate 300 50
|
||||
xrandr --output DP-0 --primary --mode 2560x1440 --left-of HDMI-0 --output HDMI-0 --mode 1920x1080
|
||||
dunst &
|
||||
xset r rate 300 40
|
||||
|
||||
if ! pgrep -f /usr/bin/easyeffects; then
|
||||
exec /usr/bin/easyeffects --gapplication-service &
|
||||
notify-send 'easyeffects daemon started'
|
||||
fi
|
||||
|
||||
gpu_mode=$(/usr/bin/envycontrol -q)
|
||||
if [ "$gpu_mode" = "nvidia" ]; then
|
||||
xrandr --setprovideroutputsource modesetting NVIDIA-0
|
||||
xrandr --auto
|
||||
fi
|
||||
#gpu_mode=$(/usr/bin/envycontrol -q)
|
||||
#if [ "$gpu_mode" = "nvidia" ]; then
|
||||
#xrandr --setprovideroutputsource modesetting NVIDIA-0
|
||||
#xrandr --auto
|
||||
#fi
|
||||
|
||||
|
||||
exec /home/afonso/.local/bin/xmonad
|
||||
|
|
4
.zshenv
4
.zshenv
|
@ -8,3 +8,7 @@ if [[ $(uname) == "Darwin" ]]; then
|
|||
export JAVA_HOME="/opt/homebrew/opt/openjdk@17/libexec/openjdk.jdk/Contents/Home"
|
||||
fi
|
||||
export LIBVA_DRIVER_NAME=nvidia
|
||||
export XDG_CONFIG_HOME="${HOME}/.config"
|
||||
export XDG_CACHE_HOME="${HOME}/.cache"
|
||||
export XDG_DATA_HOME="${HOME}/.local/share"
|
||||
export XDG_STATE_HOME="${HOME}/.local/state"
|
||||
|
|
4
.zshrc
4
.zshrc
|
@ -1,7 +1,7 @@
|
|||
# Add paths
|
||||
export PATH="/usr/sbin:/sbin:$PATH"
|
||||
export PATH="$HOME/.local/share/nvim/mason/bin:$PATH"
|
||||
export PATH="/Users/afonso/.local/bin:$PATH"
|
||||
export PATH="$HOME/.local/bin:$PATH"
|
||||
export PATH="/opt/homebrew/bin:$PATH"
|
||||
export PATH="$HOME/go/bin:$PATH"
|
||||
export PATH="$HOME/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin:$PATH"
|
||||
|
@ -91,7 +91,7 @@ source $HOME/.config/zsh/themes/gruvbox_dark.zsh
|
|||
source $HOME/.config/zsh/overrides.zsh
|
||||
|
||||
zvm_after_init_commands+=('[ -f $HOME/.fzf.zsh ] && source $HOME/.fzf.zsh')
|
||||
plugins=(zsh-vi-mode git sudo macos tmux command-not-found web-search zsh-autosuggestions zsh-history-substring-search zsh-syntax-highlighting fzf-tab)
|
||||
plugins=(zsh-vi-mode git sudo macos tmux command-not-found web-search zsh-autosuggestions zsh-history-substring-search zsh-syntax-highlighting fzf-tab zsh-abbr)
|
||||
|
||||
|
||||
#Completions
|
||||
|
|
Loading…
Reference in a new issue