From 15d22d2b68b7218eef94904799cf94b61aae3189 Mon Sep 17 00:00:00 2001 From: linarphy Date: Thu, 27 Jul 2023 22:39:59 +0200 Subject: [PATCH] Initial commit --- private_dot_config/alacritty/alacritty.toml | 4 + private_dot_config/nvim/init.lua | 66 ++++++++ private_dot_config/nvim/lua/display/cmd.lua | 3 + .../nvim/lua/display/editor.lua | 10 ++ .../nvim/lua/display/graphic.lua | 7 + private_dot_config/nvim/lua/display/init.lua | 13 ++ private_dot_config/nvim/lua/general/cmd.lua | 7 + .../nvim/lua/general/editor.lua | 16 ++ .../nvim/lua/general/indent.lua | 7 + private_dot_config/nvim/lua/general/init.lua | 15 ++ private_dot_config/nvim/lua/general/lang.lua | 5 + private_dot_config/nvim/lua/mapping/init.lua | 14 ++ .../nvim/lua/mapping/maintenance.lua | 8 + .../nvim/lua/mapping/mapleader.lua | 5 + .../nvim/lua/mapping/movement.lua | 13 ++ .../nvim/lua/plugins/dashboard-nvim/init.lua | 10 ++ .../nvim/lua/plugins/dashboard-nvim/menu.lua | 52 ++++++ .../lua/plugins/indent-blankline/display.lua | 8 + .../plugins/indent-blankline/exclusions.lua | 11 ++ .../lua/plugins/indent-blankline/init.lua | 16 ++ .../lua/plugins/indent-blankline/mapping.lua | 7 + .../lua/plugins/indent-blankline/setup.lua | 8 + private_dot_config/nvim/lua/plugins/init.lua | 18 ++ .../nvim/lua/plugins/loader.lua | 48 ++++++ .../nvim/lua/plugins/nvim-treesitter/init.lua | 13 ++ .../lua/plugins/nvim-treesitter/setup.lua | 14 ++ .../plugins/nvim-treesitter/workaround.lua | 17 ++ .../nvim/lua/plugins/vim-easy-align/init.lua | 10 ++ .../lua/plugins/vim-easy-align/mapping.lua | 6 + .../nvim/plugin/packer_compiled.lua | 159 ++++++++++++++++++ private_dot_config/sway/config | 102 +++++++++++ .../sway/config.d/display/background.conf | 2 + .../sway/config.d/display/bar.conf | 15 ++ .../config.d/display/general_display.conf | 1 + .../sway/config.d/display/init.conf | 12 ++ .../sway/config.d/general/general.conf | 3 + .../sway/config.d/general/init.conf | 8 + .../sway/config.d/hardware/init.conf | 10 ++ .../sway/config.d/hardware/input/init.conf | 10 ++ .../config.d/hardware/input/keyboard.conf | 7 + .../config.d/hardware/input/touchpad.conf | 8 + .../config.d/mapping/general_mapping.conf | 11 ++ .../sway/config.d/mapping/init.conf | 18 ++ .../sway/config.d/mapping/launch.conf | 16 ++ .../sway/config.d/mapping/layout.conf | 18 ++ .../sway/config.d/mapping/movement.conf | 13 ++ .../sway/config.d/mapping/scratchpad.conf | 7 + .../sway/config.d/mapping/workspace.conf | 25 +++ .../sway/config.d/modes/init.conf | 8 + .../sway/config.d/modes/loader.conf | 3 + .../config.d/modes/resize/definition.conf | 15 ++ .../sway/config.d/modes/resize/init.conf | 11 ++ .../sway/config.d/modes/resize/mapping.conf | 3 + .../sway/config.d/plugins/init.conf | 8 + .../sway/config.d/plugins/loader.conf | 3 + .../sway/config.d/plugins/systemd/init.conf | 8 + .../plugins/systemd/systemd-user.conf | 7 + .../sway/config.d/tools/init.conf | 8 + .../sway/config.d/tools/loader.conf | 7 + 59 files changed, 957 insertions(+) create mode 100644 private_dot_config/alacritty/alacritty.toml create mode 100644 private_dot_config/nvim/init.lua create mode 100644 private_dot_config/nvim/lua/display/cmd.lua create mode 100644 private_dot_config/nvim/lua/display/editor.lua create mode 100644 private_dot_config/nvim/lua/display/graphic.lua create mode 100644 private_dot_config/nvim/lua/display/init.lua create mode 100644 private_dot_config/nvim/lua/general/cmd.lua create mode 100644 private_dot_config/nvim/lua/general/editor.lua create mode 100644 private_dot_config/nvim/lua/general/indent.lua create mode 100644 private_dot_config/nvim/lua/general/init.lua create mode 100644 private_dot_config/nvim/lua/general/lang.lua create mode 100644 private_dot_config/nvim/lua/mapping/init.lua create mode 100644 private_dot_config/nvim/lua/mapping/maintenance.lua create mode 100644 private_dot_config/nvim/lua/mapping/mapleader.lua create mode 100644 private_dot_config/nvim/lua/mapping/movement.lua create mode 100644 private_dot_config/nvim/lua/plugins/dashboard-nvim/init.lua create mode 100644 private_dot_config/nvim/lua/plugins/dashboard-nvim/menu.lua create mode 100644 private_dot_config/nvim/lua/plugins/indent-blankline/display.lua create mode 100644 private_dot_config/nvim/lua/plugins/indent-blankline/exclusions.lua create mode 100644 private_dot_config/nvim/lua/plugins/indent-blankline/init.lua create mode 100644 private_dot_config/nvim/lua/plugins/indent-blankline/mapping.lua create mode 100644 private_dot_config/nvim/lua/plugins/indent-blankline/setup.lua create mode 100644 private_dot_config/nvim/lua/plugins/init.lua create mode 100644 private_dot_config/nvim/lua/plugins/loader.lua create mode 100644 private_dot_config/nvim/lua/plugins/nvim-treesitter/init.lua create mode 100644 private_dot_config/nvim/lua/plugins/nvim-treesitter/setup.lua create mode 100644 private_dot_config/nvim/lua/plugins/nvim-treesitter/workaround.lua create mode 100644 private_dot_config/nvim/lua/plugins/vim-easy-align/init.lua create mode 100644 private_dot_config/nvim/lua/plugins/vim-easy-align/mapping.lua create mode 100644 private_dot_config/nvim/plugin/packer_compiled.lua create mode 100644 private_dot_config/sway/config create mode 100644 private_dot_config/sway/config.d/display/background.conf create mode 100644 private_dot_config/sway/config.d/display/bar.conf create mode 100644 private_dot_config/sway/config.d/display/general_display.conf create mode 100644 private_dot_config/sway/config.d/display/init.conf create mode 100644 private_dot_config/sway/config.d/general/general.conf create mode 100644 private_dot_config/sway/config.d/general/init.conf create mode 100644 private_dot_config/sway/config.d/hardware/init.conf create mode 100644 private_dot_config/sway/config.d/hardware/input/init.conf create mode 100644 private_dot_config/sway/config.d/hardware/input/keyboard.conf create mode 100644 private_dot_config/sway/config.d/hardware/input/touchpad.conf create mode 100644 private_dot_config/sway/config.d/mapping/general_mapping.conf create mode 100644 private_dot_config/sway/config.d/mapping/init.conf create mode 100644 private_dot_config/sway/config.d/mapping/launch.conf create mode 100644 private_dot_config/sway/config.d/mapping/layout.conf create mode 100644 private_dot_config/sway/config.d/mapping/movement.conf create mode 100644 private_dot_config/sway/config.d/mapping/scratchpad.conf create mode 100644 private_dot_config/sway/config.d/mapping/workspace.conf create mode 100644 private_dot_config/sway/config.d/modes/init.conf create mode 100644 private_dot_config/sway/config.d/modes/loader.conf create mode 100644 private_dot_config/sway/config.d/modes/resize/definition.conf create mode 100644 private_dot_config/sway/config.d/modes/resize/init.conf create mode 100644 private_dot_config/sway/config.d/modes/resize/mapping.conf create mode 100644 private_dot_config/sway/config.d/plugins/init.conf create mode 100644 private_dot_config/sway/config.d/plugins/loader.conf create mode 100644 private_dot_config/sway/config.d/plugins/systemd/init.conf create mode 100644 private_dot_config/sway/config.d/plugins/systemd/systemd-user.conf create mode 100644 private_dot_config/sway/config.d/tools/init.conf create mode 100644 private_dot_config/sway/config.d/tools/loader.conf diff --git a/private_dot_config/alacritty/alacritty.toml b/private_dot_config/alacritty/alacritty.toml new file mode 100644 index 0000000..dbc7610 --- /dev/null +++ b/private_dot_config/alacritty/alacritty.toml @@ -0,0 +1,4 @@ +[font] + size = 10.0 + [font.normal] + family = "Mononoki NerdFont" diff --git a/private_dot_config/nvim/init.lua b/private_dot_config/nvim/init.lua new file mode 100644 index 0000000..4348956 --- /dev/null +++ b/private_dot_config/nvim/init.lua @@ -0,0 +1,66 @@ +--[[ +Initialization file + +This file only loads others to improve readability of settings + +File organization: + +legend: + >name : folder + >name : sub-folder + name : file + (name) : comment + +>lua +(contains all configuration files) + >display + (ui and graphical settings) + cmd.lua + (ui settings for the cmd) + editor.lua + (ui settings for the editor) + graphic.lua + (general graphic settings) + init.lua + (load other files) + >general + (settings not in other category) + cmd.lua + (cmd settings) + editor.lua + (editor settings) + indent.lua + (tab and indent settings) + init.lua + (load other files) + lang.lua + (lang settings) + >mapping + (key mapping settings) + init.lua + (load other files) + mapleader.lua + (define mapleader key) + movement.lua + (movement linked mapping) + maintenance.lua + (maintenance and configuration change linked mapping) + >plugins + (plugins settings) + init.lua + (load other files) + loader.lua + (install and load plugins and plugins settings) + >{name of a plugin} + ({name of a plugin} settings) + init.lua + (load other files) +--]] + +require('display') -- ui and graphical settings + +require('general') -- settings not in other category + +require('mapping') -- key mapping settings + +require('plugins') -- plugins settings diff --git a/private_dot_config/nvim/lua/display/cmd.lua b/private_dot_config/nvim/lua/display/cmd.lua new file mode 100644 index 0000000..759dd4d --- /dev/null +++ b/private_dot_config/nvim/lua/display/cmd.lua @@ -0,0 +1,3 @@ +--[[ +Loads ui settings for the neovim's command-line +--]] diff --git a/private_dot_config/nvim/lua/display/editor.lua b/private_dot_config/nvim/lua/display/editor.lua new file mode 100644 index 0000000..ff097e9 --- /dev/null +++ b/private_dot_config/nvim/lua/display/editor.lua @@ -0,0 +1,10 @@ +--[[ +Loads ui settings for the editor +--]] + +vim.opt.relativenumber = true -- display relative number from the line you are +vim.opt.wrap = false -- do not break word from line to other +vim.opt.emoji = false -- do not display emoji with specific width +-- cursor option +vim.opt.cursorline = true -- display line you are on +vim.opt.cursorcolumn = true -- display column you are on diff --git a/private_dot_config/nvim/lua/display/graphic.lua b/private_dot_config/nvim/lua/display/graphic.lua new file mode 100644 index 0000000..6a0bcfa --- /dev/null +++ b/private_dot_config/nvim/lua/display/graphic.lua @@ -0,0 +1,7 @@ +--[[ +Loads general graphic settings +--]] + +vim.opt.guifont = "mononoki NFM:h11" -- set font +vim.opt.background = dark -- set theme +vim.cmd( 'silent! colorscheme monokai') -- set colorscheme diff --git a/private_dot_config/nvim/lua/display/init.lua b/private_dot_config/nvim/lua/display/init.lua new file mode 100644 index 0000000..b5bd4ce --- /dev/null +++ b/private_dot_config/nvim/lua/display/init.lua @@ -0,0 +1,13 @@ +--[[ +Loads ui and graphical settings + +This file only loads others + +To have a full display of the configuration structure, see the root init.lua +--]] + +require('display.cmd') -- ui settings for the cmd + +require('display.editor') -- ui settings for the editor + +require('display.graphic') -- general graphic settings diff --git a/private_dot_config/nvim/lua/general/cmd.lua b/private_dot_config/nvim/lua/general/cmd.lua new file mode 100644 index 0000000..e4c308d --- /dev/null +++ b/private_dot_config/nvim/lua/general/cmd.lua @@ -0,0 +1,7 @@ +--[[ +Loads cmd settings +--]] + +vim.opt.confirm = true -- ask confirmation before leaving an unsaved file +vim.opt.ignorecase = true -- ignore case in search pattern +vim.opt.smartcase = true -- stop ignoring case in search pattern if upper case diff --git a/private_dot_config/nvim/lua/general/editor.lua b/private_dot_config/nvim/lua/general/editor.lua new file mode 100644 index 0000000..48c9c4a --- /dev/null +++ b/private_dot_config/nvim/lua/general/editor.lua @@ -0,0 +1,16 @@ +--[[ +Loads editor settings +--]] + +vim.opt.textwidth = 72 -- maximum width of text (80 is a standard, but with +-- diff marker and email quoting, 72 is safer) + +-- apply it to each filetype +vim.opt.formatoptions:append({ t, 1 }) +vim.api.nvim_create_autocmd( + {"Filetype"}, + { + pattern = {"*"}, + command = ":setlocal formatoptions+=t1" + } +) diff --git a/private_dot_config/nvim/lua/general/indent.lua b/private_dot_config/nvim/lua/general/indent.lua new file mode 100644 index 0000000..870a6af --- /dev/null +++ b/private_dot_config/nvim/lua/general/indent.lua @@ -0,0 +1,7 @@ +--[[ +Loads tab and indent settings +--]] + +vim.opt.tabstop = 4 -- number of space equivalent to a tab +vim.opt.shiftwidth = 4 -- number of space to use for indenting +vim.opt.smartindent = true -- can auto insert indent diff --git a/private_dot_config/nvim/lua/general/init.lua b/private_dot_config/nvim/lua/general/init.lua new file mode 100644 index 0000000..82969ef --- /dev/null +++ b/private_dot_config/nvim/lua/general/init.lua @@ -0,0 +1,15 @@ +--[[ +Loads settings not in others category + +This file only loads others + +To have a full display of the configuration structure, see the root init.lua +--]] + +require('general.cmd') -- cmd settings + +require('general.editor') -- editor settings + +require('general.indent') -- tab and indent settings + +require('general.lang') -- lang settings diff --git a/private_dot_config/nvim/lua/general/lang.lua b/private_dot_config/nvim/lua/general/lang.lua new file mode 100644 index 0000000..66a01a8 --- /dev/null +++ b/private_dot_config/nvim/lua/general/lang.lua @@ -0,0 +1,5 @@ +--[[ +Loads lang settings +--]] + +vim.opt.spell = true -- enable spell checking diff --git a/private_dot_config/nvim/lua/mapping/init.lua b/private_dot_config/nvim/lua/mapping/init.lua new file mode 100644 index 0000000..0cae7cd --- /dev/null +++ b/private_dot_config/nvim/lua/mapping/init.lua @@ -0,0 +1,14 @@ +--[[ +Loads key mapping settings + +This file only loads others + +To have a full display of the configuration structure, see the root init.lua +--]] + +require('mapping.mapleader') -- define mapleader key + +require('mapping.movement') -- movement linked mapping + +require('mapping.maintenance') -- maintenance and configuration change linked +-- mapping diff --git a/private_dot_config/nvim/lua/mapping/maintenance.lua b/private_dot_config/nvim/lua/mapping/maintenance.lua new file mode 100644 index 0000000..01e3fff --- /dev/null +++ b/private_dot_config/nvim/lua/mapping/maintenance.lua @@ -0,0 +1,8 @@ +--[[ +Loads maintenance and configuration change linked mapping +--]] +local vimrc = 'C:\\Users\\DELL\\AppData\\Local\\nvim\\init.lua' -- path to +-- init.lua /!\ to change for each OS /!\ + +vim.keymap.set('n', 'ie', ':tabedit ' .. vimrc .. '') -- edit it +vim.keymap.set('n', 'is', ':source ' .. vimrc .. '') -- source it diff --git a/private_dot_config/nvim/lua/mapping/mapleader.lua b/private_dot_config/nvim/lua/mapping/mapleader.lua new file mode 100644 index 0000000..acafe0a --- /dev/null +++ b/private_dot_config/nvim/lua/mapping/mapleader.lua @@ -0,0 +1,5 @@ +--[[ +Defines mapleader key +--]] + +vim.g.mapleader = ',' diff --git a/private_dot_config/nvim/lua/mapping/movement.lua b/private_dot_config/nvim/lua/mapping/movement.lua new file mode 100644 index 0000000..770ff29 --- /dev/null +++ b/private_dot_config/nvim/lua/mapping/movement.lua @@ -0,0 +1,13 @@ +--[[ +Loads movement linked mapping +--]] + +-- moves through buffer with only one key press +vim.keymap.set('n', '', 'h') +vim.keymap.set('n', '', 'j') +vim.keymap.set('n', '', 'k') +vim.keymap.set('n', '', 'l') + +-- jump to tag under the cursor with an azerty keyboard +vim.keymap.set('n', 'c', '') +vim.keymap.set('i', 'c', '') diff --git a/private_dot_config/nvim/lua/plugins/dashboard-nvim/init.lua b/private_dot_config/nvim/lua/plugins/dashboard-nvim/init.lua new file mode 100644 index 0000000..f810a4d --- /dev/null +++ b/private_dot_config/nvim/lua/plugins/dashboard-nvim/init.lua @@ -0,0 +1,10 @@ +--[[ +Loads settings for dashboard-nvim plugin + +This file only loads others + +To have a full display of the configuration structure, see the root +init.lua +--]] + +require('plugins.dashboard-nvim.menu') -- loads menu settings diff --git a/private_dot_config/nvim/lua/plugins/dashboard-nvim/menu.lua b/private_dot_config/nvim/lua/plugins/dashboard-nvim/menu.lua new file mode 100644 index 0000000..92200fa --- /dev/null +++ b/private_dot_config/nvim/lua/plugins/dashboard-nvim/menu.lua @@ -0,0 +1,52 @@ +--[[ +Loads menu settings +--]] + +local db = require('dashboard') + +db.custom_header = { + '', + 'MMMMMMMMMWkdXMMMMMMMMMMMMMWXOd:\'.. ..\':oOXWMMMMMMMMMMMMMNxkWMMMMMMMMM', + 'MMMMMMMMMWo.;kNMMMMMMMMNOd:\'. .\':oONMMMMMMMMWO:.lWMMMMMMMMM', + 'MMMMMMMMMWo ;kNMMMNkc\' \'ckXMMMWO:. lWMMMMMMMMM', + 'MMMMMMMMMWo .;kKd\' \'oKO:. lWMMMMMMMMM', + 'MMMMMMMMMWo .xO:. :Ox\' lWMMMMMMMMM', + 'MMMMMMMMMWo .oKWMNk;. ;kNMMXd\' lWMMMMMMMMM', + 'MMMMMMMMMWo..oKWMMMMMNk;. ;kNMMMMMMXd\'.lWMMMMMMMMM', + 'MMMMMMMMMWOdKWMMMMMMMMMNk;. ;kNMMMMMMMMMWXxOWMMMMMMMMM', + 'MMMMMMMMMMMMMMMMMMMMMMMMMNk;. ;kNMMMMMMMMMMMMMMMMMMMMMMMMM', + 'MMMMMMMMMMMMMMMMMMMMMMMMMMMNk;. ;kNMMMMMMMMMMMMMMMMMMMMMMMMMMM', + 'MMMMMMMMMMMMMMMMMMMMMMMMMMMMMNk;. ;kNMMMMMMMMMMMMMMMMMMMMMMMMMMMMM', + 'MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMNk;. ;kNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM', + 'MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMNk;. .;kNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM', + 'XWMMMMMMMW0doooooooooooooooooooooooddddooooooooooooooooooooooooo0WMMMMMMMMX', + ',oKWMMMMMWd. ;kNMNk; oWMMMMMMXo\'', + '. .oKWMMMMk. ;kNMMMMMNk; .kMMMMMXd\' ', + '\' .oXWMMX; ;kNMMMMMMMMMNk; ;KMMWXd\' .', + 'c .oXWWx. ;kNMMMMMMMMMMMMMNk; .xWWXd\' :', + 'O. .oXNo ;kNMMMMMMMMMMMMMMMMMNk; lXXd\' .k', + 'No .oOc ;kNMMMMMMMMMMMMMMMMMMMMMNk; cOd\' lN', + 'MX: \'c;. ;kNMMMMMMMMMMMMMMMMMMMMMMMMMNk; .;c\' ;KM', + 'MM0; ... ;kNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMNk; ... ,0MM', + 'MMM0; .:kNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMNk:. ,0MMM', + 'MMMMKc ;kNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMNk; :KMMMM', + 'MMMMMNd. ;kNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMNk; .oXMMMMM', + 'MMMMMMW0:. ;kNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMNk; ;OWMMMMMM', + 'MMMMMMMMNl\'lXMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMXl\'lXMMMMMMMM', + '', +} + +db.custom_center = { + { + icon = ' ', + desc = ' load previous session ', + shortcut = ' , p s l', + action = 'SessionLoad' + }, + { + icon = ' ', + desc = ' recently opened file ', + shortcut = ' , f f o', + action = 'DashboardFindHistory' + } +} diff --git a/private_dot_config/nvim/lua/plugins/indent-blankline/display.lua b/private_dot_config/nvim/lua/plugins/indent-blankline/display.lua new file mode 100644 index 0000000..d5fca81 --- /dev/null +++ b/private_dot_config/nvim/lua/plugins/indent-blankline/display.lua @@ -0,0 +1,8 @@ +--[[ +Loads ui settings of indent-blankline plugin +--]] + +vim.opt.list = true -- display indent + +vim.opt.listchars:append('eol:↴') -- display end of line (eof) +vim.opt.listchars:append('space:⋅') -- display space diff --git a/private_dot_config/nvim/lua/plugins/indent-blankline/exclusions.lua b/private_dot_config/nvim/lua/plugins/indent-blankline/exclusions.lua new file mode 100644 index 0000000..f065df0 --- /dev/null +++ b/private_dot_config/nvim/lua/plugins/indent-blankline/exclusions.lua @@ -0,0 +1,11 @@ +--[[ +Loads list of excluded context where we do not needs to use the plugin +--]] + +require('indent_blankline').setup{ + + filetype_exclude = { + 'dashboard' -- used by the dashboard-nvim plugin + }, + +} diff --git a/private_dot_config/nvim/lua/plugins/indent-blankline/init.lua b/private_dot_config/nvim/lua/plugins/indent-blankline/init.lua new file mode 100644 index 0000000..9e8326a --- /dev/null +++ b/private_dot_config/nvim/lua/plugins/indent-blankline/init.lua @@ -0,0 +1,16 @@ +--[[ +Loads settings for indent-blankline plugin + +This file only loads others + +To have a full display of the configuration structure, see the root +init.lua +--]] + +require('plugins.indent-blankline.display') -- ui and graphical settings + +require('plugins.indent-blankline.exclusions') -- excluded context + +require('plugins.indent-blankline.mapping') -- key mapping settings + +require('plugins.indent-blankline.setup') -- setup settings diff --git a/private_dot_config/nvim/lua/plugins/indent-blankline/mapping.lua b/private_dot_config/nvim/lua/plugins/indent-blankline/mapping.lua new file mode 100644 index 0000000..8d55dac --- /dev/null +++ b/private_dot_config/nvim/lua/plugins/indent-blankline/mapping.lua @@ -0,0 +1,7 @@ +--[[ +Loads key mapping settings for the plugin indent-blankline +--]] + +vim.keymap.set('n', 'pwt', function() -- toggle the plugin + vim.g.indent_blankline_enabled = not vim.g.indent_blankline_enabled +end) diff --git a/private_dot_config/nvim/lua/plugins/indent-blankline/setup.lua b/private_dot_config/nvim/lua/plugins/indent-blankline/setup.lua new file mode 100644 index 0000000..c045d3a --- /dev/null +++ b/private_dot_config/nvim/lua/plugins/indent-blankline/setup.lua @@ -0,0 +1,8 @@ +--[[ +Loads setup settings for indent-blankline plugin (except exclusion +settings managed in exclusions.lua) +--]] + +require('indent_blankline').setup{ + use_treesitter = true, +} diff --git a/private_dot_config/nvim/lua/plugins/init.lua b/private_dot_config/nvim/lua/plugins/init.lua new file mode 100644 index 0000000..e13900c --- /dev/null +++ b/private_dot_config/nvim/lua/plugins/init.lua @@ -0,0 +1,18 @@ +--[[ +Loads plugins settings + +This file only loads others + +To have a full display of the configuration structure, see the root init.lua +--]] + +require('plugins.loader') -- install and load plugins and plugins settings + +require('plugins.vim-easy-align') -- settings for vim-easy-align plugin + +require('plugins.dashboard-nvim') -- settings for dashboard-nvim plugin + +require('plugins.indent-blankline') -- settings for indeent-blankline +--settings + +require('plugins.nvim-treesitter') -- setting for nvim-treesitter plugin diff --git a/private_dot_config/nvim/lua/plugins/loader.lua b/private_dot_config/nvim/lua/plugins/loader.lua new file mode 100644 index 0000000..cf26f65 --- /dev/null +++ b/private_dot_config/nvim/lua/plugins/loader.lua @@ -0,0 +1,48 @@ +--[[ +Installs and loads plugins and plugins settings +--]] + +-- Packer startup +return require('packer').startup(function(use) + use 'wbthomason/packer.nvim' -- packer can manage itself + + use { -- install fzf as a neovim plugin + 'junegunn/fzf', + run = './install --bin' + } + + use 'vijaymarupudi/nvim-fzf' -- link between lua and fzf + + use { 'ibhagwan/fzf-lua', -- fzf.vim replacement with lua (only for +--linux) + -- optional for icon support + requires = { 'nvim-tree/nvim-web-devicons' } + } + + use 'tpope/vim-fugitive' -- Git plugin + + use 'glepnir/dashboard-nvim' -- dashboard + + use 'lukas-reineke/indent-blankline.nvim' -- add indentation guides +--to all lines + + use {'nvim-treesitter/nvim-treesitter', -- parser generator tool +-- (completion and better syntax highlighting) + run = function() + local ts_update = require('nvim-treesitter.install').update( + { with_sync = true } + ) + ts_update() + end, + } + + use 'junegunn/gv.vim' -- git commit browser for vim-fugitive + + use 'junegunn/vim-peekaboo' -- real time view of the register + + use 'junegunn/vim-easy-align' -- align multiple line on a symbol + + use 'tanvirtin/monokai.nvim' -- coloscheme + + use 'nvim-tree/nvim-web-devicons' -- adds icons to plugins +end) diff --git a/private_dot_config/nvim/lua/plugins/nvim-treesitter/init.lua b/private_dot_config/nvim/lua/plugins/nvim-treesitter/init.lua new file mode 100644 index 0000000..2feead4 --- /dev/null +++ b/private_dot_config/nvim/lua/plugins/nvim-treesitter/init.lua @@ -0,0 +1,13 @@ +--[[ +Loads settings for nvim-treesitter plugin + +This file only loads others + +To have a full display of the configuration structure, see the root +init.lua +--]] + +require('plugins.nvim-treesitter.workaround') -- workaround found on +--https://github.com/nvim-treesitter/nvim-treesitter/wiki/Installation + +require('plugins.nvim-treesitter.setup') -- setup settings diff --git a/private_dot_config/nvim/lua/plugins/nvim-treesitter/setup.lua b/private_dot_config/nvim/lua/plugins/nvim-treesitter/setup.lua new file mode 100644 index 0000000..af54c27 --- /dev/null +++ b/private_dot_config/nvim/lua/plugins/nvim-treesitter/setup.lua @@ -0,0 +1,14 @@ +--[[ +Loads setup settings for nvim-treesitter plugin +--]] + +require('nvim-treesitter.configs').setup { + ensure_installed = 'all', -- installed parser + sync_install = false, -- don't install parsers synchronously + auto_install = false, -- install missing parsers when entering +--buffer + + highlight = { + enable = true, -- enable highlighting + } +} diff --git a/private_dot_config/nvim/lua/plugins/nvim-treesitter/workaround.lua b/private_dot_config/nvim/lua/plugins/nvim-treesitter/workaround.lua new file mode 100644 index 0000000..ebab7ff --- /dev/null +++ b/private_dot_config/nvim/lua/plugins/nvim-treesitter/workaround.lua @@ -0,0 +1,17 @@ +--[[ +Loads workaround found on +https://github.com/nvim-treesitter/nvim-treesitter/wiki/Installation +--]] + +-- vim.opt.foldmethod = 'expr' +-- vim.opt.foldexpr = 'nvim_treesitter#foldexpr()' +---WORKAROUND to enable folding +--[[ vim.api.nvim_create_autocmd({'BufEnter','BufAdd','BufNew','BufNewFile','BufWinEnter'}, { + group = vim.api.nvim_create_augroup('TS_FOLD_WORKAROUND', {}), + callback = function() + vim.opt.foldmethod = 'expr' + vim.opt.foldexpr = 'nvim_treesitter#foldexpr()' + end +}) +--]] +---ENDWORKAROUND diff --git a/private_dot_config/nvim/lua/plugins/vim-easy-align/init.lua b/private_dot_config/nvim/lua/plugins/vim-easy-align/init.lua new file mode 100644 index 0000000..b7771b1 --- /dev/null +++ b/private_dot_config/nvim/lua/plugins/vim-easy-align/init.lua @@ -0,0 +1,10 @@ +--[[ +Loads settings for vim-easy-align plugin + +This file only loads others + +To have a full display of the configuration structure, see the root +init.lua +--]] + +require('plugins.vim-easy-align.mapping') -- key mapping settings diff --git a/private_dot_config/nvim/lua/plugins/vim-easy-align/mapping.lua b/private_dot_config/nvim/lua/plugins/vim-easy-align/mapping.lua new file mode 100644 index 0000000..5a9174b --- /dev/null +++ b/private_dot_config/nvim/lua/plugins/vim-easy-align/mapping.lua @@ -0,0 +1,6 @@ +--[[ +Loads key mapping settings +--]] + +vim.keymap.set('v', 'pa', '(EasyAlign)') -- align selected +-- lines diff --git a/private_dot_config/nvim/plugin/packer_compiled.lua b/private_dot_config/nvim/plugin/packer_compiled.lua new file mode 100644 index 0000000..69b6ac9 --- /dev/null +++ b/private_dot_config/nvim/plugin/packer_compiled.lua @@ -0,0 +1,159 @@ +-- Automatically generated packer.nvim plugin loader code + +if vim.api.nvim_call_function('has', {'nvim-0.5'}) ~= 1 then + vim.api.nvim_command('echohl WarningMsg | echom "Invalid Neovim version for packer.nvim! | echohl None"') + return +end + +vim.api.nvim_command('packadd packer.nvim') + +local no_errors, error_msg = pcall(function() + +_G._packer = _G._packer or {} +_G._packer.inside_compile = true + +local time +local profile_info +local should_profile = false +if should_profile then + local hrtime = vim.loop.hrtime + profile_info = {} + time = function(chunk, start) + if start then + profile_info[chunk] = hrtime() + else + profile_info[chunk] = (hrtime() - profile_info[chunk]) / 1e6 + end + end +else + time = function(chunk, start) end +end + +local function save_profiles(threshold) + local sorted_times = {} + for chunk_name, time_taken in pairs(profile_info) do + sorted_times[#sorted_times + 1] = {chunk_name, time_taken} + end + table.sort(sorted_times, function(a, b) return a[2] > b[2] end) + local results = {} + for i, elem in ipairs(sorted_times) do + if not threshold or threshold and elem[2] > threshold then + results[i] = elem[1] .. ' took ' .. elem[2] .. 'ms' + end + end + if threshold then + table.insert(results, '(Only showing plugins that took longer than ' .. threshold .. ' ms ' .. 'to load)') + end + + _G._packer.profile_output = results +end + +time([[Luarocks path setup]], true) +local package_path_str = "/home/linarphy/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/?.lua;/home/linarphy/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/?/init.lua;/home/linarphy/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/?.lua;/home/linarphy/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/?/init.lua" +local install_cpath_pattern = "/home/linarphy/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/lua/5.1/?.so" +if not string.find(package.path, package_path_str, 1, true) then + package.path = package.path .. ';' .. package_path_str +end + +if not string.find(package.cpath, install_cpath_pattern, 1, true) then + package.cpath = package.cpath .. ';' .. install_cpath_pattern +end + +time([[Luarocks path setup]], false) +time([[try_loadstring definition]], true) +local function try_loadstring(s, component, name) + local success, result = pcall(loadstring(s), name, _G.packer_plugins[name]) + if not success then + vim.schedule(function() + vim.api.nvim_notify('packer.nvim: Error running ' .. component .. ' for ' .. name .. ': ' .. result, vim.log.levels.ERROR, {}) + end) + end + return result +end + +time([[try_loadstring definition]], false) +time([[Defining packer_plugins]], true) +_G.packer_plugins = { + ["dashboard-nvim"] = { + loaded = true, + path = "/home/linarphy/.local/share/nvim/site/pack/packer/start/dashboard-nvim", + url = "https://github.com/glepnir/dashboard-nvim" + }, + fzf = { + loaded = true, + path = "/home/linarphy/.local/share/nvim/site/pack/packer/start/fzf", + url = "https://github.com/junegunn/fzf" + }, + ["fzf-lua"] = { + loaded = true, + path = "/home/linarphy/.local/share/nvim/site/pack/packer/start/fzf-lua", + url = "https://github.com/ibhagwan/fzf-lua" + }, + ["gv.vim"] = { + loaded = true, + path = "/home/linarphy/.local/share/nvim/site/pack/packer/start/gv.vim", + url = "https://github.com/junegunn/gv.vim" + }, + ["indent-blankline.nvim"] = { + loaded = true, + path = "/home/linarphy/.local/share/nvim/site/pack/packer/start/indent-blankline.nvim", + url = "https://github.com/lukas-reineke/indent-blankline.nvim" + }, + ["monokai.nvim"] = { + loaded = true, + path = "/home/linarphy/.local/share/nvim/site/pack/packer/start/monokai.nvim", + url = "https://github.com/tanvirtin/monokai.nvim" + }, + ["nvim-fzf"] = { + loaded = true, + path = "/home/linarphy/.local/share/nvim/site/pack/packer/start/nvim-fzf", + url = "https://github.com/vijaymarupudi/nvim-fzf" + }, + ["nvim-treesitter"] = { + loaded = true, + path = "/home/linarphy/.local/share/nvim/site/pack/packer/start/nvim-treesitter", + url = "https://github.com/nvim-treesitter/nvim-treesitter" + }, + ["nvim-web-devicons"] = { + loaded = true, + path = "/home/linarphy/.local/share/nvim/site/pack/packer/start/nvim-web-devicons", + url = "https://github.com/nvim-tree/nvim-web-devicons" + }, + ["packer.nvim"] = { + loaded = true, + path = "/home/linarphy/.local/share/nvim/site/pack/packer/start/packer.nvim", + url = "https://github.com/wbthomason/packer.nvim" + }, + ["vim-easy-align"] = { + loaded = true, + path = "/home/linarphy/.local/share/nvim/site/pack/packer/start/vim-easy-align", + url = "https://github.com/junegunn/vim-easy-align" + }, + ["vim-fugitive"] = { + loaded = true, + path = "/home/linarphy/.local/share/nvim/site/pack/packer/start/vim-fugitive", + url = "https://github.com/tpope/vim-fugitive" + }, + ["vim-peekaboo"] = { + loaded = true, + path = "/home/linarphy/.local/share/nvim/site/pack/packer/start/vim-peekaboo", + url = "https://github.com/junegunn/vim-peekaboo" + } +} + +time([[Defining packer_plugins]], false) + +_G._packer.inside_compile = false +if _G._packer.needs_bufread == true then + vim.cmd("doautocmd BufRead") +end +_G._packer.needs_bufread = false + +if should_profile then save_profiles() end + +end) + +if not no_errors then + error_msg = error_msg:gsub('"', '\\"') + vim.api.nvim_command('echohl ErrorMsg | echom "Error in packer_compiled: '..error_msg..'" | echom "Please check your config for correctness" | echohl None') +end diff --git a/private_dot_config/sway/config b/private_dot_config/sway/config new file mode 100644 index 0000000..42ea7af --- /dev/null +++ b/private_dot_config/sway/config @@ -0,0 +1,102 @@ +# Initialization file +# +# This file only loads others to improve readability of settings +# +# File organization +# +# legend: +# -name : folder +# -name : sub-folder +# name : file +# (name) : comment +# +# -config.d +# (contains all configuration files) +# -display +# (ui and graphical settings) +# background.conf +# (background configuration) +# bar.conf +# (swaybar configuration) +# general_display.conf +# (set general display settings like colors) +# init.conf +# (load other files) +# -general +# (settings not in other category) +# general.conf +# (general settings) +# init.conf +# (load other files) +# -hardware +# (hardware settings) +# init.conf +# (load other files) +# -input +# (input settings) +# init.conf +# (load other files) +# keyboard.conf +# (keyboard configuration) +# touchpad.conf +# (touchpad configuration) +# -mapping +# (key mapping settings) +# general_mapping.conf +# (set general mapping, which are used in other shortcut) +# init.conf +# (load other files) +# launch.conf +# (set shortcut to start activity) +# layout.conf +# (set shortcut related to layout) +# movement.conf +# (set shortcut to move) +# scratchpad.conf +# (set shortcut related to scratchpad) +# workspace.conf +# (set shortcut related to workspace) +# -modes +# (mode configuration) +# init.conf +# (load other files) +# loader.conf +# (install and load modes and modes settings) +# -{name of a mode} +# ({name of a mode} settings) +# init.conf +# (load other files) +# -plugins +# (plugins settings) +# init.conf +# (load other files) +# loader.conf +# (install and load plugins and plugins settings) +# -{name of a plugin} +# ({name of a plugin} settings) +# init.conf +# (load other files) +# -tools +# (tools setting) +# loader.conf +# (load tools settings) +# init.conf +# (load other files) +# -{name of a tool} +# ({name of a tool} settings) +# init.conf +# (load other files) + +include config.d/hardware/init.conf + +include config.d/tools/init.conf + +include config.d/display/init.conf + +include config.d/mapping/init.conf + +include config.d/general/init.conf + +include config.d/plugins/init.conf + +include config.d/modes/init.conf diff --git a/private_dot_config/sway/config.d/display/background.conf b/private_dot_config/sway/config.d/display/background.conf new file mode 100644 index 0000000..75774a5 --- /dev/null +++ b/private_dot_config/sway/config.d/display/background.conf @@ -0,0 +1,2 @@ +# Background settings +output * bg /usr/share/backgrounds/sway/Sway_Wallpaper_Blue_1920x1080.png fill diff --git a/private_dot_config/sway/config.d/display/bar.conf b/private_dot_config/sway/config.d/display/bar.conf new file mode 100644 index 0000000..73832cd --- /dev/null +++ b/private_dot_config/sway/config.d/display/bar.conf @@ -0,0 +1,15 @@ +# Swaybar settings + +bar { + position top + + # When the status_command prints a new line to stdout, swaybar updates. + # The default just shows the current date and time. + status_command while date +'%Y-%m-%d %I:%M:%S %p'; do sleep 1; done + + colors { + statusline #ffffff + background #323232 + inactive_workspace #32323200 #32323200 #5c5c5c + } +} diff --git a/private_dot_config/sway/config.d/display/general_display.conf b/private_dot_config/sway/config.d/display/general_display.conf new file mode 100644 index 0000000..3efd8d5 --- /dev/null +++ b/private_dot_config/sway/config.d/display/general_display.conf @@ -0,0 +1 @@ +# General display settings, like default colors diff --git a/private_dot_config/sway/config.d/display/init.conf b/private_dot_config/sway/config.d/display/init.conf new file mode 100644 index 0000000..1565add --- /dev/null +++ b/private_dot_config/sway/config.d/display/init.conf @@ -0,0 +1,12 @@ +# Ui and graphical settings +# +# This file only loads others +# +# To have a full display of the configuration structure, see the root +# config file + +include background.conf + +include general_display.conf + +include bar.conf diff --git a/private_dot_config/sway/config.d/general/general.conf b/private_dot_config/sway/config.d/general/general.conf new file mode 100644 index 0000000..35320dd --- /dev/null +++ b/private_dot_config/sway/config.d/general/general.conf @@ -0,0 +1,3 @@ +# General settings + +floating_modifier $mod normal diff --git a/private_dot_config/sway/config.d/general/init.conf b/private_dot_config/sway/config.d/general/init.conf new file mode 100644 index 0000000..616ebcd --- /dev/null +++ b/private_dot_config/sway/config.d/general/init.conf @@ -0,0 +1,8 @@ +# Settings not in other category +# +# This file only loads others +# +# To have a full display of the configuration structure, see the root +# config file + +include general.conf diff --git a/private_dot_config/sway/config.d/hardware/init.conf b/private_dot_config/sway/config.d/hardware/init.conf new file mode 100644 index 0000000..72b64d8 --- /dev/null +++ b/private_dot_config/sway/config.d/hardware/init.conf @@ -0,0 +1,10 @@ +# Loads hardware configuration +# +# This file only loads others +# +# To have a full display of the configuration structure, see the root +# config file + +include input/init.conf + +include output/init.conf diff --git a/private_dot_config/sway/config.d/hardware/input/init.conf b/private_dot_config/sway/config.d/hardware/input/init.conf new file mode 100644 index 0000000..8e6c7e7 --- /dev/null +++ b/private_dot_config/sway/config.d/hardware/input/init.conf @@ -0,0 +1,10 @@ +# Loads hardware input configuration +# +# This file only loads others +# +# To have a full display of the configuration structure, see the root +# config file + +include keyboard.conf + +include touchpad.conf diff --git a/private_dot_config/sway/config.d/hardware/input/keyboard.conf b/private_dot_config/sway/config.d/hardware/input/keyboard.conf new file mode 100644 index 0000000..3bc018f --- /dev/null +++ b/private_dot_config/sway/config.d/hardware/input/keyboard.conf @@ -0,0 +1,7 @@ +# Load keyboard configuration + +input "type:keyboard" { + xkb_model "pc102" + xkb_layout "fr" + xkb_variant "oss" +} diff --git a/private_dot_config/sway/config.d/hardware/input/touchpad.conf b/private_dot_config/sway/config.d/hardware/input/touchpad.conf new file mode 100644 index 0000000..1a90e1b --- /dev/null +++ b/private_dot_config/sway/config.d/hardware/input/touchpad.conf @@ -0,0 +1,8 @@ +# Load touchpad configuration + +input "type:touchpad" { + drag enabled + dwt enabled + middle_emulation enabled + natural_scroll enabled +} diff --git a/private_dot_config/sway/config.d/mapping/general_mapping.conf b/private_dot_config/sway/config.d/mapping/general_mapping.conf new file mode 100644 index 0000000..bd6193e --- /dev/null +++ b/private_dot_config/sway/config.d/mapping/general_mapping.conf @@ -0,0 +1,11 @@ +# Set general mapping, used in other shortcut + +set $mod Mod4 + +# Variant key to change effect of a shorctut +set $variant Shift + +set $left l +set $right h +set $top k +set $down j diff --git a/private_dot_config/sway/config.d/mapping/init.conf b/private_dot_config/sway/config.d/mapping/init.conf new file mode 100644 index 0000000..98ded1d --- /dev/null +++ b/private_dot_config/sway/config.d/mapping/init.conf @@ -0,0 +1,18 @@ +# Loads key mapping settings +# +# This file only loads others +# +# To have a full display of the configuration structure, see the root +# config file + +include general_mapping.conf + +include launch.conf + +include layout.conf + +include movement.conf + +include scratchpad.conf + +include workspace.conf diff --git a/private_dot_config/sway/config.d/mapping/launch.conf b/private_dot_config/sway/config.d/mapping/launch.conf new file mode 100644 index 0000000..6f97c01 --- /dev/null +++ b/private_dot_config/sway/config.d/mapping/launch.conf @@ -0,0 +1,16 @@ +# Shortcut to start/stop activity + +# launch a terminal +bindsym $mod+Return exec $terminal + +# kill focused window +bindsym $mod+$variant+q kill + +# start app launcher +bindsym $mod+d exec $menu + +# reload configuration file +bindsym $mod+$variant+c reload + +# exit sway +bindsym $mod+$variant+e exec swaynag -t warning -m 'Voulez-vous vraiment quitter sway? Cela arrêtera votre session Wayland.' -B 'Oui, quitter sway' 'swaymsg exit' diff --git a/private_dot_config/sway/config.d/mapping/layout.conf b/private_dot_config/sway/config.d/mapping/layout.conf new file mode 100644 index 0000000..df5982b --- /dev/null +++ b/private_dot_config/sway/config.d/mapping/layout.conf @@ -0,0 +1,18 @@ +# Set shortcut to change layout + +# splitting +bindsym $mod+b splith +bindsym $mod+v splitv + +# switch current container between different layout styles +bindsym $mod+s layout stacking +bindsym $mod+w layout tabbed +bindsym $mod+e layout toggle split +bindsym $mod+f fullscreen +bindsym $mod+$variant+space floating toggle + +# focus change +# swap focus between tiling area and floting area +bindsym $mod+space focus mod_toggle +# move focus to the parent container +bindsym $mod+a focus parent diff --git a/private_dot_config/sway/config.d/mapping/movement.conf b/private_dot_config/sway/config.d/mapping/movement.conf new file mode 100644 index 0000000..f1112b6 --- /dev/null +++ b/private_dot_config/sway/config.d/mapping/movement.conf @@ -0,0 +1,13 @@ +# Set shortcut to move around + +# Focus +bindsym $mod+$left focus left +bindsym $mod+$right focus right +bindsym $mod+$top focus top +bindsym $mod+$down focus down + +# Window +bindsym $mod+$variant+$left move left +bindsym $mod+$variant+$right move right +bindsym $mod+$variant+$top move top +bindsym $mod+$variant+$down move down diff --git a/private_dot_config/sway/config.d/mapping/scratchpad.conf b/private_dot_config/sway/config.d/mapping/scratchpad.conf new file mode 100644 index 0000000..ae98ea1 --- /dev/null +++ b/private_dot_config/sway/config.d/mapping/scratchpad.conf @@ -0,0 +1,7 @@ +# Set shortcut related to scratchpad +# +# Sway "scratchpad" is a bag of holding for windows. +# You can send windows there and get them back later. + +bindsym $mod+$variant+minus move scratchpad +bindsym $mod+minus scratchpad show diff --git a/private_dot_config/sway/config.d/mapping/workspace.conf b/private_dot_config/sway/config.d/mapping/workspace.conf new file mode 100644 index 0000000..ec633d6 --- /dev/null +++ b/private_dot_config/sway/config.d/mapping/workspace.conf @@ -0,0 +1,25 @@ +# Set shortcut related to workspace + +# Move to workspace +bindsym $mod+1 workspace number 1 +bindsym $mod+2 workspace number 2 +bindsym $mod+3 workspace number 3 +bindsym $mod+4 workspace number 4 +bindsym $mod+5 workspace number 5 +bindsym $mod+6 workspace number 6 +bindsym $mod+7 workspace number 7 +bindsym $mod+8 workspace number 8 +bindsym $mod+9 workspace number 9 +bindsym $mod+0 workspace number 10 + +# Move container to workspace +bindsym $mod+$variant+1 move container to workspace number 1 +bindsym $mod+$variant+2 move container to workspace number 2 +bindsym $mod+$variant+3 move container to workspace number 3 +bindsym $mod+$variant+4 move container to workspace number 4 +bindsym $mod+$variant+5 move container to workspace number 5 +bindsym $mod+$variant+6 move container to workspace number 6 +bindsym $mod+$variant+7 move container to workspace number 7 +bindsym $mod+$variant+8 move container to workspace number 8 +bindsym $mod+$variant+9 move container to workspace number 9 +bindsym $mod+$variant+0 move container to workspace number 10 diff --git a/private_dot_config/sway/config.d/modes/init.conf b/private_dot_config/sway/config.d/modes/init.conf new file mode 100644 index 0000000..65fc01a --- /dev/null +++ b/private_dot_config/sway/config.d/modes/init.conf @@ -0,0 +1,8 @@ +# Modes configuration +# +# This file only loads others +# +# To have a full display of the configuration structure, see the root +# config file + +include loader.conf diff --git a/private_dot_config/sway/config.d/modes/loader.conf b/private_dot_config/sway/config.d/modes/loader.conf new file mode 100644 index 0000000..5f9a19b --- /dev/null +++ b/private_dot_config/sway/config.d/modes/loader.conf @@ -0,0 +1,3 @@ +# Load modes configuration + +include resize/init.conf diff --git a/private_dot_config/sway/config.d/modes/resize/definition.conf b/private_dot_config/sway/config.d/modes/resize/definition.conf new file mode 100644 index 0000000..db9881f --- /dev/null +++ b/private_dot_config/sway/config.d/modes/resize/definition.conf @@ -0,0 +1,15 @@ +# Mode definition + +mode "resize" { + # left will shrink the containers width + # right will grow the containers width + # up will shrink the containers height + # down will grow the containers height + bindsym $left resize shrink width 10px + bindsym $down resize grow height 10px + bindsym $top resize shrink height 10px + bindsym $right resize grow width 10px + + # Return to default mode + bindsym Escape mode "default" +} diff --git a/private_dot_config/sway/config.d/modes/resize/init.conf b/private_dot_config/sway/config.d/modes/resize/init.conf new file mode 100644 index 0000000..39ea697 --- /dev/null +++ b/private_dot_config/sway/config.d/modes/resize/init.conf @@ -0,0 +1,11 @@ +# Resize mode configuration +# This mode allow to resize windows +# +# This file only loads others +# +# To have a full display of the configuration structure, see the root +# config file + +include definition.conf + +include mapping.conf diff --git a/private_dot_config/sway/config.d/modes/resize/mapping.conf b/private_dot_config/sway/config.d/modes/resize/mapping.conf new file mode 100644 index 0000000..cd0eb13 --- /dev/null +++ b/private_dot_config/sway/config.d/modes/resize/mapping.conf @@ -0,0 +1,3 @@ +# Shortcut to start the mode + +bindsym $mod+r mode "resize" diff --git a/private_dot_config/sway/config.d/plugins/init.conf b/private_dot_config/sway/config.d/plugins/init.conf new file mode 100644 index 0000000..ac24685 --- /dev/null +++ b/private_dot_config/sway/config.d/plugins/init.conf @@ -0,0 +1,8 @@ +# Plugins settings +# +# This file only loads others +# +# To have a full display of the configuration structure, see the root +# config file + +include loader.conf diff --git a/private_dot_config/sway/config.d/plugins/loader.conf b/private_dot_config/sway/config.d/plugins/loader.conf new file mode 100644 index 0000000..07f608b --- /dev/null +++ b/private_dot_config/sway/config.d/plugins/loader.conf @@ -0,0 +1,3 @@ +# Install and load plugins and plugins settings + +include systemd/init.conf diff --git a/private_dot_config/sway/config.d/plugins/systemd/init.conf b/private_dot_config/sway/config.d/plugins/systemd/init.conf new file mode 100644 index 0000000..6c13826 --- /dev/null +++ b/private_dot_config/sway/config.d/plugins/systemd/init.conf @@ -0,0 +1,8 @@ +# Systemd plugin (default in arch) +# +# This file only loads others +# +# To have a full display of the configuration structure, see the root +# config file + +include systemd-user.conf diff --git a/private_dot_config/sway/config.d/plugins/systemd/systemd-user.conf b/private_dot_config/sway/config.d/plugins/systemd/systemd-user.conf new file mode 100644 index 0000000..d75ccdb --- /dev/null +++ b/private_dot_config/sway/config.d/plugins/systemd/systemd-user.conf @@ -0,0 +1,7 @@ +# sway does not set DISPLAY/WAYLAND_DISPLAY in the systemd user environment +# See FS#63021 +# Adapted from xorg's 50-systemd-user.sh, which achieves a similar goal. + +exec systemctl --user import-environment DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP +exec hash dbus-update-activation-environment 2>/dev/null && \ + dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP diff --git a/private_dot_config/sway/config.d/tools/init.conf b/private_dot_config/sway/config.d/tools/init.conf new file mode 100644 index 0000000..4f5f133 --- /dev/null +++ b/private_dot_config/sway/config.d/tools/init.conf @@ -0,0 +1,8 @@ +# Loads tools settings +# +# This file only loads others +# +# To have a full display of the configuration structure, see the root +# config file + +include loader.conf diff --git a/private_dot_config/sway/config.d/tools/loader.conf b/private_dot_config/sway/config.d/tools/loader.conf new file mode 100644 index 0000000..7c6a7c2 --- /dev/null +++ b/private_dot_config/sway/config.d/tools/loader.conf @@ -0,0 +1,7 @@ +# Load differents tools + +set $terminal alacritty + +set $list fzf + +set $menu dmenu_path | dmenu | xargs swaymsg exec --