Browse Source

first

master
nicolas-arnaud 2 years ago
commit
9db21de84c
  1. 28
      .config/fish/config.fish
  2. 220
      .config/i3/config
  3. 39
      .config/i3status-rust/config.toml
  4. 199
      .config/lvim/config.lua
  5. 1
      .config/lvim/lua/background.lua
  6. 56
      .config/redshift/hooks/brightness.sh
  7. 40
      .config/redshift/hooks/colorscheme.sh
  8. 11
      .config/redshift/redshift.conf
  9. 13
      .scripts/calibrate_touch_left.sh
  10. 13
      .scripts/dowload_wallpapers.sh
  11. 32
      .scripts/rotate_screen.sh
  12. 1
      .scripts/xfce4-night-mode
  13. 27
      .tmux.conf
  14. 198
      .vimrc
  15. 1
      .xprofile
  16. 23
      README.md

28
.config/fish/config.fish

@ -0,0 +1,28 @@
## Set values
# Hide welcome message
set fish_greeting
set VIRTUAL_ENV_DISABLE_PROMPT "1"
set -x MANPAGER "sh -c 'col -bx | bat -l man -p'"
# Set settings for done.fish
set -U __done_min_cmd_duration 10000
set -U __done_notification_urgency_level low
## Environment setup
# Apply .profile: use this to put fish compatible .profile stuff in
if test -f ~/.fish_profile
source ~/.fish_profile
end
# Add ~/.local/bin to PATH
if test -d ~/.local/bin
if not contains -- ~/.local/bin $PATH
set -p PATH ~/.local/bin
end
end
alias ..="cd .."
alias ...="cd ../.."
alias ....="cd ../../.."
alias .....="cd ../../../.."
source /opt/asdf-vm/asdf.fish

220
.config/i3/config

