Compare commits

...

75 Commits

Author SHA1 Message Date
07de246f77 Feat: activate treesitter 2022-02-08 12:55:24 +01:00
e04c89b57a Feat: decoration, all workspace on waybar and kanshi as service 2022-02-06 15:43:56 +01:00
fe0c7e7630 Fix: diagnostic and tries to activate treesitter 2022-02-04 05:47:31 +01:00
4e6384ac3e Fix: cmp mapping (tab to confirm) 2022-02-03 10:26:39 +01:00
ecf6b9fb6a Feat: add lsp html and remap K 2022-02-03 10:21:56 +01:00
b2e957ba9c Feat: source python in virtualenv 2022-02-03 10:21:38 +01:00
150341e4c2 Feat: activate pyenv 2022-02-02 10:17:05 +01:00
6f637e746e Feat: open url in incognito mod 2022-01-25 22:13:54 +01:00
d6214ac324 Feat: full path in lualine 2022-01-25 22:13:42 +01:00
d8519974f5 Feat: mouse bindings and use alacritty with sway 2022-01-25 09:25:56 +01:00
f7056eca23 Feat: add latexmkrc 2022-01-19 05:05:33 +01:00
f0af5d5b3f Feat: clean vimtex conf 2022-01-19 05:04:44 +01:00
f6a7fe0563 Feat: exercise template 2022-01-17 07:14:25 +01:00
ea12f5ba70 Feat: default zoom adblock etc 2022-01-17 07:13:04 +01:00
29a815e43c Feat: update rofi theme place and add kanshs config 2022-01-12 13:59:46 +01:00
9da1a5ed65 Feat: add avizo and user pamixer for sound 2022-01-12 05:56:14 +01:00
f6cebbacb3 Feat: add marks for qutebrowser 2022-01-12 05:26:03 +01:00
48dc36f660 Feat: exclude vim autoload and plugged 2022-01-12 05:25:40 +01:00
6a1540bcb0 Feat: vim config 2022-01-12 05:23:30 +01:00
1bae59ca93 Feat: set termguicolors for colorizer 2022-01-12 05:17:06 +01:00
c89d6b8c39 Feat: add gitconfig 2022-01-12 04:52:50 +01:00
3c26a04bb6 Feat: qutebrowser config 2022-01-09 14:32:48 +01:00
4f971c9df9 Feat: start qutebrowser config 2022-01-09 11:43:30 +01:00
e71eae2345 Feat: remove tab and stack shortcuts in sway 2022-01-09 11:41:45 +01:00
0f0e24d16c Feat: possibility to activate colors 2022-01-09 11:41:23 +01:00
ba6bb2bfba Fix: nvim_lsp -> nvim_diagnostic 2022-01-07 10:39:18 +01:00
769acc8605 Feat: add gammastep 2022-01-06 21:28:56 +01:00
16194e4431 Feat: add tasks snippet 2022-01-04 07:55:22 +01:00
fed96f0ad1 Feat: notes only on nextcloud 2021-12-29 09:49:25 +01:00
a8f7cbdaea Feat: add click on link in urxvt 2021-12-29 09:49:02 +01:00
fe3ee3aefe Feat: new ytb feeds 2021-12-21 11:47:46 +01:00
b143fb61a9 Feat: rofi-pass with filename as user 2021-12-04 09:19:20 +01:00
216417e85e Fix: checkhealth 2021-12-04 09:19:03 +01:00
d1cb75acff Feat: rofi-pass config 2021-11-27 19:42:41 +01:00
3b3a46ddfb Feat: add ytb channel 2021-11-25 14:09:57 +01:00
b89c49cb34 Fix: GTK+ app long to start 2021-11-25 14:09:37 +01:00
9d85245129 Feat: add mako for notification 2021-11-25 14:09:19 +01:00
f0a1460022 Feat: début d'un readme 2021-11-24 06:31:31 +01:00
cf14508462 Feat: autostart firefox and thunderbird 2021-11-24 06:31:12 +01:00
44336cfb5b Feat: activate scratchpad, rofi-pass and numlock 2021-11-24 06:30:45 +01:00
9568a1a3c2 Feat: init sway config 2021-11-20 20:52:12 +01:00
7090ff15bf Feat: telescope use fzf 2021-11-20 20:42:23 +01:00
b151282f15 Feat: vifm open svg with inkscape 2021-11-15 09:42:40 +01:00
a726bf12ac Feat: add Y as yank to the end of the line 2021-11-09 09:58:27 +01:00
025e863c75 Feat: add vim-tmux plugin 2021-11-09 09:51:32 +01:00
783508bf25 Feat: telescope ignore pdf 2021-11-03 05:46:00 +01:00
829bf55d82 Feat: buffer title on the middle 2021-11-01 14:53:06 +01:00
f133c72653 Fix: enumerate template name 2021-11-01 14:53:06 +01:00
f24a4e8a47 Feat: keyword_lenght for buffer and spell 2021-11-01 11:46:37 +01:00
f26fd07e96 Feat: don't load cmp-spell 2021-11-01 08:48:10 +01:00
99fa23f6ad Feat: remove friendly-snippest 2021-11-01 08:48:10 +01:00
a17b6e79b1 Feat: TERM and arguments 2021-11-01 08:46:29 +01:00
72b109c14a Fix: arguments in restart_on_randr 2021-11-01 08:46:29 +01:00
b1cf2bbab6 Feat: remove spell from cmp list 2021-11-01 04:44:57 +01:00
4f07c62070 Feat: Open mocp with TERM 2021-10-31 20:32:35 +01:00
99517cf4e4 Feat: move bar to top 2021-10-31 20:32:07 +01:00
c74ed2a1e3 Feat: dialogue to floating windows 2021-10-31 18:10:41 +01:00
4491310bba Feat: Change screens places 2021-10-31 18:06:05 +01:00
b53e69beb8 Feat: Import qtile config 2021-10-31 17:21:47 +01:00
21cbaeb542 Feat: activate lsp in vsnip 2021-09-25 21:11:18 +02:00
c1f449ed3d Feat: use lualine evil lualine config 2021-09-25 21:06:36 +02:00
df067d434c Feat: snippet multicols 2021-09-22 08:46:56 +02:00
a42946553a Feat: add date snippets 2021-09-22 06:06:52 +02:00
4bb4356727 Feat: add vim-notes 2021-09-22 05:52:37 +02:00
7e6bfc2f4d Feat: clean vim scripts 2021-09-22 05:52:26 +02:00
243ea5a116 Feat: add tabs in tabular 2021-09-22 05:35:48 +02:00
4ce449368e Merge branch 'main' of git_opytex:lafrite/dotfiles 2021-09-19 20:33:25 +02:00
c65fffdd9c Feat: add packer plugin folder in gitignore 2021-09-19 20:32:15 +02:00
4e4b45bb24 Feat: add packer plugin folder in gitignore 2021-09-19 14:35:34 +02:00
e95bbfd0ad Feat: completion and full lua config 2021-09-19 14:32:12 +02:00
ea98f4be74 Feat: vimtex config 2021-09-17 10:21:38 +02:00
c897b57295 Feat: moving forward but no completion yep 2021-09-17 10:21:38 +02:00
e9cf99cf8e Feat: plugins (not configured) and lualine 2021-09-17 10:21:38 +02:00
da6ff29448 Feat: début de transition vers lua 2021-09-17 10:21:38 +02:00
9dd08b6d18 Feat: add X config 2021-09-16 21:17:41 +02:00
59 changed files with 2212 additions and 407 deletions

4
.gitignore vendored
View File

@@ -5,3 +5,7 @@ vifm/.config/vifm/vifm-help.txt
vifm/.config/vifm/vifminfo.json
nvim/.config/nvim/autoload
nvim/.config/nvim/plugin
vim/.vim/autoload/
vim/.vim/plugged/

View File

@@ -1 +1,7 @@
# My dotfiles
## Sway
Paquets à installer
sway waybar rofi rofi-pass nm-applet blueman brightnessctl

46
X/.Xdefaults Normal file
View File

@@ -0,0 +1,46 @@
URxvt*font: xft:DroidSansMono Nerd Font Mono:pixelsize=14,xft:UbuntuMono Nerd Font:pixelsize=12
URxvt*letterSpace: -1
URxvt*scrollBar: false
! Extensions
URxvt.perl-ext-common: default,matcher,fullscreen,resize-font
! fullscreen with F11
URxvt.keysym.F11: perl:fullscreen:switch
! `font-size` plugin
URxvt.resize-font.smaller: C-Down
URxvt.resize-font.bigger: C-Up
! Open link with firefox
! URxvt.url-launcher: /usr/bin/xdg-open
URxvt.url-launcher: /usr/bin/firefox
URxvt.matcher.button: 1
! hard contrast: *background: #1d2021
*background: #282828
! soft contrast: *background: #32302f
*foreground: #ebdbb2
! Black + DarkGrey
*color0: #282828
*color8: #928374
! DarkRed + Red
*color1: #cc241d
*color9: #fb4934
! DarkGreen + Green
*color2: #98971a
*color10: #b8bb26
! DarkYellow + Yellow
*color3: #d79921
*color11: #fabd2f
! DarkBlue + Blue
*color4: #458588
*color12: #83a598
! DarkMagenta + Magenta
*color5: #b16286
*color13: #d3869b
! DarkCyan + Cyan
*color6: #689d6a
*color14: #8ec07c
! LightGrey + White
*color7: #a89984
*color15: #ebdbb2

View File

@@ -45,7 +45,7 @@ font:
style: Bold Italic
# Point size
size: 11.0
size: 12.0
offset:
x: 0
@@ -82,6 +82,22 @@ selection:
live_config_reload: true
cursor:
# Cursor style
#
# Values for 'style':
# - ▇ Block
# - _ Underline
# - | Beam
style: Block
# If this is `true`, the cursor will be rendered as a hollow box when the
# window is not focused.
unfocused_hollow: true
mouse_bindings:
- { mouse: Middle, action: PasteSelection }
key_bindings:
- { key: V, mods: Control|Shift, action: Paste }
- { key: C, mods: Control|Shift, action: Copy }

5
git/.gitconfig Normal file
View File

@@ -0,0 +1,5 @@
[user]
name = Bertrand Benjamin
email = benjamin.bertrand@opytex.org
[init]
defaultBranch = main

View File

@@ -1,6 +1,6 @@
auto-reload yes
reload-time 30
browser chromium
browser "chromium --incognito"
macro y set browser "tmux new-window mpv %u"; open-in-browser ; set browser chromium
macro Y set browser "mpv %u"; open-in-browser ; set browser chromium

View File

