Compare commits

...

17 Commits

Author SHA1 Message Date
332a9513be xinitrc updated 2023-11-16 23:31:15 +01:00
ba356f30ce added tldr alias; fix pipewire 2023-07-24 22:00:58 +02:00
1e85bda258 updated alacritty example 2023-07-17 16:47:51 +02:00
e44bf09895 update 2023-07-07 11:02:04 +02:00
0e2d581a42 updates 2023-07-07 10:40:16 +02:00
e49f872029 added: gpg functions in bashrc; modified: nvim config 2023-06-20 13:33:05 +02:00
269efeacd5 updated to latest state
aka no idea what is there:)
2023-06-13 14:16:13 +02:00
7fc48a5009 update 2023-05-25 16:20:12 +02:00
7a2d8666e7 added .xprofile for pipewire on gentoo; updates 2023-03-29 14:56:00 +02:00
e88bca1023 updates 2023-03-03 11:31:05 +01:00
5542bebfa8 autopairs plugin added 2023-02-24 10:57:21 +01:00
50c09a01e5 update 2023-02-12 03:11:31 +01:00
ebc9b1a639 .xinitrc updated 2023-02-07 02:16:40 +01:00
d26e963b3a alacritty config added 2023-02-07 02:02:12 +01:00
a3a96c3fc6 nvim config added 2023-02-07 02:00:28 +01:00
910ba5b3c5 vimrc updated 2023-02-07 01:25:37 +01:00
8e947766c4 configs added 2023-02-07 00:57:13 +01:00
22 changed files with 520 additions and 38 deletions

17
.bash_profile Normal file
View File

@@ -0,0 +1,17 @@
# .bash_profile
# Get the aliases and functions
[ -f $HOME/.bashrc ] && . $HOME/.bashrc
export _JAVA_AWT_WM_NOREPARENTING=1
export PATH="$PATH:/opt/texlive/2023/bin/x86_64-linux/"
# SSHAGENT
export SSH_AUTH_SOCK=${HOME}/.ssh/agent
if ! pgrep -u ${USER} ssh-agent > /dev/null; then
rm -f ${SSH_AUTH_SOCK}
fi
if [ ! -S ${SSH_AUTH_SOCK} ]; then
eval $(ssh-agent -a ${SSH_AUTH_SOCK} 2> /dev/null)
fi

54
.bashrc
View File

