Compare commits
3 commits
main
...
wayland-te
| Author | SHA1 | Date | |
|---|---|---|---|
| 6059f7c564 | |||
| 6984c5f047 | |||
| 74aca8f0b2 |
41 changed files with 795 additions and 932 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
|
@ -1,3 +0,0 @@
|
|||
zsh/zsh_history
|
||||
zsh/cache
|
||||
config/nvim/plugin
|
||||
3
.gitmodules
vendored
3
.gitmodules
vendored
|
|
@ -1,3 +0,0 @@
|
|||
[submodule "ssh/conf.d"]
|
||||
path = ssh/conf.d
|
||||
url = git@git.preisner.eu:preisi/ssh-config.git
|
||||
14
Xresources
14
Xresources
|
|
@ -1,11 +1,5 @@
|
|||
! beryllium is arch-based with easy access to source code pro, let's use it
|
||||
#if defined(SRVR_beryllium) || defined(SRVR_oxygen)
|
||||
URxvt.font: xft:Source Code Pro:size=9:antialias=true
|
||||
URxvt.boldFont: xft:Source Code Pro:style=bold:size=9:antialias=true
|
||||
#else
|
||||
URxvt.font: xft:Monospace:size=9:antialias=true
|
||||
URxvt.boldFont: xft:Monospace:style=bold:size=9:antialias=true
|
||||
#endif
|
||||
URxvt.font: xft:Monospace:size=9:antialias=true
|
||||
URxvt.boldFont: xft:Monospace:style=bold:size=9:antialias=true
|
||||
URxvt.foreground: white
|
||||
URxvt.background: black
|
||||
URxvt.letterSpace: -1
|
||||
|
|
@ -21,7 +15,7 @@ URxvt.shading: 20
|
|||
URxvt.iso14755: false
|
||||
URxvt.iso14755_52: false
|
||||
|
||||
#if defined(SRVR_beryllium) || defined(SRVR_cipbuero4) || defined(SRVR_oxygen)
|
||||
#if defined(SRVR_falcon) || defined(SRVR_warthog) || defined(SRVR_cipbuero4)
|
||||
Xft.dpi: 192
|
||||
#endif
|
||||
|
||||
|
|
@ -55,7 +49,7 @@ Xft.rgba: rgb
|
|||
*.color11: #fffd00
|
||||
|
||||
! blue
|
||||
*.color4: #0086ff
|
||||
*.color4: #0026ff
|
||||
*.color12: #8470ff
|
||||
!*.color12: #0000ff
|
||||
|
||||
|
|
|
|||
|
|
@ -16,7 +16,8 @@ monitor = sys.argv[1] if len(sys.argv) >= 2 else 0
|
|||
(x, y, monitor_w, monitor_h) = hc.monitor_rect(monitor)
|
||||
|
||||
HiDPIHosts = set()
|
||||
HiDPIHosts.add('beryllium')
|
||||
HiDPIHosts.add('falcon')
|
||||
HiDPIHosts.add('warthog')
|
||||
HiDPIHosts.add('cipbuero4')
|
||||
|
||||
HiDPI = os.uname().nodename in HiDPIHosts
|
||||
|
|
|
|||
2
config/chromium-flags.conf
Normal file
2
config/chromium-flags.conf
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
--enable-features=UseOzonePlatform
|
||||
--ozone-platform=wayland
|
||||
|
|
@ -72,7 +72,7 @@ case "$HOSTNAME" in
|
|||
;;
|
||||
esac
|
||||
|
||||
if [ "$HOSTNAME" = beryllium ]; then
|
||||
if [ "$HOSTNAME" = warthog ] || [ "$HOSTNAME" = falcon ]; then
|
||||
hc keybind $Mod-d spawn /usr/bin/dmenu_run_hlwm -fn "Monospace-9"
|
||||
hc keybind XF86MonBrightnessDown spawn xbacklight -4
|
||||
hc keybind XF86MonBrightnessUp spawn xbacklight +4
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ fi
|
|||
x=${geometry[0]}
|
||||
y=${geometry[1]}
|
||||
panel_width=${geometry[2]}
|
||||
if [ "$HOSTNAME" = beryllium ]; then
|
||||
if [ "$HOSTNAME" = warthog ]; then
|
||||
panel_height=30
|
||||
font="-*-fixed-medium-*-*-*-26-*-*-*-*-*-*-*"
|
||||
iconpath=${HOME}/.config/herbstluftwm/icons_large
|
||||
|
|
@ -90,7 +90,7 @@ function cpu() {
|
|||
|
||||
# BATTERY
|
||||
function battery() {
|
||||
if [ "$HOSTNAME" != beryllium ]; then
|
||||
if [ "$HOSTNAME" != warthog ]; then
|
||||
return
|
||||
fi
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ set $mod Mod4
|
|||
|
||||
# Font for window titles. Will also be used by the bar unless a different font
|
||||
# is used in the bar {} block below.
|
||||
font pango:DejaVu Sans, FontAwesome 7
|
||||
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).
|
||||
|
|
@ -24,7 +24,7 @@ floating_modifier $mod
|
|||
|
||||
# start a terminal
|
||||
#bindsym $mod+Return exec i3-sensible-terminal
|
||||
bindsym $mod+Return exec alacritty
|
||||
bindsym $mod+Return exec urxvt
|
||||
|
||||
bindsym $mod+b exec chromium
|
||||
|
||||
|
|
@ -89,10 +89,7 @@ bindsym $mod+a focus parent
|
|||
#bindsym $mod+d focus child
|
||||
|
||||
# custom bind for pass dmenu wrapper
|
||||
bindsym $mod+p exec passmenu --type
|
||||
|
||||
# custom bind for flameshot screenshot tool
|
||||
bindsym $mod+Shift+s exec flameshot gui
|
||||
bindsym $mod+p exec ~/bin/passmenu --type
|
||||
|
||||
# do not focus container behind mouse
|
||||
focus_follows_mouse no
|
||||
|
|
@ -108,7 +105,7 @@ set $ws6 "6"
|
|||
set $ws7 "7"
|
||||
set $ws8 "8"
|
||||
set $ws9 "9"
|
||||
set $ws10 "A"
|
||||
set $ws10 "10"
|
||||
|
||||
# switch to workspace
|
||||
bindsym $mod+1 [workspace=$ws1] move workspace to output current, workspace $ws1
|
||||
|
|
@ -139,7 +136,7 @@ bindsym $mod+Alt+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+q exec i3lock --nofork --show-failed-attempts
|
||||
bindsym $mod+q exec i3lock
|
||||
bindsym $mod+Shift+q exit
|
||||
|
||||
# resize window (you can also use the mouse for that)
|
||||
|
|
@ -173,21 +170,19 @@ bindsym $mod+r mode "resize"
|
|||
bindsym XF86AudioMute exec "pactl set-sink-mute @DEFAULT_SINK@ toggle"
|
||||
bindsym XF86AudioLowerVolume exec "pactl set-sink-mute @DEFAULT_SINK@ false && pactl set-sink-volume @DEFAULT_SINK@ '-5%'"
|
||||
bindsym XF86AudioRaiseVolume exec "pactl set-sink-mute @DEFAULT_SINK@ false && pactl set-sink-volume @DEFAULT_SINK@ '+5%'"
|
||||
bindsym XF86AudioMicMute exec "pactl set-source-mute @DEFAULT_SOURCE@ toggle"
|
||||
bindsym XF86AudioMicMute exec "pactl set-source-mute 1 toggle"
|
||||
|
||||
bindsym XF86MonBrightnessDown exec "brightnessctl set 4%-"
|
||||
bindsym XF86MonBrightnessUp exec "brightnessctl set 4%+"
|
||||
bindsym XF86MonBrightnessDown exec "xbacklight -4"
|
||||
bindsym XF86MonBrightnessUp exec "xbacklight +4"
|
||||
|
||||
# Start i3bar to display a workspace bar (plus the system information i3status
|
||||
# finds out, if available)
|
||||
bar {
|
||||
position top
|
||||
status_command i3status
|
||||
font pango:DejaVu Sans, FontAwesome 7
|
||||
font pango:DejaVu Sans, FontAwesome 8
|
||||
}
|
||||
|
||||
exec --no-startup-id redshift
|
||||
exec --no-startup-id nm-applet
|
||||
exec --no-startup-id dunst
|
||||
exec --no-startup-id blueman-applet
|
||||
exec --no-startup-id signal-desktop --start-in-tray
|
||||
|
|
|
|||
|
|
@ -11,15 +11,11 @@ general {
|
|||
interval = 5
|
||||
}
|
||||
|
||||
order += "memory"
|
||||
order += "cpu_temperature 0"
|
||||
order += "cpu_usage"
|
||||
order += "battery all"
|
||||
order += "tztime local"
|
||||
|
||||
memory {
|
||||
format = " %percentage_used"
|
||||
}
|
||||
|
||||
cpu_temperature 0 {
|
||||
format = " %degrees°C"
|
||||
|
|
@ -37,7 +33,6 @@ battery all {
|
|||
status_unk = " UNK"
|
||||
status_full = " FULL"
|
||||
low_threshold = 10
|
||||
last_full_capacity = true
|
||||
}
|
||||
|
||||
tztime local {
|
||||
|
|
|
|||
|
|
@ -1,3 +0,0 @@
|
|||
require('general')
|
||||
require('keybindings')
|
||||
require('plugins')
|
||||
|
|
@ -1,81 +0,0 @@
|
|||
-- reduce boilerplate by defining some shortcuts
|
||||
local opt = vim.opt
|
||||
local cmd = vim.cmd
|
||||
local autocmd = vim.api.nvim_create_autocmd
|
||||
|
||||
--------------------
|
||||
-- General
|
||||
--------------------
|
||||
opt.mouse = 'n' -- enable mouse support in normal mode
|
||||
opt.clipboard = 'unnamedplus' -- copy/paste to and from system clipboard
|
||||
|
||||
opt.wildmode = 'list:longest,full'
|
||||
opt.wildignorecase = true
|
||||
-- ignore C/C++ objects and other build files
|
||||
opt.wildignore = '*.o,*.so,*.out'
|
||||
-- ignore java classes
|
||||
opt.wildignore:append '*.class'
|
||||
-- ignore python cache files
|
||||
opt.wildignore:append '*.pyc'
|
||||
-- ignore tex-related build files
|
||||
opt.wildignore:append '*.aux,*.bcf,*.lof,*.lol,*.lot,*.rubbercache,*.toc,*.pdf'
|
||||
|
||||
opt.fileformats = 'unix,dos' -- use identical lineendings for all platforms
|
||||
opt.secure = true -- disable autocmd for security reasons
|
||||
|
||||
--------------------
|
||||
-- Tabs
|
||||
--------------------
|
||||
opt.tabstop = 4 -- 1 tab == N spaces
|
||||
opt.shiftwidth = 4 -- shift N spaces when pressing tab
|
||||
opt.smartindent = true -- take syntax into account for applying indentation
|
||||
|
||||
--------------------
|
||||
-- Search
|
||||
--------------------
|
||||
opt.ignorecase = true -- ignore capitalization on search
|
||||
opt.smartcase = true -- ignore capitalication unless word contains a capital
|
||||
|
||||
opt.iskeyword:append '-' -- treat hyphenated words as a single word
|
||||
|
||||
--------------------
|
||||
-- Neovim UI
|
||||
--------------------
|
||||
opt.number = true -- line numbers
|
||||
opt.ruler = true -- cursor position in statusbar
|
||||
opt.showtabline = 2 -- always show vim tabs
|
||||
opt.showcmd = true -- display currently typed command
|
||||
opt.termguicolors = true -- enable 24-bit RGB color
|
||||
|
||||
-- highlight line at which the cursor is positioned
|
||||
opt.cursorline = true
|
||||
cmd 'highlight CursorLine term=bold cterm=bold'
|
||||
cmd 'highlight CursorLineNR term=bold cterm=bold ctermbg=darkgrey'
|
||||
|
||||
-- display warning column at 81 and 121
|
||||
opt.colorcolumn = '81,121'
|
||||
cmd 'highlight ColorColumn ctermbg=235 guibg=#2d2d2d'
|
||||
|
||||
opt.splitright = true -- horizontal split to the right
|
||||
opt.splitbelow = true -- vertical split to the bottom
|
||||
|
||||
-- define characters to display when using 'set list'
|
||||
opt.listchars = 'tab:→ ,trail:∙,eol:¬,extends:❯,precedes:❮,nbsp:␣'
|
||||
|
||||
--------------------
|
||||
-- Performance
|
||||
--------------------
|
||||
opt.hidden = true -- allow buffers with changes to be hidden
|
||||
opt.updatetime = 300 -- delay (in ms) to wait before triggering event
|
||||
opt.timeoutlen = 500 -- time (in ms) to wait for event to complete
|
||||
opt.history = 10000 -- remember N lines of history
|
||||
|
||||
--------------------
|
||||
-- Misc
|
||||
--------------------
|
||||
|
||||
-- remove redundant whitespaces on save
|
||||
autocmd('BufWritePre', {
|
||||
pattern = '*',
|
||||
command = ':%s/\\s\\+$//e'
|
||||
})
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
local map = require('utils').map -- import map
|
||||
|
||||
-- redefine leader key
|
||||
vim.g.mapleader = ' '
|
||||
|
||||
-- allow switching between buffers using tab and Shift-tab
|
||||
map('n', '<TAB>', ':bnext<CR>')
|
||||
map('n', '<S-TAB>', ':bprevious<CR>')
|
||||
|
|
@ -1,173 +0,0 @@
|
|||
--------------------
|
||||
-- Packer Bootstrap
|
||||
--------------------
|
||||
local packer_installed, _ = pcall(require, 'packer')
|
||||
local packer_bootstrap = false
|
||||
if (not packer_installed) then
|
||||
-- ask user whether packer should be bootstrapped
|
||||
packer_bootstrap = require('utils').prompt(
|
||||
'Plugin manager packer not found. Install it now?',
|
||||
'Bootstrapping packer now...',
|
||||
'Skipping setup of packer and plugins.')
|
||||
|
||||
if (not packer_bootstrap) then
|
||||
return
|
||||
end
|
||||
|
||||
-- perform actual bootstrap
|
||||
local fn = vim.fn
|
||||
local install_path = fn.stdpath('data') .. '/site/pack/packer/start/packer.nvim'
|
||||
fn.system({'git', 'clone', '--depth', '1', 'https://github.com/wbthomason/packer.nvim', install_path})
|
||||
vim.cmd('packadd packer.nvim')
|
||||
end
|
||||
|
||||
-- helper function to be used `config` parameter of packer's use to externalize
|
||||
-- plugin configuration, expects the name of the config file
|
||||
function load_config(name)
|
||||
return string.format('require("plugins/%s")', name)
|
||||
end
|
||||
|
||||
return require('packer').startup({
|
||||
function(use)
|
||||
use 'wbthomason/packer.nvim'
|
||||
|
||||
--------------------
|
||||
-- Visuals
|
||||
--------------------
|
||||
use { -- colorblind-friendly colorscheme
|
||||
'projekt0n/github-nvim-theme',
|
||||
config = load_config('github-nvim-theme'),
|
||||
}
|
||||
use { -- color highlighter
|
||||
'norcalli/nvim-colorizer.lua',
|
||||
config = function() require('colorizer').setup() end,
|
||||
}
|
||||
|
||||
--------------------
|
||||
-- Package Manager
|
||||
--------------------
|
||||
use { -- portable package manager
|
||||
'williamboman/mason.nvim',
|
||||
config = load_config('mason'),
|
||||
}
|
||||
use { -- update helper for mason
|
||||
'WhoIsSethDaniel/mason-tool-installer.nvim',
|
||||
after = { 'mason.nvim' },
|
||||
config = function() require('mason-tool-installer').setup({}) end,
|
||||
}
|
||||
|
||||
--------------------
|
||||
-- LSP Setup
|
||||
--------------------
|
||||
use { -- compatibility layer between mason and lspconfig + autoinstaller
|
||||
'williamboman/mason-lspconfig.nvim',
|
||||
after = { 'mason.nvim' },
|
||||
requires = {
|
||||
'neovim/nvim-lspconfig',
|
||||
},
|
||||
}
|
||||
use { -- configuration layer for neovim LSP client
|
||||
'neovim/nvim-lspconfig',
|
||||
after = {
|
||||
'mason-lspconfig.nvim',
|
||||
'cmp-nvim-lsp',
|
||||
},
|
||||
config = load_config('lspconfig'),
|
||||
}
|
||||
|
||||
--------------------
|
||||
-- Linter/Formatter
|
||||
--------------------
|
||||
use { -- linter and formatter manager
|
||||
'jose-elias-alvarez/null-ls.nvim',
|
||||
after = {
|
||||
'mason.nvim',
|
||||
'plenary.nvim',
|
||||
},
|
||||
requires = { 'nvim-lua/plenary.nvim' },
|
||||
}
|
||||
use { -- compatibility layer between mason and null-ls
|
||||
'jayp0521/mason-null-ls.nvim',
|
||||
after = { 'null-ls.nvim' },
|
||||
config = load_config('null-ls')
|
||||
}
|
||||
|
||||
--------------------
|
||||
-- Snippets
|
||||
--------------------
|
||||
use { -- snippet engine
|
||||
'L3MON4D3/LuaSnip',
|
||||
requires = {
|
||||
'saadparwaiz1/cmp_luasnip',
|
||||
'rafamadriz/friendly-snippets',
|
||||
},
|
||||
}
|
||||
use { -- various snippets
|
||||
'rafamadriz/friendly-snippets',
|
||||
after = { 'LuaSnip' },
|
||||
config = load_config('friendly-snippets'),
|
||||
}
|
||||
|
||||
--------------------
|
||||
-- Completion
|
||||
--------------------
|
||||
use { -- nvim-cmp source for nvim-lsp
|
||||
'hrsh7th/cmp-nvim-lsp',
|
||||
requires = { 'hrsh7th/nvim-cmp' },
|
||||
}
|
||||
use { -- nvim-cmp source for LuaSnip
|
||||
'saadparwaiz1/cmp_luasnip',
|
||||
requires = { 'hrsh7th/nvim-cmp' },
|
||||
after = { 'LuaSnip' },
|
||||
}
|
||||
use { -- nvim-cmp source for buffer words
|
||||
'hrsh7th/cmp-buffer',
|
||||
requires = { 'hrsh7th/nvim-cmp' },
|
||||
}
|
||||
use { -- nvim-cmp source for filesystem paths
|
||||
'hrsh7th/cmp-path',
|
||||
requires = { 'hrsh7th/nvim-cmp' },
|
||||
}
|
||||
use { -- nvim-cmp source for vim's cmdline
|
||||
'hrsh7th/cmp-cmdline',
|
||||
requires = { 'hrsh7th/nvim-cmp' },
|
||||
}
|
||||
use { -- completion engine
|
||||
'hrsh7th/nvim-cmp',
|
||||
after = {
|
||||
'cmp-nvim-lsp',
|
||||
'cmp-buffer',
|
||||
'cmp-path',
|
||||
'cmp-cmdline',
|
||||
'cmp_luasnip'
|
||||
},
|
||||
config = load_config('nvim-cmp'),
|
||||
}
|
||||
|
||||
--------------------
|
||||
-- Misc Utilities
|
||||
--------------------
|
||||
use { -- fuzzy finder
|
||||
'nvim-telescope/telescope.nvim',
|
||||
config = load_config('telescope'),
|
||||
requires = {'nvim-lua/plenary.nvim'},
|
||||
}
|
||||
|
||||
-- Automatically set up your configuration after cloning packer.nvim
|
||||
-- Put this at the end after all plugins
|
||||
if packer_bootstrap then
|
||||
require('packer').sync()
|
||||
end
|
||||
end,
|
||||
config = {
|
||||
display = {
|
||||
open_fn = function()
|
||||
return require('packer.util').float({ border = 'rounded' })
|
||||
end,
|
||||
},
|
||||
profile = {
|
||||
enable = true,
|
||||
threshold = 1, -- the amount in ms that a plugins load time must be over for it to be included in the profile
|
||||
},
|
||||
},
|
||||
})
|
||||
|
|
@ -1 +0,0 @@
|
|||
require('luasnip.loaders.from_vscode').lazy_load()
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
require('github-theme').setup({
|
||||
options = {
|
||||
transparent = true,
|
||||
},
|
||||
})
|
||||
|
||||
vim.cmd.colorscheme('github_dark_colorblind')
|
||||
|
|
@ -1,24 +0,0 @@
|
|||
local map = require('utils').map -- import map
|
||||
|
||||
require('mason-lspconfig').setup()
|
||||
require('mason-lspconfig').setup_handlers({
|
||||
function(server_name) -- default handler
|
||||
-- prepare nvim-cmp source
|
||||
local capabilities = require('cmp_nvim_lsp').default_capabilities()
|
||||
require('lspconfig')[server_name].setup({
|
||||
-- announce nvim-cmp-lsp capabilities to each lsp server
|
||||
capabilities = capabilities
|
||||
})
|
||||
end
|
||||
})
|
||||
|
||||
-- lsp keybindings
|
||||
map('n', 'gd', '<cmd>lua vim.lsp.buf.definition()<CR>')
|
||||
map('n', 'gD', '<cmd>lua vim.lsp.buf.declaration()<CR>')
|
||||
map('n', 'K', '<cmd>lua vim.lsp.buf.hover()<CR>')
|
||||
map('n', 'gi', '<cmd>lua vim.lsp.buf.implementation()<CR>')
|
||||
map('n', 'gr', '<cmd>lua vim.lsp.buf.references()<CR>')
|
||||
map('n', '<C-k>', '<cmd>lua vim.lsp.buf.signature_help()<CR>')
|
||||
map('n', '<leader>rn', '<cmd>lua vim.lsp.buf.rename()<CR>')
|
||||
map('n', '<leader>ca', '<cmd>lua vim.lsp.buf.code_action()<CR>')
|
||||
map('n', '<leader>f', '<cmd>lua vim.lsp.buf.type_definition({ async = true })<CR>')
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
require('mason').setup({
|
||||
ui = {
|
||||
icons = {
|
||||
package_installed = '✓',
|
||||
package_pending = '➜',
|
||||
package_uninstalled = '✗',
|
||||
},
|
||||
},
|
||||
})
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
require('null-ls').setup()
|
||||
require('mason-null-ls').setup()
|
||||
|
|
@ -1,78 +0,0 @@
|
|||
vim.opt.completeopt = 'menu,menuone,noselect'
|
||||
|
||||
local cmp = require('cmp')
|
||||
cmp.setup({
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
require('luasnip').lsp_expand(args.body)
|
||||
end,
|
||||
},
|
||||
formatting = {
|
||||
format = function(entry, vim_item)
|
||||
vim_item.menu = ({
|
||||
nvim_lsp = '[LSP]',
|
||||
buffer = '[Buffer]',
|
||||
luasnip = '[Snippet]',
|
||||
})[entry.source.name]
|
||||
return vim_item
|
||||
end,
|
||||
},
|
||||
window = {
|
||||
completion = cmp.config.window.bordered({ border = 'rounded' }),
|
||||
documentation = cmp.config.window.bordered({ border = 'rounded' }),
|
||||
},
|
||||
mapping = cmp.mapping.preset.insert({
|
||||
['<C-b>'] = cmp.mapping.scroll_docs(-4),
|
||||
['<C-f>'] = cmp.mapping.scroll_docs(4),
|
||||
['<C-Space>'] = cmp.mapping.complete(),
|
||||
['<C-e>'] = cmp.mapping.abort(),
|
||||
['<CR>'] = cmp.mapping.confirm({ select = false }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items.
|
||||
}),
|
||||
sources = cmp.config.sources({
|
||||
{ name = 'nvim_lsp', keyword_length = 3 },
|
||||
{ name = 'luasnip', keyword_length = 2 },
|
||||
}, {
|
||||
{
|
||||
name = 'buffer',
|
||||
keyword_length = 3,
|
||||
option = {
|
||||
get_bufnrs = function()
|
||||
return vim.api.nvim_list_bufs()
|
||||
end,
|
||||
},
|
||||
},
|
||||
})
|
||||
})
|
||||
|
||||
-- configure completion for specific filetype
|
||||
cmp.setup.filetype('gitcommit', {
|
||||
sources = cmp.config.sources({
|
||||
{ name = 'buffer' },
|
||||
}),
|
||||
})
|
||||
|
||||
-- use buffer source for `/` and `?` (if you enabled `native_menu`, this won't
|
||||
-- work anymore)
|
||||
cmp.setup.cmdline({ '/', '?' }, {
|
||||
mapping = cmp.mapping.preset.cmdline(),
|
||||
sources = {
|
||||
{ name = 'buffer' }
|
||||
},
|
||||
})
|
||||
|
||||
-- use cmdline & path source for ':' (if you enabled `native_menu`, this won't
|
||||
-- work anymore).
|
||||
cmp.setup.cmdline(':', {
|
||||
mapping = cmp.mapping.preset.cmdline(),
|
||||
sources = cmp.config.sources({
|
||||
{
|
||||
name = 'path',
|
||||
option = {
|
||||
trailing_slash = false,
|
||||
label_trailing_slash = false,
|
||||
}
|
||||
}
|
||||
}, {
|
||||
{ name = 'cmdline' }
|
||||
}),
|
||||
})
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
local map = require('utils').map -- import map
|
||||
|
||||
-- telescope keybindings
|
||||
map('n', 'ff', '<cmd>Telescope find_files<CR>')
|
||||
map('n', 'fg', '<cmd>Telescope live_grep<CR>')
|
||||
map('n', 'fb', '<cmd>Telescope buffers<CR>')
|
||||
map('n', 'fh', '<cmd>Telescope help_tags<CR>')
|
||||
|
|
@ -1,30 +0,0 @@
|
|||
local M = {}
|
||||
|
||||
-- keybinding mapper
|
||||
function M.map(mode, lhs, rhs, opts)
|
||||
local options = { noremap = true, silent = true }
|
||||
if opts then
|
||||
options = vim.tbl_extend('force', options, opts)
|
||||
end
|
||||
vim.api.nvim_set_keymap(mode, lhs, rhs, options)
|
||||
end
|
||||
|
||||
-- simple prompt
|
||||
function M.prompt(msg, accept_msg, deny_msg)
|
||||
local answer = vim.fn.input(msg .. ' (YES/no) ')
|
||||
while(true) do
|
||||
-- clear vim cmdline before printing anything
|
||||
vim.cmd('mode')
|
||||
if answer == 'YES' then
|
||||
print(accept_msg)
|
||||
return true
|
||||
elseif string.lower(answer) == 'no' then
|
||||
print(deny_msg)
|
||||
return false
|
||||
end
|
||||
-- re-request user input
|
||||
answer = vim.fn.input('Please retry: ' .. msg .. ' (YES/no) ')
|
||||
end
|
||||
end
|
||||
|
||||
return M
|
||||
236
config/sway/config
Normal file
236
config/sway/config
Normal file
|
|
@ -0,0 +1,236 @@
|
|||
### 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
|
||||
|
||||
# Workspace names
|
||||
set $ws1 "1"
|
||||
set $ws2 "2"
|
||||
set $ws3 "3"
|
||||
set $ws4 "4"
|
||||
set $ws5 "5"
|
||||
set $ws6 "6"
|
||||
set $ws7 "7"
|
||||
set $ws8 "8"
|
||||
set $ws9 "9"
|
||||
set $ws10 "A"
|
||||
|
||||
# Your preferred terminal emulator
|
||||
set $term gnome-terminal
|
||||
# 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 dmenu_path | dmenu | xargs swaymsg exec --
|
||||
|
||||
### Output configuration
|
||||
#
|
||||
# Default wallpaper (more resolutions are available in /usr/share/backgrounds/sway/)
|
||||
output * bg /usr/share/backgrounds/sway/Sway_Wallpaper_Blue_1920x1080.png fill
|
||||
|
||||
# Disable monitor when closing lid and enable it again when opening lid
|
||||
bindswitch --reload --locked lid:on output ePD-1 disable
|
||||
bindswitch --reload --locked lid:off output ePD-1 enable
|
||||
|
||||
# Laptop monitor
|
||||
output eDP-1 pos 3840 0 scale 2
|
||||
|
||||
# External monitors via docking station
|
||||
output DP-6 pos 0 0 scale 1
|
||||
output DP-7 pos 1920 0 scale 1
|
||||
|
||||
### Idle 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:touchpad {
|
||||
natural_scroll enabled
|
||||
click_method clickfinger
|
||||
}
|
||||
|
||||
input type:keyboard {
|
||||
xkb_layout "us,de"
|
||||
xkb_variant "altgr-intl,"
|
||||
xkb_options "ctrl:nocaps,compose:menu,compose:ralt,grp:shifts_toggle"
|
||||
xkb_numlock "enabled"
|
||||
}
|
||||
|
||||
### Key bindings
|
||||
#
|
||||
# Basics:
|
||||
#
|
||||
# Start a terminal
|
||||
bindsym $mod+Return exec $term
|
||||
|
||||
# Start your launcher
|
||||
bindsym $mod+d exec $menu
|
||||
|
||||
bindsym $mod+b exec chromium
|
||||
bindsym $mod+p exec passmenu # TODO: add --type as soon as pass is updated
|
||||
|
||||
# Kill focused window
|
||||
bindsym $mod+Shift+c kill
|
||||
|
||||
# Reload the configuration file
|
||||
bindsym $mod+Shift+r reload
|
||||
|
||||
# Start lockscreen
|
||||
bindsym $mod+q exec swaylock
|
||||
# Exit sway
|
||||
bindsym $mod+Shift+q exit
|
||||
|
||||
# Audio keybindings
|
||||
bindsym XF86AudioMute exec "pactl set-sink-mute @DEFAULT_SINK@ toggle"
|
||||
bindsym XF86AudioLowerVolume exec "pactl set-sink-mute @DEFAULT_SINK@ false && pactl set-sink-volume @DEFAULT_SINK@ '-5%'"
|
||||
bindsym XF86AudioRaiseVolume exec "pactl set-sink-mute @DEFAULT_SINK@ false && pactl set-sink-volume @DEFAULT_SINK@ '+5%'"
|
||||
bindsym XF86AudioMicMute exec "pactl set-source-mute 1 toggle"
|
||||
|
||||
# Brightness control
|
||||
bindsym XF86MonBrightnessDown exec "brightnessctl set 4%-"
|
||||
bindsym XF86MonBrightnessUp exec "brightnessctl set 4%+"
|
||||
|
||||
# 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
|
||||
|
||||
#
|
||||
# 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:
|
||||
#
|
||||
# Switch to workspace
|
||||
bindsym $mod+1 workspace $ws1
|
||||
bindsym $mod+2 workspace $ws2
|
||||
bindsym $mod+3 workspace $ws3
|
||||
bindsym $mod+4 workspace $ws4
|
||||
bindsym $mod+5 workspace $ws5
|
||||
bindsym $mod+6 workspace $ws6
|
||||
bindsym $mod+7 workspace $ws7
|
||||
bindsym $mod+8 workspace $ws8
|
||||
bindsym $mod+9 workspace $ws9
|
||||
bindsym $mod+0 workspace $ws10
|
||||
|
||||
# Move focused container to workspace
|
||||
bindsym $mod+Shift+1 move container to workspace $ws1
|
||||
bindsym $mod+Shift+2 move container to workspace $ws2
|
||||
bindsym $mod+Shift+3 move container to workspace $ws3
|
||||
bindsym $mod+Shift+4 move container to workspace $ws4
|
||||
bindsym $mod+Shift+5 move container to workspace $ws5
|
||||
bindsym $mod+Shift+6 move container to workspace $ws6
|
||||
bindsym $mod+Shift+7 move container to workspace $ws7
|
||||
bindsym $mod+Shift+8 move container to workspace $ws8
|
||||
bindsym $mod+Shift+9 move container to workspace $ws9
|
||||
bindsym $mod+Shift+0 move container to workspace $ws10
|
||||
#
|
||||
# Layout stuff:
|
||||
#
|
||||
# Split in horizontal orientation
|
||||
bindsym $mod+u split h
|
||||
# Split in vertical orientation
|
||||
bindsym $mod+o split v
|
||||
|
||||
# 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+minus 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+minus scratchpad show
|
||||
#
|
||||
# Resizing containers:
|
||||
#
|
||||
mode "resize" {
|
||||
# left will shrink the containers width
|
||||
# right will grow the containers width
|
||||
# up will shrink the containers height
|
||||
# down will grow the containers height
|
||||
bindsym $left resize shrink width 10px
|
||||
bindsym $down resize grow height 10px
|
||||
bindsym $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"
|
||||
|
||||
# Do not focus container behind mouse
|
||||
focus_follows_mouse no
|
||||
|
||||
font pango:DejaVu Sans 8
|
||||
|
||||
# Add external bar
|
||||
bar {
|
||||
position top
|
||||
swaybar_command waybar
|
||||
font pango:DejaVu Sans, FontAwesome 1
|
||||
}
|
||||
|
||||
exec --no-startup-id nm-applet --indicator
|
||||
|
||||
include /etc/sway/config.d/*
|
||||
97
config/waybar/config
Normal file
97
config/waybar/config
Normal file
|
|
@ -0,0 +1,97 @@
|
|||
{
|
||||
// Choose the order of the modules
|
||||
"modules-left": ["sway/workspaces", "sway/mode"],
|
||||
"modules-center": ["sway/window"],
|
||||
"modules-right": ["idle_inhibitor", "pulseaudio", "network", "temperature", "cpu", "memory", "sway/language", "battery", "clock", "tray"],
|
||||
// Modules configuration
|
||||
"sway/workspaces": {
|
||||
"disable-scroll": true,
|
||||
// "all-outputs": true,
|
||||
// "format": "{name}: {icon}",
|
||||
// "format-icons": {
|
||||
// "1": "",
|
||||
// "2": "",
|
||||
// "3": "",
|
||||
// "4": "",
|
||||
// "5": "",
|
||||
// "urgent": "",
|
||||
// "focused": "",
|
||||
// "default": ""
|
||||
// }
|
||||
},
|
||||
"sway/mode": {
|
||||
"format": "<span style=\"italic\">{}</span>"
|
||||
},
|
||||
"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-alt": "{:%Y-%m-%d}"
|
||||
},
|
||||
"cpu": {
|
||||
"format": "{usage}% ",
|
||||
"tooltip": false
|
||||
},
|
||||
"temperature": {
|
||||
// "thermal-zone": 2,
|
||||
// "hwmon-path": "/sys/class/hwmon/hwmon2/temp1_input",
|
||||
"critical-threshold": 80,
|
||||
// "format-critical": "{temperatureC}°C {icon}",
|
||||
"format": "{temperatureC}°C {icon}",
|
||||
"format-icons": ["", "", ""]
|
||||
},
|
||||
"memory": {
|
||||
"format": "{}% "
|
||||
},
|
||||
"battery": {
|
||||
"states": {
|
||||
// "good": 95,
|
||||
"warning": 30,
|
||||
"critical": 15
|
||||
},
|
||||
"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": ["", "", "", "", ""]
|
||||
},
|
||||
"network": {
|
||||
// "interface": "wlp2*", // (Optional) To force the use of this interface
|
||||
"format-wifi": "{essid} ({signalStrength}%) ",
|
||||
"format-ethernet": "{ifname}: {ipaddr}/{cidr} ",
|
||||
"format-linked": "{ifname} (No IP) ",
|
||||
"format-disconnected": "Disconnected ⚠",
|
||||
"format-alt": "{ifname}: {ipaddr}/{cidr}"
|
||||
},
|
||||
"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"
|
||||
}
|
||||
}
|
||||
225
config/waybar/style.css
Normal file
225
config/waybar/style.css
Normal file
|
|
@ -0,0 +1,225 @@
|
|||
* {
|
||||
border: none;
|
||||
border-radius: 0;
|
||||
/* `otf-font-awesome` is required to be installed for icons */
|
||||
font-family: Roboto, Helvetica, Arial, sans-serif;
|
||||
font-size: 13px;
|
||||
min-height: 0;
|
||||
}
|
||||
|
||||
window#waybar {
|
||||
background-color: rgba(43, 48, 59, 0.5);
|
||||
border-bottom: 3px solid rgba(100, 114, 125, 0.5);
|
||||
color: #ffffff;
|
||||
transition-property: background-color;
|
||||
transition-duration: .5s;
|
||||
}
|
||||
|
||||
window#waybar.hidden {
|
||||
opacity: 0.2;
|
||||
}
|
||||
|
||||
/*
|
||||
window#waybar.empty {
|
||||
background-color: transparent;
|
||||
}
|
||||
window#waybar.solo {
|
||||
background-color: #FFFFFF;
|
||||
}
|
||||
*/
|
||||
|
||||
window#waybar.termite {
|
||||
background-color: #3F3F3F;
|
||||
}
|
||||
|
||||
window#waybar.chromium {
|
||||
background-color: #000000;
|
||||
border: none;
|
||||
}
|
||||
|
||||
#workspaces button {
|
||||
padding: 0 2px;
|
||||
background-color: transparent;
|
||||
color: #ffffff;
|
||||
/* Use box-shadow instead of border so the text isn't offset */
|
||||
box-shadow: inset 0 -3px transparent;
|
||||
}
|
||||
|
||||
/* https://github.com/Alexays/Waybar/wiki/FAQ#the-workspace-buttons-have-a-strange-hover-effect */
|
||||
#workspaces button:hover {
|
||||
background: rgba(0, 0, 0, 0.2);
|
||||
box-shadow: inset 0 -3px #ffffff;
|
||||
}
|
||||
|
||||
#workspaces button.focused {
|
||||
background-color: #64727D;
|
||||
box-shadow: inset 0 -3px #ffffff;
|
||||
}
|
||||
|
||||
#workspaces button.urgent {
|
||||
background-color: #eb4d4b;
|
||||
}
|
||||
|
||||
#mode {
|
||||
background-color: #64727D;
|
||||
border-bottom: 3px solid #ffffff;
|
||||
}
|
||||
|
||||
#clock,
|
||||
#battery,
|
||||
#cpu,
|
||||
#memory,
|
||||
#temperature,
|
||||
#backlight,
|
||||
#network,
|
||||
#pulseaudio,
|
||||
#custom-media,
|
||||
#tray,
|
||||
#mode,
|
||||
#idle_inhibitor,
|
||||
#mpd {
|
||||
padding: 2 5px;
|
||||
margin: 0 3px;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
#window,
|
||||
#workspaces {
|
||||
margin: 0 4px;
|
||||
}
|
||||
|
||||
/* If workspaces is the leftmost module, omit left margin */
|
||||
.modules-left > widget:first-child > #workspaces {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
/* If workspaces is the rightmost module, omit right margin */
|
||||
.modules-right > widget:last-child > #workspaces {
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
#clock {
|
||||
background-color: #64727D;
|
||||
}
|
||||
|
||||
#battery {
|
||||
background-color: #ffffff;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
#battery.charging {
|
||||
color: #ffffff;
|
||||
background-color: #26A65B;
|
||||
}
|
||||
|
||||
@keyframes blink {
|
||||
to {
|
||||
background-color: #ffffff;
|
||||
color: #000000;
|
||||
}
|
||||
}
|
||||
|
||||
#battery.critical:not(.charging) {
|
||||
background-color: #f53c3c;
|
||||
color: #ffffff;
|
||||
animation-name: blink;
|
||||
animation-duration: 0.5s;
|
||||
animation-timing-function: linear;
|
||||
animation-iteration-count: infinite;
|
||||
animation-direction: alternate;
|
||||
}
|
||||
|
||||
label:focus {
|
||||
background-color: #000000;
|
||||
}
|
||||
|
||||
#cpu {
|
||||
background-color: #2ecc71;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
#memory {
|
||||
background-color: #9b59b6;
|
||||
}
|
||||
|
||||
#backlight {
|
||||
background-color: #90b1b1;
|
||||
}
|
||||
|
||||
#network {
|
||||
background-color: #2980b9;
|
||||
}
|
||||
|
||||
#network.disconnected {
|
||||
background-color: #f53c3c;
|
||||
}
|
||||
|
||||
#pulseaudio {
|
||||
background-color: #f1c40f;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
#pulseaudio.muted {
|
||||
background-color: #90b1b1;
|
||||
color: #2a5c45;
|
||||
}
|
||||
|
||||
#custom-media {
|
||||
background-color: #66cc99;
|
||||
color: #2a5c45;
|
||||
min-width: 100px;
|
||||
}
|
||||
|
||||
#custom-media.custom-spotify {
|
||||
background-color: #66cc99;
|
||||
}
|
||||
|
||||
#custom-media.custom-vlc {
|
||||
background-color: #ffa000;
|
||||
}
|
||||
|
||||
#temperature {
|
||||
background-color: #f0932b;
|
||||
}
|
||||
|
||||
#temperature.critical {
|
||||
background-color: #eb4d4b;
|
||||
}
|
||||
|
||||
#tray {
|
||||
background-color: #2980b9;
|
||||
}
|
||||
|
||||
#idle_inhibitor {
|
||||
background-color: #2d3436;
|
||||
}
|
||||
|
||||
#idle_inhibitor.activated {
|
||||
background-color: #ecf0f1;
|
||||
color: #2d3436;
|
||||
}
|
||||
|
||||
#mpd {
|
||||
background-color: #66cc99;
|
||||
color: #2a5c45;
|
||||
}
|
||||
|
||||
#mpd.disconnected {
|
||||
background-color: #f53c3c;
|
||||
}
|
||||
|
||||
#mpd.stopped {
|
||||
background-color: #90b1b1;
|
||||
}
|
||||
|
||||
#mpd.paused {
|
||||
background-color: #51a37a;
|
||||
}
|
||||
|
||||
#language {
|
||||
background: #00b093;
|
||||
color: #740864;
|
||||
padding: 0 5px;
|
||||
margin: 0 5px;
|
||||
min-width: 16px;
|
||||
}
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
email = mail@tpreisner.de
|
||||
name = Thomas Preisner
|
||||
[core]
|
||||
editor = nvim
|
||||
editor = vim
|
||||
[commit]
|
||||
verbose = true
|
||||
[alias]
|
||||
|
|
@ -20,9 +20,3 @@
|
|||
s = status
|
||||
st = status
|
||||
t = tag
|
||||
[init]
|
||||
defaultBranch = main
|
||||
[diff "ansible-vault"]
|
||||
textconv = "ansible-vault view"
|
||||
[diff "sopsdiffer"]
|
||||
textconv = "sops --config /dev/null --decrypt"
|
||||
|
|
|
|||
|
|
@ -4,5 +4,3 @@ default-cache-ttl 600
|
|||
max-cache-ttl 3600
|
||||
|
||||
grab
|
||||
|
||||
pinentry-program /usr/bin/pinentry-gnome3
|
||||
|
|
|
|||
|
|
@ -4,3 +4,5 @@ SSH_AGENT_PID DEFAULT=
|
|||
SSH_AUTH_SOCK DEFAULT="${XDG_RUNTIME_DIR}/gnupg/S.gpg-agent.ssh"
|
||||
|
||||
_JAVA_AWT_WM_NONREPARENTING DEFAULT="1"
|
||||
|
||||
MOZ_ENABLE_WAYLAND DEFAULT="1"
|
||||
|
|
|
|||
27
setup.sh
27
setup.sh
|
|
@ -48,15 +48,7 @@ if installed vim; then
|
|||
echo "Setting up vim:"
|
||||
|
||||
link vimrc ~/.vimrc
|
||||
link vim ~/.vim
|
||||
|
||||
echo
|
||||
fi
|
||||
if installed nvim; then
|
||||
echo "Setting up nvim:"
|
||||
|
||||
mkdir -p ~/.config
|
||||
link config/nvim ~/.config/nvim
|
||||
#link vim ~/.vim
|
||||
|
||||
echo
|
||||
fi
|
||||
|
|
@ -91,7 +83,6 @@ if installed ssh; then
|
|||
|
||||
mkdir -p ~/.ssh
|
||||
link ssh/config ~/.ssh/config
|
||||
link ssh/conf.d ~/.ssh/conf.d
|
||||
|
||||
echo
|
||||
fi
|
||||
|
|
@ -144,8 +135,24 @@ if installed i3; then
|
|||
link config/i3status/config ~/.config/i3status/config
|
||||
fi
|
||||
|
||||
if installed sway; then
|
||||
echo "Setting up sway:"
|
||||
mkdir -p ~/.config/sway
|
||||
link config/sway/config ~/.config/sway/config
|
||||
|
||||
# it is assumed that waybar is installed
|
||||
mkdir -p ~/.config/waybar
|
||||
link config/waybar/config ~/.config/waybar/config
|
||||
fi
|
||||
|
||||
if installed redshift; then
|
||||
echo "Setting up redshift:"
|
||||
|
||||
link config/redshift.conf ~/.config/redshift.conf
|
||||
fi
|
||||
|
||||
if installed chromium; then
|
||||
echo "Setting up chromium:"
|
||||
|
||||
link config/chromium-flags.conf ~/.config/chromium-flags.conf
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -1 +0,0 @@
|
|||
Subproject commit e322403a55ca26a907da9e92a50316a14cf87898
|
||||
40
ssh/config
40
ssh/config
|
|
@ -3,10 +3,44 @@
|
|||
Host *
|
||||
AddKeysToAgent confirm
|
||||
|
||||
# Include external config if available
|
||||
Include conf.d/*
|
||||
Host 0?? 0???
|
||||
HostName faui%h.informatik.uni-erlangen.de
|
||||
ForwardAgent yes
|
||||
|
||||
# Use if they havent been defined yet:
|
||||
Host faui0? faui0?? faui0???
|
||||
HostName %h.informatik.uni-erlangen.de
|
||||
ForwardAgent yes
|
||||
|
||||
Host man? man?? big?
|
||||
HostName faui49%h.informatik.uni-erlangen.de
|
||||
ProxyJump ty28wuqu@i4lab1.informatik.uni-erlangen.de
|
||||
|
||||
Match Host faui*
|
||||
User ty28wuqu
|
||||
|
||||
Host ircbox
|
||||
HostName ircbox.informatik.uni-erlangen.de
|
||||
User ty28wuqu
|
||||
|
||||
Host irc
|
||||
HostName tpreisner.de
|
||||
User weechat
|
||||
|
||||
Host server
|
||||
HostName tpreisner.de
|
||||
User root
|
||||
|
||||
Host steep
|
||||
Hostname steep.cs.fau.de
|
||||
User preisi
|
||||
Port 17
|
||||
|
||||
Host pi
|
||||
HostName wg.tpreisner.de
|
||||
# dynamic ip behind hostname would cause warnings
|
||||
CheckHostIP no
|
||||
|
||||
# use if they havent been defined yet:
|
||||
Host *
|
||||
Compression yes
|
||||
ForwardAgent no
|
||||
|
|
|
|||
|
|
@ -1,161 +0,0 @@
|
|||
" dichromatic.vim -- Vim color scheme.
|
||||
" Author: Romain Lafourcade (romainlafourcade@gmail.com)
|
||||
" Webpage: https://raw.githubusercontent.com/romainl/vim-dichromatic/master/colors/dichromatic.vim
|
||||
" Description: A 'dark' colorscheme for color blind vimmers. But not only.
|
||||
|
||||
hi clear
|
||||
|
||||
if exists("syntax_on")
|
||||
syntax reset
|
||||
endif
|
||||
|
||||
let colors_name = "dichromatic"
|
||||
|
||||
if ($TERM =~ '256' || &t_Co >= 256) || has("gui_running")
|
||||
hi Normal ctermbg=232 ctermfg=252 cterm=NONE guibg=#080808 guifg=#D0D0D0 gui=NONE
|
||||
hi NonText ctermbg=NONE ctermfg=240 cterm=NONE guibg=NONE guifg=#585858 gui=NONE
|
||||
hi Comment ctermbg=NONE ctermfg=244 cterm=NONE guibg=NONE guifg=#808080 gui=NONE
|
||||
hi Constant ctermbg=NONE ctermfg=168 cterm=NONE guibg=NONE guifg=#D75F87 gui=NONE
|
||||
hi Error ctermbg=15 ctermfg=89 cterm=reverse guibg=#FFFFFF guifg=#87005F gui=reverse
|
||||
hi Identifier ctermbg=NONE ctermfg=133 cterm=NONE guibg=NONE guifg=#AF5FAF gui=NONE
|
||||
hi Ignore ctermbg=NONE ctermfg=NONE cterm=NONE guibg=NONE guifg=NONE gui=NONE
|
||||
hi PreProc ctermbg=NONE ctermfg=186 cterm=NONE guibg=NONE guifg=#DFDF87 gui=NONE
|
||||
hi Special ctermbg=NONE ctermfg=15 cterm=NONE guibg=NONE guifg=#FFFFFF gui=NONE
|
||||
hi Statement ctermbg=NONE ctermfg=133 cterm=NONE guibg=NONE guifg=#AF5FAF gui=NONE
|
||||
hi String ctermbg=NONE ctermfg=142 cterm=NONE guibg=NONE guifg=#AFAF00 gui=NONE
|
||||
hi Todo ctermbg=NONE ctermfg=NONE cterm=reverse guibg=NONE guifg=NONE gui=reverse
|
||||
hi Type ctermbg=NONE ctermfg=116 cterm=NONE guibg=NONE guifg=#87D7D7 gui=NONE
|
||||
hi Underlined ctermbg=NONE ctermfg=NONE cterm=underline guibg=NONE guifg=NONE gui=underline
|
||||
hi Number ctermbg=NONE ctermfg=168 cterm=NONE guibg=NONE guifg=#D75F87 gui=NONE
|
||||
hi StatusLine ctermbg=15 ctermfg=240 cterm=NONE guibg=#FFFFFF guifg=#585858 gui=NONE
|
||||
hi StatusLineNC ctermbg=240 ctermfg=15 cterm=NONE guibg=#585858 guifg=#FFFFFF gui=NONE
|
||||
hi VertSplit ctermbg=240 ctermfg=240 cterm=NONE guibg=#585858 guifg=#585858 gui=NONE
|
||||
hi TabLine ctermbg=240 ctermfg=15 cterm=NONE guibg=#585858 guifg=#FFFFFF gui=NONE
|
||||
hi TabLineFill ctermbg=240 ctermfg=240 cterm=NONE guibg=#585858 guifg=#585858 gui=NONE
|
||||
hi TabLineSel ctermbg=15 ctermfg=240 cterm=NONE guibg=#FFFFFF guifg=#585858 gui=NONE
|
||||
hi Title ctermbg=NONE ctermfg=72 cterm=NONE guibg=NONE guifg=#5FAF87 gui=NONE
|
||||
hi LineNr ctermbg=NONE ctermfg=116 cterm=NONE guibg=NONE guifg=#87D7D7 gui=NONE
|
||||
hi Cursor ctermbg=15 ctermfg=232 cterm=NONE guibg=#FFFFFF guifg=#080808 gui=NONE
|
||||
hi CursorColumn ctermbg=89 ctermfg=NONE cterm=NONE guibg=#87005F guifg=NONE gui=NONE
|
||||
hi CursorLine ctermbg=236 ctermfg=NONE cterm=NONE guibg=#303030 guifg=NONE gui=NONE
|
||||
hi CursorLineNr ctermbg=236 ctermfg=NONE cterm=NONE guibg=#303030 guifg=NONE gui=NONE
|
||||
hi helpLeadBlank ctermbg=NONE ctermfg=NONE cterm=NONE guibg=NONE guifg=NONE gui=NONE
|
||||
hi helpNormal ctermbg=NONE ctermfg=NONE cterm=NONE guibg=NONE guifg=NONE gui=NONE
|
||||
hi Visual ctermbg=116 ctermfg=232 cterm=NONE guibg=#87D7D7 guifg=#080808 gui=NONE
|
||||
hi VisualNOS ctermbg=133 ctermfg=232 cterm=NONE guibg=#AF5FAF guifg=#080808 gui=NONE
|
||||
hi Pmenu ctermbg=186 ctermfg=232 cterm=NONE guibg=#DFDF87 guifg=#080808 gui=NONE
|
||||
hi PmenuSbar ctermbg=142 ctermfg=186 cterm=NONE guibg=#AFAF00 guifg=#DFDF87 gui=NONE
|
||||
hi PmenuSel ctermbg=133 ctermfg=232 cterm=NONE guibg=#AF5FAF guifg=#080808 gui=NONE
|
||||
hi PmenuThumb ctermbg=133 ctermfg=133 cterm=NONE guibg=#AF5FAF guifg=#AF5FAF gui=NONE
|
||||
hi FoldColumn ctermbg=NONE ctermfg=72 cterm=NONE guibg=NONE guifg=#5FAF87 gui=NONE
|
||||
hi Folded ctermbg=NONE ctermfg=248 cterm=NONE guibg=NONE guifg=#A8A8A8 gui=NONE
|
||||
hi WildMenu ctermbg=53 ctermfg=15 cterm=NONE guibg=#00005F guifg=#FFFFFF gui=NONE
|
||||
hi SpecialKey ctermbg=NONE ctermfg=186 cterm=NONE guibg=NONE guifg=#DFDF87 gui=NONE
|
||||
hi DiffAdd ctermbg=232 ctermfg=111 cterm=reverse guibg=#080808 guifg=#87afff gui=reverse
|
||||
hi DiffChange ctermbg=232 ctermfg=188 cterm=reverse guibg=#080808 guifg=#dfdfdf gui=reverse
|
||||
hi DiffDelete ctermbg=232 ctermfg=222 cterm=reverse guibg=#080808 guifg=#ffdf87 gui=reverse
|
||||
hi DiffText ctermbg=232 ctermfg=145 cterm=reverse guibg=#080808 guifg=#afafaf gui=reverse
|
||||
hi IncSearch ctermbg=232 ctermfg=133 cterm=reverse guibg=#080808 guifg=#AF5FAF gui=reverse
|
||||
hi Search ctermbg=186 ctermfg=232 cterm=NONE guibg=#DFDF87 guifg=#080808 gui=NONE
|
||||
hi Directory ctermbg=NONE ctermfg=72 cterm=NONE guibg=NONE guifg=#5FAF87 gui=NONE
|
||||
hi MatchParen ctermbg=240 ctermfg=186 cterm=NONE guibg=#585858 guifg=#DFDF87 gui=NONE
|
||||
hi SpellBad ctermbg=89 ctermfg=232 cterm=NONE guibg=#87005F guifg=#080808 gui=NONE guisp=#87005F
|
||||
hi SpellCap ctermbg=72 ctermfg=232 cterm=NONE guibg=#5FAF87 guifg=#080808 gui=NONE guisp=#5FAF87
|
||||
hi SpellLocal ctermbg=142 ctermfg=232 cterm=NONE guibg=#AFAF00 guifg=#080808 gui=NONE guisp=#AFAF00
|
||||
hi SpellRare ctermbg=133 ctermfg=232 cterm=NONE guibg=#AF5FAF guifg=#080808 gui=NONE guisp=#AF5FAF
|
||||
hi ColorColumn ctermbg=133 ctermfg=NONE cterm=NONE guibg=#AF5FAF guifg=NONE gui=NONE
|
||||
hi signColumn ctermbg=NONE ctermfg=186 cterm=NONE guibg=NONE guifg=#DFDF87 gui=NONE
|
||||
hi ErrorMsg ctermbg=89 ctermfg=15 cterm=NONE guibg=#87005F guifg=#FFFFFF gui=NONE
|
||||
hi ModeMsg ctermbg=142 ctermfg=232 cterm=NONE guibg=#AFAF00 guifg=#080808 gui=NONE
|
||||
hi MoreMsg ctermbg=NONE ctermfg=142 cterm=NONE guibg=NONE guifg=#AFAF00 gui=NONE
|
||||
hi Question ctermbg=NONE ctermfg=72 cterm=NONE guibg=NONE guifg=#5FAF87 gui=NONE
|
||||
hi WarningMsg ctermbg=168 ctermfg=232 cterm=NONE guibg=#D75F87 guifg=#080808 gui=NONE
|
||||
hi QuickFixLine ctermbg=15 ctermfg=240 cterm=NONE guibg=#FFFFFF guifg=#585858 gui=NONE
|
||||
|
||||
elseif &t_Co == 8 || $TERM !~# '^linux' || &t_Co == 16
|
||||
set t_Co=16
|
||||
|
||||
hi Normal ctermbg=black ctermfg=grey cterm=NONE
|
||||
hi NonText ctermbg=NONE ctermfg=darkgrey cterm=NONE
|
||||
hi Comment ctermbg=NONE ctermfg=darkgrey cterm=NONE
|
||||
hi Constant ctermbg=NONE ctermfg=red cterm=NONE
|
||||
hi Error ctermbg=white ctermfg=darkmagenta cterm=reverse
|
||||
hi Identifier ctermbg=NONE ctermfg=darkred cterm=NONE
|
||||
hi Ignore ctermbg=NONE ctermfg=NONE cterm=NONE
|
||||
hi PreProc ctermbg=NONE ctermfg=yellow cterm=NONE
|
||||
hi Special ctermbg=NONE ctermfg=white cterm=NONE
|
||||
hi Statement ctermbg=NONE ctermfg=darkred cterm=NONE
|
||||
hi String ctermbg=NONE ctermfg=darkyellow cterm=NONE
|
||||
hi Todo ctermbg=NONE ctermfg=NONE cterm=reverse
|
||||
hi Type ctermbg=NONE ctermfg=cyan cterm=NONE
|
||||
hi Underlined ctermbg=NONE ctermfg=NONE cterm=underline
|
||||
hi Number ctermbg=NONE ctermfg=red cterm=NONE
|
||||
hi StatusLine ctermbg=white ctermfg=darkgrey cterm=NONE
|
||||
hi StatusLineNC ctermbg=darkgrey ctermfg=white cterm=NONE
|
||||
hi VertSplit ctermbg=darkgrey ctermfg=darkgrey cterm=NONE
|
||||
hi TabLine ctermbg=darkgrey ctermfg=white cterm=NONE
|
||||
hi TabLineFill ctermbg=darkgrey ctermfg=darkgrey cterm=NONE
|
||||
hi TabLineSel ctermbg=white ctermfg=darkgrey cterm=NONE
|
||||
hi Title ctermbg=NONE ctermfg=green cterm=NONE
|
||||
hi LineNr ctermbg=NONE ctermfg=cyan cterm=NONE
|
||||
hi Cursor ctermbg=white ctermfg=black cterm=NONE
|
||||
hi CursorColumn ctermbg=darkmagenta ctermfg=NONE cterm=NONE
|
||||
hi CursorLine ctermbg=black ctermfg=NONE cterm=NONE
|
||||
hi CursorLineNr ctermbg=black ctermfg=NONE cterm=NONE
|
||||
hi helpLeadBlank ctermbg=NONE ctermfg=NONE cterm=NONE
|
||||
hi helpNormal ctermbg=NONE ctermfg=NONE cterm=NONE
|
||||
hi Visual ctermbg=cyan ctermfg=black cterm=NONE
|
||||
hi VisualNOS ctermbg=darkred ctermfg=black cterm=NONE
|
||||
hi Pmenu ctermbg=yellow ctermfg=black cterm=NONE
|
||||
hi PmenuSbar ctermbg=darkyellow ctermfg=yellow cterm=NONE
|
||||
hi PmenuSel ctermbg=darkred ctermfg=black cterm=NONE
|
||||
hi PmenuThumb ctermbg=darkred ctermfg=darkred cterm=NONE
|
||||
hi FoldColumn ctermbg=NONE ctermfg=green cterm=NONE
|
||||
hi Folded ctermbg=NONE ctermfg=grey cterm=NONE
|
||||
hi WildMenu ctermbg=darkblue ctermfg=white cterm=NONE
|
||||
hi SpecialKey ctermbg=NONE ctermfg=yellow cterm=NONE
|
||||
hi DiffAdd ctermbg=black ctermfg=blue cterm=reverse
|
||||
hi DiffChange ctermbg=black ctermfg=grey cterm=reverse
|
||||
hi DiffDelete ctermbg=black ctermfg=yellow cterm=reverse
|
||||
hi DiffText ctermbg=black ctermfg=darkgray cterm=reverse
|
||||
hi IncSearch ctermbg=black ctermfg=darkred cterm=reverse
|
||||
hi Search ctermbg=yellow ctermfg=black cterm=NONE
|
||||
hi Directory ctermbg=NONE ctermfg=green cterm=NONE
|
||||
hi MatchParen ctermbg=darkgrey ctermfg=yellow cterm=NONE
|
||||
hi SpellBad ctermbg=darkmagenta ctermfg=black cterm=NONE
|
||||
hi SpellCap ctermbg=green ctermfg=black cterm=NONE
|
||||
hi SpellLocal ctermbg=darkyellow ctermfg=black cterm=NONE
|
||||
hi SpellRare ctermbg=darkred ctermfg=black cterm=NONE
|
||||
hi ColorColumn ctermbg=darkred ctermfg=NONE cterm=NONE
|
||||
hi signColumn ctermbg=NONE ctermfg=yellow cterm=NONE
|
||||
hi ErrorMsg ctermbg=darkmagenta ctermfg=white cterm=NONE
|
||||
hi ModeMsg ctermbg=darkyellow ctermfg=black cterm=NONE
|
||||
hi MoreMsg ctermbg=NONE ctermfg=darkyellow cterm=NONE
|
||||
hi Question ctermbg=NONE ctermfg=green cterm=NONE
|
||||
hi WarningMsg ctermbg=red ctermfg=black cterm=NONE
|
||||
hi QuickFixLine ctermbg=white ctermfg=darkgrey cterm=NONE
|
||||
endif
|
||||
|
||||
hi link StatusLineTerm StatusLine
|
||||
hi link StatusLineTermNC StatusLineNC
|
||||
|
||||
let g:terminal_ansi_colors = [
|
||||
\ '#080808',
|
||||
\ '#AF5FAF',
|
||||
\ '#008700',
|
||||
\ '#AFAF00',
|
||||
\ '#00005F',
|
||||
\ '#87005F',
|
||||
\ '#87D7D7',
|
||||
\ '#D0D0D0',
|
||||
\ '#808080',
|
||||
\ '#D75F87',
|
||||
\ '#5FAF87',
|
||||
\ '#DFDF87',
|
||||
\ '#87D7D7',
|
||||
\ '#D75F87',
|
||||
\ '#87D7D7',
|
||||
\ '#FFFFFF',
|
||||
\ ]
|
||||
|
||||
" Generated with RNB (https://gist.github.com/romainl/5cd2f4ec222805f49eca)
|
||||
139
vim/general.vim
139
vim/general.vim
|
|
@ -1,139 +0,0 @@
|
|||
" drop vi-compatibility
|
||||
set nocompatible
|
||||
" disable autocmd
|
||||
set secure
|
||||
" use utf8 only
|
||||
set encoding=utf8
|
||||
|
||||
" file/directory matching
|
||||
set wildmode=list:longest,full
|
||||
" ignore case when completing
|
||||
if exists('+wildignorecase')
|
||||
set wildignorecase
|
||||
endif
|
||||
" ignorelist
|
||||
set wildignore=*.o,*.d,*.so,*.class,*.aux,*.log,*.out,*.toc,*.pdf,*.pyc
|
||||
|
||||
" increase command history
|
||||
set history=1000
|
||||
" increase count of possible undos
|
||||
set undolevels=1000
|
||||
|
||||
" encrypt buffers when saved to files
|
||||
if exists('+cryptmethod')
|
||||
set cryptmethod=blowfish
|
||||
endif
|
||||
|
||||
" enable fast terminal for tmux but not for ssh connection
|
||||
if &term =~# '^screen' && !exists('SSH_CONNECTION')
|
||||
set ttyfast
|
||||
endif
|
||||
|
||||
" enable automatic file detection, plugin and indention support
|
||||
if has('autocmd')
|
||||
filetype plugin indent on
|
||||
endif
|
||||
|
||||
" use utf8 encoding for all files and recognize latin1
|
||||
set fileencodings=utf-8,latin1
|
||||
|
||||
" use unix line-endings and recognize dos endings
|
||||
set fileformats=unix,dos
|
||||
|
||||
" tabs
|
||||
set tabstop=4
|
||||
set shiftwidth=4
|
||||
set autoindent
|
||||
set smartindent
|
||||
set smarttab
|
||||
|
||||
" allow backspacing over autoindent and line breaks
|
||||
set backspace=indent,eol,start
|
||||
|
||||
" already display matches while searching
|
||||
set incsearch
|
||||
" only check for case if the searched word contains a capital
|
||||
set ignorecase
|
||||
set smartcase
|
||||
" highlight all matches. use <C-L> to remove the highlights
|
||||
set hlsearch
|
||||
|
||||
" treat hyphenated words as a single word
|
||||
set iskeyword+=-
|
||||
|
||||
" syntax folding
|
||||
if has('folding')
|
||||
set foldmethod=syntax
|
||||
" only use folding when there is enough space
|
||||
" if &columns > 80
|
||||
" set foldcolumn=2
|
||||
" endif
|
||||
set foldlevel=99
|
||||
|
||||
" dont open fold for block movements
|
||||
set foldopen-=block
|
||||
endif
|
||||
|
||||
" allow buffers with changes to be hidden
|
||||
set hidden
|
||||
|
||||
" correct splitting
|
||||
if has('vertsplit')
|
||||
set splitright
|
||||
set splitbelow
|
||||
endif
|
||||
|
||||
" Visual
|
||||
" set text color for dark terminal background
|
||||
set background=dark
|
||||
|
||||
" activate syntax highlighting
|
||||
if has('syntax')
|
||||
syntax enable
|
||||
endif
|
||||
|
||||
" set colorscheme
|
||||
colorscheme dichromatic
|
||||
|
||||
" display line at which the current is positioned
|
||||
if exists('+cursorline')
|
||||
set cursorline
|
||||
" remove line and make the line bold instead
|
||||
highlight CursorLine term=bold cterm=bold
|
||||
highlight CursorLineNR term=bold cterm=bold ctermbg=darkgrey
|
||||
endif
|
||||
|
||||
" display warning column at 81 and 121
|
||||
let &colorcolumn="81,121"
|
||||
highlight ColorColumn ctermbg=235 guibg=#2d2d2d
|
||||
|
||||
" display line numbers
|
||||
set number
|
||||
|
||||
" show cursor position all the time
|
||||
set ruler
|
||||
|
||||
" show vim tabs all the time
|
||||
set showtabline=2
|
||||
|
||||
" show currently typed command
|
||||
set showcmd
|
||||
|
||||
" define characters to display when using 'set list'
|
||||
set listchars=tab:→\ ,trail:∙,eol:¬,extends:❯,precedes:❮,nbsp:␣
|
||||
|
||||
" increase completion performance and reduce time until timeout
|
||||
set updatetime=300
|
||||
set timeoutlen=500
|
||||
|
||||
" copy paste between vim and everything else
|
||||
set clipboard=unnamedplus
|
||||
|
||||
" Misc
|
||||
set mouse=n
|
||||
|
||||
" remove windows ^M when the encoding gets messed up
|
||||
noremap <Leader>m mmHmt:%s/<C-V><cr>//ge<cr>'tzt'm
|
||||
|
||||
" add convenience command for force-saving read-only files
|
||||
cmap w!! w !sudo tee %
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
" allow easier pane switching
|
||||
nnoremap <C-J> <C-W><C-J>
|
||||
nnoremap <C-K> <C-W><C-K>
|
||||
nnoremap <C-L> <C-W><C-L>
|
||||
nnoremap <C-H> <C-W><C-H>
|
||||
|
||||
" allow easier pane resizing
|
||||
nnoremap <M-J> :resize -2<CR>
|
||||
nnoremap <M-K> :resize +2<CR>
|
||||
nnoremap <M-L> :vertical resize -2<CR>
|
||||
nnoremap <M-H> :vertical resize +2<CR>
|
||||
|
||||
" use TAB to switch to next buffers
|
||||
nnoremap <TAB> :bnext<CR>
|
||||
" use Shift-TAB to switch to previous buffers
|
||||
nnoremap <S-TAB> :bprevious<CR>
|
||||
145
vimrc
145
vimrc
|
|
@ -1,2 +1,143 @@
|
|||
source $HOME/.vim/general.vim
|
||||
source $HOME/.vim/keybindings.vim
|
||||
" .vimrc
|
||||
|
||||
" only vim and not vi
|
||||
set nocompatible
|
||||
" disable autocmd
|
||||
set secure
|
||||
" use utf8 only
|
||||
set encoding=utf8
|
||||
|
||||
" file/directory matching
|
||||
set wildmode=list:longest,full
|
||||
" ignore case when completing
|
||||
if exists('+wildignorecase')
|
||||
set wildignorecase
|
||||
endif
|
||||
" ignorelist
|
||||
set wildignore=*.o,*.d,*.so,*.class,*.aux,*.log,*.out,*.toc,*.pdf,*.pyc
|
||||
|
||||
" show completion menu even with only one match
|
||||
if exists('+completeopt')
|
||||
set completeopt+=menuone
|
||||
endif
|
||||
|
||||
" increase command history
|
||||
set history=1000
|
||||
" increase count of possible undos
|
||||
set undolevels=1000
|
||||
|
||||
" encrypt buffers when saved to files
|
||||
if exists('+cryptmethod')
|
||||
set cryptmethod=blowfish
|
||||
endif
|
||||
|
||||
" enable fast terminal for tmux but not for ssh connection
|
||||
if &term =~# '^screen' && !exists('SSH_CONNECTION')
|
||||
set ttyfast
|
||||
endif
|
||||
|
||||
" enable automatic file detection, plugin and indention support
|
||||
if has('autocmd')
|
||||
filetype off "for pathogen
|
||||
filetype plugin indent on
|
||||
endif
|
||||
|
||||
" use utf8 encoding for all files and recognize latin1
|
||||
set fileencodings=utf-8,latin1
|
||||
|
||||
" use unix line-endings and recognize dos endings
|
||||
set fileformats=unix,dos
|
||||
|
||||
" tabs
|
||||
set tabstop=4
|
||||
set shiftwidth=4
|
||||
set autoindent
|
||||
set smartindent
|
||||
set smarttab
|
||||
|
||||
" allow backspacing over autoindent and line breaks
|
||||
set backspace=indent,eol,start
|
||||
|
||||
" already display matches while searching
|
||||
set incsearch
|
||||
" only check for case if the searched word contains a capital
|
||||
set ignorecase
|
||||
set smartcase
|
||||
" highlight all matches. use <C-L> to remove the highlights
|
||||
set hlsearch
|
||||
|
||||
" syntax folding
|
||||
if has('folding')
|
||||
set foldmethod=syntax
|
||||
" only use folding when there is enough space
|
||||
" if &columns > 80
|
||||
" set foldcolumn=2
|
||||
" endif
|
||||
set foldlevel=99
|
||||
|
||||
" dont open fold for block movements
|
||||
set foldopen-=block
|
||||
endif
|
||||
|
||||
" allow buffers with changes to be hidden
|
||||
set hidden
|
||||
|
||||
" correct splitting
|
||||
if has('vertsplit')
|
||||
set splitright
|
||||
set splitbelow
|
||||
endif
|
||||
|
||||
" Visual
|
||||
" set text color for dark terminal background
|
||||
set background=dark
|
||||
|
||||
" activate syntax highlighting
|
||||
if has('syntax')
|
||||
syntax enable
|
||||
endif
|
||||
|
||||
" set colorscheme
|
||||
colorscheme ron
|
||||
|
||||
" display line at which the current is positioned
|
||||
if exists('+cursorline')
|
||||
set cursorline
|
||||
" remove line and make the line bold instead
|
||||
highlight CursorLine term=bold cterm=bold
|
||||
highlight CursorLineNR term=bold cterm=bold ctermbg=darkgrey
|
||||
endif
|
||||
|
||||
" display box from column 81 to 100
|
||||
let &colorcolumn=join(range(81, 100), ",")
|
||||
highlight ColorColumn ctermbg=235 guibg=#2d2d2d
|
||||
|
||||
" display line numbers
|
||||
set number
|
||||
|
||||
" show currently typed command
|
||||
set showcmd
|
||||
|
||||
" define characters to display when using 'set list'
|
||||
set listchars=tab:→\ ,trail:∙,eol:¬,extends:❯,precedes:❮,nbsp:␣
|
||||
|
||||
" Disable arrow keys
|
||||
"map <Right> <Nop>
|
||||
"map <Left> <Nop>
|
||||
"map <Up> <Nop>
|
||||
"map <Down> <Nop>
|
||||
|
||||
"map! <Right> <Nop>
|
||||
"map! <Left> <Nop>
|
||||
"map! <Up> <Nop>
|
||||
"map! <Down> <Nop>
|
||||
|
||||
" allow easier pane switching
|
||||
nnoremap <C-J> <C-W><C-J>
|
||||
nnoremap <C-K> <C-W><C-K>
|
||||
nnoremap <C-L> <C-W><C-L>
|
||||
nnoremap <C-H> <C-W><C-H>
|
||||
|
||||
" Misc
|
||||
set mouse=n
|
||||
noremap <Leader>m mmHmt:%s/<C-V><cr>//ge<cr>'tzt'm
|
||||
|
|
|
|||
15
xinitrc
15
xinitrc
|
|
@ -1,12 +1,7 @@
|
|||
#! /bin/bash
|
||||
|
||||
case "$HOSTNAME" in
|
||||
cipbuero4)
|
||||
# detects fau-machine and defines variable for Xresources
|
||||
xrdb -load -DHOST_FAUCIP ~/.Xresources
|
||||
xrandr --output DP-2 --scale 1.6x1.6
|
||||
;;
|
||||
fau*|cip*)
|
||||
fau*)
|
||||
# detects fau-machine and defines variable for Xresources
|
||||
xrdb -load -DHOST_FAUCIP ~/.Xresources
|
||||
;;
|
||||
|
|
@ -23,19 +18,13 @@ if [ -d $HOME/.fonts ]; then
|
|||
xset fp rehash
|
||||
fi
|
||||
|
||||
# start automount-daemon for udisks2 if available
|
||||
if type "udiskie" >/dev/null 2>&1; then
|
||||
udiskie &
|
||||
fi
|
||||
|
||||
# autolock on suspend
|
||||
xss-lock -- i3lock --nofork --show-failed-attempts &
|
||||
xss-lock -- i3lock --nofork &
|
||||
|
||||
# autolock after 5 minutes of inactivity
|
||||
xset s 300
|
||||
|
||||
# set background
|
||||
xsetroot -solid '#22AA22'
|
||||
feh --randomize --bg-fill ~/misc/wallpapers
|
||||
|
||||
exec i3
|
||||
|
|
|
|||
|
|
@ -45,14 +45,7 @@ alias grep='grep --binary-files=without-match -H -n --color=always'
|
|||
alias less='less -r'
|
||||
alias cp='cp -i'
|
||||
alias mv='mv -i'
|
||||
# use nvim instead of vim when available
|
||||
if type nvim >/dev/null 2>&1; then
|
||||
alias vi='vim'
|
||||
alias vim='nvim'
|
||||
fi
|
||||
alias automake='{ while true; do inotifywait -r -e modify . && make; done; } &'
|
||||
# less verbose and more colorful `ip addr`-output
|
||||
alias ip='ip -br -color=auto'
|
||||
|
||||
# ===== sp aliases
|
||||
alias xterm='xterm -fa terminus -fs 8'
|
||||
|
|
|
|||
|
|
@ -51,9 +51,7 @@ zstyle ':completion:::::' completer \
|
|||
#TODO: keep _prefix or not?
|
||||
|
||||
# ignore case when trying to match typed characters
|
||||
zstyle ':completion:*:(^approximate):*' matcher-list 'm:{[:lower:]}={[:upper:]}' \
|
||||
'+m:{[:upper:]}={[:lower:]}' \
|
||||
'+m:{-_}={_-}'
|
||||
zstyle ':completion:*:(^approximate):*' matcher-list 'm:{a-zA-Z-_}={A-Za-z_-}'
|
||||
|
||||
# allow one mistake per three characters
|
||||
zstyle -e ':completion:*:approximate:*' max-errors \
|
||||
|
|
@ -108,11 +106,11 @@ zstyle ':completion:*' separate-sections on
|
|||
zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#) ([0-9a-z-]#)*=01;34=0=01'
|
||||
|
||||
# do not complete unwanted files with vim
|
||||
zstyle ':completion:*:*:*vim:*:globbed-files' ignored-patterns \
|
||||
'*.o' '*.so' '*.out' \
|
||||
'*.class' \
|
||||
'*.pyc' \
|
||||
'*.aux' '*.bbl' '*.bcf' '*.blg' '*.lof' '*.lol' '*.lot' '*.pdf' '*.rubbercache' '*.run.xml' '*.toc' '*.pdf' '*.dvi'
|
||||
zstyle ':completion:*:*:vim:*:globbed-files' ignored-patterns \
|
||||
'*.aux' '*.log' '*.pdf' '*.ps' '*.bbl' '*.blg' '*.out' '*-blx.bib' '*.run.xml' '*.dvi' \
|
||||
'*.o' \
|
||||
'*.pyc' \
|
||||
'*.class'
|
||||
|
||||
# only complete *.pdf with katarakt
|
||||
zstyle ':completion:*:*:katarakt:*:*' file-patterns '*.pdf *(-/)'
|
||||
|
|
|
|||
|
|
@ -1,6 +1,4 @@
|
|||
# set EDITOR variable
|
||||
if type nvim >/dev/null 2>&1; then
|
||||
export EDITOR="nvim"
|
||||
elif type vim >/dev/null 2>&1; then
|
||||
if type vim >/dev/null 2>&1; then
|
||||
export EDITOR="vim"
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ case "$OSTYPE" in
|
|||
export LSCOLORS=gxfxcxdxbxegedabagacad
|
||||
;;
|
||||
*)
|
||||
export LS_COLORS=di='36;40:ln=35;40:so=32;40:pi=33;40:ex=31;40:bd=34;46:cd=34;43:su=0;41:sg=0;46:tw=0;42:ow=0;45:'
|
||||
export LS_COLORS=di='36;40:ln=35;40:so=32;40:pi=33;40:ex=31;40:bd=34;46:cd=34;43:su=0;41:sg=0;46:tw=0;42:ow=0;43:'
|
||||
;;
|
||||
esac
|
||||
|
||||
|
|
@ -18,9 +18,6 @@ setopt transient_rprompt # only show the rprompt on the current prompt
|
|||
# ===== set the prompt
|
||||
zshrc_prompt_precmd() {
|
||||
|
||||
# call vcs_info before every prompt
|
||||
vcs_info
|
||||
|
||||
# regex to remove all zerospace elements. Used to calculate the width of
|
||||
# the top prompt.
|
||||
local zero='%([BSUBfksu]|([FB]|){*})'
|
||||
|
|
@ -55,14 +52,6 @@ zshrc_prompt_precmd() {
|
|||
# username, green for normal users, red for root
|
||||
local user="%(!.%F{red}.%F{green})%n%f"
|
||||
|
||||
# information about unstaged/staged changes in VCS in current directory
|
||||
local vcs="${vcs_info_msg_0_}"
|
||||
local vcs_width=${#${(S%%%)vcs//$~zero/}}
|
||||
if [[ $vcs_width -ne 0 ]]; then
|
||||
# add brackets if vcs is non-empty
|
||||
vcs="${bracket_open}${vcs}${bracket_close}"
|
||||
fi
|
||||
|
||||
# hostname, underlined if running on a remote system through SSH
|
||||
local host="%F{green}%m%f"
|
||||
if [[ -n $SSH_CONNECTION ]]; then
|
||||
|
|
@ -106,7 +95,6 @@ zshrc_prompt_precmd() {
|
|||
# combine them to create the prompt
|
||||
local top_left=""
|
||||
local top_right="${bracket_open}${time}${bracket_close}"
|
||||
local top_middle="${vcs}"
|
||||
local bottom_left="${bracket_open}${user}%F{green}@%f${host}${bracket_close}${exitcode}${separator}${symbol}"
|
||||
local bottom_right=
|
||||
|
||||
|
|
@ -121,16 +109,15 @@ zshrc_prompt_precmd() {
|
|||
local width_top_prefix=${#${(S%%%)top_prefix//$~zero/}}
|
||||
local width_top_suffix=${#${(S%%%)top_suffix//$~zero/}}
|
||||
local width_top_left=${#${(S%%%)top_left//$~zero/}}
|
||||
local width_top_middle=${#${(S%%%)top_middle//$~zero/}}
|
||||
local width_top_right=${#${(S%%%)top_right//$~zero/}}
|
||||
|
||||
# calculate the maximum width of ${top_left}:
|
||||
# (-4 for brackets and as spacing between top_left, top_middle and top_right)
|
||||
# (-4 for brackets, -1 as spacing between top_left and top_right)
|
||||
local top_left_width_max=$((
|
||||
COLUMNS - $width_top_prefix
|
||||
- $width_top_left - 2
|
||||
- $width_top_middle
|
||||
- $width_top_right - 2
|
||||
- $width_top_left - 4
|
||||
- 1
|
||||
- $width_top_right
|
||||
- $width_top_suffix
|
||||
))
|
||||
|
||||
|
|
@ -142,14 +129,12 @@ zshrc_prompt_precmd() {
|
|||
local width=$((
|
||||
COLUMNS - width_top_prefix
|
||||
- width_top_left
|
||||
- width_top_middle
|
||||
- width_top_right
|
||||
- width_top_suffix
|
||||
))
|
||||
local top_left_separator="%F{cyan}${(pl:$((width / 2))::$dash:)}%f"
|
||||
local top_right_separator="%F{cyan}${(pl:$((width / 2 + width % 2))::$dash:)}%f"
|
||||
local top_separator="%F{cyan}${(pl:${width}::$dash:)}%f"
|
||||
|
||||
PROMPT="${top_prefix}${top_left}${top_left_separator}${top_middle}${top_right_separator}${top_right}${top_suffix}
|
||||
PROMPT="${top_prefix}${top_left}${top_separator}${top_right}${top_suffix}
|
||||
${bottom_prefix}${bottom_left} "
|
||||
|
||||
RPROMPT="${bottom_right}${bottom_suffix}"
|
||||
|
|
|
|||
69
zsh/vcs.zsh
69
zsh/vcs.zsh
|
|
@ -1,69 +0,0 @@
|
|||
autoload -Uz vcs_info
|
||||
|
||||
# only look for certain VCS
|
||||
zstyle ':vcs_info:*' enable git
|
||||
|
||||
# check repository for changes so that they can be used in %u/%c
|
||||
# (this might be slow for bigger repositories)
|
||||
zstyle ':vcs_info:*' check-for-changes yes
|
||||
|
||||
# display current branch (%b -> green), unstaged + staged changes (%u/%c -> green),
|
||||
# VCS (%s -> blue) and custom messages (%m).
|
||||
zstyle ':vcs_info:*' formats \
|
||||
"%F{green}%b%u%c%F{default}:%F{blue}%s%F{default}%m"
|
||||
# during special actions (e.g. merge, rebase), also display those (%a -> red)
|
||||
zstyle ':vcs_info:*' actionformats \
|
||||
"(%F{green}%b%u%c%F{default}/%F{red}%a%F{default}:%F{blue}%s%F{default}%m)"
|
||||
|
||||
# set style for formats/actionformats when unstaged (%u) and staged (%c)
|
||||
# changes are detected in the repository
|
||||
# (check-for-changes must be true for this to work)
|
||||
zstyle ':vcs_info:*' unstagedstr '¹'
|
||||
zstyle ':vcs_info:*' stagedstr '²'
|
||||
|
||||
# force vcs_info to be run. this prevents running it later for performance reasons.
|
||||
# default to run vcs_info. will be prevented from running later if possible
|
||||
# (for speedup)
|
||||
zshrc_force_run_vcs_info=1
|
||||
|
||||
# cache data
|
||||
zstyle ':vcs_info:*+pre-get-data:*' hooks pre-get-data
|
||||
+vi-pre-get-data() {
|
||||
# only git and mercurial support and need caching. ignore all other VCS
|
||||
[[ $vcs != git && $vcs != hg ]] && return
|
||||
|
||||
# run vcs_info on startup, on directory change (or for other custom reasons)
|
||||
if [[ -n $zshrc_force_run_vcs_info ]]; then
|
||||
zshrc_force_run_vcs_info=
|
||||
return
|
||||
fi
|
||||
|
||||
# don't run vcs_info by default to speed up the shell
|
||||
ret=1
|
||||
case $(fc -ln $(($HISTCMD-1))) in
|
||||
# vcs status might need an update after running git/hg
|
||||
git* | g\ *)
|
||||
ret=0
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
# display stash count
|
||||
function +vi-git-stashes() {
|
||||
if [[ -s ${hook_com[base]/.git/refs/stash} ]]; then
|
||||
local -a stashes
|
||||
# "grep" output of git stash list via (M) and :#(...)
|
||||
stashes=( ${(M)${(f)"$(git stash list 2>/dev/null)"}:#(*WIP*)} )
|
||||
|
||||
if [[ ${#stashes} -gt 0 ]]; then
|
||||
hook_com[misc]+=" %F{yellow}${#stashes}s%F{default}"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
zstyle ':vcs_info:git*+set-message:*' hooks git-stashes
|
||||
|
||||
# enforce running vcs_info when changing directory
|
||||
prompt_chpwd() {
|
||||
zshrc_force_run_vcs_info=1
|
||||
}
|
||||
chpwd_functions+=(prompt_chpwd)
|
||||
6
zshrc
6
zshrc
|
|
@ -2,15 +2,9 @@
|
|||
source ~/.zsh/keybindings.zsh
|
||||
source ~/.zsh/setopt.zsh
|
||||
source ~/.zsh/general.zsh
|
||||
source ~/.zsh/vcs.zsh
|
||||
source ~/.zsh/prompt.zsh
|
||||
source ~/.zsh/completion.zsh
|
||||
source ~/.zsh/history.zsh
|
||||
source ~/.zsh/aliases.zsh
|
||||
source ~/.zsh/multiplexer.zsh
|
||||
source ~/.zsh/exports.zsh
|
||||
|
||||
# Try loading additional local config if available
|
||||
if [ -f ~/.zsh/custom.zsh ]; then
|
||||
source ~/.zsh/custom.zsh
|
||||
fi
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue