Compare commits
No commits in common. "a6ff7a3296d345d46316100b8b1855f594b5e96a" and "98d76b0abbfe933092f2cdfee247faf659ddf73f" have entirely different histories.
a6ff7a3296
...
98d76b0abb
20 changed files with 58 additions and 87 deletions
|
@ -1,6 +1,4 @@
|
|||
require("core.variables")
|
||||
require("core.keymaps")
|
||||
require("core.autocmds")
|
||||
require('core.package_manager')
|
||||
require('winbar')
|
||||
require('core.theme')
|
||||
|
|
|
@ -35,11 +35,10 @@
|
|||
"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" },
|
||||
"vim-visual-multi": { "branch": "master", "commit": "b84a6d42c1c10678928b0bf8327f378c8bc8af5a" },
|
||||
"vimtex": { "branch": "master", "commit": "9665df7f51ee24aa81dbd81782e0a22480209753" },
|
||||
"zen-mode.nvim": { "branch": "main", "commit": "78557d972b4bfbb7488e17b5703d25164ae64e6a" }
|
||||
"vimtex": { "branch": "master", "commit": "9665df7f51ee24aa81dbd81782e0a22480209753" }
|
||||
}
|
|
@ -1,8 +0,0 @@
|
|||
vim.api.nvim_create_autocmd("VimLeavePre", {
|
||||
pattern = "*",
|
||||
callback = function()
|
||||
if vim.g.savesession then
|
||||
vim.api.nvim_command("mks! .session.vim")
|
||||
end
|
||||
end
|
||||
})
|
|
@ -1,11 +0,0 @@
|
|||
--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,6 +9,9 @@ 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("_")
|
||||
|
@ -21,12 +24,16 @@ 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,11 +23,4 @@ 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 = "$HOME/.config",
|
||||
DOTFILES = "/Users/afonso/.config",
|
||||
HOME = vim.env.HOME,
|
||||
PROJECTS = "$HOME/projects",
|
||||
["University"] = "$HOME/projects/University",
|
||||
["Personal"] = "$HOME/projects/Personal",
|
||||
PROJECTS = "/Users/afonso/projects",
|
||||
["University"] = "/Users/afonso/projects/University",
|
||||
["Personal"] = "/Users/afonso/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 = 4.0;
|
||||
corner-radius = 16.0;
|
||||
rounded-corners-exclude = [
|
||||
#"window_type = 'normal'",
|
||||
"class_g = 'Rofi'",
|
||||
|
|
|
@ -30,3 +30,7 @@ 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 @@
|
|||
**/*.o
|
||||
**/*.hi
|
||||
*.hi
|
||||
*.o
|
||||
.ghc.*
|
||||
.stack-work
|
||||
stack.*
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# ~/.config/xmonad/build
|
||||
#!/bin/sh
|
||||
exec $HOME/.ghcup/bin/stack ghc -- \
|
||||
exec stack ghc -- \
|
||||
--make xmonad.hs \
|
||||
-i \
|
||||
-ilib \
|
||||
|
|
|
@ -44,7 +44,8 @@ import Colors.Teal
|
|||
|
||||
|
||||
|
||||
myTerminal = "alacritty"
|
||||
myTerminal = "kitty"
|
||||
myTerminalTmux = myTerminal ++ " -e tmux a"
|
||||
myTextEditor = "nvim"
|
||||
myWebBrowser = "firefox"
|
||||
myModMask = mod4Mask
|
||||
|
@ -69,7 +70,7 @@ myWorkspaceIndices = zip myWorkspaces [1..]
|
|||
|
||||
myKeys :: [(String, X ())]
|
||||
myKeys =
|
||||
[ ("M-t" ,spawn myTerminal )
|
||||
[ ("M-x" ,spawn myTerminalTmux )
|
||||
, ("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")
|
||||
|
@ -82,14 +83,14 @@ myKeys =
|
|||
, ("<XF86MonBrightnessDown>", spawn "lux -s 10%")
|
||||
, ("M-n", spawn $ myTerminal ++ " -e nmtui")
|
||||
, ("M-q", kill)
|
||||
, ("M-<Space>", sendMessage NextLayout)
|
||||
, ("M-S-<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-S-t", withFocused $ windows . W.sink)
|
||||
, ("M-t", withFocused $ windows . W.sink)
|
||||
, ("M-S-u", io (exitWith ExitSuccess))
|
||||
, ("M-u", spawn "xmonad --recompile; xmonad --restart")
|
||||
]
|
||||
|
@ -122,7 +123,7 @@ myManageHook = composeAll
|
|||
, className =? "discord" --> doShift (myWorkspaces !! 4)
|
||||
, title =? "JetBrains Toolbox" --> doShift (myWorkspaces !! 3)
|
||||
, className =? "main" --> doFloat
|
||||
, className =? "thunderbird" --> doShift (myWorkspaces !! 5)
|
||||
, className =? "Mailspring" --> doShift (myWorkspaces !! 5)
|
||||
, className =? "Xmessage" --> doFloat
|
||||
, title =? "Steam - News" --> doFloat
|
||||
, title =? "Friends List" --> doFloat
|
||||
|
@ -132,21 +133,19 @@ 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" myTerminal
|
||||
spawnOnOnce "main" myTerminalTmux
|
||||
|
||||
|
||||
mySB = statusBarProp "/home/afonso/.local/bin/xmobar /home/afonso/.config/xmobar/xmobarrc" (pure myXmobarPP)
|
||||
|
@ -164,7 +163,6 @@ myXmobarPP = def
|
|||
where
|
||||
wsIconFull = " <fn=2>\xf111</fn> "
|
||||
|
||||
myLayoutHook = (Tall 1 (3/100) (0.5)) ||| (Mirror $ Tall 1 (3/100) (0.5))
|
||||
|
||||
myConfig = def
|
||||
{
|
||||
|
@ -176,7 +174,7 @@ myConfig = def
|
|||
workspaces = myWorkspaces,
|
||||
normalBorderColor = myNormalBorderColor,
|
||||
focusedBorderColor = myFocusedBorderColor,
|
||||
layoutHook = avoidStruts $ smartBorders $ myLayoutHook,
|
||||
layoutHook = avoidStruts $ smartBorders . smartSpacingWithEdge 5 $ layoutHook def,
|
||||
manageHook = manageSpawn <+> myManageHook <+> manageHook def,
|
||||
handleEventHook = myEventHook <+> fullscreenEventHook,
|
||||
startupHook = myStartupHook
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
abbr "i"="sudo pacman -S"
|
||||
abbr "r"="sudo pacman -Rns"
|
||||
abbr "s"="sudo pacman -Ss"
|
|
@ -1,7 +1,3 @@
|
|||
ZSH_AUTOSUGGEST_STRATEGY=(match_prev_cmd history completion)
|
||||
|
||||
if [[ ! $(tty) =~ ^/dev/tty[0-9]*$ ]]; then
|
||||
ZSH_TMUX_AUTOSTART=true
|
||||
fi
|
||||
|
||||
zstyle ':fzf-tab:complete:cd:*' fzf-preview 'eza -1 --color=always $realpath'
|
||||
|
|
6
.config/zsh/pacman.zsh
Normal file
6
.config/zsh/pacman.zsh
Normal file
|
@ -0,0 +1,6 @@
|
|||
# ~/.config/zsh/pacman.zsh
|
||||
|
||||
alias i="brew install"
|
||||
alias s="brew search"
|
||||
alias r="brew uninstall"
|
||||
|
|
@ -2,18 +2,7 @@
|
|||
|
||||
alias ls="eza --icons -l --sort type"
|
||||
|
||||
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 vim="nvim --listen /tmp/nvim.pipe"
|
||||
|
||||
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 "libinput Rotation Angle" 350
|
||||
xinput set-prop $id "Coordinate Transformation Matrix" 0.9848 0.1736 0 -0.1736 0.9848 0 0 0 1
|
||||
sleep 1
|
||||
done
|
||||
|
|
21
.xinitrc
21
.xinitrc
|
@ -32,15 +32,22 @@ if [ -d /etc/X11/xinit/xinitrc.d ] ; then
|
|||
fi
|
||||
|
||||
setxkbmap -layout us,pt
|
||||
setxkbmap -option grp:alt_space_toggle
|
||||
setxkbmap -option grp:win_space_toggle
|
||||
setxkbmap -option caps:escape
|
||||
xset r rate 300 40
|
||||
xset r rate 300 50
|
||||
xrandr --output DP-0 --primary --mode 2560x1440 --left-of HDMI-0 --output HDMI-0 --mode 1920x1080
|
||||
dunst &
|
||||
|
||||
#gpu_mode=$(/usr/bin/envycontrol -q)
|
||||
#if [ "$gpu_mode" = "nvidia" ]; then
|
||||
#xrandr --setprovideroutputsource modesetting NVIDIA-0
|
||||
#xrandr --auto
|
||||
#fi
|
||||
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
|
||||
|
||||
|
||||
exec /home/afonso/.local/bin/xmonad
|
||||
|
|
4
.zshenv
4
.zshenv
|
@ -8,7 +8,3 @@ 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="$HOME/.local/bin:$PATH"
|
||||
export PATH="/Users/afonso/.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 zsh-abbr)
|
||||
plugins=(zsh-vi-mode git sudo macos tmux command-not-found web-search zsh-autosuggestions zsh-history-substring-search zsh-syntax-highlighting fzf-tab)
|
||||
|
||||
|
||||
#Completions
|
||||
|
|
Loading…
Reference in a new issue