@@ -14,6 +14,9 @@ source /etc/profile
# PS1 shell color
## simple white ps1 without git
#PS1='\[\e[0m\][\[\e[0m\]\u\[\e[0m\]@\[\e[0m\]\H \[\e[0m\]\W\[\e[0m\]]\[\e[0m\]\$ \[\e[0m\]'
## based on: https://www.cyberciti.biz/faq/bash-shell-change-the-color-of-my-shell-prompt-under-linux-or-unix/
## get current branch in git repo
function parse_git_branch() {
@@ -90,12 +93,12 @@ function sv-enable () {
## Switch keyboard layouts
function xkb-switch () {
LAYOUT=$(setxkbmap -query | grep layout | awk '{print $2}')
if [[ $LAYOUT == "us" ]]; then
LAYOUT=$(setxkbmap -query | grep layout | awk '{print $2}')
if [[ $LAYOUT == "us" ]]; then
setxkbmap cz qwerty
else
else
setxkbmap us
fi
fi
}
## Repeat command until exit
@@ -123,33 +126,47 @@ m3u8-download() {
youtube-dl -f $format_code --hls-prefer-native "$1"
}
## GPG functions
gpg_encrypt () {
output=~/"${1}".$(date +%s).enc
#gpg --encrypt --armor --output ${output} -r 0x0000 -r 0x0001 -r 0x0002 "${1}" && echo "${1} -> ${output}"
gpg --encrypt --armor --output ${output} "${1}" && echo "${1} -> ${output}"
}
gpg_decrypt () {
output=$(echo "${1}" | rev | cut -c16- | rev)
gpg --decrypt --output ${output} "${1}" && echo "${1} -> ${output}"
}
# Aliases and Exports
## utility
alias cal="cal -m"
## shell
set -o vi # vim keybinding in terminal
#set -o vi # vim keybinding in terminal
EDITOR=vim # prefered editor
stty -ixon # reverse i search bash
complete -cf doas # doas completion
alias ls="ls --color=auto"
alias ll="ls -lFh"
alias la="ls -alh"
alias l="ls -CF"
alias ld="ls -d -F */"
alias lda="ls -l -d -p */"
export HISTCONTROL=ignoredups # fuckin history identical vole
## network
## shortcuts
alias lgfr="cd ~/git/filiprojek/"
alias lgfr="cd ~/git/fr/"
alias lgfw="cd ~/git/fofrweb/"
alias lbc="cd ~/git/fr/pedf/bc"
## programs
alias r="ranger"
alias feh="feh --scale-down"
alias dragon="dragon-drop"
#alias dragon="dragon-drop"
alias xclip="xclip -selection c"
alias grep='grep --color=auto'
alias passmenu="passmenu -l 10"
@@ -157,6 +174,7 @@ alias speedtest="speedtest-cli"
alias "cd.."="cd .."
alias df='df -h' # human-readable sizes
alias free='free -m' # show sizes in MB
alias tldr='tldr -t base16' # colors
## gpg encryption
# verify signature for isos
@@ -192,8 +210,9 @@ alias fuck='doas $(history -p \!\!)'
alias sudo="doas"
## void xbps aliases
alias xi="doas xbps-install"
alias xq="doas xbps-query -Rs"
#alias xi="doas xbps-install"
alias xi="doas xi"
alias xq="xbps-query -Rs"
alias xr="doas xbps-remove"
alias xrd="doas xbps-remove -R" # remove all dependencies
alias xu="doas xbps-install -Suv" # update
@@ -201,24 +220,27 @@ alias xreinstall="doas xbps-install -f"
alias xlu="xbps-install -Suvn" # list packages requiring updates
## random
#alias vim="nvim"
alias todo="vim ~/_todo.md"
alias schm="~/.screenlayout/home.sh"
alias sclp="~/.screenlayout/laptop.sh"
### bare git repo alias for dotfiles
alias config="/usr/bin/git --git-dir=$HOME/.dotfiles --work-tree=$HOME"
# Exports
export PATH="$PATH:$HOME/.cargo/bin"
export PATH="$PATH:$HOME/.local/bin"
export PATH="$PATH:/var/lib/flatpak/exports/bin"
export PATH="$PATH:$HOME/.local/share/flatpak/exports/bin"
export PATH="$PATH:/home/fr/git/microlab/wpa_tui/dmenu_scripts"
# Locales Exports
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
export LANGUAGE=en_US.UTF-8
# autologin on tty1
if [ -z "$DISPLAY" ] && [ "$(fgconsole)" -eq 1 ]; then
exec startx
fi
export $(dbus-launch)
# if [ -z "$DISPLAY" ] && [ "$(fgconsole)" -eq 1 ]; then
# exec startx
# fi

1
.config/alacritty/.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
alacritty.yml

View File

@@ -0,0 +1,86 @@
font:
normal:
family: LiterationMono Nerd Font Mono
style: Regular
bold:
family: LiterationMono Nerd Font Mono
style: Bold
italic:
family: LiterationMono Nerd Font Mono
style: Italic
bold_italic:
family: LiterationMono Nerd Font Mono
style: Bold Italic
size: 8
# Base16 Default Dark - alacritty color config
# Chris Kempson (http://chriskempson.com)
colors:
# Default colors
primary:
background: '0x181818'
# foreground: '0xd8d8d8'
# background: '0x000000'
foreground: '0xffffff'
# Colors the cursor will use if `custom_cursor_colors` is true
cursor:
text: '0x181818'
cursor: '0xd8d8d8'
# Normal colors
normal:
black: '0x181818'
red: '0xab4642'
green: '0xa1b56c'
yellow: '0xf7ca88'
blue: '0x7cafc2'
magenta: '0xba8baf'
cyan: '0x86c1b9'
white: '0xd8d8d8'
bright:
black: '0x181818'
red: '0xab4642'
green: '0xa1b56c'
yellow: '0xf7ca88'
blue: '0x7cafc2'
magenta: '0xba8baf'
cyan: '0x86c1b9'
white: '0xd8d8d8'
# Bright colors
# bright:
# black: '0x585858'
# red: '0xdc9656'
# green: '0x282828'
# yellow: '0x383838'
# blue: '0xb8b8b8'
# magenta: '0xe8e8e8'
# cyan: '0xa16946'
# white: '0xf8f8f8'
indexed_colors:
- { index: 16, color: '0xdc9656' }
- { index: 17, color: '0xa16946' }
- { index: 18, color: '0x282828' }
- { index: 19, color: '0x383838' }
- { index: 20, color: '0xb8b8b8' }
- { index: 21, color: '0xe8e8e8' }
draw_bold_text_with_bright_colors: false
window:
opacity: 0.9
key_bindings:
- { key: Return, mods: Control|Shift, action: SpawnNewInstance }
env:
TERM: xterm-256color

2
.config/nvim/.gitignore vendored Normal file
View File

@@ -0,0 +1,2 @@
lazy-lock.json

20
.config/nvim/init.lua Normal file
View File

@@ -0,0 +1,20 @@
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)
vim.g.mapleader = ' '
vim.g.maplocalleader = ' '
require('lazy').setup('plugins')
require('config')
require('completion')

View File

@@ -0,0 +1,128 @@
local cmp_status_ok, cmp = pcall(require, "cmp")
if not cmp_status_ok then
return
end
local snip_status_ok, luasnip = pcall(require, "luasnip")
if not snip_status_ok then
return
end
require("luasnip/loaders/from_vscode").lazy_load()
local check_backspace = function()
local col = vim.fn.col "." - 1
return col == 0 or vim.fn.getline("."):sub(col, col):match "%s"
end
--   פּ ﯟ   some other good icons
local kind_icons = {
Text = "",
Method = "m",
Function = "",
Constructor = "",
Field = "",
Variable = "",
Class = "",
Interface = "",
Module = "",
Property = "",
Unit = "",
Value = "",
Enum = "",
Keyword = "",
Snippet = "",
Color = "",
File = "",
Reference = "",
Folder = "",
EnumMember = "",
Constant = "",
Struct = "",
Event = "",
Operator = "",
TypeParameter = "",
}
-- find more here: https://www.nerdfonts.com/cheat-sheet
cmp.setup {
snippet = {
expand = function(args)
luasnip.lsp_expand(args.body) -- For `luasnip` users.
end,
},
mapping = {
["<C-k>"] = cmp.mapping.select_prev_item(),
["<C-j>"] = cmp.mapping.select_next_item(),
["<C-b>"] = cmp.mapping(cmp.mapping.scroll_docs(-1), { "i", "c" }),
["<C-f>"] = cmp.mapping(cmp.mapping.scroll_docs(1), { "i", "c" }),
["<C-Space>"] = cmp.mapping(cmp.mapping.complete(), { "i", "c" }),
["<C-y>"] = cmp.config.disable, -- Specify `cmp.config.disable` if you want to remove the default `<C-y>` mapping.
["<C-e>"] = cmp.mapping {
i = cmp.mapping.abort(),
c = cmp.mapping.close(),
},
-- Accept currently selected item. If none selected, `select` first item.
-- Set `select` to `false` to only confirm explicitly selected items.
["<CR>"] = cmp.mapping.confirm { select = false },
["<Tab>"] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_next_item()
elseif luasnip.expandable() then
luasnip.expand()
elseif luasnip.expand_or_jumpable() then
luasnip.expand_or_jump()
elseif check_backspace() then
fallback()
else
fallback()
end
end, {
"i",
"s",
}),
["<S-Tab>"] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_prev_item()
elseif luasnip.jumpable(-1) then
luasnip.jump(-1)
else
fallback()
end
end, {
"i",
"s",
}),
},
formatting = {
fields = { "kind", "abbr", "menu" },
format = function(entry, vim_item)
-- Kind icons
vim_item.kind = string.format("%s", kind_icons[vim_item.kind])
-- vim_item.kind = string.format('%s %s', kind_icons[vim_item.kind], vim_item.kind) -- This concatonates the icons with the name of the item kind
vim_item.menu = ({
luasnip = "[Snippet]",
buffer = "[Buffer]",
path = "[Path]",
})[entry.source.name]
return vim_item
end,
},
sources = {
{ name = "luasnip" },
{ name = "buffer" },
{ name = "path" },
},
confirm_opts = {
behavior = cmp.ConfirmBehavior.Replace,
select = false,
},
-- documentation = {
-- border = { "╭", "─", "╮", "│", "╯", "─", "╰", "│" },
-- },
-- experimental = {
-- ghost_text = false,
-- native_menu = false,
-- },
}