@ -0,0 +1,220 @@
# This file has been auto-generated by i3-config-wizard(1).
# It will not be overwritten, so edit it as you like.
#
# Should you change your keyboard layout some time, delete
# this file and re-run i3-config-wizard(1).
#
# i3 config file (v4)
#
# Please see https://i3wm.org/docs/userguide.html for a complete reference!
set $mod Mod1
# Font for window titles. Will also be used by the bar unless a different font
# is used in the bar {} block below.
font pango:monospace 8
# This font is widely installed, provides lots of unicode glyphs, right-to-left
# text rendering and scalability on retina/hidpi displays (thanks to pango).
#font pango:DejaVu Sans Mono 8
# Start XDG autostart .desktop files using dex. See also
# https://wiki.archlinux.org/index.php/XDG_Autostart
exec --no-startup-id dex --autostart --environment i3
# The combination of xss-lock, nm-applet and pactl is a popular choice, so
# they are included here as an example. Modify as you see fit.
# xss-lock grabs a logind suspend inhibit lock and will use i3lock to lock the
# screen before suspend. Use loginctl lock-session to lock your screen.
exec --no-startup-id xss-lock --transfer-sleep-lock -- i3lock --nofork
# NetworkManager is the most popular way to manage wireless networks on Linux,
# and nm-applet is a desktop environment-independent system tray GUI for it.
exec --no-startup-id nm-applet
# Use pactl to adjust volume in PulseAudio.
set $refresh_i3status killall -SIGUSR1 i3status
bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +10% && $refresh_i3status
bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -10% && $refresh_i3status
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle && $refresh_i3status
bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle && $refresh_i3status
# Use Mouse+$mod to drag floating windows to their wanted position
floating_modifier $mod
# move tiling windows via drag & drop by left-clicking into the title bar,
# or left-clicking anywhere into the window while holding the floating modifier.
tiling_drag modifier titlebar
# start a terminal
bindsym $mod+Return exec TERMINAL=kitty i3-sensible-terminal
# kill focused window
bindsym $mod+Shift+q kill
# start dmenu (a program launcher)
# bindsym $mod+d exec --no-startup-id dmenu_run
# A more modern dmenu replacement is rofi:
bindcode $mod+40 exec "rofi -modi drun,run -show drun"
# There also is i3-dmenu-desktop which only displays applications shipping a
# .desktop file. It is a wrapper around dmenu, so you need that installed.
# bindcode $mod+40 exec --no-startup-id i3-dmenu-desktop
# change focus
bindsym $mod+h focus left
bindsym $mod+j focus down
bindsym $mod+k focus up
bindsym $mod+l focus right
# alternatively, you can use the cursor keys:
bindsym $mod+Left focus left
bindsym $mod+Down focus down
bindsym $mod+Up focus up
bindsym $mod+Right focus right
# move focused window
bindsym $mod+Shift+j move left
bindsym $mod+Shift+k move down
bindsym $mod+Shift+l move up
bindsym $mod+Shift+semicolon move right
# alternatively, you can use the cursor 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
# split in horizontal orientation
bindsym $mod+g split h
# split in vertical orientation
bindsym $mod+v split v
# enter fullscreen mode for the focused container
bindsym $mod+f fullscreen toggle
# change container layout (stacked, tabbed, toggle split)
bindsym $mod+s layout stacking
bindsym $mod+w layout tabbed
bindsym $mod+e layout toggle split
# toggle tiling / floating
bindsym $mod+Shift+space floating toggle
# change focus between tiling / floating windows
bindsym $mod+space focus mode_toggle
# focus the parent container
bindsym $mod+a focus parent
# focus the child container
#bindsym $mod+d focus child
# Define names for default workspaces for which we configure key bindings later on.
# We use variables to avoid repeating the names in multiple places.
set $ws1 "1: S1"
set $ws2 "2: S2"
set $ws3 "3: S3"
set $ws4 "4: S4"
set $ws5 "5: S5"
set $ws6 "6: P1"
set $ws7 "7: P2"
set $ws8 "8: P3"
set $ws9 "9: P4"
set $ws0 "0: P5"
workspace $ws1 output HDMI-A-0
workspace $ws2 output HDMI-A-0
workspace $ws3 output HDMI-A-0
workspace $ws4 output HDMI-A-0
workspace $ws5 output HDMI-A-0
workspace $ws6 output eDP
workspace $ws7 output eDP
workspace $ws8 output eDP
workspace $ws9 output eDP
workspace $ws0 output eDP
# switch to workspace
bindsym $mod+1 workspace number $ws1
bindsym $mod+2 workspace number $ws2
bindsym $mod+3 workspace number $ws3
bindsym $mod+4 workspace number $ws4
bindsym $mod+5 workspace number $ws5
bindsym $mod+6 workspace number $ws6
bindsym $mod+7 workspace number $ws7
bindsym $mod+8 workspace number $ws8
bindsym $mod+9 workspace number $ws9
bindsym $mod+0 workspace number $ws0
# move focused container to workspace
bindsym $mod+Shift+1 move container to workspace number $ws1
bindsym $mod+Shift+2 move container to workspace number $ws2
bindsym $mod+Shift+3 move container to workspace number $ws3
bindsym $mod+Shift+4 move container to workspace number $ws4
bindsym $mod+Shift+5 move container to workspace number $ws5
bindsym $mod+Shift+6 move container to workspace number $ws6
bindsym $mod+Shift+7 move container to workspace number $ws7
bindsym $mod+Shift+8 move container to workspace number $ws8
bindsym $mod+Shift+9 move container to workspace number $ws9
bindsym $mod+Shift+0 move container to workspace number $ws0
# reload the configuration file
bindsym $mod+Shift+c reload
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
bindsym $mod+Shift+r restart
# exit i3 (logs you out of your X session)
bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -B 'Yes, exit i3' 'i3-msg exit'"
# resize window (you can also use the mouse for that)
mode "resize" {
# These bindings trigger as soon as you enter the resize mode
# Pressing left will shrink the window’s width.
# Pressing right will grow the window’s width.
# Pressing up will shrink the window’s height.
# Pressing down will grow the window’s height.
bindsym j resize shrink width 10 px or 10 ppt
bindsym k resize grow height 10 px or 10 ppt
bindsym l resize shrink height 10 px or 10 ppt
bindsym semicolon resize grow width 10 px or 10 ppt
# same bindings, but for the arrow keys
bindsym Left resize shrink width 10 px or 10 ppt
bindsym Down resize grow height 10 px or 10 ppt
bindsym Up resize shrink height 10 px or 10 ppt
bindsym Right resize grow width 10 px or 10 ppt
# back to normal: Enter or Escape or $mod+r
bindsym Return mode "default"
bindsym Escape mode "default"
bindsym $mod+r mode "default"
}
bindsym $mod+r mode "resize"
# Start i3bar to display a workspace bar (plus the system information i3status
# finds out, if available)
bar {
status_command i3status-rs ~/.config/i3status-rust/config.toml
font pango:DejaVu Sans Mono, Font Awesome 6 Free 12
position top
}
# Download a random wallpaper or use a random one already downloaded
exec --no-startup-id sh ~/.config/i3/scripts/wallpaper.sh
set $i3lockwall sh ~/.config/i3/scripts/lock.sh
bindsym $mod+Ctrl+Shift+l exec --no-startup-id $i3lockwall
bindsym XF86MonBrightnessDown exec --no-startup-id ~/usr/bin/brightness -10
bindsym XF86MonBrightnessUp exec --no-startup-id ~/usr/bin/brightness +10
exec --no-startup-id xrandr --output HDMI-A-0 --left-of eDP
bindsym $mod+m exec --no-startup-id xrandr --output HDMI-A-0 --auto --left-of eDP
exec --no-startup-id sh ~/scripts/calibrate_touch_left.sh
#exec bash ~/.config/polybar/launch.sh --hack
#exec variety

