Merge branch 'master' into laptop

This commit is contained in:
Thomas Avé 2024-01-20 22:18:54 +01:00
commit 133401b827
16 changed files with 146 additions and 71 deletions

View File

@ -1,5 +1,6 @@
env = WLR_DRM_DEVICES,/dev/dri/card0:/dev/dri/card1
env = WLR_NO_HARDWARE_CURSORS,1
env = TERMINAL,alacritty
monitor=,preferred,auto,1
exec-once=sudo wg-quick up wg0
@ -112,8 +113,8 @@ gestures {
$mainMod = SUPER
# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more
bindr = $mainMod, SUPER_L, exec, $scripts/toggle_rofi.sh
bindr = $mainMod, SUPER_R, exec, $scripts/toggle_rofi.sh
bindr = $mainMod, SUPER_L, exec, pkill rofi || rofi -show drun
bindr = $mainMod, SUPER_R, exec, pkill rofi || rofi -show drun
bind = $mainMod, return, exec, $scripts/launch_alacritty.sh $(hyprctl activewindow -j | jq .pid)
bind = $mainMod SHIFT, return, exec, alacritty
bind = $mainMod, Q, killactive,
@ -157,10 +158,10 @@ bind = $mainMod SHIFT, H, movewindow, l
bind = $mainMod SHIFT, L, movewindow, r
bind = $mainMod SHIFT, K, movewindow, u
bind = $mainMod SHIFT, J, movewindow, d
bind = $mainMod ALT, L, resizeactive, 20 0
bind = $mainMod ALT, H, resizeactive, -20 0
bind = $mainMod ALT, K, resizeactive, 0 -20
bind = $mainMod ALT, J, resizeactive, 0 20
binde = $mainMod ALT, L, resizeactive, 20 0
binde = $mainMod ALT, H, resizeactive, -20 0
binde = $mainMod ALT, K, resizeactive, 0 -20
binde = $mainMod ALT, J, resizeactive, 0 20
bind = $mainMod, 1, exec, hyprsome workspace 1
bind = $mainMod, 2, exec, hyprsome workspace 2

View File

@ -23,13 +23,13 @@ fi
OS=$(grep -E '^(NAME)=' /etc/os-release )
if [[ -z "${XDG_CONFIG_HOME}" ]]; then
mkdir -p $HOME/.config
XDG_CONFIG_HOME=$HOME/.config
mkdir -p "$HOME"/.config
XDG_CONFIG_HOME="$HOME"/.config
fi
if [[ -z "${XDG_DATA_HOME}" ]]; then
mkdir -p $HOME/.local/share
XDG_DATA_HOME=$HOME/.local/share
mkdir -p "$HOME"/.local/share
XDG_DATA_HOME="$HOME"/.local/share
fi
#################################################
@ -39,18 +39,18 @@ fi
if $NVIM; then
dependencies="neovim git unzip fzf cmake gcc make curl wget ripgrep npm"
if [[ $OS == "NAME=\"Arch Linux\"" ]]; then
$SUDO pacman -Sy --needed --noconfirm $dependencies npm go fd
$SUDO pacman -Sy --needed --noconfirm "$dependencies" npm go fd
elif [[ $OS == "NAME=\"Ubuntu\"" ]]; then
$SUDO apt update
$SUDO apt install -y software-properties-common
$SUDO add-apt-repository ppa:neovim-ppa/unstable -y
$SUDO curl -sL https://deb.nodesource.com/setup_21.x | $SUDO bash -
$SUDO apt update
$SUDO apt install -y $dependencies python3-venv nodejs golang fd-find
$SUDO apt install -y "$dependencies" python3-venv nodejs golang fd-find
fi
ln -s $PWD/nvim $XDG_CONFIG_HOME/nvim
ln -s $PWD/clang/.clang-tidy $HOME/.clang-tidy
ln -s "$PWD"/nvim "$XDG_CONFIG_HOME"/nvim
ln -s "$PWD"/clang/.clang-tidy "$HOME"/.clang-tidy
nvim --headless "+Lazy! sync" +qa
nvim --headless "+MasonInstall bash-language-server pyright typescript-language-server rust-analyzer clangd cmake-language-server css-lsp dockerfile-language-server emmet-ls gopls html-lsp jdtls json-lsp ltex-ls lua-language-server ruff-lsp rustfmt rustywind texlab vetur-vls vim-language-server yaml-language-server" +qa
@ -63,29 +63,29 @@ if $ZSH; then
PROFILE=true
dependencies="fzf zsh curl zoxide"
if [[ $OS == "NAME=\"Arch Linux\"" ]]; then
$SUDO pacman -Sy --needed --noconfirm $dependencies zsh-autosuggestions
$SUDO pacman -Sy --needed --noconfirm "$dependencies" zsh-autosuggestions
echo "Please manually install yay"
elif [[ $OS == "NAME=\"Ubuntu\"" ]]; then
$SUDO apt update
$SUDO apt install -y $dependencies
$SUDO apt install -y "$dependencies"
fi
ln -s $PWD/zsh $XDG_CONFIG_HOME/zsh
ln -s $PWD/zsh/.zshrc $HOME/.zshrc
mkdir -p $HOME/.local/state/zsh/
ln -s "$PWD"/zsh "$XDG_CONFIG_HOME"/zsh
ln -s "$PWD"/zsh/.zshrc "$HOME"/.zshrc
mkdir -p "$HOME"/.local/state/zsh/
git clone https://github.com/cxreg/smartcd.git /tmp/smartcd
cd /tmp/smartcd
cd /tmp/smartcd || exit
make install
ln -s $XDG_CONFIG_HOME/zsh/.smartcd_config $HOME/.smartcd_config
cd -
ln -s "$XDG_CONFIG_HOME"/zsh/.smartcd_config "$HOME"/.smartcd_config
cd - || exit
fi
#################################################
# Profile #
#################################################
if $PROFILE; then
rm -rf $HOME/.profile && ln -s $PWD/profile/.profile $HOME/.profile
rm -rf "$HOME"/.profile && ln -s "$PWD"/profile/.profile "$HOME"/.profile
fi
#################################################
@ -95,16 +95,16 @@ fi
if $AWESOME; then
dependencies="awesome picom numlockx xcape rofi"
if [[ $OS == "NAME=\"Arch Linux\"" ]]; then
$SUDO pacman -Sy --needed --noconfirm $dependencies network-manager-applet xorg-xmodmap adobe-source-code-pro-fonts noto-fonts ttf-nerd-fonts-symbols
$SUDO pacman -Sy --needed --noconfirm "$dependencies" network-manager-applet xorg-xmodmap adobe-source-code-pro-fonts noto-fonts ttf-nerd-fonts-symbols
elif [[ $OS == "NAME=\"Ubuntu\"" ]]; then
$SUDO apt update
$SUDO apt install -y $dependencies awesome-extra
$SUDO apt install -y "$dependencies" awesome-extra
fi
ln -s $PWD/awesome $XDG_CONFIG_HOME/awesome
ln -s $PWD/picom/picom.conf $XDG_CONFIG_HOME/picom.conf
ln -s $PWD/xmodmap/.Xmodmap $XDG_CONFIG_HOME/.Xmodmap
ln -s $PWD/rofi $XDG_CONFIG_HOME/rofi
ln -s "$PWD"/awesome "$XDG_CONFIG_HOME"/awesome
ln -s "$PWD"/picom/picom.conf "$XDG_CONFIG_HOME"/picom.conf
ln -s "$PWD"/xmodmap/.Xmodmap "$XDG_CONFIG_HOME"/.Xmodmap
ln -s "$PWD"/rofi "$XDG_CONFIG_HOME"/rofi
fi
#################################################
@ -123,7 +123,7 @@ if $ALACRITTY; then
$SUDO apt install -y $dependencies
fi
ln -s $PWD/alacritty $XDG_CONFIG_HOME/alacritty
ln -s "$PWD"/alacritty "$XDG_CONFIG_HOME"/alacritty
fi
#################################################
@ -139,7 +139,7 @@ if $MPV; then
$SUDO apt install -y $dependencies
fi
ln -s $PWD/mpv $XDG_CONFIG_HOME/mpv
ln -s "$PWD"/mpv "$XDG_CONFIG_HOME"/mpv
fi
#################################################
@ -149,18 +149,18 @@ fi
if $TMUX; then
dependencies="tmux git zsh xdg-utils"
if [[ $OS == "NAME=\"Arch Linux\"" ]]; then
$SUDO pacman -Sy --needed --noconfirm $dependencies
$SUDO pacman -Sy --needed --noconfirm "$dependencies"
ln -s $PWD/tmux $XDG_CONFIG_HOME/tmux
git clone https://github.com/tmux-plugins/tpm $XDG_DATA_HOME/tmux/plugins/tpm
$XDG_DATA_HOME/tmux/plugins/tpm/bin/install_plugins
ln -s "$PWD"/tmux "$XDG_CONFIG_HOME"/tmux
git clone https://github.com/tmux-plugins/tpm "$XDG_DATA_HOME"/tmux/plugins/tpm
"$XDG_DATA_HOME"/tmux/plugins/tpm/bin/install_plugins
elif [[ $OS == "NAME=\"Ubuntu\"" ]]; then
$SUDO apt update
$SUDO apt install -y $dependencies
$SUDO apt install -y "$dependencies"
ln -s $PWD/tmux $HOME/.tmux
ln -s $PWD/tmux/tmux.conf $HOME/.tmux.conf
git clone https://github.com/tmux-plugins/tpm $HOME/.tmux/plugins/tpm
$HOME/.tmux/plugins/tpm/bin/install_plugins
ln -s "$PWD"/tmux "$HOME"/.tmux
ln -s "$PWD"/tmux/tmux.conf "$HOME"/.tmux.conf
git clone https://github.com/tmux-plugins/tpm "$HOME"/.tmux/plugins/tpm
"$HOME"/.tmux/plugins/tpm/bin/install_plugins
fi
fi

View File

@ -16,19 +16,23 @@
"mason-lspconfig.nvim": { "branch": "main", "commit": "3ba1b92b771f33256b4969d696b82c8ae7075364" },
"mason.nvim": { "branch": "main", "commit": "e110bc3be1a7309617cecd77bfe4bf86ba1b8134" },
"neogit": { "branch": "master", "commit": "38dd297a905ec6869f4c20ea9184a3e514316e3b" },
"none-ls.nvim": { "branch": "main", "commit": "cf81e765460f722a381e5f3f5e3cbdce88398517" },
"nvim-autopairs": { "branch": "master", "commit": "9fd41181693dd4106b3e414a822bb6569924de81" },
"nvim-cmp": { "branch": "main", "commit": "538e37ba87284942c1d76ed38dd497e54e65b891" },
"nvim-lspconfig": { "branch": "master", "commit": "7eed8b2150192e5ad05e1886fdf133493ddf2928" },
"nvim-neoclip.lua": { "branch": "main", "commit": "798cd0592a81c185465db3a091a0ff8a21af60fd" },
"nvim-snippy": { "branch": "master", "commit": "8e4e39a4bf5f8939fcf4898d1fba48d1d1f72303" },
"nvim-tree.lua": { "branch": "master", "commit": "59e65d88db177ad1e6a8cffaafd4738420ad20b6" },
"nvim-treesitter": { "branch": "master", "commit": "07c8c3d84f67b1530f636dcad31971f569a3df5f" },
"nvim-web-devicons": { "branch": "master", "commit": "140edfcf25093e8b321d13e154cbce89ee868ca0" },
"oil.nvim": { "branch": "master", "commit": "dd432e76d01eda08b8658415588d011009478469" },
"plenary.nvim": { "branch": "master", "commit": "55d9fe89e33efd26f532ef20223e5f9430c8b0c0" },
"sqlite.lua": { "branch": "master", "commit": "b7e28c8463254c46a8e61c52d27d6a2040492fc3" },
"telescope-fzf-native.nvim": { "branch": "main", "commit": "6c921ca12321edaa773e324ef64ea301a1d0da62" },
"telescope-fzy-native.nvim": { "branch": "master", "commit": "282f069504515eec762ab6d6c89903377252bf5b" },
"telescope-undo.nvim": { "branch": "main", "commit": "d3afc1c105535a90caec092ce27a113f77ba7b84" },
"telescope.nvim": { "branch": "master", "commit": "da8b3d485975a8727bea127518b65c980521ae22" },
"todo-comments.nvim": { "branch": "main", "commit": "4a6737a8d70fe1ac55c64dfa47fcb189ca431872" },
"tree-sitter-hypr": { "branch": "master", "commit": "42aa7274b5f093cec92b7a5bab629ba26b4be439" },
"trim.nvim": { "branch": "master", "commit": "629b96a303a3a0bb5fd050e6cd9d627ca7831cc7" },
"trouble.nvim": { "branch": "main", "commit": "f1168feada93c0154ede4d1fe9183bf69bac54ea" },

View File

@ -14,7 +14,7 @@ return {
TelescopeBorder = { bg = "#191926", fg = "#191926" },
TelescopePromptBorder = { bg = "#191926", fg = "#191926" },
TelescopeTitle = { fg = colors.blue },
WinSeparator = { fg = "#191926" }
WinSeparator = { fg = "#023269" }
}
end,
color_overrides = {

View File

@ -6,7 +6,7 @@ return {
{'windwp/nvim-autopairs', event = "InsertEnter", opts = {}},
{'NeogitOrg/neogit', dependencies = {"nvim-lua/plenary.nvim", "nvim-telescope/telescope.nvim", "sindrets/diffview.nvim"}, config = true, lazy = true},
{'akinsho/bufferline.nvim', version = "*", dependencies = 'nvim-tree/nvim-web-devicons'},
{'folke/trouble.nvim', dependencies = {"nvim-tree/nvim-web-devicons"}, config = function () require('trouble').setup() end, lazy = true},
{'lervag/vimtex', ft='latex'},
{'numToStr/Comment.nvim', config = function () require('Comment').setup() end},
{ "folke/todo-comments.nvim", dependencies = { "nvim-lua/plenary.nvim" }, opts = {} }
}

View File

@ -0,0 +1,26 @@
return {
"AckslD/nvim-neoclip.lua",
dependencies = {
'nvim-telescope/telescope.nvim',
{'kkharji/sqlite.lua', module = 'sqlite'},
},
opts = {
continuous_sync = true,
enable_persistent_history = true,
keys = {
telescope = {
i = {
paste = "<cr>",
paste_behind = "<S-cr>",
},
n = {
paste = "<cr>",
paste_behind = "<S-cr>",
}
},
}
},
keys = {
{'<leader>c', '<cmd>Telescope neoclip<cr>'},
},
}

View File

@ -0,0 +1,21 @@
return {
"nvimtools/none-ls.nvim",
dependencies = { "mason.nvim", "nvim-lua/plenary.nvim" },
config = function()
local null_ls = require("null-ls")
null_ls.setup({
root_dir = require("null-ls.utils").root_pattern(".git", "Makefile", "CMakeLists.txt", "build/", "meson.build"),
sources = {
null_ls.builtins.completion.spell,
null_ls.builtins.code_actions.proselint,
null_ls.builtins.diagnostics.proselint,
null_ls.builtins.diagnostics.codespell,
null_ls.builtins.diagnostics.shellcheck,
null_ls.builtins.formatting.shellharden,
null_ls.builtins.formatting.shfmt,
-- null_ls.builtins.diagnostics.cppcheck,
null_ls.builtins.diagnostics.selene
}
})
end,
}

View File

@ -0,0 +1,12 @@
return {
'folke/trouble.nvim',
dependencies = {"nvim-tree/nvim-web-devicons"},
opts = {
action_keys = {
close = {"q", "<Esc>"},
jump = {"<cr>"},
toggle_fold = {"<tab>"},
}
},
lazy = true
}

View File

@ -10,7 +10,8 @@ local function should_load(path)
[2] = "json.hpp",
[3] = "build",
[4] = "third-party",
[5] = "sfml",
[5] = "sfml/",
[5] = "SFML/",
[6] = "TinyXML"
}
local match = {
@ -33,8 +34,8 @@ local function should_load(path)
end
function teaching.load()
require("nvim-tree").open()
require("trouble").open()
require("nvim-tree").open()
local scan = require("plenary.scandir").scan_dir('.')
local cwd = vim.fn.getcwd()
for _, v in ipairs(scan) do

1
nvim/selene.toml Normal file
View File

@ -0,0 +1 @@
std="lua51+vim"

2
nvim/vim.toml Normal file
View File

@ -0,0 +1,2 @@
[vim]
any = true

View File

@ -1,7 +0,0 @@
if ps -C rofi > /dev/null
then
killall rofi
else
export TERMINAL=alacritty
rofi -show combi -combi-modi drun,calc:~/.config/rofi/show-calculator.sh -sort -levenshtein-sort
fi

View File

@ -5,11 +5,11 @@
"output": "eDP-1",
"modules-left": ["wlr/taskbar"],
"modules-center": ["hyprland/workspaces"],
"modules-right": ["tray", "wireplumber", "cpu#cpu2", "cpu", "memory", "custom/updates", "temperature", "battery", "clock#clock2", "clock"],
"modules-right": ["tray", "wireplumber", "cpu#cpu2", "cpu", "memory", "custom/updates", "temperature", "battery", "clock", "clock#clock2"],
"wlr/taskbar": {
"on-click": "activate",
"on-click-right": "close",
"format": "{icon} {title:.30}",
"format": "{icon} {title:.20}",
"all-outputs": true
},
"wireplumber": {
@ -31,13 +31,13 @@
// "icon-size": 21,
"spacing": 10
},
"clock": {
"clock#clock2": {
"timezone": "Europe/Brussels",
"format": "{:%H:%M:%S}",
"interval": 1,
},
"clock#clock2": {
"clock": {
"timezone": "Europe/Brussels",
"format": "{:%Y-%m-%d}",
"interval": 3600,

View File

@ -1,12 +1,12 @@
* {
/* `otf-font-awesome` is required to be installed for icons */
font-family: Ubuntu;
font-family: "Roboto Sans";
font-size: 14px;
font-weight:500;
}
window#waybar {
background-color: rgba(0, 0, 0, 0.3);
background-color: rgba(0, 0, 0, 0.2);
color: #ffffff;
transition-property: background-color;
transition-duration: .5s;
@ -26,21 +26,22 @@ button:hover {
box-shadow: inset 0 0 #ffffff;
}
#workspaces button {
padding: 0 8px;
padding: 0 5px;
background-color: transparent;
color: #ffffff;
border-radius: 2px;
}
#workspaces button:hover {
background-color: #002F5F;
background-color: #023269;
}
#workspaces button.focused {
background-color: #002F5F;
background-color: #023269;
}
#workspaces button.active {
background-color: #002F5F;
background-color: #023269;
}
#workspaces button.urgent {
@ -62,24 +63,35 @@ button:hover {
#custom-updates,
#custom-powermode,
#tray {
padding: 0 12px;
border-radius: 5px;
padding: 0 14px;
border-radius: 7px;
color: #ffffff;
background-color: #002F5F;
margin-left:2px;
margin-right:2px;
background-color: #1f2430;
margin-left:4px;
margin-right:4px;
margin-top:2px;
margin-bottom:2px;
}
#clock.clock2,
#cpu.cpu2,
#memory,
#temperature {
background-color: #023269;
}
#taskbar button {
padding: 0 12px;
border-radius: 5px;
border-radius: 7px;
color: #ffffff;
background-color: #1f2430;
margin-left:2px;
margin-right:2px;
margin-left:4px;
margin-right:4px;
margin-top:2px;
margin-bottom:2px;
}
#taskbar button.active {
background-color: #002F5F;
background-color: #023269;
}
#window {
@ -95,7 +107,7 @@ window#waybar.empty #window {
}
#workspaces {
margin: 0 10px;
margin: 4px 9px;
}
/* If workspaces is the leftmost module, omit left margin */

View File

@ -189,3 +189,5 @@ alias python=python3
alias r=". ranger"
alias cpr=rsync --archive -hh --partial --info=stats1,progress2 --modify-window=1
alias mvr=rsync --archive -hh --partial --info=stats1,progress2 --modify-window=1 --remove-source-files
alias rg="rg -i --colors 'match:bg:yellow' --colors 'match:fg:black' --colors 'match:style:nobold' --colors 'path:fg:green' --colors 'path:style:bold' --colors 'line:fg:yellow' --colors 'line:style:bold'"
alias ag="rg -i --colors 'match:bg:yellow' --colors 'match:fg:black' --colors 'match:style:nobold' --colors 'path:fg:green' --colors 'path:style:bold' --colors 'line:fg:yellow' --colors 'line:style:bold'"