View File

@@ -0,0 +1,47 @@
local set = vim.opt
set.mouse = 'a'
set.encoding = 'UTF-8'
set.fileencoding = 'UTF-8'
set.number = true
set.relativenumber = true
set.showcmd = true
vim.o.syntax = true
set.ignorecase = true
set.smartcase = true
set.cursorline = true
-- bold line number at cursor
vim.cmd [[ highlight CursorLineNr cterm=bold ]]
set.linebreak = true
-- special characters
set.list = true
set.listchars = 'tab:→ ,eol:↲,nbsp:␣,trail:•,extends:⟩,precedes:⟨'
set.tabstop = 4
set.shiftwidth = 4
vim.o.expandtab = false
vim.o.smartindent = true
set.swapfile = false
-- spellcheck (enable with `set spell`)
vim.o.spelllang = 'cs,en_gb'
vim.cmd [[ hi SpellBad cterm=bold ctermbg=red ctermfg=white ]]
-- cursor padding from top and bottom
vim.o.scrolloff = 5
-- better navigation in split windows
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-h>', '<C-w>l')
-- colorscheme
vim.cmd [[ color base16-default-dark ]]

View File

@@ -0,0 +1,5 @@
vim.o.tabstop = 2
vim.o.softtabstop = 2
vim.o.shiftwidth = 2
vim.o.expandtab = true