39
.config/i3status-rust/config.toml

@ -0,0 +1,39 @@
theme = "gruvbox-dark"
icons = "awesome"
[[block]]
block = "disk_space"
path = "/"
alias = "/"
info_type = "available"
unit = "GB"
interval = 20
warning = 20.0
alert = 10.0
[[block]]
block = "memory"
display_type = "memory"
format_mem = "{mem_used_percents}"
format_swap = "{swap_used_percents}"
[[block]]
block = "cpu"
interval = 1
[[block]]
block = "load"
interval = 1
format = "{1m}"
[[block]]
block = "sound"
[[block]]
block = "time"
interval = 5
format = "%a %d/%m %R"
[[block]]
block = "battery"
if_command = "test -e /sys/class/power_supply/BAT0"

199
.config/lvim/config.lua

@ -0,0 +1,199 @@
--[[
lvim is the global options object
Linters should be
filled in as strings with either
a global executable or a path to
an executable
]]
-- THESE ARE EXAMPLE CONFIGS FEEL FREE TO CHANGE TO WHATEVER YOU WANT
-- general
lvim.log.level = "warn"
lvim.format_on_save.enabled = false
lvim.colorscheme = "gruvbox"
lvim.builtin.theme.name="gruvbox"
vim.opt.tabstop = 4;
vim.opt.shiftwidth = 4;
vim.opt.relativenumber = true;
-- to disable icons and use a minimalist setup, uncomment the following
-- lvim.use_icons = false
-- keymappings [view all the defaults by pressing <leader>Lk]
lvim.leader = "space"
-- add your own keymapping
lvim.keys.normal_mode["<C-s>"] = ":w<cr>"
-- lvim.keys.normal_mode["<S-l>"] = ":BufferLineCycleNext<CR>"
-- lvim.keys.normal_mode["<S-h>"] = ":BufferLineCyclePrev<CR>"
-- unmap a default keymapping
-- vim.keymap.del("n", "<C-Up>")
-- override a default keymapping
-- lvim.keys.normal_mode["<C-q>"] = ":q<cr>" -- or vim.keymap.set("n", "<C-q>", ":q<cr>" )
-- Change Telescope navigation to use j and k for navigation and n and p for history in both input and normal mode.
-- we use protected-mode (pcall) just in case the plugin wasn't loaded yet.
-- local _, actions = pcall(require, "telescope.actions")
-- lvim.builtin.telescope.defaults.mappings = {
-- -- for input mode
-- i = {
-- ["<C-j>"] = actions.move_selection_next,
-- ["<C-k>"] = actions.move_selection_previous,
-- ["<C-n>"] = actions.cycle_history_next,
-- ["<C-p>"] = actions.cycle_history_prev,
-- },
-- -- for normal mode
-- n = {
-- ["<C-j>"] = actions.move_selection_next,
-- ["<C-k>"] = actions.move_selection_previous,
-- },
-- }
-- Change theme settings
-- lvim.builtin.theme.options.dim_inactive = true
-- lvim.builtin.theme.options.style = "storm"
-- Use which-key to add extra bindings with the leader-key prefix
-- lvim.builtin.which_key.mappings["P"] = { "<cmd>Telescope projects<CR>", "Projects" }
-- lvim.builtin.which_key.mappings["t"] = {
-- name = "+Trouble",
-- r = { "<cmd>Trouble lsp_references<cr>", "References" },
-- f = { "<cmd>Trouble lsp_definitions<cr>", "Definitions" },
-- d = { "<cmd>Trouble document_diagnostics<cr>", "Diagnostics" },
-- q = { "<cmd>Trouble quickfix<cr>", "QuickFix" },
-- l = { "<cmd>Trouble loclist<cr>", "LocationList" },
-- w = { "<cmd>Trouble workspace_diagnostics<cr>", "Workspace Diagnostics" },
-- }
-- TODO: User Config for predefined plugins
-- After changing plugin config exit and reopen LunarVim, Run :PackerInstall :PackerCompile
lvim.builtin.alpha.active = true
lvim.builtin.alpha.mode = "dashboard"
lvim.builtin.terminal.active = true
lvim.builtin.nvimtree.setup.view.side = "left"
lvim.builtin.nvimtree.setup.renderer.icons.show.git = false
-- if you don't want all the parsers change this to a table of the ones you want
lvim.builtin.treesitter.ensure_installed = {
"bash",
"c",
"cpp",
"javascript",
"json",
"lua",
"python",
"typescript",
"tsx",
"css",
"rust",
"java",
"yaml",
}
lvim.builtin.treesitter.ignore_install = { "haskell" }
lvim.builtin.treesitter.highlight.enable = true
-- generic LSP settings
-- -- make sure server will always be installed even if the server is in skipped_servers list
-- lvim.lsp.installer.setup.ensure_installed = {
-- "sumneko_lua",
-- "jsonls",
-- }
-- -- change UI setting of `LspInstallInfo`
-- -- see <https://github.com/williamboman/nvim-lsp-installer#default-configuration>
-- lvim.lsp.installer.setup.ui.check_outdated_servers_on_open = false
-- lvim.lsp.installer.setup.ui.border = "rounded"
-- lvim.lsp.installer.setup.ui.keymaps = {
-- uninstall_server = "d",
-- toggle_server_expand = "o",
-- }
-- ---@usage disable automatic installation of servers
-- lvim.lsp.installer.setup.automatic_installation = false
-- ---configure a server manually. !!Requires `:LvimCacheReset` to take effect!!
-- ---see the full default list `:lua print(vim.inspect(lvim.lsp.automatic_configuration.skipped_servers))`
-- vim.list_extend(lvim.lsp.automatic_configuration.skipped_servers, { "pyright" })
-- local opts = {} -- check the lspconfig documentation for a list of all possible options
-- require("lvim.lsp.manager").setup("pyright", opts)
-- ---remove a server from the skipped list, e.g. eslint, or emmet_ls. !!Requires `:LvimCacheReset` to take effect!!
-- ---`:LvimInfo` lists which server(s) are skipped for the current filetype
-- lvim.lsp.automatic_configuration.skipped_servers = vim.tbl_filter(function(server)
-- return server ~= "emmet_ls"
-- end, lvim.lsp.automatic_configuration.skipped_servers)
-- -- you can set a custom on_attach function that will be used for all the language servers
-- -- See <https://github.com/neovim/nvim-lspconfig#keybindings-and-completion>
-- lvim.lsp.on_attach_callback = function(client, bufnr)
-- local function buf_set_option(...)
-- vim.api.nvim_buf_set_option(bufnr, ...)
-- end
-- --Enable completion triggered by <c-x><c-o>
-- buf_set_option("omnifunc", "v:lua.vim.lsp.omnifunc")
-- end
-- -- set a formatter, this will override the language server formatting capabilities (if it exists)
-- local formatters = require "lvim.lsp.null-ls.formatters"
-- formatters.setup {
-- { command = "black", filetypes = { "python" } },
-- { command = "isort", filetypes = { "python" } },
-- {
-- -- each formatter accepts a list of options identical to https://github.com/jose-elias-alvarez/null-ls.nvim/blob/main/doc/BUILTINS.md#Configuration
-- command = "prettier",
-- ---@usage arguments to pass to the formatter
-- -- these cannot contain whitespaces, options such as `--line-width 80` become either `{'--line-width', '80'}` or `{'--line-width=80'}`
-- extra_args = { "--print-with", "100" },
-- ---@usage specify which filetypes to enable. By default a providers will attach to all the filetypes it supports.
-- filetypes = { "typescript", "typescriptreact" },
-- },
-- }
-- -- set additional linters
-- local linters = require "lvim.lsp.null-ls.linters"
-- linters.setup {
-- { command = "flake8", filetypes = { "python" } },
-- {
-- -- each linter accepts a list of options identical to https://github.com/jose-elias-alvarez/null-ls.nvim/blob/main/doc/BUILTINS.md#Configuration
-- command = "shellcheck",
-- ---@usage arguments to pass to the formatter
-- -- these cannot contain whitespaces, options such as `--line-width 80` become either `{'--line-width', '80'}` or `{'--line-width=80'}`
-- extra_args = { "--severity", "warning" },
-- },
-- {
-- command = "codespell",
-- ---@usage specify which filetypes to enable. By default a providers will attach to all the filetypes it supports.
-- filetypes = { "javascript", "python" },
-- },
-- }
-- Additional Plugins
-- lvim.plugins = {
-- {
-- "folke/trouble.nvim",
-- cmd = "TroubleToggle",
-- },
-- }
lvim.plugins = {
{ "ellisonleao/gruvbox.nvim" },
{
"aserowy/tmux.nvim",
config = function() require("tmux").setup() end
}
}
-- Autocommands (https://neovim.io/doc/user/autocmd.html)
-- vim.api.nvim_create_autocmd("BufEnter", {
-- pattern = { "*.json", "*.jsonc" },
-- -- enable wrap mode for json files only
-- command = "setlocal wrap",
-- })
-- vim.api.nvim_create_autocmd("FileType", {
-- pattern = "zsh",
-- callback = function()
-- -- let treesitter use bash highlight for zsh files as well
-- require("nvim-treesitter.highlight").attach(0, "bash")
-- end,
-- })
require('background')

1
.config/lvim/lua/background.lua

@ -0,0 +1 @@
vim.opt.background = "light"

56
.config/redshift/hooks/brightness.sh

@ -0,0 +1,56 @@
#!/usr/bin/bash
set -eu
exec >> ~/.redshift-hooks.log 2>&1
# path to github.com/qualiaa/acpi-brightness script
readonly brightness=$HOME/usr/bin/brightness
readonly fade_time=$(( 60*60 ))
readonly day_brightness=90
readonly transition_brightness=60
readonly night_brightness=5
brightness() {
local seconds=${1:-0}
local cond=${2:-}
"$brightness" -t $seconds $cond $percent
}
if [ $1 = "period-changed" ]; then
case $3 in
daytime)
percent=$day_brightness
case $2 in
transition)
brightness $fade_time --inc ;;
night|none)
brightness ;;
*)
echo "Unrecognised: $2"
esac ;;
transition)
percent=$transition_brightness
case $2 in
daytime)
brightness $fade_time --dec ;;
night)
brightness $fade_time --inc ;;
none)
brightness ;;
*)
echo "Unrecognised: $2"
esac ;;
night)
percent=$night_brightness
case $2 in
transition)
brightness $fade_time --dec ;;
daytime|none)
brightness ;;
*)
echo "Unrecognised: $2"
esac
esac
fi