@@ -3,6 +3,8 @@ https://www.youtube.com/feeds/videos.xml?channel_id=UCXuqSBlHAE6Xw-yeJA0Tunw "Te
https://www.youtube.com/feeds/videos.xml?channel_id=UCeeFfhMcJa1kjtfZAGskOCA "Tech"
https://www.youtube.com/feeds/videos.xml?channel_id=UCsRIv1fsbnQRIPKmUQbRzZg "Tech"
https://www.youtube.com/feeds/videos.xml?channel_id=UCUQo7nzH1sXVpzL92VesANw "Tech"
https://www.youtube.com/feeds/videos.xml?channel_id=UCV0qA-eDDICsRR9rPcnG7tw "Tech"
https://www.youtube.com/feeds/videos.xml?channel_id=UCR-DXc1voovS8nhAvccRZhg "Tech"
https://www.youtube.com/feeds/videos.xml?channel_id=UC9C07cryUrKzLuAzwITPA3A "SC2" "SC2HL"
@@ -32,6 +34,8 @@ https://www.youtube.com/feeds/videos.xml?channel_id=UC7FkqjV8SU5I8FCHXQSQe9Q "Bo
https://www.youtube.com/feeds/videos.xml?channel_id=UCjaudhGC0gBfEtMyQYzT3pA "Bois" "Atelier Floky"
https://www.youtube.com/feeds/videos.xml?channel_id=UCRix1GJvSBNDpEFY561eSzw "DIY" "Laura Kampf"
https://www.youtube.com/feeds/videos.xml?channel_id=UCjED9uS41ioeFuPfbR-OBlw "DIY" "Les frères Poulain"
https://www.youtube.com/feeds/videos.xml?channel_id=UCWimnuBF27nwOxgUBJ4qNeg "DIY" "Abrege"
https://www.youtube.com/feeds/videos.xml?channel_id=UC6mIxFTvXkWQVEHPsEdflzQ "Electronique" "GreatScott!"
@@ -39,6 +43,7 @@ https://www.youtube.com/feeds/videos.xml?channel_id=UCP6qAy9q_Lkhzu2reZfun9g "Sk
https://www.youtube.com/feeds/videos.xml?channel_id=UCjHh3N6jUJKdrtTqNorpRhg "Ski" "Bon appetit"
https://www.youtube.com/feeds/videos.xml?channel_id=UCdtrhMQTlTWNLGcmx1Qy80Q "Ski" "Fabien Maierhofer"
https://www.youtube.com/feeds/videos.xml?channel_id=UChkpEJqHjX-tGmYoGf8jdGA "Escalade" "EpicTV Relais Vertical"
https://www.youtube.com/feeds/videos.xml?channel_id=UCJlvyoYGLr3UIV0oD4-aarA "Sports" "Riding zone"
https://www.youtube.com/feeds/videos.xml?channel_id=UCgkhWgBGRp0sdFy2MHDWfSg "Math" "El Ji"

View File

@@ -1,18 +0,0 @@
" Use completion-nvim in every buffer
autocmd BufEnter * lua require'nvim-comp'.on_attach()
let g:completion_enable_snippet = 'UltiSnips'
let g:completion_matching_strategy_list = ['exact', 'substring', 'fuzzy']
" Use <Tab> and <S-Tab> to navigate through popup menu
" inoremap <expr> <Tab> pumvisible() ? "\<C-n>" : "\<Tab>"
" inoremap <expr> <S-Tab> pumvisible() ? "\<C-p>" : "\<S-Tab>"
"map <c-p> to manually trigger completion
"imap <silent> <c-p> <Plug>(completion_trigger)
" Set completeopt to have a better completion experience
set completeopt=menuone,noinsert,noselect
" Avoid showing message extra message when using completion
set shortmess+=c

View File

