add laptop config
This commit is contained in:
47
hosts/alpheratz/dotfiles/fish/config.fish
Normal file
47
hosts/alpheratz/dotfiles/fish/config.fish
Normal file
@@ -0,0 +1,47 @@
|
||||
if status is-interactive
|
||||
### Local environment variables
|
||||
|
||||
set -g fish_greeting
|
||||
set -g fish_cursor_default block
|
||||
set -g fish_cursor_insert line
|
||||
set -g fish_cursor_replace_one underscore
|
||||
set -g fish_cursor_replace underscore
|
||||
set -g fish_cursor_external line
|
||||
set -g fish_cursor_visual block
|
||||
|
||||
end
|
||||
|
||||
if test (tty) = "/dev/tty1"
|
||||
sway
|
||||
end
|
||||
|
||||
if status is-login
|
||||
|
||||
### Environment Variables
|
||||
|
||||
# Set nvim to default editor
|
||||
set -x SUDO_EDITOR = "/usr/bin/nvim"
|
||||
|
||||
# Set R library location
|
||||
set -x R_LIBS_USER = "/home/eesim/.local/lib/R"
|
||||
|
||||
# Disable GTK portal
|
||||
set -x GTK_USE_PORTAL=0
|
||||
|
||||
# Wayland environment variables
|
||||
set -x XDG_CURRENT_DESKTOP = "sway"
|
||||
set -x XDG_CURRENT_SESSION = "sway"
|
||||
set -x XDG_SESSION_TYPE = "wayland"
|
||||
set -x ELECTRON_OZONE_PLATFORM_HINT = "auto"
|
||||
set -x QT_QPA_PLATFORM = "wayland;xcb"
|
||||
set -x SDL_VIDEODRIVER = "wayland,x11"
|
||||
|
||||
# Java fix
|
||||
set -x _JAVA_AWT_WM_NONREPARENTING = "1"
|
||||
|
||||
### Themes
|
||||
set -x QT_QPA_PLATFORMTHEME = "qt5ct"
|
||||
|
||||
### Start fish
|
||||
exec fish
|
||||
end
|
||||
9
hosts/alpheratz/dotfiles/nvim/init.lua
Normal file
9
hosts/alpheratz/dotfiles/nvim/init.lua
Normal file
@@ -0,0 +1,9 @@
|
||||
require('config/keymaps')
|
||||
require('config/settings')
|
||||
require('config/plugins')
|
||||
require('config/plugins/lualine')
|
||||
require('config/plugins/lspconfig')
|
||||
|
||||
local vimscriptpath = vim.fn.stdpath("config") .. "/lua/config/vimscript/"
|
||||
|
||||
vim.cmd('source' .. vimscriptpath .. 'init.vim')
|
||||
15
hosts/alpheratz/dotfiles/nvim/lazy-lock.json
Normal file
15
hosts/alpheratz/dotfiles/nvim/lazy-lock.json
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" },
|
||||
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
|
||||
"fzf-lua": { "branch": "main", "commit": "b442569ab827f72e344236c598b02cb9dc754e9f" },
|
||||
"kanagawa.nvim": { "branch": "master", "commit": "860e4f80df71221d18bf2cd9ef1deb4d364274d2" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "8f19915175395680808de529e4220da8dafc0759" },
|
||||
"lualine.nvim": { "branch": "master", "commit": "0a5a66803c7407767b799067986b4dc3036e1983" },
|
||||
"nvim-autopairs": { "branch": "master", "commit": "c15de7e7981f1111642e7e53799e1211d4606cb9" },
|
||||
"nvim-cmp": { "branch": "main", "commit": "5260e5e8ecadaf13e6b82cf867a909f54e15fd07" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "b972e7154bc94ab4ecdbb38c8edbccac36f83996" },
|
||||
"nvim-surround": { "branch": "main", "commit": "79aaa42da1f698ed31bcbe7f83081f69dca7ba17" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "e37bb1feee9e7320c76050a55443fa843b4b6f83" },
|
||||
"rust.vim": { "branch": "master", "commit": "889b9a7515db477f4cb6808bef1769e53493c578" },
|
||||
"typst.vim": { "branch": "main", "commit": "d9a7650e76c85f8ba437e056d08dd43b01b8bfd6" }
|
||||
}
|
||||
15
hosts/alpheratz/dotfiles/nvim/lua/config/keymaps.lua
Normal file
15
hosts/alpheratz/dotfiles/nvim/lua/config/keymaps.lua
Normal file
@@ -0,0 +1,15 @@
|
||||
vim.g.mapleader=','
|
||||
vim.g.maplocalleader=','
|
||||
|
||||
vim.keymap.set('n', '<C-h>', '<C-w>h')
|
||||
vim.keymap.set('n', '<C-j>', '<C-w>j')
|
||||
vim.keymap.set('n', '<C-k>', '<C-w>k')
|
||||
vim.keymap.set('n', '<C-l>', '<C-w>l')
|
||||
|
||||
vim.keymap.set('n', '<leader>ff', ':FzfLua files<CR>')
|
||||
vim.keymap.set('n', '<leader>fb', ':FzfLua buffers<CR>')
|
||||
vim.keymap.set('n', '<leader>rg', ':FzfLua grep<CR>')
|
||||
|
||||
vim.keymap.set('i', '<S-Tab>', '<C-d>')
|
||||
|
||||
vim.keymap.set('n', 'K', vim.lsp.buf.hover, opts)
|
||||
50
hosts/alpheratz/dotfiles/nvim/lua/config/plugins/init.lua
Normal file
50
hosts/alpheratz/dotfiles/nvim/lua/config/plugins/init.lua
Normal file
@@ -0,0 +1,50 @@
|
||||
local plugins = {
|
||||
'rebelot/kanagawa.nvim',
|
||||
|
||||
'nvim-lualine/lualine.nvim',
|
||||
'kyazdani42/nvim-web-devicons',
|
||||
|
||||
'kylechui/nvim-surround',
|
||||
|
||||
{
|
||||
'ibhagwan/fzf-lua',
|
||||
config = function()
|
||||
require('fzf-lua').setup({'skim'})
|
||||
end
|
||||
},
|
||||
|
||||
'neovim/nvim-lspconfig',
|
||||
'hrsh7th/nvim-cmp',
|
||||
'hrsh7th/cmp-nvim-lsp',
|
||||
'hrsh7th/cmp-path',
|
||||
|
||||
'rust-lang/rust.vim',
|
||||
|
||||
{
|
||||
'windwp/nvim-autopairs',
|
||||
event = 'InsertEnter',
|
||||
opts={},
|
||||
},
|
||||
|
||||
{
|
||||
'kaarmu/typst.vim',
|
||||
ft = 'typst',
|
||||
lazy = false,
|
||||
},
|
||||
|
||||
}
|
||||
|
||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||
if not vim.loop.fs_stat(lazypath) then
|
||||
vim.fn.system({
|
||||
"git",
|
||||
"clone",
|
||||
"--filter=blob:none",
|
||||
"https://github.com/folke/lazy.nvim.git",
|
||||
"--branch=stable", -- latest stable release
|
||||
lazypath,
|
||||
})
|
||||
end
|
||||
vim.opt.rtp:prepend(lazypath)
|
||||
|
||||
require("lazy").setup(plugins, opts)
|
||||
@@ -0,0 +1,59 @@
|
||||
local capabilities = require('cmp_nvim_lsp').default_capabilities()
|
||||
capabilities.textDocument.completion.completionItem.snippetSupport = false;
|
||||
|
||||
local lspconfig = require('lspconfig')
|
||||
|
||||
lspconfig.rust_analyzer.setup {
|
||||
capabilities = capabilities,
|
||||
settings = {
|
||||
["rust-analyzer"] = {
|
||||
cargo = {
|
||||
allFeatures = true,
|
||||
},
|
||||
imports = {
|
||||
group = {
|
||||
enable = false,
|
||||
},
|
||||
},
|
||||
completion = {
|
||||
postfix = {
|
||||
enable = false,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
local servers = {'ccls', 'typst_lsp'}
|
||||
|
||||
for _, lsp in ipairs(servers) do
|
||||
lspconfig[lsp].setup {
|
||||
capabilities = capabilities
|
||||
}
|
||||
end
|
||||
|
||||
local cmp = require 'cmp'
|
||||
|
||||
cmp.setup {
|
||||
preselect = cmp.PreselectMode.None,
|
||||
mapping = cmp.mapping.preset.insert({
|
||||
['<Tab>'] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_next_item()
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { 'i', 's' }),
|
||||
['<S-Tab>'] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_prev_item()
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { 'i', 's' }),
|
||||
}),
|
||||
sources = {
|
||||
{ name = 'nvim_lsp' },
|
||||
{ name = 'path' },
|
||||
},
|
||||
}
|
||||
36
hosts/alpheratz/dotfiles/nvim/lua/config/plugins/lualine.lua
Normal file
36
hosts/alpheratz/dotfiles/nvim/lua/config/plugins/lualine.lua
Normal file
@@ -0,0 +1,36 @@
|
||||
require('lualine').setup {
|
||||
options = {
|
||||
icons_enabled = true,
|
||||
theme = 'wombat',
|
||||
component_separators = { left = '', right = ''},
|
||||
section_separators = { left = '', right = ''},
|
||||
disabled_filetypes = {},
|
||||
always_divide_middle = true,
|
||||
globalstatus = true,
|
||||
},
|
||||
sections = {
|
||||
lualine_a = {'mode'},
|
||||
lualine_b = {'branch', 'diff', 'diagnostics'},
|
||||
lualine_c = {'filename'},
|
||||
lualine_x = {'encoding', 'fileformat', 'filetype'},
|
||||
lualine_y = {'progress'},
|
||||
lualine_z = {'location'}
|
||||
},
|
||||
inactive_sections = {
|
||||
lualine_a = {},
|
||||
lualine_b = {},
|
||||
lualine_c = {'filename'},
|
||||
lualine_x = {'location'},
|
||||
lualine_y = {},
|
||||
lualine_z = {}
|
||||
},
|
||||
tabline = {
|
||||
lualine_a = {'buffers'},
|
||||
lualine_b = {'branch'},
|
||||
lualine_c = {'filename'},
|
||||
lualine_x = {},
|
||||
lualine_y = {},
|
||||
lualine_z = {'tabs'}
|
||||
},
|
||||
extensions = {}
|
||||
}
|
||||
40
hosts/alpheratz/dotfiles/nvim/lua/config/settings.lua
Normal file
40
hosts/alpheratz/dotfiles/nvim/lua/config/settings.lua
Normal file
@@ -0,0 +1,40 @@
|
||||
vim.opt.cursorline=true
|
||||
vim.opt.relativenumber=true
|
||||
vim.opt.number=true
|
||||
|
||||
vim.opt.scrolloff=10
|
||||
|
||||
vim.opt.autoindent=true
|
||||
vim.opt.expandtab=true
|
||||
vim.opt.softtabstop=4
|
||||
vim.opt.shiftwidth=4
|
||||
vim.opt.shiftround=true
|
||||
|
||||
vim.opt.backspace={'indent','eol','start'}
|
||||
vim.opt.hidden=true
|
||||
vim.opt.laststatus=2
|
||||
vim.opt.display='lastline'
|
||||
|
||||
vim.opt.showmode=true
|
||||
vim.opt.showcmd=true
|
||||
|
||||
vim.opt.incsearch=true
|
||||
vim.opt.ignorecase=true
|
||||
vim.opt.smartcase=true
|
||||
|
||||
vim.opt.ttyfast=true
|
||||
vim.opt.updatetime=300
|
||||
|
||||
vim.opt.splitright=true
|
||||
|
||||
vim.opt.wrapscan=true
|
||||
vim.opt.report=0
|
||||
|
||||
vim.opt.list=true
|
||||
vim.opt.completeopt=menuone,noselect
|
||||
|
||||
vim.opt.undofile=true
|
||||
|
||||
|
||||
vim.g['loaded_perl_provider']=0
|
||||
vim.g['python3_host_prog']='/usr/bin/python'
|
||||
@@ -0,0 +1,9 @@
|
||||
filetype plugin indent on
|
||||
syntax on
|
||||
colorscheme kanagawa
|
||||
|
||||
if has('multi_byte') && &encoding ==# 'utf-8'
|
||||
let &listchars = 'tab:▸ ,extends:❯,precedes:❮,nbsp:±'
|
||||
else
|
||||
let &listchars = 'tab:> ,extends:>,precedes:<,nbsp:.'
|
||||
endif
|
||||
80
hosts/alpheratz/dotfiles/waybar/config
Normal file
80
hosts/alpheratz/dotfiles/waybar/config
Normal file
@@ -0,0 +1,80 @@
|
||||
{
|
||||
"layer": "top", // Waybar at top layer
|
||||
"output": "eDP-1",
|
||||
"position": "top", // Waybar position (top|bottom|left|right)
|
||||
"height": 30, // Waybar height (to be removed for auto height)
|
||||
"spacing": 4, // Gaps between modules (4px)
|
||||
// Choose the order of the modules
|
||||
"modules-left": ["sway/workspaces", "sway/mode", "sway/scratchpad"],
|
||||
"modules-center": ["sway/window"],
|
||||
"modules-right": ["idle_inhibitor", "pulseaudio", "cpu", "memory", "battery", "clock"],
|
||||
// Modules configuration
|
||||
"sway/workspaces": {
|
||||
"disable-scroll": true,
|
||||
"all-outputs": false,
|
||||
"format": "{name}: {icon}",
|
||||
"format-icons": {
|
||||
"1": "",
|
||||
"2": "",
|
||||
"3": "",
|
||||
"urgent": "",
|
||||
"focused": "",
|
||||
"default": ""
|
||||
}
|
||||
},
|
||||
"sway/mode": {
|
||||
"format": "<span style=\"italic\">{}</span>"
|
||||
},
|
||||
"sway/scratchpad": {
|
||||
"format": "{icon} {count}",
|
||||
"show-empty": false,
|
||||
"format-icons": ["", ""],
|
||||
"tooltip": true,
|
||||
"tooltip-format": "{app}: {title}"
|
||||
},
|
||||
"idle_inhibitor": {
|
||||
"format": "{icon}",
|
||||
"format-icons": {
|
||||
"activated": "",
|
||||
"deactivated": ""
|
||||
}
|
||||
},
|
||||
"tray": {
|
||||
// "icon-size": 21,
|
||||
"spacing": 10
|
||||
},
|
||||
"clock": {
|
||||
// "timezone": "America/New_York",
|
||||
"tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>",
|
||||
"format": "{:%I:%M %p}",
|
||||
"format-alt": "{:%Y-%m-%d}"
|
||||
},
|
||||
"battery": {
|
||||
"format": "{capacity}% "
|
||||
},
|
||||
"cpu": {
|
||||
"format": "{usage}% ",
|
||||
"tooltip": false
|
||||
},
|
||||
"memory": {
|
||||
"format": "{}% "
|
||||
},
|
||||
"pulseaudio": {
|
||||
// "scroll-step": 1, // %, can be a float
|
||||
"format": "{volume}% {icon}",
|
||||
"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": ["", "", ""]
|
||||
},
|
||||
},
|
||||
}
|
||||
102
hosts/alpheratz/dotfiles/waybar/style.css
Normal file
102
hosts/alpheratz/dotfiles/waybar/style.css
Normal file
@@ -0,0 +1,102 @@
|
||||
* {
|
||||
border: none;
|
||||
border-radius: 0;
|
||||
font-family: "Ubuntu Nerd Font";
|
||||
font-size: 16px;
|
||||
min-height: 0;
|
||||
}
|
||||
|
||||
window#waybar {
|
||||
background: rgba(0, 0, 0, 0.2);
|
||||
color: white;
|
||||
}
|
||||
|
||||
#window {
|
||||
font-weight: bold;
|
||||
font-family: "Ubuntu";
|
||||
}
|
||||
/*
|
||||
#workspaces {
|
||||
padding: 0 5px;
|
||||
}
|
||||
*/
|
||||
|
||||
#workspaces button {
|
||||
padding: 0 5px;
|
||||
background: transparent;
|
||||
color: white;
|
||||
border-top: 2px solid transparent;
|
||||
}
|
||||
|
||||
#workspaces button.focused {
|
||||
color: #c9545d;
|
||||
border-top: 2px solid #c9545d;
|
||||
}
|
||||
|
||||
#mode {
|
||||
background: #64727D;
|
||||
border-bottom: 3px solid white;
|
||||
}
|
||||
|
||||
#clock, #battery, #cpu, #memory, #network, #pulseaudio, #custom-spotify, #tray, #mode, #idle_inhibitor {
|
||||
padding: 0 8px;
|
||||
margin: 0 3px;
|
||||
}
|
||||
|
||||
#clock {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
#battery {
|
||||
}
|
||||
|
||||
#battery icon {
|
||||
color: red;
|
||||
}
|
||||
|
||||
#battery.charging {
|
||||
}
|
||||
|
||||
@keyframes blink {
|
||||
to {
|
||||
background-color: #ffffff;
|
||||
color: black;
|
||||
}
|
||||
}
|
||||
|
||||
#battery.warning:not(.charging) {
|
||||
color: white;
|
||||
animation-name: blink;
|
||||
animation-duration: 0.5s;
|
||||
animation-timing-function: linear;
|
||||
animation-iteration-count: infinite;
|
||||
animation-direction: alternate;
|
||||
}
|
||||
|
||||
#cpu {
|
||||
}
|
||||
|
||||
#memory {
|
||||
}
|
||||
|
||||
#network {
|
||||
}
|
||||
|
||||
#network.disconnected {
|
||||
background: #f53c3c;
|
||||
}
|
||||
|
||||
#pulseaudio {
|
||||
}
|
||||
|
||||
#pulseaudio.muted {
|
||||
}
|
||||
|
||||
#custom-spotify {
|
||||
color: rgb(102, 220, 105);
|
||||
}
|
||||
|
||||
#tray {
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user