40
.config/redshift/hooks/colorscheme.sh

@ -0,0 +1,40 @@
#!/usr/bin/env sh
set -eu
exec >> ~/.redshift-hooks.log 2>&1
update_terminal() {
pkill -SIGUSR1 kitty
}
day_setup() {
echo "include gruvbox/gruvbox_light.conf" > "$HOME"/.config/kitty/coloscheme.conf
echo "vim.opt.background = \"light\"" > "$HOME"/.config/lvim/lua/background.lua
bash ~/scripts/xfce4-night-mode/xfce4-night-mode.sh day
update_terminal
}
night_setup() {
echo "include gruvbox/gruvbox_dark.conf" > "$HOME"/.config/kitty/coloscheme.conf
echo "vim.opt.background = \"dark\"" > "$HOME"/.config/lvim/lua/background.lua
bash ~/scripts/xfce4-night-mode/xfce4-night-mode.sh night
update_terminal
}
if [ "$1" = period-changed ]; then
echo $(date +"%y-%m-%d %H:%M:%S") $@
case $3 in
daytime)
day_setup
;;
transition)
if [ "$2" = none ]; then
day_setup
fi
;;
night)
night_setup
esac
fi

11
.config/redshift/redshift.conf

@ -0,0 +1,11 @@
[redshift]
; Set the location-provider: 'geoclue2', 'manual'
; type 'redshift -l list' to see possible values.
; The location provider settings are in a different section.
location-provider=manual
; Keep in mind that longitudes west of Greenwich (e.g. the Americas)
; are negative numbers.
[manual]
lat=43.9644978
lon=7.2700003