@@ -1,19 +0,0 @@
" Better window navigation
" nnoremap <C-h> <C-w>h
" nnoremap <C-j> <C-w>j
" nnoremap <C-k> <C-w>k
" nnoremap <C-l> <C-w>l
" Align blocks of text and keep them selected
vmap < <gv
vmap > >gv
" Automatically spell check last error in insert mode
inoremap <c-f> <c-g>u<Esc>[s1z=`]a<c-g>u
" Find files using Telescope command-line sugar.
nnoremap <leader>e <cmd>Telescope find_files<cr>
nnoremap <leader>g <cmd>Telescope live_grep<cr>
nnoremap <leader>b <cmd>Telescope buffers<cr>
nnoremap <leader>h <cmd>Telescope help_tags<cr>

View File

@@ -1,69 +0,0 @@
" set leader key
let g:mapleader = "\<Space>"
syntax enable " Enables syntax highlighing
set hidden " Required to keep multiple buffers open multiple buffers
set wrap " Display long lines as just one line
set pumheight=10 " Makes popup menu smaller
set encoding=utf-8 " The encoding displayed
set fileencoding=utf-8 " The encoding written to file
set ruler " Show the cursor position all the time
set cmdheight=1 " More space for displaying messages
set iskeyword+=- " treat dash separated words as a word text object"
set mouse=a " Enable your mouse
set t_Co=256 " Support 256 colors
set conceallevel=0 " So that I can see `` in markdown files
set tabstop=4 " Insert 2 spaces for a tab
set shiftwidth=4 " Change the number of space characters inserted for indentation
set smarttab " Makes tabbing smarter will realize you have 2 vs 4
set expandtab " Converts tabs to spaces
set smartindent " Makes indenting smart
set autoindent " Good auto indent
set foldmethod=indent
set laststatus=2 " Always display the status line
set number " Line number
set relativenumber " Relative line number
set cursorline " Enable highlighting of the current line
set showtabline=1 " show tabs only when there are some
set background=dark " tell vim what the background color looks like
set nobackup " This is recommended by coc
set nowritebackup " This is recommended by coc
set noswapfile
set updatetime=300 " Faster completion
set timeoutlen=500 " By default timeoutlen is 1000 ms
set clipboard=unnamedplus " Copy paste between vim and everything else
set showmode " Display edition mode
"set noshowmode " We don't need to see things like -- INSERT -- anymore
set incsearch " hightlight while searching
set ignorecase " Ignore case while searching
set smartcase " Override ignorecase if search patern contains upper case
set wildmenu " Enable wildmenu
set spell " Enable spell checking
set spelllang=fr,en
set nrformats+=alpha " letter concidered as number for Ctrl-A or Ctrl-X
"set autochdir " Your working directory will always be the same as your working directory
execute "set colorcolumn=" . join(range(81,335), ',')
colorscheme zenburn
" Set completeopt to have a better completion experience
" set completeopt=menuone,noinsert,noselect
" set completeopt=menuone,noselect
" Avoid showing message extra message when using completion
set shortmess+=c
let g:indentLine_setConceal = 0

View File

@@ -0,0 +1,5 @@
require('plugins')
require('settings')
require('mappings')
require('lsp')

View File

@@ -1,18 +0,0 @@
source $HOME/.config/nvim/plugins/plugins.vim
source $HOME/.config/nvim/general/settings.vim
source $HOME/.config/nvim/general/mappings.vim
" source $HOME/.config/nvim/general/completion.vim
source $HOME/.config/nvim/plugins/lightline.vim
source $HOME/.config/nvim/plugins/nvim-comp.vim
source $HOME/.config/nvim/plugins/vimtex.vim
lua <<EOF
require("lsp")
EOF
" require("comp")
" bug fix with telescope and insert mode https://GitHub.com/vim telescope/telescope.vim/issues/82
autocmd FileType TelescopePrompt
\ call deoplete#custom#buffer_option('auto_complete', v:false)

View File

@@ -1,78 +0,0 @@
-- Configuration for nvim-compe
local utils = require('utils')
vim.cmd [[set shortmess+=c]]
utils.opt('o', 'completeopt', 'menuone,noselect')
require'compe'.setup {
enabled = true;
autocomplete = true;
debug = false;
min_length = 1;
preselect = 'enable';
throttle_time = 80;
source_timeout = 200;
incomplete_delay = 400;
allow_prefix_unmatch = false;
max_abbr_width = 1000;
max_kind_width = 1000;
max_menu_width = 1000000;
documentation = true;
source = {
path = true;
buffer = true;
calc = false;
vsnip = true;
nvim_lsp = true;
nvim_lua = false;
spell = true;
tags = true;
snippets_nvim = false;
treesitter = true;
};
}
local t = function(str)
return vim.api.nvim_replace_termcodes(str, true, true, true)
end
local check_back_space = function()
local col = vim.fn.col('.') - 1
if col == 0 or vim.fn.getline('.'):sub(col, col):match('%s') then
return true
else
return false
end
end
-- Use (s-)tab to:
--- move to prev/next item in completion menuone
--- jump to prev/next snippet's placeholder
_G.tab_complete = function()
if vim.fn.pumvisible() == 1 then
return t "<C-n>"
elseif vim.fn.call("vsnip#available", {1}) == 1 then
return t "<Plug>(vsnip-expand-or-jump)"
elseif check_back_space() then
return t "<Tab>"
else
return vim.fn['compe#complete']()
end
end
_G.s_tab_complete = function()
if vim.fn.pumvisible() == 1 then
return t "<C-p>"
elseif vim.fn.call("vsnip#jumpable", {-1}) == 1 then
return t "<Plug>(vsnip-jump-prev)"
else
return t "<S-Tab>"
end
end
utils.map("i", "<Tab>", "v:lua.tab_complete()", {expr = true})
utils.map("s", "<Tab>", "v:lua.tab_complete()", {expr = true})
utils.map("i", "<S-Tab>", "v:lua.s_tab_complete()", {expr = true})
utils.map("s", "<S-Tab>", "v:lua.s_tab_complete()", {expr = true})

View File

@@ -0,0 +1,95 @@
local has_words_before = function()
if vim.api.nvim_buf_get_option(0, "buftype") == "prompt" then
return false
end
local line, col = unpack(vim.api.nvim_win_get_cursor(0))
return col ~= 0 and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match("%s") == nil
end
local feedkey = function(key, mode)
vim.api.nvim_feedkeys(vim.api.nvim_replace_termcodes(key, true, true, true), mode, true)
end
local lsp_symbols = {
Text = "  (Text) ",
Method = "  (Method)",
Function = "  (Function)",
Constructor = "  (Constructor)",
Field = " ﴲ (Field)",
Variable = "[] (Variable)",
Class = "  (Class)",
Interface = " ﰮ (Interface)",
Module = "  (Module)",
Property = " 襁 (Property)",
Unit = "  (Unit)",
Value = "  (Value)",
Enum = " 練 (Enum)",
Keyword = "  (Keyword)",
Snippet = "  (Snippet)",
Color = "  (Color)",
File = "  (File)",
Reference = "  (Reference)",
Folder = "  (Folder)",
EnumMember = "  (EnumMember)",
Constant = " ﲀ (Constant)",
Struct = " ﳤ (Struct)",
Event = "  (Event)",
Operator = "  (Operator)",
TypeParameter = "  (TypeParameter)",
}
local cmp = require'cmp'
cmp.setup{
completion = {
completeopt = 'menuone,noselect',
},
formatting = {
format = function(entry, vim_item)
-- fancy icons and a name of kind
vim_item.kind = lsp_symbols[vim_item.kind]
-- set a name for each source
vim_item.menu = ({
buffer = "[Buffer]",
nvim_lsp = "[LSP]",
vsnip = "[vSnip]",
path = "[Path]",
spell = "[Spell]",
})[entry.source.name]
return vim_item
end,
},
snippet = {
expand = function(args)
vim.fn["vsnip#anonymous"](args.body)
end,
},
mapping = {
-- ["<cr>"] = cmp.mapping.confirm({select = true, behavior = cmp.ConfirmBehavior.Replace}),
["<Tab>"] = cmp.mapping.confirm({select = true, behavior = cmp.ConfirmBehavior.Insert}),
},
sources = {
{ name = 'vsnip' },
{ name = 'nvim_lsp' },
{ name = 'path' },
{
name = 'buffer',
keyword_length = 4,
keyword_pattern = [[\d\@!\k\k*]],
options = {
-- keyword_pattern = [[\k\+]]-- for non ascii caracters
keyword_pattern = [[\d\@!\k\k*]],
}
},
-- { name = 'spell', keyword_length = 4 },
},
experimental = {
-- I like the new menu better! Nice work hrsh7th
native_menu = false,
-- Let's play with this for a day or two
ghost_text = true,
},
}
vim.cmd [[autocmd FileType TelescopePrompt lua require('cmp').setup.buffer { enabled = false }]]
vim.g.vsnip_snippet_dir = '~/.config/nvim/vsnips'

View File

@@ -0,0 +1,4 @@
vim.opt.termguicolors = true
require'colorizer'.setup()

View File

@@ -0,0 +1,214 @@
-- Eviline config for lualine
-- Author: shadmansaleh
-- Credit: glepnir
local lualine = require 'lualine'
-- Color table for highlights
local colors = {
bg = '#202328',
fg = '#bbc2cf',
yellow = '#ECBE7B',
cyan = '#008080',
darkblue = '#081633',
green = '#98be65',
orange = '#FF8800',
violet = '#a9a1e1',
magenta = '#c678dd',
blue = '#51afef',
red = '#ec5f67'
}
local conditions = {
buffer_not_empty = function() return vim.fn.empty(vim.fn.expand('%:t')) ~= 1 end,
hide_in_width = function() return vim.fn.winwidth(0) > 80 end,
check_git_workspace = function()
local filepath = vim.fn.expand('%:p:h')
local gitdir = vim.fn.finddir('.git', filepath .. ';')
return gitdir and #gitdir > 0 and #gitdir < #filepath
end
}
-- Config
local config = {
options = {
-- Disable sections and component separators
component_separators = "",
section_separators = "",
-- theme = 'gruvbox',
theme = {
-- We are going to use lualine_c an lualine_x as left and
-- right section. both are highlighted by c theme . so we
-- are just setting default looks o statusline
normal = {c = {fg = colors.fg, bg = colors.bg}},
inactive = {c = {fg = colors.fg, bg = colors.bg}}
}
},
sections = {
-- these are to remove the defaults
lualine_a = {},
lualine_b = {},
lualine_y = {},
lualine_z = {},
-- these will be filled later
lualine_c = {},
lualine_x = {}
},
inactive_sections = {
-- these are to remove the defaults
lualine_a = {},
lualine_v = {},
lualine_y = {},
lualine_z = {},
lualine_c = {},
lualine_x = {}
}
}
-- inserts a component in lualine_c at left section
local function ins_left(component)
table.insert(config.sections.lualine_c, component)
end
-- inserts a component in lualine_x ot right section
local function ins_right(component)
table.insert(config.sections.lualine_x, component)
end
local mode_color = {
n = colors.red,
i = colors.green,
v = colors.blue,
[''] = colors.blue,
v = colors.blue,
c = colors.magenta,
no = colors.red,
s = colors.orange,
s = colors.orange,
[''] = colors.orange,
ic = colors.yellow,
r = colors.violet,
rv = colors.violet,
cv = colors.red,
ce = colors.red,
r = colors.cyan,
rm = colors.cyan,
['r?'] = colors.cyan,
['!'] = colors.red,
t = colors.red
}
ins_left {
-- mode component
function()
-- auto change color according to neovims mode
vim.api.nvim_command(
'hi! lualinemode guifg=' .. mode_color[vim.fn.mode()] .. " guibg=" .. colors.bg)
return ''
end,
color = "lualinemode",
left_padding = 0
}
ins_left {
"mode",
color = {fg = colors.green, gui = 'bold'}
}
ins_left {
-- filesize component
function()
local function format_file_size(file)
local size = vim.fn.getfsize(file)
if size <= 0 then return '' end
local sufixes = {'b', 'k', 'm', 'g'}
local i = 1
while size > 1024 do
size = size / 1024
i = i + 1
end
return string.format('%.1f%s', size, sufixes[i])
end
local file = vim.fn.expand('%:p')
if string.len(file) == 0 then return '' end
return format_file_size(file)
end,
condition = conditions.buffer_not_empty
}
ins_left {
-- Lsp server name .
function()
local msg = 'No Active Lsp'
local buf_ft = vim.api.nvim_buf_get_option(0, 'filetype')
local clients = vim.lsp.get_active_clients()
if next(clients) == nil then return msg end
for _, client in ipairs(clients) do
local filetypes = client.config.filetypes
if filetypes and vim.fn.index(filetypes, buf_ft) ~= -1 then
return client.name
end
end
return msg
end,
icon = ' LSP:',
color = {fg = '#ffffff', gui = 'bold'}
}
ins_left {
'diagnostics',
sources = {'nvim_diagnostic'},
symbols = {error = '', warn = '', info = ''},
color_error = colors.red,
color_warn = colors.yellow,
color_info = colors.cyan
}
-- Insert mid section. You can make any number of sections in neovim :)
-- for lualine it's any number greater then 2
ins_left {function() return '%=' end}
ins_left {
'filename',
file_status = true,
path = 1,
condition = conditions.buffer_not_empty,
color = {fg = colors.magenta, gui = 'bold'}
}
-- Add components to right sections
ins_right {
'o:encoding', -- option component same as &encoding in viml
upper = true, -- I'm not sure why it's upper case either ;)
condition = conditions.hide_in_width,
color = {fg = colors.green, gui = 'bold'}
}
ins_right {
'fileformat',
upper = true,
icons_enabled = false, -- I think icons are cool but Eviline doesn't have them. sigh
color = {fg = colors.green, gui = 'bold'}
}
ins_right {
'branch',
icon = '',
condition = conditions.check_git_workspace,
color = {fg = colors.violet, gui = 'bold'}
}
ins_right {
'diff',
-- Is it me or the symbol for modified us really weird
symbols = {added = '', modified = '', removed = ''},
color_added = colors.green,
color_modified = colors.orange,
color_removed = colors.red,
condition = conditions.hide_in_width
}
ins_right {'location'}
ins_right {'progress', color = {fg = colors.fg, gui = 'bold'}}
-- Now don't forget to initialize lualine
lualine.setup(config)

View File

@@ -0,0 +1 @@
vim.g.notes_directories = {"~/Nextcloud/Notes/vim" }

View File

@@ -0,0 +1,46 @@
local previewers = require('telescope.previewers')
local Job = require('plenary.job')
local new_maker = function(filepath, bufnr, opts)
filepath = vim.fn.expand(filepath)
Job:new({
command = 'file',
args = { '--mime-type', '-b', filepath },
on_exit = function(j)
local mime_type = vim.split(j:result()[1], '/')[1]
if mime_type == "text" then
previewers.buffer_previewer_maker(filepath, bufnr, opts)
else
-- maybe we want to write something to the buffer here
vim.schedule(function()
vim.api.nvim_buf_set_lines(bufnr, 0, -1, false, { 'BINARY' })
end)
end
end
}):sync()
end
require('telescope').setup {
defaults = {
buffer_previewer_maker = new_maker,
file_ignore_patterns = {"**/*.pdf"},
},
extensions = {
fzf = {
fuzzy = true, -- false will only do exact matching
override_generic_sorter = true, -- override the generic sorter
override_file_sorter = true, -- override the file sorter
case_mode = "smart_case", -- or "ignore_case" or "respect_case"
-- the default case_mode is "smart_case"
}
}
}
require('telescope').load_extension('fzf')
local map = vim.api.nvim_set_keymap
-- Find files using Telescope command-line sugar.
map('n', '<leader>e', '<cmd>Telescope find_files<cr>', {})
map('n', '<leader>g', '<cmd>Telescope live_grep<cr>', {})
map('n', '<leader>b', '<cmd>Telescope buffers<cr>', {})
map('n', '<leader>h', '<cmd>Telescope help_tags<cr>', {})

View File

@@ -0,0 +1,12 @@
require'nvim-treesitter.configs'.setup {
-- One of "all", "maintained" (parsers with maintainers), or a list of languages
ensure_installed = "maintained",
highlight = {
enable = true,
},
indent = {
enable = false,
}
}
-- vim.opt.foldmethod = "expr"
-- vim.opt.foldexpr = "nvim_treesitter#foldexpr()"

View File

@@ -0,0 +1,6 @@
vim.g.maplocalleader = " "
vim.g.vimtex_view_method = 'zathura'
-- Les fichiers sty et cls sont vus comme des fichiers tex
vim.cmd("autocmd BufRead,BufNewFile *.{sty,cls} setlocal syntax=tex")

View File

@@ -21,37 +21,32 @@ local on_attach = function(client, bufnr)
-- Rename
buf_set_keymap('n', '<leader>rn', '<cmd>lua vim.lsp.buf.rename()<CR>', opts)
-- je sais pas ce c'est que ces workspaces
buf_set_keymap('n', '<leader>wa', '<cmd>lua vim.lsp.buf.add_workspace_folder()<CR>', opts)
buf_set_keymap('n', '<leader>wr', '<cmd>lua vim.lsp.buf.remove_workspace_folder()<CR>', opts)
buf_set_keymap('n', '<leader>wl', '<cmd>lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))<CR>', opts)
-- ??
-- proposions from lsp
buf_set_keymap('n', '<leader>ca', '<cmd>lua vim.lsp.buf.code_action()<CR>', opts)
-- Details on diagnostics
buf_set_keymap('n', '<leader>d', '<cmd>lua vim.lsp.diagnostic.show_line_diagnostics()<CR>', opts)
buf_set_keymap('n', '<leader>d', '<cmd>lua vim.diagnostic.open_float()<CR>', opts)
-- Cycle over diagnostics
buf_set_keymap('n', '[d', '<cmd>lua vim.lsp.diagnostic.goto_prev()<CR>', opts)
buf_set_keymap('n', ']d', '<cmd>lua vim.lsp.diagnostic.goto_next()<CR>', opts)
buf_set_keymap('n', '<leader>df', '<cmd>lua vim.diagnostic.goto_prev()<CR>', opts)
buf_set_keymap('n', '<leader>dp', '<cmd>lua vim.diagnostic.goto_next()<CR>', opts)
-- Get diagnostic on local list
buf_set_keymap('n', '<leader>q', '<cmd>lua vim.lsp.diagnostic.set_loclist()<CR>', opts)
buf_set_keymap('n', '<leader>q', '<cmd>lua vim.diagnostic.setloclist()<CR>', opts)
buf_set_keymap("n", "<leader>f", "<cmd>lua vim.lsp.buf.formatting()<CR>", opts)
buf_set_keymap('n', 'gD', '<Cmd>lua vim.lsp.buf.declaration()<CR>', opts)
buf_set_keymap('n', 'gd', '<Cmd>lua vim.lsp.buf.definition()<CR>', opts)
buf_set_keymap('n', 'gi', '<cmd>lua vim.lsp.buf.implementation()<CR>', opts)
buf_set_keymap('n', '<C-k>', '<cmd>lua vim.lsp.buf.signature_help()<CR>', opts)
buf_set_keymap('n', '<leader>D', '<cmd>lua vim.lsp.buf.type_definition()<CR>', opts)
end
-- Use a loop to conveniently call 'setup' on multiple servers and
-- map buffer local keybindings when the language server attaches
local servers = { "texlab", "pyright", "vuels", "tsserver" }
local servers = { "texlab", "pyright", "vuels", "tsserver", "html" }
for _, lsp in ipairs(servers) do
nvim_lsp[lsp].setup {
on_attach = on_attach,
flags = {
debounce_text_changes = 150,
}
},
}
end

View File

@@ -0,0 +1,17 @@
local map = vim.api.nvim_set_keymap
local default_opts = {noremap = true, silent = true}
-- move around splits using Ctrl + {h,j,k,l}
map('n', '<C-h>', '<C-w>h', default_opts)
map('n', '<C-j>', '<C-w>j', default_opts)
map('n', '<C-k>', '<C-w>k', default_opts)
map('n', '<C-l>', '<C-w>l', default_opts)
-- Align blocks of text and keep them selected
map('v', '<', '<gv', {})
map('v', '>', '>gv', {})
-- Automatically spell check last error in insert mode
map('i', '<c-f>', '<c-g>u<Esc>[s1z=`]a<c-g>u', default_opts)