View File

@@ -0,0 +1,4 @@
return {
'windwp/nvim-autopairs',
config = function() require("nvim-autopairs").setup {} end
}

View File

@@ -0,0 +1,10 @@
return {
{
'akinsho/bufferline.nvim',
config = function()
vim.opt.termguicolors = true
require("bufferline").setup{}
end
},
}

View File

@@ -0,0 +1,17 @@
return {
{
'f-person/git-blame.nvim',
config = function()
vim.g.gitblame_date_format = '%r'
vim.g.gitblame_message_when_not_committed = ''
vim.g.gitblame_display_virtual_text = 0
end
},
{
'lewis6991/gitsigns.nvim',
config = function()
require('gitsigns').setup()
end
},
}

View File

@@ -0,0 +1,48 @@
return {
'RRethy/nvim-base16',
'tpope/vim-commentary',
-- completion
'hrsh7th/nvim-cmp',
'hrsh7th/cmp-buffer',
'hrsh7th/cmp-path',
'hrsh7th/cmp-cmdline',
'saadparwaiz1/cmp_luasnip',
-- snippets
'L3MON4D3/LuaSnip',
'rafamadriz/friendly-snippets',
-- emmet
'mattn/emmet-vim',
-- LSP
'neovim/nvim-lspconfig',
-- LSP, DAP, linters and formatters
-- 'jose-elias-alvarez/null-ls.nvim',
{
'dense-analysis/ale',
config = function()
vim.cmd [[ g:ale_sign_column_always = 1 ]]
end
},
-- management for LSP, DAP, linters and formatters
{
'williamboman/mason.nvim',
config = function()
require('mason').setup({
ui = {
icons = {
package_installed = "",
package_pending = "",
package_uninstalled = ""
}
}
})
end
},
'williamboman/mason-lspconfig.nvim',
}