13
.scripts/calibrate_touch_left.sh

@ -0,0 +1,13 @@
#!/usr/bin/env bash
#
ids=$(xinput --list | awk -v search="WingCool" \
'$0 ~ search {match($0, /id=[0-9]+/);\
if (RSTART) \
print substr($0, RSTART+3, RLENGTH-3)\
}'\
)
for i in $ids
do
xinput set-prop $i --type=float "Coordinate Transformation Matrix" 0.584297018 0 0 0 1 0 0 0 1
done

13
.scripts/dowload_wallpapers.sh

@ -0,0 +1,13 @@
#/usr/bin/env bash
if [[ ! $1 ]]; then
i=1;
else
i=$1
fi
cd "$HOME/Images/Wallpapers/test"
while [[ $i -gt 0 ]]; do
wget https://source.unsplash.com/random/1920x1080 -O $(echo $RANDOM |md5sum | head -c 8)
((i--))
done;

32
.scripts/rotate_screen.sh

@ -0,0 +1,32 @@
#!/usr/bin/env bash
TRANSFORM='Coordinate Transformation Matrix'
if [[ $1 == "edp" ]]; then
SCREEN="eDP"
OFFSREEN="HDMI-A-0"
TOUCHPAD='ELAN469D:00 04F3:304B Touchpad'
ROT=$(xrandr --query --verbose | grep $SCREEN | cut -d ' ' -f 6)
if [[ "$ROT" == "left" ]]; then
xrandr --output $SCREEN --auto --rotate normal --output $OFFSCREEN --off
xinput set-prop "$TOUCHPAD" "$TRANSFORM" 1 0 0 0 1 0 0 0 1
else
xrandr --output $SCREEN --auto --rotate left --output $OFFSCREEN --off
xinput set-prop "$TOUCHPAD" "$TRANSFORM" 0 -1 1 1 0 0 0 0 1
fi
elif [[ $1 == "hdmi" ]]; then
SCREEN="HDMI-A-0"
OFFSCREEN="eDP"
ROT=$(xrandr --query --verbose | grep $SCREEN | cut -d ' ' -f 5)
if [[ "$ROT" == "right" ]]; then
xrandr --output $SCREEN --auto --rotate normal --output $OFFSCREEN --off
else
xrandr --output $SCREEN --auto --rotate right --output $OFFSCREEN --off
fi
elif [[ $1 == "reset" ]]; then
xrandr --output eDP --auto --rotate normal --pos 1920x312 --right-of HDMI-A-0 --output HDMI-A-0 --auto --rotate normal
xinput set-prop $2 --type=float "Coordinate Transformation Matrix" 0.584297018 0 0 0 1 0 0 0 1
ROT=$(xrandr --query --verbose | grep "eDP" | cut -d ' ' -f 6)
if [[ $ROT == "left" ]]; then
xinput set-prop "$TOUCHPAD" "$TRANSFORM" 1 0 0 0 1 0 0 0 1
fi
fi

1
.scripts/xfce4-night-mode

@ -0,0 +1 @@
Subproject commit 4c6ae90598880983123fabdbe3d43236117b0bbd

27
.tmux.conf

@ -0,0 +1,27 @@
setw -g mode-keys vi
setw -g default-command /usr/bin/fish
set -g mouse on
#set -g default-terminal "tmux-256color"
set -as terminal-features ",xterm-256color:RGB"
set -ga terminal-overrides ",*256col*:Tc"
set -sg escape-time 10
# Smart pane switching with awareness of Vim splits.
# See: https://github.com/christoomey/vim-tmux-navigator
is_vim="ps -o state= -o comm= -t '#{pane_tty}' \
| grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'"
bind-key -n 'C-h' if-shell "$is_vim" 'send-keys C-h' 'select-pane -L'
bind-key -n 'C-j' if-shell "$is_vim" 'send-keys C-j' 'select-pane -D'
bind-key -n 'C-k' if-shell "$is_vim" 'send-keys C-k' 'select-pane -U'
bind-key -n 'C-l' if-shell "$is_vim" 'send-keys C-l' 'select-pane -R'
bind-key -T copy-mode-vi 'C-h' 'select-pane -L'
bind-key -T copy-mode-vi 'C-j' 'select-pane -D'
bind-key -T copy-mode-vi 'C-k' 'select-pane -U'
bind-key -T copy-mode-vi 'C-l' 'select-pane -R'
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
run '~/.tmux/plugins/tpm/tpm'