View File

@@ -0,0 +1,83 @@
-- Only required if you have packer configured as `opt`
vim.cmd [[packadd packer.nvim]]
return require('packer').startup(function()
use 'morhetz/gruvbox'
-- Status line
use {
'hoob3rt/lualine.nvim',
config = [[require('config.lualine')]],
}
use 'tpope/vim-fugitive'
use 'mhinz/vim-signify'
use 'tpope/vim-surround'
use 'tpope/vim-repeat'
use {
'neovim/nvim-lspconfig',
requires = {
"hrsh7th/cmp-nvim-lsp"
}
}
use {
'hrsh7th/nvim-cmp',
event = 'InsertEnter',
config = [[require('completion')]],
requires = {
'hrsh7th/vim-vsnip',
-- 'hrsh7th/vim-vsnip-integ',
-- 'rafamadriz/friendly-snippets',
},
}
use {'hrsh7th/cmp-vsnip', after = 'nvim-cmp'}
use {'hrsh7th/cmp-buffer', after = 'nvim-cmp'}
use {'hrsh7th/cmp-path', after = 'nvim-cmp'}
use {'hrsh7th/cmp-nvim-lsp', after = 'nvim-cmp'}
-- use {'f3fora/cmp-spell', after = 'nvim-cmp'}
use 'nvim-lua/popup.nvim'
use {
'nvim-telescope/telescope.nvim',
config = [[require('config.telescope')]],
requires = { 'nvim-lua/plenary.nvim'}
}
use {'nvim-telescope/telescope-fzf-native.nvim', run = 'make' }
use {
'lervag/vimtex',
config = [[require('config.vimtex')]],
}
-- Highlight on Yank
use 'machakann/vim-highlightedyank'
-- Autoclose parenthesis
use 'jiangmiao/auto-pairs'
use 'kyazdani42/nvim-web-devicons'
use {
'xolox/vim-notes',
config = [[require('config.notes')]],
requires = {
'xolox/vim-misc',
}
}
use 'christoomey/vim-tmux-navigator'
use {
'nvim-treesitter/nvim-treesitter',
config=[[require('config.treesitter')]],
run = ':TSUpdate',
}
use {
'norcalli/nvim-colorizer.lua',
config = [[require('config.colorizer')]],
}
end)

View File

@@ -0,0 +1,55 @@
local cmd = vim.cmd -- execute Vim commands
local exec = vim.api.nvim_exec -- execute Vimscript
-- local fn = vim.fn -- call Vim functions
local g = vim.g -- global variables
local opt = vim.opt -- global/buffer/windows-scoped options
g.mapleader = ' ' -- Leaderkey
g.showmode = true
g.hidden = true -- Required to keep multiple buffers open multiple buffers
opt.mouse = 'a' -- enable mouse
opt.clipboard = 'unnamedplus' -- copy/paste with system
opt.swapfile = false -- no swapfile
opt.wrap = true -- Display long lines as just one line
opt.expandtab = true -- Use space instead of tabs
opt.tabstop = 4 -- Insert 4 spaces for a tab
opt.shiftwidth = 4 -- Change the number of space characters inserted for indentation
opt.smarttab = true -- Makes tabbing smarter will realize you have 2 vs 4
opt.autoindent = true -- Good auto indent
opt.foldmethod='indent'
opt.number = true -- show line number
opt.relativenumber = true -- show relative line number
opt.cursorline = true -- highlight current line
opt.ignorecase = true -- Ignore case on search
opt.smartcase = true -- ignore lowercse for the whoel pattern
opt.completeopt = 'menuone,noselect,noinsert' -- completion options
opt.spell = true
opt.spelllang = {'fr', 'en'}
opt.nrformats = opt.nrformats + 'alpha'
g.showtabline = true
-- don't auto commenting new lines
cmd[[au BufEnter * set fo-=c fo-=r fo-=o]]
opt.showmatch = true -- show parenthethis match
-- Highlight on yank
exec([[
augroup YankHighlight
autocmd!
autocmd TextYankPost * silent! lua vim.highlight.on_yank{higroup="IncSearch", timeout=700}
augroup end
]], false)
cmd('colorscheme gruvbox')
-- Python 3
g.python3_host_prog="~/.venv/nvim/bin/python"

View File

@@ -1,10 +0,0 @@
let g:lightline = {
\ 'colorscheme': 'wombat',
\ 'active': {
\ 'left': [ [ 'mode', 'paste' ],
\ [ 'gitbranch', 'readonly', 'relativepath', 'modified'] ]
\ },
\ 'component_function': {
\ 'gitbranch': 'FugitiveHead'
\ },
\ }

View File

@@ -1,101 +0,0 @@
let g:compe = {}
let g:compe.enabled = v:true
let g:compe.autocomplete = v:true
let g:compe.debug = v:false
let g:compe.min_length = 1
let g:compe.preselect = 'enable'
let g:compe.throttle_time = 80
let g:compe.source_timeout = 200
let g:compe.resolve_timeout = 800
let g:compe.incomplete_delay = 400
let g:compe.max_abbr_width = 100
let g:compe.max_kind_width = 100
let g:compe.max_menu_width = 100
let g:compe.documentation = v:true
let g:compe.source = {}
let g:compe.source.path = v:true
let g:compe.source.buffer = v:true
let g:compe.source.calc = v:true
let g:compe.source.nvim_lsp = v:true
let g:compe.source.nvim_lua = v:true
let g:compe.source.vsnip = v:true
let g:compe.source.ultisnips = v:true
let g:compe.source.luasnip = v:true
let g:compe.source.emoji = v:false
" NOTE: You can use other key to expand snippet.
" Expand
imap <expr> <C-j> vsnip#expandable() ? '<Plug>(vsnip-expand)' : '<C-j>'
smap <expr> <C-j> vsnip#expandable() ? '<Plug>(vsnip-expand)' : '<C-j>'
" Expand or jump
imap <expr> <C-l> vsnip#available(1) ? '<Plug>(vsnip-expand-or-jump)' : '<C-l>'
smap <expr> <C-l> vsnip#available(1) ? '<Plug>(vsnip-expand-or-jump)' : '<C-l>'
" Jump forward or backward
imap <expr> <Tab> vsnip#jumpable(1) ? '<Plug>(vsnip-jump-next)' : '<Tab>'
smap <expr> <Tab> vsnip#jumpable(1) ? '<Plug>(vsnip-jump-next)' : '<Tab>'
imap <expr> <S-Tab> vsnip#jumpable(-1) ? '<Plug>(vsnip-jump-prev)' : '<S-Tab>'
smap <expr> <S-Tab> vsnip#jumpable(-1) ? '<Plug>(vsnip-jump-prev)' : '<S-Tab>'
" Select or cut text to use as $TM_SELECTED_TEXT in the next snippet.
" See https://github.com/hrsh7th/vim-vsnip/pull/50
nmap s <Plug>(vsnip-select-text)
xmap s <Plug>(vsnip-select-text)
nmap S <Plug>(vsnip-cut-text)
xmap S <Plug>(vsnip-cut-text)
" " If you want to use snippet for multiple filetypes, you can `g:vsnip_filetypes` for it.
" let g:vsnip_filetypes = {}
" let g:vsnip_filetypes.javascriptreact = ['javascript']
" let g:vsnip_filetypes.typescriptreact = ['typescript']
lua << EOF
local t = function(str)
return vim.api.nvim_replace_termcodes(str, true, true, true)
end
local check_back_space = function()
local col = vim.fn.col('.') - 1
if col == 0 or vim.fn.getline('.'):sub(col, col):match('%s') then
return true
else
return false
end
end
-- Use (s-)tab to:
--- move to prev/next item in completion menuone
--- jump to prev/next snippet's placeholder
_G.tab_complete = function()
if vim.fn.pumvisible() == 1 then
return t "<C-n>"
elseif check_back_space() then
return t "<Tab>"
else
return vim.fn['compe#complete']()
end
end
_G.s_tab_complete = function()
if vim.fn.pumvisible() == 1 then
return t "<C-p>"
else
return t "<S-Tab>"
end
end
vim.api.nvim_set_keymap("i", "<Tab>", "v:lua.tab_complete()", {expr = true})
vim.api.nvim_set_keymap("s", "<Tab>", "v:lua.tab_complete()", {expr = true})
vim.api.nvim_set_keymap("i", "<S-Tab>", "v:lua.s_tab_complete()", {expr = true})
vim.api.nvim_set_keymap("s", "<S-Tab>", "v:lua.s_tab_complete()", {expr = true})
--This line is important for auto-import
vim.api.nvim_set_keymap('i', '<cr>', 'compe#confirm("<cr>")', { expr = true })
vim.api.nvim_set_keymap('i', '<c-space>', 'compe#complete()', { expr = true })
EOF
let g:vsnip_snippet_dir = expand('~/.config/nvim/vsnips')

View File

@@ -1,48 +0,0 @@
" auto-install vim-plug
if empty(glob('~/.config/nvim/autoload/plug.vim'))
silent !curl -fLo ~/.config/nvim/autoload/plug.vim --create-dirs
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
"autocmd VimEnter * PlugInstall
"autocmd VimEnter * PlugInstall | source $MYVIMRC
endif
call plug#begin('~/.config/nvim/autoload/plugged')
Plug 'jnurmine/Zenburn'
Plug 'itchyny/lightline.vim'
"Plug 'tpope/vim-sensible'
Plug 'tpope/vim-fugitive'
Plug 'mhinz/vim-signify'
Plug 'tpope/vim-surround'
Plug 'tpope/vim-repeat'
Plug 'junegunn/goyo.vim'
Plug 'christoomey/vim-tmux-navigator'
Plug 'Yggdroot/indentLine'
" Plug 'SirVer/ultisnips'
" Plug 'honza/vim-snippets'
Plug 'neovim/nvim-lspconfig'
Plug 'hrsh7th/nvim-compe'
Plug 'hrsh7th/vim-vsnip'
Plug 'hrsh7th/vim-vsnip-integ'
Plug 'rafamadriz/friendly-snippets'
" Plug 'nvim-lua/completion-nvim'
Plug 'nvim-lua/popup.nvim'
Plug 'nvim-lua/plenary.nvim'
Plug 'nvim-telescope/telescope.nvim'
Plug 'lervag/vimtex'
" Highlight on Yank
Plug 'machakann/vim-highlightedyank'
" Autoclose parenthesis
" Plug 'cohama/lexima.vim'
Plug 'jiangmiao/auto-pairs'
" Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'}
call plug#end()

View File

@@ -1,25 +0,0 @@
let maplocalleader = "\<Space>"
let g:tex_conceal = ""
set conceallevel=0
let g:vimtex_compiler_latexmk = {
\ 'backend' : 'nvim',
\ 'background' : 1,
\ 'build_dir' : '',
\ 'callback' : 0,
\ 'continuous' : 1,
\ 'options' : [
\ '-pdf',
\ '-verbose',
\ '-file-line-error',
\ '-synctex=1',
\ '-interaction=nonstopmode',
\ '-silent',
\ '-shell-escape',
\ ],
\}
let g:vimtex_view_method = 'zathura'
" Les fichiers sty et cls sont vus comme des fichiers tex
autocmd BufRead,BufNewFile *.{sty,cls} setlocal syntax=tex

View File

@@ -0,0 +1,18 @@
{
"Date": {
"prefix": "date",
"body": [
"$CURRENT_YEAR-$CURRENT_MONTH-$CURRENT_DATE"
]
},
"Lorem Ipsum Sentence": {
"prefix": "loremSent",
"body": "Lorem ipsum dolor sit amet, qui minim labore adipisicing minim sint cillum sint consectetur cupidatat.",
"description": "Lorem Ipsum Sentence"
},
"Lorem Ipsum Paragraph": {
"prefix": "loremPara",
"body": "Lorem ipsum dolor sit amet, officia excepteur ex fugiat reprehenderit enim labore culpa sint ad nisi Lorem pariatur mollit ex esse exercitation amet. Nisi anim cupidatat excepteur officia. Reprehenderit nostrud nostrud ipsum Lorem est aliquip amet voluptate voluptate dolor minim nulla est proident. Nostrud officia pariatur ut officia. Sit irure elit esse ea nulla sunt ex occaecat reprehenderit commodo officia dolor Lorem duis laboris cupidatat officia voluptate. Culpa proident adipisicing id nulla nisi laboris ex in Lorem sunt duis officia eiusmod. Aliqua reprehenderit commodo ex non excepteur duis sunt velit enim. Voluptate laboris sint cupidatat ullamco ut ea consectetur et est culpa et culpa duis.",
"description": "Lorem Ipsum Paragraph"
}
}

View File

@@ -1,14 +1,48 @@
{
"tabular": {
"prefix": "tabular",
"\\begin{}…\\end{}": {
"prefix": "begin",
"body": [
"\\\\begin{tabular}{$1}",
"\\\\hline",
"\\\\begin{${1:env}}",
"\t$0",
"\\\\hline",
"\\\\end{tabular}"
"\\\\end{${1:env}}"
],
"description": "tabular"
"description": "Begin - End"
},
"Display Math — \\[ … \\]": {
"prefix": "$$",
"body": [
"\\[",
"\t$TM_SELECTED_TEXT$1",
"\\]"
],
"description": "Display Math"
},
"Itemize": {
"prefix": "item",
"body": [
"\\\\begin{itemize}",
"\t\\item $0",
"\\\\end{itemize}"
],
"description": "Itemize"
},
"Enumerate": {
"prefix": "enum",
"body": [
"\\\\begin{enumerate}",
"\t\\item $0",
"\\\\end{enumerate}"
],
"description": "enumerate"
},
"Task": {
"prefix": "task",
"body": [
"\\\\begin{tasks}(${1:2})",
"\t\\item $0",
"\\\\end{task}"
],
"description": "enumerate"
},
"center": {
"prefix": "center",
@@ -19,6 +53,17 @@
],
"description": "center"
},
"tabular": {
"prefix": "tabular",
"body": [
"\\\\begin{tabular}{$1}",
"\t\\\\hline",
"\t$0",
"\t\\\\hline",
"\\\\end{tabular}"
],
"description": "tabular"
},
"minipage": {
"prefix": "minipage",
"body": [
@@ -27,5 +72,24 @@
"\\\\end{minipage}"
],
"description": "minipage"
},
"multicols": {
"prefix": "multicols",
"body": [
"\\\\begin{multicols}{${1:2}}",
"\t$0",
"\\\\end{multicols}"
],
"description": "multicols"
},
"exercise": {
"prefix": "exercise",
"body": [
"\\\\begin{exercise}[subtitle={${1:subtitle}}, step={${2:1}}, origin={${3:Création}}, topics={${4:chapitre}}, tags={${5:tags}}, mode={${5:groupe}}]",
"\t$0",
"\\\\end{exercise}"
],
"description": "exercise xsim"
}
}

1
nvim/.latexmkrc Normal file
View File

@@ -0,0 +1 @@
$pdf_mode = 4;

View File

@@ -0,0 +1,5 @@
#!/bin/sh
nm-applet &
pasystray &
nextcloud &
xrandr --output VGA-1 --off --output HDMI-1 --mode 1920x1080 --pos 1080x420 --rotate normal --output DP-1 --off --output HDMI-2 --mode 1920x1080 --pos 0x0 --rotate left --output DP-2 --off

View File

@@ -0,0 +1,267 @@
# Copyright (c) 2010 Aldo Cortesi
# Copyright (c) 2010, 2014 dequis
# Copyright (c) 2012 Randall Ma
# Copyright (c) 2012-2014 Tycho Andersen
# Copyright (c) 2012 Craig Barnes
# Copyright (c) 2013 horsik
# Copyright (c) 2013 Tao Sauvage
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
from libqtile.config import Key, Screen, Group, Drag, Click, ScratchPad, DropDown
from libqtile.command import lazy
from libqtile import layout, bar, widget, extension, hook
from libqtile.log_utils import logger
from os.path import expanduser
from subprocess import call
from typing import List # noqa: F401
wmname = "???"
MOD = "mod4"
TERM = "urxvt"
# Base16 - hybrid (with 5 and 13 from jmbi)
colors = {
# special
"FG": "#c5c8c6",
"BG": "#1d1f21",
"C": "#c5c8c6",
# black
0: "#282a2e",
8: "#373b41",
# red
1: "#a54242",
9: "#cc6666",
# green
2: "#8c9440",
10: "#b5bd68",
# yellow
3: "#de935f",
11: "#f0c674",
# blue
4: "#5f819d",
12: "#81a2be",
# magenta
5: "#d13516",
13: "#c25431",
# cyan
6: "#5e8d87",
14: "#8abeb7",
# white
7: "#707880",
15: "#c5c8c6",
}
keys = [
Key([MOD], "f", lazy.window.toggle_floating()),
# Moving inside a screen
Key([MOD], "Tab", lazy.layout.next()),
Key([MOD], "j", lazy.layout.down()),
Key([MOD], "k", lazy.layout.up()),
Key([MOD, "shift"], "Tab", lazy.layout.rotate()),
# Key([MOD, "shift"], "Tab", lazy.spawncmd()), # circle inside layout
Key([MOD, "shift"], "k", lazy.layout.shuffle_up()),
Key([MOD, "shift"], "j", lazy.layout.shuffle_down()),
# Move between screens
Key([MOD], "l", lazy.to_screen(0)),
Key([MOD], "h", lazy.to_screen(1)),
# Key([MOD, "shift"], "l", move to screen 1),
# Key([MOD, "shift"], "h", move to screen 0),
# Toggle between different layouts as defined below
Key([MOD], "space", lazy.next_layout()),
# Toggle between split and unsplit sides of stack.
# Split = all windows displayed
# Unsplit = 1 window displayed, like Max layout, but still with
# multiple stack panes
# Key([MOD, "shift"], "Return", lazy.layout.toggle_split()),
# Swap panes of split stack
# Key([MOD, "shift"], "space", lazy.layout.rotate()),
# Screens
Key([MOD], "r", lazy.spawncmd()),
# Key([MOD], 'r', lazy.run_extension(extension.DmenuRun(
# dmenu_prompt=">",
# dmenu_font="Andika-8",
# background="#15181a",
# foreground="#00ff00",
# selected_background="#079822",
# selected_foreground="#fff",
# dmenu_height=24, # Only supported by some dmenu forks
# ))),
Key([MOD], "Return", lazy.spawn(TERM)),
Key([MOD], "q", lazy.window.kill()),
Key([MOD, "control"], "r", lazy.restart()),
Key([MOD, "control"], "q", lazy.shutdown()),
Key([MOD, "control"], "equal", lazy.spawn("systemctl suspend")),
# Change the volume if our keyboard has keys
Key([], "XF86AudioRaiseVolume", lazy.spawn("pamixer -i 2")),
Key([], "XF86AudioLowerVolume", lazy.spawn("pamixer -d 2")),
Key([], "XF86AudioMute", lazy.spawn("pamixer -t")),
]
groups = [
Group("t:", spawn="firefox", layout="Tall", persist=True),
Group("y:", spawn="thunderbird", layout="verticaltile", persist=True),
Group("u:", spawn=TERM+" -e sh -c tmuxp load enseignement", layout="TallRight", persist=True),
Group("i:", layout="Wide", persist=True),
Group("o:", layout="TallRight", persist=True),
Group("p:", layout="Wide", persist=True),
]
groups_keys = ["t", "y", "u", "i", "o", "p"]
for i, g in enumerate(groups):
k = groups_keys[i]
keys.extend(
[
# mod1 + letter of group = switch to group
Key([MOD], k, lazy.group[g.name].toscreen()),
# mod1 + shift + letter of group = switch to & move focused window to group
Key(
[MOD, "shift"], k, lazy.window.togroup(g.name)
), # , lazy.group[g.name].toscreen()),
]
)
groups.append(
ScratchPad(
"scratchpad",
[
DropDown(
"music", TERM+" -e sh -c mocp", x=0.25, y=0.25, height=0.5, width=0.5, opacity=0.8
),
],
),
)
keys.extend(
[
Key([MOD], "m", lazy.group["scratchpad"].dropdown_toggle("music")),
]
)
borders = {
"border_focus": colors[13],
"border_normal": colors["BG"],
}
layouts = [
layout.Max(),
layout.VerticalTile(**borders),
layout.MonadTall(
name="Tall",
align=0,
ratio=0.5,
**borders,
),
layout.MonadTall(
name="TallRight",
align=0,
ratio=0.7,
**borders,
),
layout.MonadWide(
name="Wide",
ratio=0.8,
**borders,
),
]
widget_defaults = dict(
font="DroidSans",
fontsize=12,
padding=3,
)
extension_defaults = widget_defaults.copy()
screens = [
Screen(),
Screen(
top=bar.Bar(
[
widget.GroupBox(
active=colors["FG"],
foreground=colors[8],
highlight_color=[colors[1], colors[13]],
highlight_method="border",
this_current_screen_border=colors[13],
this_screen_border=colors[8],
other_current_screen_border=colors[13],
other_screen_border=colors[8],
),
widget.Prompt(
background=colors[13],
),
# widget.WindowName(),
widget.Spacer(bar.STRETCH),
widget.Clock(
format="%a %d %B %Y %H:%M",
background=colors[13],
foreground=colors[15],
),
widget.Systray(),
# widget.CurrentLayoutIcon(scale=0.5),
],
size=24,
background=colors["BG"],
),
),
]
# Drag floating layouts.
mouse = [
Drag(
[MOD],
"Button1",
lazy.window.set_position_floating(),
start=lazy.window.get_position(),
),
Drag(
[MOD], "Button3", lazy.window.set_size_floating(), start=lazy.window.get_size()
),
Click([MOD], "Button2", lazy.window.bring_to_front()),
]
dgroups_key_binder = None
dgroups_app_rules = [] # type: List
main = None
follow_mouse_focus = True
bring_front_click = False
cursor_warp = False
auto_fullscreen = True
focus_on_window_activation = "smart"
@hook.subscribe.client_new
def floating_dialogs(window):
dialog = window.window.get_wm_type() == 'dialog'
transient = window.window.get_wm_transient_for()
if dialog or transient:
window.floating = True
@hook.subscribe.startup_once
def autostart():
home = expanduser("~")
call([home + "/.config/qtile/autostart.sh"])
@hook.subscribe.screen_change
def restart_on_randr(qtile):
qtile.cmd_restart()

View File

@@ -0,0 +1,2 @@
#!/bin/sh
xrandr --output VGA-1 --off --output HDMI-1 --mode 1920x1080 --pos 1080x420 --rotate normal --output DP-1 --off --output HDMI-2 --mode 1920x1080 --pos 0x0 --rotate left --output DP-2 --off