View File

@@ -0,0 +1,16 @@
return {
'nvim-lualine/lualine.nvim',
dependencies = { 'kyazdani42/nvim-web-devicons', lazy = true },
config = function()
local git_blame = require('gitblame')
require('lualine').setup({
sections = {
lualine_c = {
{ git_blame.get_current_blame_text, cond = git_blame.is_blame_text_available }
}
}
})
vim.o.showmode = false
end
}

View File

@@ -0,0 +1,19 @@
return {
'nvim-neo-tree/neo-tree.nvim',
cmd = 'Neotree',
branch = 'v2.x',
keys = {
{ '<leader>ft', '<cmd>Neotree toggle<cr>', desc = 'NeoTree' },
},
dependencies = {
'nvim-lua/plenary.nvim',
'MunifTanjim/nui.nvim',
},
opts = {
filesystem = {
follow_current_file = true,
hijack_netrw_behavior = 'open_current',
},
},
}

View File

@@ -0,0 +1,8 @@
return {
"folke/which-key.nvim",
config = function()
vim.o.timeout = true
vim.o.timeoutlen = 300
end
}

View File

@@ -0,0 +1,29 @@
return {
'folke/zen-mode.nvim',
config = {
window = {
backdrop = 1,
width = 80,
height = .9,
options = {
signcolumn = "no",
number = false,
relativenumber = false,
cursorline = false,
cursorcolumn = false,
foldcolumn = "0",
list = false,
}
},
opts = {
alacritty = {
enabled = true,
font = "13",
},
},
},
keys = {
{ '<leader>fg', '<cmd>ZenMode<cr>', desc = 'Zen Mode' },
},
}

3
.config/ranger/rc.conf Normal file
View File

@@ -0,0 +1,3 @@
set preview_images true
set preview_images_method ueberzug

6
.vimrc
View File

@@ -18,9 +18,3 @@ set listchars=tab:→\ ,eol:↲,nbsp:␣,trail:•,extends:⟩,precedes:⟨
set nobackup nowritebackup
call plug#begin()
Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'junegunn/goyo.vim'
call plug#end()

View File

@@ -1,20 +1,24 @@
#!/bin/bash
[[ "$(xrandr --listmonitors)" == *"HDMI2"* ]] && /home/fr/.screenlayout/home.sh
# Make sure this is before the 'exec' command or it won't be sourced.
[ -f /etc/xprofile ] && . /etc/xprofile
[ -f ~/.xprofile ] && . ~/.xprofile
[ -f ~/.Xresources ] && xrdb -merge -I$HOME ~/.Xresources
feh --bg-center "/home/fr/Pictures/bg.png" &
export _JAVA_AWT_WM_NONREPARENTING=1
xautolock -locker slock -detectsleep -secure -time 10 &
eval "$(dbus-launch --sh-syntax --exit-with-session)"
pipewire &
feh --bg-center "$HOME/Pictures/bg.png" &
xautolock -locker lock-us -secure -time 1 &
#pipewire &
dbus-run-session pipewire &
pipewire-pulse &
wireplumber &
dwmblocks &
while true; do
/home/fr/.scripts/batterycheck
sleep 30
done &
dbus-launch --sh-syntax --exit-with-session dwm
while true; do
dwm
done

7
.xprofile Normal file
View File

@@ -0,0 +1,7 @@
#gentoo-pipewire-launcher &
ssh-agent &
TPADID=$(xinput | grep "Synaptics" | awk '{print $5}' | awk -F "=" '{print $2}')
xinput disable $TPADID
xinput set-prop "TPPS/2 IBM TrackPoint" "libinput Accel Speed" 0.9
xdg-settings set default-web-browser firefox.desktop

View File

@@ -1,5 +0,0 @@
## Setup
- `echo "alias config='/usr/bin/git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME'" >> .bashrc && source $HOME/.bashrc`
- `echo ".dotfiles" >> .gitignore`
- `git clone --bare https://git.filiprojek.cz/filiprojek/dotfiles $HOME/.dotfiles`