198
.vimrc

@ -0,0 +1,198 @@
" ------------------------------------------------------------
" Load plugins
" ------------------------------------------------------------
set nocompatible
filetype off
" Set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
" Plugins will be downloaded under the specified directory.
call vundle#begin('~/.vim/plugged')
" Let Vundle manage Vundle, required
Plugin 'VundleVim/Vundle.vim'
" Colorschemes
Plugin 'kristijanhusak/vim-hybrid-material'
Plugin 'cocopon/iceberg.vim'
Plugin 'arcticicestudio/nord-vim'
Plugin 'sjl/badwolf'
Plugin 'lifepillar/vim-solarized8'
Plugin 'scheakur/vim-scheakur'
Plugin 'Badacadabra/vim-archery'
Plugin 'ycm-core/YouCompleteMe'
" PloyGlot
Plugin 'sheerun/vim-polyglot'
" Auto Pairs
Plugin 'jiangmiao/auto-pairs' " Auto Pairs
" NERDTree
Plugin 'preservim/nerdtree'
" Tagbar
Plugin 'preservim/tagbar'
" ctrlsf.vim
Plugin'dyng/ctrlsf.vim'
" vim-fswitch
Plugin 'derekwyatt/vim-fswitch'
" vim-protodef
Plugin 'derekwyatt/vim-protodef'
" List ends here. Plugins become visible to Vim after this call.
call vundle#end()
filetype plugin indent on
" ------------------------------------------------------------
" auto-pairs configuration
" ------------------------------------------------------------
let g:AutoPairsShortcutToggle = '<C-P>'
" ------------------------------------------------------------
" NERDTree configuration
" ------------------------------------------------------------
let NERDTreeShowBookmarks = 1
let NERDTreeShowHidden = 1
let NERDTreeShowLineNumbers = 0
let NERDTreeMinimalMenu = 1
let NERDTreeWinPos = "left"
let NERDTreeWinSize = 31
" ------------------------------------------------------------
" tagbar configuration
" ------------------------------------------------------------
let g:tagbar_autofocus = 1
let g:tagbar_autoshowtag = 1
let g:tagbar_position = 'botright vertical'
" ------------------------------------------------------------
" ctrlsf configuration
" ------------------------------------------------------------
let g:ctrlsf_backend = 'ack'
let g:ctrlsf_auto_close = { "normal": 0, "compact": 0 }
let g:ctrlsf_auto_focus = { "at": "start" }
let g:ctrlsf_auto_preview = 0
let g:ctrlsf_case_sensitive = 'smart'
let g:ctrlsf_default_view = 'normal'
let g:ctrlsf_regex_pattern = 0
let g:ctrlsf_position = 'right'
let g:ctrlsf_winsize = '46'
let g:ctrlsf_default_root = 'cwd' " projcet
" ------------------------------------------------------------
" fswitch configuration
" ------------------------------------------------------------
"
" Set fswichdst and fswitchloc variables when BufEnter event takes place
" on a file whose name matches {*.cpp}.
au! BufEnter *.cpp let b:fswitchdst = 'hpp,h'
au! BufEnter *.h let b:fswitchdst = 'cpp,c'
" fswitchdst - Denotes the files extensions that is the target extension of
" the current file's companion file.
"
" fswitchlocs - Contains a set of directories that indicate directory names
" that should be formulated when trying to find the alternate
" file.
" ------------------------------------------------------------
" vim-protodef configuration
" ------------------------------------------------------------
nmap <buffer> <silent> <leader> ,PP
nmap <buffer> <silent> <leader> ,PN
" NOTE: This doesn't seem to disable the sorting.
let g:disable_protodef_sorting = 1
" ------------------------------------------------------------
" YCM configuration
" ------------------------------------------------------------
" Key to close the completion menu (default <C-y>)
let g:ycm_key_list_stop_completion = ['<C-x>']
let g:ycm_filetype_whitelist = {'cpp':1, 'h':2, 'hpp':3, 'c':4, 'cxx':5 , 'vimrc':6}
let g:ycm_autoclose_preview_window_after_insertion = 1
let g:ycm_autoclose_preview_window_after_completion = 1
let g:ycm_confirm_extra_conf = 0
let g:ycm_always_populate_location_list = 1
let g:ycm_enable_diagnostic_signs = 1
let g:ycm_open_loclist_on_ycm_diags = 1
let g:ycm_max_num_candidates = 20
let g:ycm_max_num_identifier_candidates = 10
let g:ycm_auto_trigger = 1
let g:ycm_show_diagnostic_ui = 1
let g:ycm_error_symbol = '>>'
let g:ycm_enable_diagnostic_signs = 1
let g:ycm_enable_diagnostic_highlighting = 1
let g:ycm_echo_current_diagnostic = 1
" ------------------------------------------------------------
" Vim configuration
" ------------------------------------------------------------
set nu " Enable line numbers
syntax on " Enable synax highlighting
set incsearch " Enable incremental search
set hlsearch " Enable highlight search
set splitbelow " Always split below"
set mouse=a " Enable mouse drag on window splits
set tabstop=4 " How many columns of whitespace a \t is worth
set shiftwidth=4 " How many columns of whitespace a “level of indentation” is worth
set expandtab " Use spaces when tabbing
if !has('nvim')
set termwinsize=12x0 " Set terminal size
endif
set background=light " Set background
colorscheme gruvbox " Set color scheme
" ------------------------------------------------------------
" Key mappings
" ------------------------------------------------------------
" General
nmap <C-B> :buffers<CR>
nmap <C-J> :term<CR>
" NERDTree
nmap <F2> :NERDTreeToggle<CR>
" tagbar
nmap <F8> :TagbarToggle<CR>
" ctrlds
nmap <C-F>f <Plug>CtrlSFPrompt
xmap <C-F>f <Plug>CtrlSFVwordPath
xmap <C-F>F <Plug>CtrlSFVwordExec
nmap <C-F>n <Plug>CtrlSFCwordPath
nmap <C-F>p <Plug>CtrlSFPwordPath
nnoremap <C-F>o :CtrlSFOpen<CR>
nnoremap <C-F>t :CtrlSFToggle<CR>
inoremap <C-F>t <Esc>:CtrlSFToggle<CR>
" fswitch
nmap <C-Z> :vsplit <bar> :wincmd l <bar> :FSRight<CR>
let g:user42 = 'narnaud'
let g:mail42 = 'narnaud@student.42.fr'

1
.xprofile

@ -0,0 +1 @@
xset b off

23
README.md

@ -0,0 +1,23 @@
My environment:
===
Arch wiki dotfiles page: [https://wiki.archlinux.org/title/Dotfiles]
- Window manager: [i3 v4.21.1](https://wiki.archlinux.org/title/I3)
- Status bar: [i3status-rust v0.22](https://github.com/greshake/i3status-rust)
- Light editor: [Vim](https://www.vim.org/docs.php)
- IDE: [Lunarvim](https://www.lunarvim.org/docs/configuration)
- Terminal emulator: [Kitty](https://wiki.archlinux.org/title/Kitty)
- Terminal multiplexer: [tmux](https://wiki.archlinux.org/title/Tmux)
- Backlight: [Redshift](https://wiki.archlinux.org/title/redshift)
- Browser: [luakit](https://wiki.archlinux.org/title/Luakit)
## Ocasionals use:
- Alacritty
- zellij
-
Memo:
- [https://github.com/catppuccin/catppuccin]
Loading…
Cancel
Save