View File

@@ -0,0 +1,19 @@
# If a config.py file exists, this file is ignored unless it's explicitly loaded
# via config.load_autoconfig(). For more information, see:
# https://github.com/qutebrowser/qutebrowser/blob/master/doc/help/configuring.asciidoc#loading-autoconfigyml
# DO NOT edit this file by hand, qutebrowser will overwrite it.
# Instead, create a config.py - see :help for details.
config_version: 2
settings:
auto_save.session:
global: true
content.blocking.method:
global: both
content.geolocation:
https://www.reseau-canope.fr: false
spellcheck.languages:
global:
- fr-FR
zoom.default:
global: 120%

View File

@@ -0,0 +1,2 @@
config.load_autoconfig()
config.source("gruvbox_dark_medium.py")

View File

@@ -0,0 +1,300 @@
# base16-qutebrowser (https://github.com/theova/base16-qutebrowser)
# Base16 qutebrowser template by theova
# Gruvbox dark, medium scheme by Dawid Kurek (dawikur@gmail.com), morhetz (https://github.com/morhetz/gruvbox)
base00 = "#282828"
base01 = "#3c3836"
base02 = "#504945"
base03 = "#665c54"
base04 = "#bdae93"
base05 = "#d5c4a1"
base06 = "#ebdbb2"
base07 = "#fbf1c7"
base08 = "#fb4934"
base09 = "#fe8019"
base0A = "#fabd2f"
base0B = "#b8bb26"
base0C = "#8ec07c"
base0D = "#83a598"
base0E = "#d3869b"
base0F = "#d65d0e"
# set qutebrowser colors
# Text color of the completion widget. May be a single color to use for
# all columns or a list of three colors, one for each column.
c.colors.completion.fg = base05
# Background color of the completion widget for odd rows.
c.colors.completion.odd.bg = base01
# Background color of the completion widget for even rows.
c.colors.completion.even.bg = base00
# Foreground color of completion widget category headers.
c.colors.completion.category.fg = base0A
# Background color of the completion widget category headers.
c.colors.completion.category.bg = base00
# Top border color of the completion widget category headers.
c.colors.completion.category.border.top = base00
# Bottom border color of the completion widget category headers.
c.colors.completion.category.border.bottom = base00
# Foreground color of the selected completion item.
c.colors.completion.item.selected.fg = base05
# Background color of the selected completion item.
c.colors.completion.item.selected.bg = base02
# Top border color of the selected completion item.
c.colors.completion.item.selected.border.top = base02
# Bottom border color of the selected completion item.
c.colors.completion.item.selected.border.bottom = base02
# Foreground color of the matched text in the selected completion item.
c.colors.completion.item.selected.match.fg = base0B
# Foreground color of the matched text in the completion.
c.colors.completion.match.fg = base0F
# Color of the scrollbar handle in the completion view.
c.colors.completion.scrollbar.fg = base05
# Color of the scrollbar in the completion view.
c.colors.completion.scrollbar.bg = base00
# Background color of disabled items in the context menu.
c.colors.contextmenu.disabled.bg = base01
# Foreground color of disabled items in the context menu.
c.colors.contextmenu.disabled.fg = base04
# Background color of the context menu. If set to null, the Qt default is used.
c.colors.contextmenu.menu.bg = base00
# Foreground color of the context menu. If set to null, the Qt default is used.
c.colors.contextmenu.menu.fg = base05
# Background color of the context menus selected item. If set to null, the Qt default is used.
c.colors.contextmenu.selected.bg = base02
#Foreground color of the context menus selected item. If set to null, the Qt default is used.
c.colors.contextmenu.selected.fg = base05
# Background color for the download bar.
c.colors.downloads.bar.bg = base00
# Color gradient start for download text.
c.colors.downloads.start.fg = base00
# Color gradient start for download backgrounds.
c.colors.downloads.start.bg = base0D
# Color gradient end for download text.
c.colors.downloads.stop.fg = base00
# Color gradient stop for download backgrounds.
c.colors.downloads.stop.bg = base0C
# Foreground color for downloads with errors.
c.colors.downloads.error.fg = base08
# Font color for hints.
c.colors.hints.fg = base00
# Background color for hints. Note that you can use a `rgba(...)` value
# for transparency.
c.colors.hints.bg = base0A
# Font color for the matched part of hints.
c.colors.hints.match.fg = base05
# Text color for the keyhint widget.
c.colors.keyhint.fg = base05
# Highlight color for keys to complete the current keychain.
c.colors.keyhint.suffix.fg = base05
# Background color of the keyhint widget.
c.colors.keyhint.bg = base00
# Foreground color of an error message.
c.colors.messages.error.fg = base00
# Background color of an error message.
c.colors.messages.error.bg = base08
# Border color of an error message.
c.colors.messages.error.border = base08
# Foreground color of a warning message.
c.colors.messages.warning.fg = base00
# Background color of a warning message.
c.colors.messages.warning.bg = base0E
# Border color of a warning message.
c.colors.messages.warning.border = base0E
# Foreground color of an info message.
c.colors.messages.info.fg = base05
# Background color of an info message.
c.colors.messages.info.bg = base00
# Border color of an info message.
c.colors.messages.info.border = base00
# Foreground color for prompts.
c.colors.prompts.fg = base05
# Border used around UI elements in prompts.
c.colors.prompts.border = base00
# Background color for prompts.
c.colors.prompts.bg = base00
# Background color for the selected item in filename prompts.
c.colors.prompts.selected.bg = base02
# Foreground color for the selected item in filename prompts.
c.colors.prompts.selected.fg = base05
# Foreground color of the statusbar.
c.colors.statusbar.normal.fg = base0B
# Background color of the statusbar.
c.colors.statusbar.normal.bg = base00
# Foreground color of the statusbar in insert mode.
c.colors.statusbar.insert.fg = base00
# Background color of the statusbar in insert mode.
c.colors.statusbar.insert.bg = base0A
# Foreground color of the statusbar in passthrough mode.
c.colors.statusbar.passthrough.fg = base00
# Background color of the statusbar in passthrough mode.
c.colors.statusbar.passthrough.bg = base0C
# Foreground color of the statusbar in private browsing mode.
c.colors.statusbar.private.fg = base00
# Background color of the statusbar in private browsing mode.
c.colors.statusbar.private.bg = base01
# Foreground color of the statusbar in command mode.
c.colors.statusbar.command.fg = base05
# Background color of the statusbar in command mode.
c.colors.statusbar.command.bg = base00
# Foreground color of the statusbar in private browsing + command mode.
c.colors.statusbar.command.private.fg = base05
# Background color of the statusbar in private browsing + command mode.
c.colors.statusbar.command.private.bg = base00
# Foreground color of the statusbar in caret mode.
c.colors.statusbar.caret.fg = base00
# Background color of the statusbar in caret mode.
c.colors.statusbar.caret.bg = base0E
# Foreground color of the statusbar in caret mode with a selection.
c.colors.statusbar.caret.selection.fg = base00
# Background color of the statusbar in caret mode with a selection.
c.colors.statusbar.caret.selection.bg = base0D
# Background color of the progress bar.
c.colors.statusbar.progress.bg = base0D
# Default foreground color of the URL in the statusbar.
c.colors.statusbar.url.fg = base05
# Foreground color of the URL in the statusbar on error.
c.colors.statusbar.url.error.fg = base08
# Foreground color of the URL in the statusbar for hovered links.
c.colors.statusbar.url.hover.fg = base05
# Foreground color of the URL in the statusbar on successful load
# (http).
c.colors.statusbar.url.success.http.fg = base0C
# Foreground color of the URL in the statusbar on successful load
# (https).
c.colors.statusbar.url.success.https.fg = base0B
# Foreground color of the URL in the statusbar when there's a warning.
c.colors.statusbar.url.warn.fg = base0E
# Background color of the tab bar.
c.colors.tabs.bar.bg = base00
# Color gradient start for the tab indicator.
c.colors.tabs.indicator.start = base0D
# Color gradient end for the tab indicator.
c.colors.tabs.indicator.stop = base0C
# Color for the tab indicator on errors.
c.colors.tabs.indicator.error = base08
# Foreground color of unselected odd tabs.
c.colors.tabs.odd.fg = base05
# Background color of unselected odd tabs.
c.colors.tabs.odd.bg = base01
# Foreground color of unselected even tabs.
c.colors.tabs.even.fg = base05
# Background color of unselected even tabs.
c.colors.tabs.even.bg = base00
# Background color of pinned unselected even tabs.
c.colors.tabs.pinned.even.bg = base0C
# Foreground color of pinned unselected even tabs.
c.colors.tabs.pinned.even.fg = base07
# Background color of pinned unselected odd tabs.
c.colors.tabs.pinned.odd.bg = base0B
# Foreground color of pinned unselected odd tabs.
c.colors.tabs.pinned.odd.fg = base07
# Background color of pinned selected even tabs.
c.colors.tabs.pinned.selected.even.bg = base02
# Foreground color of pinned selected even tabs.
c.colors.tabs.pinned.selected.even.fg = base05
# Background color of pinned selected odd tabs.
c.colors.tabs.pinned.selected.odd.bg = base02
# Foreground color of pinned selected odd tabs.
c.colors.tabs.pinned.selected.odd.fg = base05
# Foreground color of selected odd tabs.
c.colors.tabs.selected.odd.fg = base05
# Background color of selected odd tabs.
c.colors.tabs.selected.odd.bg = base0F
# Foreground color of selected even tabs.
c.colors.tabs.selected.even.fg = base05
# Background color of selected even tabs.
c.colors.tabs.selected.even.bg = base0F
# Background color for webpages if unset (or empty to use the theme's
# color).
# c.colors.webpage.bg = base00

View File

@@ -0,0 +1 @@

View File

@@ -0,0 +1,58 @@
; Global settings
[general]
; Set the day and night screen temperatures
temp-day=5700
temp-night=3500
; Disable the smooth fade between temperatures when Redshift starts and stops.
; 0 will cause an immediate change between screen temperatures.
; 1 will gradually apply the new screen temperature over a couple of seconds.
fade=1
; Solar elevation thresholds.
; By default, Redshift will use the current elevation of the sun to determine
; whether it is daytime, night or in transition (dawn/dusk). When the sun is
; above the degrees specified with elevation-high it is considered daytime and
; below elevation-low it is considered night.
;elevation-high=3
;elevation-low=-6
; Custom dawn/dusk intervals.
; Instead of using the solar elevation, the time intervals of dawn and dusk
; can be specified manually. The times must be specified as HH:MM in 24-hour
; format.
;dawn-time=6:00-7:45
;dusk-time=18:35-20:15
; Set the screen brightness. Default is 1.0.
brightness=0.8
; It is also possible to use different settings for day and night
; since version 1.8.
;brightness-day=0.7
;brightness-night=0.4
; Set the screen gamma (for all colors, or each color channel
; individually)
gamma=0.8
;gamma=0.8:0.7:0.8
; This can also be set individually for day and night since
; version 1.10.
;gamma-day=0.8:0.7:0.8
;gamma-night=0.6
; Set the location-provider: 'geoclue2', 'manual'.
; The location provider settings are in a different section.
location-provider=manual
; Set the adjustment-method: 'randr', 'vidmode', 'drm', 'wayland'.
; 'randr' is the preferred X11 method, 'vidmode' is an older API
; that works in some cases when 'randr' does not.
; The adjustment method settings are in a different section.
adjustment-method=wayland
; Configuration of the location-provider:
; type 'gammastep -l PROVIDER:help' to see the settings.
; ex: 'gammastep -l manual:help'
; Keep in mind that longitudes west of Greenwich (e.g. the Americas)
; are negative numbers.
[manual]
lat=46.1
lon=5.44
; Configuration of the adjustment-method
; type 'gammastep -m METHOD:help' to see the settings.
; ex: 'gammastep -m randr:help'
; In this example, randr is configured to adjust only screen 0.
; Note that the numbering starts from 0, so this is actually the first screen.
; If this option is not specified, Redshift will try to adjust _all_ screens.

View File

@@ -0,0 +1,25 @@
profile chanay {
output eDP-1 enable scale 1
output "Optoma Corporation Optoma SVGA Q71P7100939" position 0,0
}
profile stex101 {
output eDP-1 enable scale 1
output "Seiko Epson Corporation EPSON PJ 0x00000101" position 0,0
}
profile maison {
output eDP-1 enable scale 1 position 320,1440
output "Samsung Electric Company LS27A600U HNMR502540" position 0,0
}
profile bdp {
output eDP-1 enable scale 1 position 320,1440
output "Dell Inc. DELL U3417W 660X87290G9L" position 0,0
}
profile undocked {
output eDP-1 enable scale 1
}

23
sway/.config/mako/config Normal file
View File

@@ -0,0 +1,23 @@
sort=-time
layer=overlay
background-color=#282828
width=300
height=110
border-size=2
border-color=#88c0d0
border-radius=5
icons=0
max-icon-size=64
default-timeout=5000
ignore-timeout=1
font=monospace 10
[urgency=low]
border-color=#ebdbb2
[urgency=normal]
border-color=#d65d0e
[urgency=high]
border-color=#cc241d
default-timeout=0

View File

@@ -0,0 +1,124 @@
# permanently set alternative root dir. Use ":" to separate multiple roots
# which can be switched at runtime with shift+left/right
# root=/path/to/root
# rofi command. Make sure to have "$@" as last argument
_rofi () {
rofi -i -no-auto-select "$@"
}
# default command to generate passwords
_pwgen () {
pwgen -y "$@"
}
# image viewer to display qrcode of selected entry
# qrencode is needed to generate the image and a viewer
# that can read from pipes. Known viewers to work are feh and display
_image_viewer () {
# feh -
display
}
# It is possible to use wl-copy and wl-paste from wl-clipboard
# Just uncomment the lines with wl-copy and wl-paste
# and comment the xclip lines
#
_clip_in_primary() {
# xclip
wl-copy-p
}
_clip_in_clipboard() {
#xclip -selection clipboard
wl-copy
}
_clip_out_primary() {
# xclip -o
wl-paste -p
}
_clip_out_clipboard() {
# xclip --selection clipboard -o
wl-paste
}
# xdotool needs the keyboard layout to be set using setxkbmap
# You can do this in your autostart scripts (e.g. xinitrc)
# If for some reason, you cannot do this, you can set the command here.
# and set fix_layout to true
fix_layout=true
layout_cmd () {
setxkbmap fr
}
# fields to be used
URL_field='url'
USERNAME_field='user'
AUTOTYPE_field='autotype'
# delay to be used for :delay keyword
delay=2
# rofi-pass needs to close itself before it can type passwords. Set delay here.
wait=0.2
# delay between keypresses when typing (in ms)
xdotool_delay=12
## Programs to be used
# Editor
EDITOR='gvim -f'
# Browser
BROWSER='xdg-open'
## Misc settings
default_do='menu' # menu, autotype, copyPass, typeUser, typePass, copyUser, copyUrl, viewEntry, typeMenu, actionMenu, copyMenu, openUrl
auto_enter='false'
notify='false'
default_autotype='user :tab pass'
# color of the help messages
# leave empty for autodetection
help_color="#4872FF"
# Clipboard settings
# Possible options: primary, clipboard, both
clip=primary
# Seconds before clearing pass from clipboard
clip_clear=45
## Options for generating new password entries
# open new password entries in editor
edit_new_pass="true"
# default_user is also used for password files that have no user field.
default_user=:filename
#default_user="${ROFI_PASS_DEFAULT_USER-$(whoami)}"
#default_user2=mary_ann
#password_length=12
# Custom Keybindings
autotype="Alt+1"
type_user="Alt+2"
type_pass="Alt+3"
open_url="Alt+4"
copy_name="Alt+u"
copy_url="Alt+l"
copy_pass="Alt+p"
show="Alt+o"
copy_entry="Alt+2"
type_entry="Alt+1"
copy_menu="Alt+c"
action_menu="Alt+a"
type_menu="Alt+t"
help="Alt+h"
switch="Alt+x"

View File

@@ -0,0 +1,18 @@
configuration {
terminal: "kitty";
modi: "combi,window,drun";
combi-modi: "drun,window";
font: "Noto Sans Bold 10";
show-icons: true;
icon-theme: "Tela circle dark";
combi-hide-mode-prefix: true;
drun-show-actions: true;
drun-display-format: "{name}";
disable-history: false;
fullscreen: false;
hide-scrollbar: true;
sidebar-mode: false;
auto-select: false;
}
@theme "/home/lafrite/.local/share/rofi/rofi-themes-collection/themes/spotlight-dark.rasi"

254
sway/.config/sway/config Normal file
View File

@@ -0,0 +1,254 @@
# Default config for sway
#
# Copy this to ~/.config/sway/config and edit it to your liking.
#
# Read `man 5 sway` for a complete reference.
### Variables
#
# Logo key. Use Mod1 for Alt.
set $mod Mod4
# Home row direction keys, like vim
set $left h
set $down j
set $up k
set $right l
# Your preferred terminal emulator
set $term alacritty
# Your preferred application launcher
# Note: pass the final command to swaymsg so that the resulting window can be opened
# on the original workspace that the command was run on.
set $menu rofi -show drun
set $laptopScreen eDP-1
### Output configuration
#
# Default wallpaper (more resolutions are available in /usr/share/backgrounds/sway/)
output * bg ~/Images/Wallpapers/Pteridium.jpg fill
#
# Example configuration:
#
# output HDMI-A-1 resolution 1920x1080 position 1920,0
#
# You can get the names of your outputs by running: swaymsg -t get_outputs
### Idle configuration
#
# Example configuration:
#
# exec swayidle -w \
# timeout 300 'swaylock -f -c 000000' \
# timeout 600 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' \
# before-sleep 'swaylock -f -c 000000'
#
# This will lock your screen after 300 seconds of inactivity, then turn off
# your displays after another 300 seconds, and turn your screens back on when
# resumed. It will also lock your screen before your computer goes to sleep.
### Input configuration
input type:keyboard {
xkb_layout "fr"
xkb_variant ""
}
input * xkb_numlock enable
input type:touchpad {
natural_scroll enabled
tap enabled
}
#
# Example configuration:
#
# input "2:14:SynPS/2_Synaptics_TouchPad" {
# dwt enabled
# tap enabled
# natural_scroll enabled
# middle_emulation enabled
# }
#
# You can get the names of your inputs by running: swaymsg -t get_inputs
# Read `man 5 sway-input` for more information about this section.
### Key bindings
#
# Basics:
#
# Start a terminal
bindsym $mod+Return exec $term
# Kill focused window
bindsym $mod+q kill
# Start your launcher
bindsym $mod+d exec $menu
bindsym $mod+p exec rofi-pass
# Drag floating windows by holding down $mod and left mouse button.
# Resize them with right mouse button + $mod.
# Despite the name, also works for non-floating windows.
# Change normal to inverse to use left mouse button for resizing and right
# mouse button for dragging.
floating_modifier $mod normal
# Reload the configuration file
bindsym $mod+Shift+c reload
# Exit sway (logs you out of your Wayland session)
bindsym $mod+Shift+e exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -b 'Yes, exit sway' 'swaymsg exit'
#
# Moving around:
#
# Move your focus around
bindsym $mod+$left focus left
bindsym $mod+$down focus down
bindsym $mod+$up focus up
bindsym $mod+$right focus right
# Or use $mod+[up|down|left|right]
bindsym $mod+Left focus left
bindsym $mod+Down focus down
bindsym $mod+Up focus up
bindsym $mod+Right focus right
# Move the focused window with the same, but add Shift
bindsym $mod+Shift+$left move left
bindsym $mod+Shift+$down move down
bindsym $mod+Shift+$up move up
bindsym $mod+Shift+$right move right
# Ditto, with arrow keys
bindsym $mod+Shift+Left move left
bindsym $mod+Shift+Down move down
bindsym $mod+Shift+Up move up
bindsym $mod+Shift+Right move right
#
# Workspaces:
#
set $ws1 1: 
set $ws2 2: 
set $ws3 3: 
set $ws4 4: 
set $ws5 5: 
set $ws6 6: 
set $ws7 7: 
bindsym $mod+ampersand workspace $ws1
bindsym $mod+eacute workspace $ws2
bindsym $mod+quotedbl workspace $ws3
bindsym $mod+apostrophe workspace $ws4
bindsym $mod+parenleft workspace $ws5
bindsym $mod+minus workspace $ws6
bindsym $mod+egrave workspace $ws7
bindsym $mod+underscore workspace 8
bindsym $mod+ccedilla workspace 9
bindsym $mod+1 move container to workspace $ws1
bindsym $mod+2 move container to workspace $ws2
bindsym $mod+3 move container to workspace $ws3
bindsym $mod+4 move container to workspace $ws4
bindsym $mod+5 move container to workspace $ws5
bindsym $mod+6 move container to workspace $ws6
bindsym $mod+7 move container to workspace $ws7
bindsym $mod+8 move container to workspace 8
bindsym $mod+9 move container to workspace 9
bindsym $mod+Ctrl+greater move workspace to output right
bindsym $mod+Ctrl+less move workspace to output left
#
# Layout stuff:
#
# You can "split" the current object of your focus with
# $mod+b or $mod+v, for horizontal and vertical splits
# respectively.
bindsym $mod+b splith
bindsym $mod+v splitv
# Switch the current container between different layout styles
# bindsym $mod+s layout stacking
# bindsym $mod+w layout tabbed
bindsym $mod+e layout toggle split
# Make the current focus fullscreen
bindsym $mod+f fullscreen
# Toggle the current focus between tiling and floating mode
bindsym $mod+Shift+space floating toggle
# Swap focus between the tiling area and the floating area
bindsym $mod+space focus mode_toggle
# Move focus to the parent container
bindsym $mod+a focus parent
#
# Scratchpad:
#
# Sway has a "scratchpad", which is a bag of holding for windows.
# You can send windows there and get them back later.
# Move the currently focused window to the scratchpad
bindsym $mod+Shift+m move scratchpad
# Show the next scratchpad window or hide the focused scratchpad window.
# If there are multiple scratchpad windows, this command cycles through them.
bindsym $mod+m scratchpad show
#
# Resizing containers:
#
mode "resize" {
bindsym $left resize shrink width 10px
bindsym $down resize grow height 10px
bindsym $up resize shrink height 10px
bindsym $right resize grow width 10px
# Ditto, with arrow keys
bindsym Left resize shrink width 10px
bindsym Down resize grow height 10px
bindsym Up resize shrink height 10px
bindsym Right resize grow width 10px
# Return to default mode
bindsym Return mode "default"
bindsym Escape mode "default"
}
bindsym $mod+r mode "resize"
#
# Audio
#
bindsym XF86AudioRaiseVolume exec volumectl -u up
bindsym XF86AudioLowerVolume exec volumectl -u down
bindsym XF86AudioMute exec volumectl toggle-mute
bindsym XF86AudioMicMute exec volumectl -m toggle-mute
#
# Brightness
#
bindsym XF86MonBrightnessUp exec lightctl up
bindsym XF86MonBrightnessDown exec lightctl down
#
# Decoration
#
default_border pixel 1
# class border backgr. text indicator child_border
client.focused #d65d0e #be5046 #ffffff #be5046 #be5046
#
# Status Bar:
#
# Read `man 5 sway-bar` for more information about this section.
bar {
# position top
# output $laptopScreen
swaybar_command waybar
}
# include /etc/sway/config.d/*
include ~/.config/sway/config.d/*

View File

@@ -0,0 +1,18 @@
exec systemctl --user import-environment DISPLAY WAYLAND_DISPLAY SWAYSOCK
exec hash dbus-update-activation-environment 2>/dev/null && \
dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK
exec_always blueman-applet
exec_always /usr/bin/nm-applet --indicator
exec_always nextcloud
exec_always /usr/libexec/goa-daemon --replace
exec gammastep-indicator
exec mako
exec "avizo-service"
#exec_always pkill kanshi; exec_always kanshi
exec_always "systemctl --user import-environment; systemctl --user start sway-session.target"
exec swaymsg "workspace $ws1; exec firefox;"
exec swaymsg "workspace $ws2; exec thunderbird;"

View File

@@ -0,0 +1,11 @@
[Unit]
Description=Dynamic output configuration for Wayland compositors
Documentation=https://sr.ht/~emersion/kanshi
BindsTo=sway-session.target
[Service]
Type=simple
ExecStart=/usr/bin/kanshi
[Install]
WantedBy=sway-session.target

View File

@@ -0,0 +1,6 @@
[Unit]
Description=Sway compositor session
Documentation=man:systemd.special
BindsTo=graphical-session.target
Wants=graphical-session-pre.target
After=graphical-session-pre.target

View File

@@ -0,0 +1 @@
/home/lafrite/.config/systemd/user/kanshi.service

View File

@@ -0,0 +1,55 @@
{
"layer": "top",
"output": "eDP-1",
"height": 30,
"modules-left": ["sway/workspaces", "sway/mode"],
"modules-center": ["sway/window"],
"modules-right": ["pulseaudio", "battery", "tray", "clock"],
"sway/window": {
"max-length": 50
},
"sway/workspaces": {
"all-outputs": true
},
"battery": {
"states": {
// "good": 95,
"warning": 20,
"critical": 10
},
"format": "{capacity}% {icon}",
"format-charging": "{capacity}% ",
"format-plugged": "{capacity}% ",
"format-alt": "{time} {icon}",
// "format-good": "", // An empty format will hide the module
// "format-full": "",
"format-icons": ["", "", "", "", ""]
},
"clock": {
"format": "{:%a, %d. %b %H:%M}",
"on-click": "gnome-calendar"
},
"pulseaudio": {
// "scroll-step": 1, // %, can be a float
"format": "{volume}% {icon} {format_source}",
"format-bluetooth": "{volume}% {icon} {format_source}",
"format-bluetooth-muted": " {icon} {format_source}",
"format-muted": " {format_source}",
"format-source": "{volume}% ",
"format-source-muted": "",
"format-icons": {
"headphone": "",
"hands-free": "",
"headset": "",
"phone": "",
"portable": "",
"car": "",
"default": ["", "", ""]
},
"on-click": "pavucontrol"
},
"tray": {
"icon-size": 21,
"spacing": 10,
}
},

View File

@@ -0,0 +1,23 @@
@define-color background #282828;
@define-color foreground #ebdbb2;
@define-color black #282828;
@define-color red #cc241d;
@define-color green #98971a;
@define-color yellow #d79921;
@define-color blue #458588;
@define-color magenta #b16286;
@define-color cyan #689d6a;
@define-color white #a89984;
@define-color aqua #689d6a;
@define-color orange #d65d0e;
@define-color magenta_b #d3869b;
@define-color cyan_b #8ec07c;
@define-color yellow_b #fabd2f;
@define-color white_b #ebdbb2;
@define-color black_b #928374;
@define-color red_b #fb4934;
@define-color green_b #b8bb26;
@define-color blue_b #83a598;
@define-color aqua_b #8ec07c;
@define-color orange_b #fe8010;

View File

@@ -0,0 +1,70 @@
* {
border: none;
border-radius: 0;
font-family: Droid Nerd Font Mono;
font-size: 14px;
min-height: 0;
}
@import "gruvbox.css";
window#waybar {
background: @background;
color: @white_b;
}
#workspaces button {
padding: 0 2px;
background: transparent;
color: @white_b;
border-bottom: 3px solid transparent;
}
#workspaces button.focused {
background: @orange;
border-bottom: 3px solid @orange_b;
}
#mode, #clock, #battery {
padding: 0 10px;
margin: 0 5px;
}
#mode {
background: @red;
border-bottom: 3px solid @white_b;
}
#clock {
color: @white_b;
}
#battery {
color: @white_b;
}
#battery.charging {
color: @gree;
}
@keyframes blink {
to {
background-color: @white_b;
color: @background;
}
}
#idle_inhibitor, #pulseaudio, #custom-openvpn, #network, #cpu, #memory, #temperature, #backlight, #battery, #clock, #tray {
padding: 0 6px;
margin: 0 3px;
}
#battery.warning:not(.charging) {
background: @red;
color: @white_b;
animation-name: blink;
animation-duration: 0.5s;
animation-timing-function: linear;
animation-iteration-count: infinite;
animation-direction: alternate;
}

View File

@@ -1,5 +1,6 @@
set -g default-terminal "screen-256color"
## Vim user config
#Prefix is Ctrl-a
@@ -183,6 +184,7 @@ set -g message-bg colour166
# }
set-option -g focus-events on
## Plugins
# Supports `github_username/repo` or full git repo URLs

View File

@@ -243,6 +243,9 @@ filextype *.bmp,*.jpg,*.jpeg,*.png,*.gif,*.xpm
fileviewer *.bmp,*.jpg,*.jpeg,*.png,*.gif,*.xpm
\ convert -identify %f -verbose /dev/null
filetype *.svg inkscape %f
" OpenRaster
filextype *.ora
\ {Edit in MyPaint}

118
vim/.vim/config/base.vim Normal file
View File

@@ -0,0 +1,118 @@
" Lines number
set number
" Always show the statusline
set laststatus=2
" Necessary to show Unicode glyphs
set encoding=utf8
" smart tab
set smartindent
" Tab to..?
set shiftround
" Display edition mode
set showmode
" Ignore case in search mode
set ignorecase
" Override the 'ignorecase' option if the search pattern
" contains upper case characters.
set smartcase
" Display uncomplete commands (??)
set showcmd
" Vim file name completion relative to current file
set autochdir
" While typing a search command, show immediately where the
" so far typed pattern matches.
set incsearch
" Use <C-L> to clear the highlighting of :set hlsearch.
set hlsearch
if maparg('<C-L>', 'n') ==# ''
nnoremap <silent> <C-L> :nohlsearch<C-R>=has('diff')?'<Bar>diffupdate':''<CR><CR><C-L>
endif
" Turn on the WiLd menu
set wildmenu
" Ignore compiled files
set wildignore=*.o,*~,*.pyc,*.swp
" Wrap lines
set wrap
" Turn backup off, since most stuff is in SVN, git et.c anyway...
set nobackup
set noswapfile
" Having relative number for lines
set relativenumber
" Display tab and ends of lines
" Shortcut to rapidly toggle `set list`
nmap <leader>L :set list!<CR>
" Behaviour of tab
set tabstop=4
set shiftwidth=4
set softtabstop=4
set expandtab
" Folding
set foldmethod=indent
" Use the same symbols as TextMate for tabstops and EOLs
" set listchars=tab:▸\ ,eol:¬
set listchars=nbsp,tab:··,trail,extends:▶,precedes:◀
" allow backspacing over everything in insert mode
set backspace=indent,eol,start
set history=50 " keep 50 lines of command line history
set ruler " show the cursor position all the time
"
" In many terminal emulators the mouse works just fine, thus enable it.
if has('mouse')
set mouse=a
endif
" Decorations
" ====================
" Switch syntax highlighting on, when the terminal has colors
" Also switch on highlighting the last used search pattern.
if &t_Co > 2 || has("gui_running")
syntax on
endif
" When set to "dark", Vim will try to use colors that look
" good on a dark background. When set to "light", Vim will
" try to use colors that look good on a light background.
" Any other value is illegal.
set background=dark
" Color Scheme
colorscheme zenburn
set cursorline
" Align blocks of text and keep them selected
vmap < <gv
vmap > >gv
" Spelling
" set spelllang=fr
autocmd BufRead,BufNewFile *.{md,tex,rst} setlocal spell spelllang=fr
autocmd FileType tex,latex,markdown,md,rst setlocal spell spelllang=fr
" Remove trailing whitespace at the end of lines
autocmd BufWritePre * %s/\s\+$//e
" Different color for far columns
execute "set colorcolumn=" . join(range(81,335), ',')

View File

@@ -0,0 +1,24 @@
" lightline -> no need showmod
set noshowmode
let g:lightline = {
\ 'colorscheme': 'selenized_dark',
\ 'active': {
\ 'left': [ [ 'mode', 'paste' ],
\ [ 'gitbranch', 'readonly', 'filename', 'modified' ] ]
\ },
\ 'component_function': {
\ 'gitbranch': 'FugitiveHead'
\ },
\ }
" Supertab
let g:SuperTabDefaultCompletionType = "context"
" Airline
let g:airline_powerline_fonts = 1
let g:tmuxline_powerline_separators = 0
" Nerdtree
let NERDTreeIgnore = ['.pyc$']
"autocmd VimEnter * NERDTree

61
vim/.vimrc Normal file
View File

@@ -0,0 +1,61 @@
set nocompatible " be iMproved, required
noremap <Space> <Nop>
map <Space> <Leader>
let mapleader = "\<Space>"
let localleader = "\<Space>"
" set the runtime path to include plug.com and initialize
call plug#begin('~/.vim/plugged')
"" plug.vim management
Plug 'junegunn/vim-plug'
" Airline statusline
Plug 'itchyny/lightline.vim'
"" Basic config for vim
Plug 'tpope/vim-sensible'
" Git integration
Plug 'tpope/vim-fugitive'
" Nerdtree
Plug 'scrooloose/nerdtree'
Plug 'Xuyuanp/nerdtree-git-plugin'
" Change surround
Plug 'tpope/vim-surround'
" Clever substitute
Plug 'tpope/tpope-vim-abolish'
" Repeat
Plug 'tpope/vim-repeat'
" Git on lines
Plug 'airblade/vim-gitgutter'
" Polyglot synthax hightlight autodetect
Plug 'sheerun/vim-polyglot'
" Show indent lines
Plug 'Yggdroot/indentLine'
" Tmux integration
Plug 'christoomey/vim-tmux-navigator'
"" Color scheme
Plug 'jnurmine/Zenburn'
" All of your Plugs must be added before the following line
call plug#end() " required
"
" import config from ./config
" runtime! config/**/*.vim
"runtime! config/*.vim
runtime! config/base.vim
runtime! config/plugins.vim
set conceallevel=0

View File

@@ -68,6 +68,9 @@ bindkey -M vicmd 'j' history-substring-search-down
# Auto-ls
source ~/.config/zsh/auto-ls/auto-ls.zsh
# Pyenv
eval "$(pyenv init --path)"
source ~/.config/zsh/completion.zsh
source ~/.config/zsh/key-bindings.zsh