Compare commits
35 Commits
726f316c83
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| ada0604178 | |||
| 85c0cd8691 | |||
| 1fdbf50a02 | |||
| 75b7c1f998 | |||
| 481734c291 | |||
| 8f78497f56 | |||
| 4db2c3461e | |||
| 6189aec9b5 | |||
| d85455d6c8 | |||
| fc4bcb1f0b | |||
| 7965c3bb31 | |||
| bc4d93aa75 | |||
| 3afc437234 | |||
| 85300fcd1d | |||
| 70b0241da9 | |||
| bd95ed8d4f | |||
| 05a458bd20 | |||
| 1429b3b9a7 | |||
| a202b07d1a | |||
| 2bd416e7f9 | |||
| e4469cb67d | |||
| c1e058c61e | |||
| 2d9980d78d | |||
| e2cef1e831 | |||
| ff9ea823d0 | |||
| 491667764e | |||
| 0e04168988 | |||
| f8a5ada905 | |||
| c833eac07f | |||
| e91b02a335 | |||
| e5bcdff29f | |||
| 863db850bb | |||
| 2cee107b6f | |||
| 2f77aee122 | |||
| cd50caf64c |
@@ -6,8 +6,11 @@
|
|||||||
# important for window manager and menu app (fuzzel, rofi, ..)
|
# important for window manager and menu app (fuzzel, rofi, ..)
|
||||||
# to find scripts and utilities
|
# to find scripts and utilities
|
||||||
|
|
||||||
export_paths=("${HOME}/dotfiles/scripts")
|
unset export_paths
|
||||||
|
export_paths+=("${HOME}/dotfiles/scripts")
|
||||||
|
export_paths+=("${HOME}/dotfiles/desktop-files")
|
||||||
export_paths+=("/opt/jlink")
|
export_paths+=("/opt/jlink")
|
||||||
|
export_paths+=("${HOME}/.cargo/bin")
|
||||||
|
|
||||||
for entry in ${export_paths[@]}; do
|
for entry in ${export_paths[@]}; do
|
||||||
if ! [[ -d "${entry}" ]]; then
|
if ! [[ -d "${entry}" ]]; then
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
# to find scripts and utilities
|
# to find scripts and utilities
|
||||||
|
|
||||||
export_paths=("${HOME}/dotfiles/scripts")
|
export_paths=("${HOME}/dotfiles/scripts")
|
||||||
|
export_paths+=("${HOME}/dotfiles/desktop-files")
|
||||||
export_paths+=("${HOME}/tools/jlink")
|
export_paths+=("${HOME}/tools/jlink")
|
||||||
|
|
||||||
for entry in ${export_paths[@]}; do
|
for entry in ${export_paths[@]}; do
|
||||||
|
|||||||
+6
-1
@@ -38,7 +38,10 @@ if ! $(which navigate &>/dev/null); then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if $(which eza &>/dev/null); then
|
if $(which eza &>/dev/null); then
|
||||||
alias list='eza -lao --no-permissions --group-directories-first -s=ext --color=always --time-style long-iso'
|
alias list='eza -lao --no-permissions --group-directories-first \
|
||||||
|
-s=ext --color=always --time-style long-iso'
|
||||||
|
alias tree='eza -laoT --no-permissions --group-directories-first \
|
||||||
|
-s=ext --color=always --time-style long-iso -I=.git'
|
||||||
else
|
else
|
||||||
alias list='ls -hAl --color=auto --group-directories-first'
|
alias list='ls -hAl --color=auto --group-directories-first'
|
||||||
fi
|
fi
|
||||||
@@ -60,6 +63,8 @@ fi
|
|||||||
# because `libreWolf` is ambiguous for tab completion
|
# because `libreWolf` is ambiguous for tab completion
|
||||||
if $(which librewolf &>/dev/null); then
|
if $(which librewolf &>/dev/null); then
|
||||||
alias firefox='librewolf'
|
alias firefox='librewolf'
|
||||||
|
elif $(which librewolf.appimage &>/dev/null); then
|
||||||
|
alias firefox='librewolf.appimage'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# short forms for tmux commands
|
# short forms for tmux commands
|
||||||
|
|||||||
@@ -0,0 +1,6 @@
|
|||||||
|
[Desktop Entry]
|
||||||
|
Name=firefox
|
||||||
|
Comment=launch zegonix browser of choice
|
||||||
|
Exec=bash start-browser.sh
|
||||||
|
Type=Application
|
||||||
|
Categories=Network;WebBrowser;
|
||||||
@@ -17,7 +17,11 @@ selection-invert-fg-bg = true
|
|||||||
|
|
||||||
window-decoration = server
|
window-decoration = server
|
||||||
mouse-scroll-multiplier = 1.0
|
mouse-scroll-multiplier = 1.0
|
||||||
|
|
||||||
app-notifications = no-clipboard-copy
|
app-notifications = no-clipboard-copy
|
||||||
copy-on-select = false
|
copy-on-select = false
|
||||||
|
clipboard-paste-protection = false
|
||||||
|
clipboard-read = allow
|
||||||
|
clipboard-write = allow
|
||||||
|
|
||||||
theme = zegonix
|
theme = zegonix
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
background = #0C0C18
|
background = #14141F
|
||||||
foreground = #D0D0D0
|
foreground = #D0D0D0
|
||||||
|
|
||||||
################
|
################
|
||||||
|
|||||||
@@ -13,9 +13,13 @@
|
|||||||
[include]
|
[include]
|
||||||
path = ~/.config/.gitconfig
|
path = ~/.config/.gitconfig
|
||||||
|
|
||||||
[format]
|
|
||||||
pretty = tformat:%C(yellow)%h %C(blue)%as%C(auto)%d %C(reset)%s
|
|
||||||
|
|
||||||
[alias]
|
[alias]
|
||||||
graph = log --oneline --all --graph
|
graph = log \
|
||||||
oneline = log -20
|
--oneline \
|
||||||
|
--all \
|
||||||
|
--graph \
|
||||||
|
--pretty='tformat:%C(yellow)%h %C(blue)%as%C(auto)%d %C(reset)%s'
|
||||||
|
|
||||||
|
oneline = log \
|
||||||
|
-n 20 \
|
||||||
|
--pretty='tformat:%C(yellow)%h %C(blue)%as%C(auto)%d %C(reset)%s'
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
[Settings]
|
[Settings]
|
||||||
gtk-icon-theme-name = Adwaita
|
gtk-icon-theme-name=Adwaita
|
||||||
gtk-theme-name = Adwaita-dark
|
gtk-theme-name=Adwaita-dark
|
||||||
gtk-font-name = JetBrainsMonoNerdFont
|
gtk-cursor-theme-name=Adwaita
|
||||||
|
gtk-font-name=JetBrainsMonoNerdFont
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
[Settings]
|
[Settings]
|
||||||
gtk-icon-theme-name = Adwaita
|
gtk-icon-theme-name=Adwaita
|
||||||
gtk-theme-name = Adwaita-dark
|
gtk-theme-name=Adwaita-dark
|
||||||
gtk-font-name = JetBrainsMonoNerdFont
|
gtk-cursor-theme-name=Adwaita
|
||||||
|
gtk-font-name=JetBrainsMonoNerdFont
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ exec --no-startup-id dunst
|
|||||||
exec --no-startup-id picom -b
|
exec --no-startup-id picom -b
|
||||||
|
|
||||||
# clean up and start polybar
|
# clean up and start polybar
|
||||||
exec_always --no-startup-id killall polybar
|
exec_always --no-startup-id pkill polybar
|
||||||
exec_always --no-startup-id bash ~/.config/polybar/launch_polybar.sh
|
exec_always --no-startup-id bash ~/.config/polybar/launch_polybar.sh
|
||||||
|
|
||||||
# xss-lock grabs a logind suspend inhibit lock and will use i3lock to lock the
|
# xss-lock grabs a logind suspend inhibit lock and will use i3lock to lock the
|
||||||
@@ -128,6 +128,7 @@ bindsym $mod+7 workspace number $ws7
|
|||||||
bindsym $mod+8 workspace number $ws8
|
bindsym $mod+8 workspace number $ws8
|
||||||
bindsym $mod+9 workspace number $ws9
|
bindsym $mod+9 workspace number $ws9
|
||||||
bindsym $mod+0 workspace number $ws10
|
bindsym $mod+0 workspace number $ws10
|
||||||
|
bindsym $mod+b scratchpad show
|
||||||
|
|
||||||
# move focused container to workspace
|
# move focused container to workspace
|
||||||
bindsym $mod+Shift+1 move container to workspace number $ws1
|
bindsym $mod+Shift+1 move container to workspace number $ws1
|
||||||
@@ -140,6 +141,7 @@ bindsym $mod+Shift+7 move container to workspace number $ws7
|
|||||||
bindsym $mod+Shift+8 move container to workspace number $ws8
|
bindsym $mod+Shift+8 move container to workspace number $ws8
|
||||||
bindsym $mod+Shift+9 move container to workspace number $ws9
|
bindsym $mod+Shift+9 move container to workspace number $ws9
|
||||||
bindsym $mod+Shift+0 move container to workspace number $ws10
|
bindsym $mod+Shift+0 move container to workspace number $ws10
|
||||||
|
bindsym $mod+Shift+z move scratchpad
|
||||||
|
|
||||||
# move focused container and switch to workspace
|
# move focused container and switch to workspace
|
||||||
bindsym $mod+$Alt+1 move container to workspace number $ws1; workspace number $ws1
|
bindsym $mod+$Alt+1 move container to workspace number $ws1; workspace number $ws1
|
||||||
@@ -166,8 +168,8 @@ bindsym $mod+o move workspace to output up
|
|||||||
bindsym $mod+p move workspace to output right
|
bindsym $mod+p move workspace to output right
|
||||||
|
|
||||||
# take screenshots
|
# take screenshots
|
||||||
bindsym $mod+s exec --no-startup-id maim -suo | xclip -selection clipboard -t image/png
|
bindsym $mod+s exec --no-startup-id bash x11-screenshot.sh --clipboard
|
||||||
bindsym $mod+Shift+s exec --no-startup-id maim -suo "${HOME}/Pictures/screenshots/$(date '+%Y%m%d_%H%M%S').png"
|
bindsym $mod+Shift+s exec --no-startup-id bash x11-screenshot.sh
|
||||||
|
|
||||||
# use pactl for media keys
|
# use pactl for media keys
|
||||||
set $refresh_i3status killall -SIGUSR1 i3status
|
set $refresh_i3status killall -SIGUSR1 i3status
|
||||||
@@ -195,7 +197,7 @@ mouse_warping none
|
|||||||
############################
|
############################
|
||||||
|
|
||||||
# load background image
|
# load background image
|
||||||
exec --no-startup-id feh --bg-fill ~/dotfiles/images/blaa.jpg
|
exec --no-startup-id feh --bg-fill ~/dotfiles/images/pixel-windows.png
|
||||||
|
|
||||||
# window border style
|
# window border style
|
||||||
default_border pixel 2
|
default_border pixel 2
|
||||||
@@ -203,8 +205,8 @@ default_floating_border pixel 0
|
|||||||
for_window [class=".*"] border pixel 1
|
for_window [class=".*"] border pixel 1
|
||||||
|
|
||||||
# gaps between windows and screen border
|
# gaps between windows and screen border
|
||||||
gaps inner 4 px
|
gaps inner 6 px
|
||||||
gaps outer 2 px
|
gaps outer 0 px
|
||||||
|
|
||||||
# Font for window titles. Will also be used by the bar unless a different font
|
# Font for window titles. Will also be used by the bar unless a different font
|
||||||
# is used in the bar {} block below.
|
# is used in the bar {} block below.
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 108 KiB |
@@ -1,69 +0,0 @@
|
|||||||
|
|
||||||
# use interactive shell instead of login shell
|
|
||||||
set-option -g default-command "/bin/bash"
|
|
||||||
|
|
||||||
# enable rgb colors
|
|
||||||
set -ag terminal-overrides ",*:RGB"
|
|
||||||
|
|
||||||
# reasonable resizing
|
|
||||||
setw -g aggressive-resize on
|
|
||||||
|
|
||||||
# start window and pane index at 1
|
|
||||||
set -g base-index 1
|
|
||||||
set -g pane-base-index 1
|
|
||||||
set-window-option -g pane-base-index 1
|
|
||||||
set-option -g renumber-windows on
|
|
||||||
|
|
||||||
# status bar
|
|
||||||
set -g status-interval 5
|
|
||||||
|
|
||||||
# buffer size
|
|
||||||
set-option -g history-limit 3000
|
|
||||||
|
|
||||||
|
|
||||||
### input options & keybindings
|
|
||||||
set-window-option -g mode-keys vi
|
|
||||||
bind-key -n M-c copy-mode
|
|
||||||
|
|
||||||
bind-key -T copy-mode-vi 'v' send -X begin-selection
|
|
||||||
bind-key -T copy-mode-vi 'y' send -X copy-selection
|
|
||||||
|
|
||||||
# change prefix key to <space>
|
|
||||||
unbind C-b
|
|
||||||
set-option -g prefix C-Space
|
|
||||||
|
|
||||||
# window navigation
|
|
||||||
bind-key -n M-Left previous-window
|
|
||||||
bind-key -n M-Right next-window
|
|
||||||
bind-key -n M-S-Left swap-window -t -1 -d
|
|
||||||
bind-key -n M-S-Right swap-window -t +1 -d
|
|
||||||
|
|
||||||
# pane navigation
|
|
||||||
bind -n M-Left select-pane -L
|
|
||||||
bind -n M-Down select-pane -D
|
|
||||||
bind -n M-Up select-pane -U
|
|
||||||
bind -n M-Right select-pane -R
|
|
||||||
|
|
||||||
bind -n M-j swap-pane -D
|
|
||||||
bind -n M-k swap-pane -U
|
|
||||||
|
|
||||||
bind-key -n M-F1 select-layout even-horizontal
|
|
||||||
bind-key -n M-F2 select-layout main-vertical
|
|
||||||
bind-key -n M-F3 select-layout tiled
|
|
||||||
|
|
||||||
unbind x
|
|
||||||
bind-key x kill-pane -t +0
|
|
||||||
|
|
||||||
# detach current session and close terminal
|
|
||||||
bind-key k run "tmux detach -P"
|
|
||||||
|
|
||||||
# enable mouse support
|
|
||||||
set -g mouse on
|
|
||||||
# bind -n WheelUpPane {
|
|
||||||
# if -F '#{==:#{window_name},nvim}' {
|
|
||||||
# send-keys -M
|
|
||||||
# } {
|
|
||||||
# copy-mode -e
|
|
||||||
# }
|
|
||||||
# }
|
|
||||||
|
|
||||||
@@ -2,13 +2,13 @@
|
|||||||
|
|
||||||
|
|
||||||
Section "Monitor"
|
Section "Monitor"
|
||||||
Identifier "DisplayPort-2"
|
Identifier "DP-3"
|
||||||
Option "Primary" "true"
|
Option "Primary" "true"
|
||||||
Option "DPMS"
|
Option "DPMS"
|
||||||
EndSection
|
EndSection
|
||||||
|
|
||||||
Section "Monitor"
|
Section "Monitor"
|
||||||
Identifier "DisplayPort-1"
|
Identifier "DP-2"
|
||||||
Option "rightof" "DisplayPort-2"
|
Option "rightof" "DP-3"
|
||||||
Option "DPMS"
|
Option "DPMS"
|
||||||
EndSection
|
EndSection
|
||||||
|
|||||||
@@ -1,258 +1,256 @@
|
|||||||
-- plugin for language servers
|
-- plugin for language servers
|
||||||
return {
|
return {
|
||||||
"neovim/nvim-lspconfig",
|
"neovim/nvim-lspconfig",
|
||||||
dependencies = {
|
dependencies = {
|
||||||
-- Automatically install LSPs and related tools to stdpath for Neovim
|
-- Automatically install LSPs and related tools to stdpath for Neovim
|
||||||
{ "williamboman/mason.nvim", config = true }, -- NOTE: Must be loaded before dependants
|
{ "williamboman/mason.nvim", config = true }, -- NOTE: Must be loaded before dependants
|
||||||
"williamboman/mason-lspconfig.nvim",
|
"williamboman/mason-lspconfig.nvim",
|
||||||
"WhoIsSethDaniel/mason-tool-installer.nvim",
|
"WhoIsSethDaniel/mason-tool-installer.nvim",
|
||||||
|
|
||||||
-- Useful status updates for LSP.
|
-- Useful status updates for LSP.
|
||||||
-- NOTE: `opts = {}` is the same as calling `require('fidget').setup({})`
|
-- NOTE: `opts = {}` is the same as calling `require('fidget').setup({})`
|
||||||
{
|
{
|
||||||
"j-hui/fidget.nvim",
|
"j-hui/fidget.nvim",
|
||||||
tag = "v1.4.0",
|
tag = "v1.4.0",
|
||||||
opts = {
|
opts = {
|
||||||
progress = {
|
progress = {
|
||||||
display = {
|
display = {
|
||||||
done_icon = "✓", -- Icon shown when all LSP progress tasks are complete
|
done_icon = "✓", -- Icon shown when all LSP progress tasks are complete
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
notification = {
|
notification = {
|
||||||
window = {
|
window = {
|
||||||
winblend = 0, -- Background color opacity in the notification window
|
winblend = 0, -- Background color opacity in the notification window
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
config = function()
|
config = function()
|
||||||
vim.api.nvim_create_autocmd("LspAttach", {
|
vim.api.nvim_create_autocmd("LspAttach", {
|
||||||
group = vim.api.nvim_create_augroup("kickstart-lsp-attach", { clear = true }),
|
group = vim.api.nvim_create_augroup("kickstart-lsp-attach", { clear = true }),
|
||||||
-- Create a function that lets us more easily define mappings specific
|
-- Create a function that lets us more easily define mappings specific
|
||||||
-- for LSP related items. It sets the mode, buffer and description for us each time.
|
-- for LSP related items. It sets the mode, buffer and description for us each time.
|
||||||
callback = function(event)
|
callback = function(event)
|
||||||
local map = function(keys, func, desc, mode)
|
local map = function(keys, func, desc, mode)
|
||||||
mode = mode or "n"
|
mode = mode or "n"
|
||||||
vim.keymap.set(mode, keys, func, { buffer = event.buf, desc = "LSP: " .. desc })
|
vim.keymap.set(mode, keys, func, { buffer = event.buf, desc = "LSP: " .. desc })
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Jump to the definition of the word under your cursor.
|
-- Jump to the definition of the word under your cursor.
|
||||||
-- This is where a variable was first declared, or where a function is defined, etc.
|
-- This is where a variable was first declared, or where a function is defined, etc.
|
||||||
-- To jump back, press <C-t>.
|
-- To jump back, press <C-t>.
|
||||||
map("gd", require("telescope.builtin").lsp_definitions, "[G]oto [D]efinition")
|
map("gd", require("telescope.builtin").lsp_definitions, "[G]oto [D]efinition")
|
||||||
|
|
||||||
-- Find references for the word under your cursor.
|
-- Find references for the word under your cursor.
|
||||||
map("gr", require("telescope.builtin").lsp_references, "[G]oto [R]eferences")
|
map("gr", require("telescope.builtin").lsp_references, "[G]oto [R]eferences")
|
||||||
|
|
||||||
-- Jump to the implementation of the word under your cursor.
|
-- Jump to the implementation of the word under your cursor.
|
||||||
-- Useful when your language has ways of declaring types without an actual implementation.
|
-- Useful when your language has ways of declaring types without an actual implementation.
|
||||||
map("gI", require("telescope.builtin").lsp_implementations, "[G]oto [I]mplementation")
|
map("gI", require("telescope.builtin").lsp_implementations, "[G]oto [I]mplementation")
|
||||||
|
|
||||||
-- Jump to the type of the word under your cursor.
|
-- Jump to the type of the word under your cursor.
|
||||||
-- Useful when you're not sure what type a variable is and you want to see
|
-- Useful when you're not sure what type a variable is and you want to see
|
||||||
-- the definition of its *type*, not where it was *defined*.
|
-- the definition of its *type*, not where it was *defined*.
|
||||||
map("<leader>D", require("telescope.builtin").lsp_type_definitions, "Type [D]efinition")
|
map("<leader>D", require("telescope.builtin").lsp_type_definitions, "Type [D]efinition")
|
||||||
|
|
||||||
-- Fuzzy find all the symbols in your current document.
|
-- Fuzzy find all the symbols in your current document.
|
||||||
-- Symbols are things like variables, functions, types, etc.
|
-- Symbols are things like variables, functions, types, etc.
|
||||||
map("<leader>ds", require("telescope.builtin").lsp_document_symbols, "[D]ocument [S]ymbols")
|
map("<leader>ds", require("telescope.builtin").lsp_document_symbols, "[D]ocument [S]ymbols")
|
||||||
|
|
||||||
-- Fuzzy find all the symbols in your current workspace.
|
-- Fuzzy find all the symbols in your current workspace.
|
||||||
-- Similar to document symbols, except searches over your entire project.
|
-- Similar to document symbols, except searches over your entire project.
|
||||||
map("<leader>ws", require("telescope.builtin").lsp_dynamic_workspace_symbols, "[W]orkspace [S]ymbols")
|
map("<leader>ws", require("telescope.builtin").lsp_dynamic_workspace_symbols, "[W]orkspace [S]ymbols")
|
||||||
|
|
||||||
-- Rename the variable under your cursor.
|
-- Rename the variable under your cursor.
|
||||||
-- Most Language Servers support renaming across files, etc.
|
-- Most Language Servers support renaming across files, etc.
|
||||||
map("<leader>rn", vim.lsp.buf.rename, "[R]e[n]ame")
|
map("<leader>rn", vim.lsp.buf.rename, "[R]e[n]ame")
|
||||||
|
|
||||||
-- Execute a code action, usually your cursor needs to be on top of an error
|
-- Execute a code action, usually your cursor needs to be on top of an error
|
||||||
-- or a suggestion from your LSP for this to activate.
|
-- or a suggestion from your LSP for this to activate.
|
||||||
map("<leader>ca", vim.lsp.buf.code_action, "[C]ode [A]ction", { "n", "x" })
|
map("<leader>ca", vim.lsp.buf.code_action, "[C]ode [A]ction", { "n", "x" })
|
||||||
|
|
||||||
-- Opens a popup that displays documentation about the word under your cursor
|
-- Opens a popup that displays documentation about the word under your cursor
|
||||||
-- See `:help K` for why this keymap
|
-- See `:help K` for why this keymap
|
||||||
map("K", vim.lsp.buf.hover, "[K]ontext - Show Tooltip")
|
map("K", vim.lsp.buf.hover, "[K]ontext - Show Tooltip")
|
||||||
|
|
||||||
-- WARN: This is not Goto Definition, this is Goto Declaration.
|
-- WARN: This is not Goto Definition, this is Goto Declaration.
|
||||||
-- For example, in C this would take you to the header.
|
-- For example, in C this would take you to the header.
|
||||||
map("gD", vim.lsp.buf.declaration, "[G]oto [D]eclaration")
|
map("gD", vim.lsp.buf.declaration, "[G]oto [D]eclaration")
|
||||||
|
|
||||||
map("<leader>df", vim.diagnostic.open_float, "show diagnostic in floating window")
|
map("<leader>df", vim.diagnostic.open_float, "show diagnostic in floating window")
|
||||||
|
|
||||||
-- The following two autocommands are used to highlight references of the
|
-- The following two autocommands are used to highlight references of the
|
||||||
-- word under your cursor when your cursor rests there for a little while.
|
-- word under your cursor when your cursor rests there for a little while.
|
||||||
-- See `:help CursorHold` for information about when this is executed
|
-- See `:help CursorHold` for information about when this is executed
|
||||||
--
|
--
|
||||||
-- When you move your cursor, the highlights will be cleared (the second autocommand).
|
-- When you move your cursor, the highlights will be cleared (the second autocommand).
|
||||||
local client = vim.lsp.get_client_by_id(event.data.client_id)
|
local client = vim.lsp.get_client_by_id(event.data.client_id)
|
||||||
if client and client.supports_method(vim.lsp.protocol.Methods.textDocument_documentHighlight) then
|
if client and client.supports_method(vim.lsp.protocol.Methods.textDocument_documentHighlight) then
|
||||||
local highlight_augroup = vim.api.nvim_create_augroup("kickstart-lsp-highlight", { clear = false })
|
local highlight_augroup = vim.api.nvim_create_augroup("kickstart-lsp-highlight", { clear = false })
|
||||||
vim.api.nvim_create_autocmd({ "CursorHold", "CursorHoldI" }, {
|
vim.api.nvim_create_autocmd({ "CursorHold", "CursorHoldI" }, {
|
||||||
buffer = event.buf,
|
buffer = event.buf,
|
||||||
group = highlight_augroup,
|
group = highlight_augroup,
|
||||||
callback = vim.lsp.buf.document_highlight,
|
callback = vim.lsp.buf.document_highlight,
|
||||||
})
|
})
|
||||||
|
|
||||||
vim.api.nvim_create_autocmd({ "CursorMoved", "CursorMovedI" }, {
|
vim.api.nvim_create_autocmd({ "CursorMoved", "CursorMovedI" }, {
|
||||||
buffer = event.buf,
|
buffer = event.buf,
|
||||||
group = highlight_augroup,
|
group = highlight_augroup,
|
||||||
callback = vim.lsp.buf.clear_references,
|
callback = vim.lsp.buf.clear_references,
|
||||||
})
|
})
|
||||||
|
|
||||||
vim.api.nvim_create_autocmd("LspDetach", {
|
vim.api.nvim_create_autocmd("LspDetach", {
|
||||||
group = vim.api.nvim_create_augroup("kickstart-lsp-detach", { clear = true }),
|
group = vim.api.nvim_create_augroup("kickstart-lsp-detach", { clear = true }),
|
||||||
callback = function(event2)
|
callback = function(event2)
|
||||||
vim.lsp.buf.clear_references()
|
vim.lsp.buf.clear_references()
|
||||||
vim.api.nvim_clear_autocmds({ group = "kickstart-lsp-highlight", buffer = event2.buf })
|
vim.api.nvim_clear_autocmds({ group = "kickstart-lsp-highlight", buffer = event2.buf })
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
-- The following code creates a keymap to toggle inlay hints in your
|
-- The following code creates a keymap to toggle inlay hints in your
|
||||||
-- code, if the language server you are using supports them
|
-- code, if the language server you are using supports them
|
||||||
--
|
--
|
||||||
-- This may be unwanted, since they displace some of your code
|
-- This may be unwanted, since they displace some of your code
|
||||||
if client and client.supports_method(vim.lsp.protocol.Methods.textDocument_inlayHint) then
|
if client and client.supports_method(vim.lsp.protocol.Methods.textDocument_inlayHint) then
|
||||||
map("<leader>th", function()
|
map("<leader>th", function()
|
||||||
vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled({ bufnr = event.buf }))
|
vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled({ bufnr = event.buf }))
|
||||||
end, "[T]oggle Inlay [H]ints")
|
end, "[T]oggle Inlay [H]ints")
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||||
capabilities = vim.tbl_deep_extend("force", capabilities, require("cmp_nvim_lsp").default_capabilities())
|
capabilities = vim.tbl_deep_extend("force", capabilities, require("cmp_nvim_lsp").default_capabilities())
|
||||||
|
|
||||||
-- Enable the following language servers
|
-- Enable the following language servers
|
||||||
local servers = {
|
local servers = {
|
||||||
clangd = {},
|
clangd = {},
|
||||||
lua_ls = {
|
marksman = {},
|
||||||
-- cmd = {...},
|
lua_ls = {
|
||||||
-- filetypes = { ...},
|
settings = {
|
||||||
-- capabilities = {},
|
Lua = {
|
||||||
settings = {
|
completion = {
|
||||||
Lua = {
|
callSnippet = "Replace",
|
||||||
completion = {
|
},
|
||||||
callSnippet = "Replace",
|
runtime = { version = "LuaJIT" },
|
||||||
},
|
workspace = {
|
||||||
runtime = { version = "LuaJIT" },
|
checkThirdParty = false,
|
||||||
workspace = {
|
library = {
|
||||||
checkThirdParty = false,
|
"${3rd}/luv/library",
|
||||||
library = {
|
unpack(vim.api.nvim_get_runtime_file("", true)),
|
||||||
"${3rd}/luv/library",
|
},
|
||||||
unpack(vim.api.nvim_get_runtime_file("", true)),
|
},
|
||||||
},
|
diagnostics = { disable = { "missing-fields" } },
|
||||||
},
|
|
||||||
diagnostics = { disable = { "missing-fields" } },
|
|
||||||
|
|
||||||
-- You can toggle below to ignore Lua_LS's noisy `missing-fields` warnings
|
-- You can toggle below to ignore Lua_LS's noisy `missing-fields` warnings
|
||||||
-- diagnostics = { disable = { 'missing-fields' } },
|
-- diagnostics = { disable = { 'missing-fields' } },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
pylsp = {
|
pylsp = {
|
||||||
settings = {
|
settings = {
|
||||||
pylsp = {
|
pylsp = {
|
||||||
plugins = {
|
plugins = {
|
||||||
pyflakes = { enabled = false },
|
pyflakes = { enabled = false },
|
||||||
pycodestyle = { enabled = false },
|
pycodestyle = { enabled = false },
|
||||||
autopep8 = { enabled = false },
|
autopep8 = { enabled = false },
|
||||||
yapf = { enabled = false },
|
yapf = { enabled = false },
|
||||||
mccabe = { enabled = false },
|
mccabe = { enabled = false },
|
||||||
pylsp_mypy = { enabled = false },
|
pylsp_mypy = { enabled = false },
|
||||||
pylsp_black = { enabled = false },
|
pylsp_black = { enabled = false },
|
||||||
pylsp_isort = { enabled = false },
|
pylsp_isort = { enabled = false },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
ruff = {
|
ruff = {
|
||||||
-- Notes on code actions: https://github.com/astral-sh/ruff-lsp/issues/119#issuecomment-1595628355
|
-- Notes on code actions: https://github.com/astral-sh/ruff-lsp/issues/119#issuecomment-1595628355
|
||||||
-- Get isort like behavior: https://github.com/astral-sh/ruff/issues/8926#issuecomment-1834048218
|
-- Get isort like behavior: https://github.com/astral-sh/ruff/issues/8926#issuecomment-1834048218
|
||||||
commands = {
|
commands = {
|
||||||
RuffAutofix = {
|
RuffAutofix = {
|
||||||
function()
|
function()
|
||||||
vim.lsp.buf.execute_command({
|
vim.lsp.buf.execute_command({
|
||||||
command = "ruff.applyAutofix",
|
command = "ruff.applyAutofix",
|
||||||
arguments = {
|
arguments = {
|
||||||
{ uri = vim.uri_from_bufnr(0) },
|
{ uri = vim.uri_from_bufnr(0) },
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
description = "Ruff: Fix all auto-fixable problems",
|
description = "Ruff: Fix all auto-fixable problems",
|
||||||
},
|
},
|
||||||
RuffOrganizeImports = {
|
RuffOrganizeImports = {
|
||||||
function()
|
function()
|
||||||
vim.lsp.buf.execute_command({
|
vim.lsp.buf.execute_command({
|
||||||
command = "ruff.applyOrganizeImports",
|
command = "ruff.applyOrganizeImports",
|
||||||
arguments = {
|
arguments = {
|
||||||
{ uri = vim.uri_from_bufnr(0) },
|
{ uri = vim.uri_from_bufnr(0) },
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
description = "Ruff: Format imports",
|
description = "Ruff: Format imports",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
rust_analyzer = {
|
rust_analyzer = {
|
||||||
["rust-analyzer"] = {
|
["rust-analyzer"] = {
|
||||||
cargo = {
|
cargo = {
|
||||||
features = "all",
|
features = "all",
|
||||||
},
|
},
|
||||||
checkOnSave = true,
|
checkOnSave = true,
|
||||||
check = {
|
check = {
|
||||||
command = "clippy",
|
command = "clippy",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
-- Ensure the servers and tools above are installed
|
-- Ensure the servers and tools above are installed
|
||||||
require("mason").setup()
|
require("mason").setup()
|
||||||
|
|
||||||
-- You can add other tools here that you want Mason to install
|
-- You can add other tools here that you want Mason to install
|
||||||
-- for you, so that they are available from within Neovim.
|
-- for you, so that they are available from within Neovim.
|
||||||
local ensure_installed = vim.tbl_keys(servers or {})
|
local ensure_installed = vim.tbl_keys(servers or {})
|
||||||
vim.list_extend(ensure_installed, {
|
vim.list_extend(ensure_installed, {
|
||||||
"stylua", -- Used to format Lua code
|
"stylua", -- Used to format Lua code
|
||||||
"clangd",
|
"clangd",
|
||||||
"rust-analyzer",
|
"rust-analyzer",
|
||||||
})
|
})
|
||||||
require("mason-tool-installer").setup({ ensure_installed = ensure_installed })
|
require("mason-tool-installer").setup({ ensure_installed = ensure_installed })
|
||||||
|
|
||||||
-- vim.cmd([[autocmd! ColorScheme * highlight NormalFloat guibg=#1f2335]])
|
-- vim.cmd([[autocmd! ColorScheme * highlight NormalFloat guibg=#1f2335]])
|
||||||
-- vim.cmd([[autocmd! ColorScheme * highlight FloatBorder guifg=white guibg=#1f2335]])
|
-- vim.cmd([[autocmd! ColorScheme * highlight FloatBorder guifg=white guibg=#1f2335]])
|
||||||
|
|
||||||
local border = {
|
local border = {
|
||||||
{ "╭", "FloatBorder" },
|
{ "╭", "FloatBorder" },
|
||||||
{ "─", "FloatBorder" },
|
{ "─", "FloatBorder" },
|
||||||
{ "╮", "FloatBorder" },
|
{ "╮", "FloatBorder" },
|
||||||
{ "│", "FloatBorder" },
|
{ "│", "FloatBorder" },
|
||||||
{ "╯", "FloatBorder" },
|
{ "╯", "FloatBorder" },
|
||||||
{ "─", "FloatBorder" },
|
{ "─", "FloatBorder" },
|
||||||
{ "╰", "FloatBorder" },
|
{ "╰", "FloatBorder" },
|
||||||
{ "│", "FloatBorder" },
|
{ "│", "FloatBorder" },
|
||||||
}
|
}
|
||||||
|
|
||||||
local orig_util_open_floating_preview = vim.lsp.util.open_floating_preview
|
local orig_util_open_floating_preview = vim.lsp.util.open_floating_preview
|
||||||
function vim.lsp.util.open_floating_preview(contents, syntax, opts, ...)
|
function vim.lsp.util.open_floating_preview(contents, syntax, opts, ...)
|
||||||
opts = opts or {}
|
opts = opts or {}
|
||||||
opts.border = opts.border or border
|
opts.border = opts.border or border
|
||||||
return orig_util_open_floating_preview(contents, syntax, opts, ...)
|
return orig_util_open_floating_preview(contents, syntax, opts, ...)
|
||||||
end
|
end
|
||||||
|
|
||||||
require("mason-lspconfig").setup({
|
require("mason-lspconfig").setup({
|
||||||
handlers = {
|
handlers = {
|
||||||
function(server_name)
|
function(server_name)
|
||||||
local server = servers[server_name] or {}
|
local server = servers[server_name] or {}
|
||||||
-- This handles overriding only values explicitly passed
|
-- This handles overriding only values explicitly passed
|
||||||
-- by the server configuration above. Useful when disabling
|
-- by the server configuration above. Useful when disabling
|
||||||
-- certain features of an LSP (for example, turning off formatting for ts_ls)
|
-- certain features of an LSP (for example, turning off formatting for ts_ls)
|
||||||
server.capabilities = vim.tbl_deep_extend("force", {}, capabilities, server.capabilities or {})
|
server.capabilities = vim.tbl_deep_extend("force", {}, capabilities, server.capabilities or {})
|
||||||
require("lspconfig")[server_name].setup(server)
|
require("lspconfig")[server_name].setup(server)
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
if type "xrandr"; then
|
if type "xrandr"; then
|
||||||
for m in $(xrandr --query | grep " connected" | cut -d" " -f1); do
|
for m in $(xrandr --query | grep " connected " | cut -d" " -f1); do
|
||||||
MONITOR=$m polybar --reload toph &
|
MONITOR=$m polybar --reload toph &
|
||||||
done
|
done
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -3,55 +3,7 @@
|
|||||||
A collection of configuration files meant to be used with GNU stow, hence the directory structure.
|
A collection of configuration files meant to be used with GNU stow, hence the directory structure.
|
||||||
|
|
||||||
|
|
||||||
## Usage
|
## Link configurations with GNU stow
|
||||||
|
|
||||||
### List of packages to install
|
|
||||||
* (alacritty)
|
|
||||||
* audacious
|
|
||||||
* bash-completion
|
|
||||||
* bat
|
|
||||||
* bitwarden
|
|
||||||
* dunst
|
|
||||||
* eza
|
|
||||||
* feh
|
|
||||||
* fzf
|
|
||||||
* git
|
|
||||||
* ghostty
|
|
||||||
* ly
|
|
||||||
* maim
|
|
||||||
* man
|
|
||||||
* neovim
|
|
||||||
* pandoc
|
|
||||||
* pavucontrol
|
|
||||||
* picom
|
|
||||||
* polybar
|
|
||||||
* ripgrep
|
|
||||||
* rofi
|
|
||||||
* starship
|
|
||||||
* stow
|
|
||||||
* tmux
|
|
||||||
* unzip
|
|
||||||
* xclip
|
|
||||||
|
|
||||||
AUR:
|
|
||||||
* paru
|
|
||||||
|
|
||||||
|
|
||||||
### Getting the repository
|
|
||||||
Navigate to your home directory `~/`.
|
|
||||||
Download the repository to that directory or do it the recommended way and clone it there with git:
|
|
||||||
```
|
|
||||||
git clone https://github.com/zegonix/dotfiles.git
|
|
||||||
```
|
|
||||||
or
|
|
||||||
```
|
|
||||||
git clone git@github.com:zegonix/dotfiles.git
|
|
||||||
```
|
|
||||||
|
|
||||||
**Note:** The location of the local copy is important for stow. You can put it somewhere else, but you will have to configure stow to inform it of non default source and target locations, the target is relative to the source by default.
|
|
||||||
|
|
||||||
|
|
||||||
### Link configurations with GNU stow
|
|
||||||
Make sure to have `stow` installed.
|
Make sure to have `stow` installed.
|
||||||
Navigate into your local copy of the repository, usually `~/dotfiles`.
|
Navigate into your local copy of the repository, usually `~/dotfiles`.
|
||||||
Create links to the configurations with:
|
Create links to the configurations with:
|
||||||
@@ -60,16 +12,11 @@ Create links to the configurations with:
|
|||||||
```
|
```
|
||||||
for example
|
for example
|
||||||
```
|
```
|
||||||
stow alacritty
|
stow bashrc
|
||||||
```
|
```
|
||||||
It is important to execute this and similar commands in the root directory of the repository `~/dotfiles` unless you specify source and target locations manually.
|
It is important to execute this and similar commands in the root directory of the repository `~/dotfiles` unless you specify source and target locations manually.
|
||||||
|
|
||||||
|
|
||||||
## Todos
|
## Ideas for scripts
|
||||||
|
|
||||||
* [ ] configure lock screen (probably i3lock)
|
|
||||||
* [ ] sway (wayland in general..)
|
|
||||||
* [ ] terminal emulators to keep in mind:
|
|
||||||
* [ ] `foot` (wayland exclusive) -> postponed for potential wayland setup
|
|
||||||
|
|
||||||
|
|
||||||
|
* (sed) script to reformat text files for a configurable line length.
|
||||||
|
|||||||
@@ -1,25 +1,38 @@
|
|||||||
@theme "~/.config/rofi/themes/zegonix-blue.rasi"
|
@theme "~/.config/rofi/themes/zegonix-blue.rasi"
|
||||||
//@theme "~/.config/rofi/themes/zegonix-black.rasi"
|
// @theme "~/.config/rofi/themes/zegonix-black.rasi"
|
||||||
|
|
||||||
configuration {
|
configuration {
|
||||||
modes: "combi,window,run";
|
// mode
|
||||||
combi-modes: "drun,run";
|
modes: "combi,run";
|
||||||
drun-match-fields: "name,generic,keywords";
|
combi-modes: "drun,run";
|
||||||
matching: "fuzzy";
|
drun-match-fields: "name,generic,keywords";
|
||||||
monitor: -1;
|
|
||||||
terminal: "ghostty";
|
|
||||||
case-sensitive: false;
|
|
||||||
kb-row-up: "Up,Control+k";
|
|
||||||
kb-row-down: "Down,Control+j";
|
|
||||||
kb-accept-entry: "Return,Control+m";
|
|
||||||
kb-remove-to-eol: "";
|
|
||||||
timeout {
|
|
||||||
action: "kb-cancel";
|
|
||||||
delay: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
filebrowser {
|
// blargh?
|
||||||
directories-first: true;
|
monitor: -1;
|
||||||
sorting-method: "name";
|
terminal: "ghostty";
|
||||||
}
|
no-plugins: true;
|
||||||
|
|
||||||
|
// matching
|
||||||
|
matching: "fuzzy";
|
||||||
|
case-sensitive: false;
|
||||||
|
|
||||||
|
// keybindings
|
||||||
|
kb-row-up: "Up,Control+k";
|
||||||
|
kb-row-down: "Down,Control+j";
|
||||||
|
kb-accept-entry: "Return";
|
||||||
|
kb-remove-to-eol: "";
|
||||||
|
kb-clear-line: "";
|
||||||
|
kb-remove-word-back: "Control+BackSpace,Control+w";
|
||||||
|
|
||||||
|
// do not cancel me!
|
||||||
|
timeout {
|
||||||
|
action: "kb-cancel";
|
||||||
|
delay: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ??
|
||||||
|
filebrowser {
|
||||||
|
directories-first: true;
|
||||||
|
sorting-method: "name";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,18 +1,18 @@
|
|||||||
* {
|
* {
|
||||||
font: "Victor Mono Nerd Font 13";
|
font: "JetBrains Mono Nerd Font 14";
|
||||||
|
|
||||||
zx-transparent: transparent;
|
zx-transparent: transparent;
|
||||||
zx-white: #C8C8C8FF;
|
zx-white: #C8C8C8FF;
|
||||||
zx-dark-blue: #080C1CEA;
|
zx-dark-blue: #000010EA;
|
||||||
zx-blue: #203050C8;
|
zx-blue: #203050C8;
|
||||||
zx-light-blue: #6bceffff;
|
zx-light-blue: #5BB8FFFF;
|
||||||
zx-cyan: #15D7E5FF;
|
zx-cyan: #15D7E5FF;
|
||||||
zx-light-grey: #A0A0ADFF;
|
zx-light-grey: #A0A0ADFF;
|
||||||
zx-dark-grey: #202028C8;
|
zx-dark-grey: #202028C8;
|
||||||
zx-black: #000000EA;
|
zx-black: #000000EA;
|
||||||
zx-background: @zx-black;
|
zx-background: @zx-black;
|
||||||
zx-secondary: @zx-dark-grey;
|
zx-secondary: @zx-dark-grey;
|
||||||
zx-accent: @zx-white;
|
zx-accent: @zx-light-grey;
|
||||||
zx-text: @zx-white;
|
zx-text: @zx-white;
|
||||||
|
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
@@ -20,16 +20,14 @@
|
|||||||
|
|
||||||
window {
|
window {
|
||||||
location: center;
|
location: center;
|
||||||
width: 35%;
|
width: 30%;
|
||||||
|
|
||||||
background-color: @zx-background;
|
background-color: @zx-background;
|
||||||
|
|
||||||
border: 0;
|
border: 0;
|
||||||
border-color: @zx-accent;
|
border-color: @zx-accent;
|
||||||
|
|
||||||
padding: 2 12 8 12;
|
children: [ mainbox ];
|
||||||
|
|
||||||
children: [mainbox];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
mainbox {
|
mainbox {
|
||||||
@@ -37,7 +35,7 @@ mainbox {
|
|||||||
border: 0px;
|
border: 0px;
|
||||||
spacing: 8px;
|
spacing: 8px;
|
||||||
|
|
||||||
children: [inputbar, listview];
|
children: [ inputbar, listview, mode-switcher ];
|
||||||
}
|
}
|
||||||
|
|
||||||
inputbar {
|
inputbar {
|
||||||
@@ -50,7 +48,7 @@ inputbar {
|
|||||||
border: 0 0 1px 0;
|
border: 0 0 1px 0;
|
||||||
border-color: @zx-accent;
|
border-color: @zx-accent;
|
||||||
|
|
||||||
children: [prompt, entry];
|
children: [ entry ];
|
||||||
}
|
}
|
||||||
|
|
||||||
prompt {
|
prompt {
|
||||||
@@ -72,17 +70,17 @@ listview {
|
|||||||
spacing: 5px;
|
spacing: 5px;
|
||||||
|
|
||||||
border: 0px;
|
border: 0px;
|
||||||
background-color: @transparent; //@zx-background;
|
background-color: @zx-transparent;
|
||||||
|
|
||||||
children: [element];
|
children: [ element ];
|
||||||
}
|
}
|
||||||
|
|
||||||
element {
|
element {
|
||||||
background-color: transparent;
|
background-color: @zx-transparent;
|
||||||
text-color: inherit;
|
text-color: inherit;
|
||||||
border: 0;
|
border: 0;
|
||||||
|
|
||||||
children: [element-text];
|
children: [ element-text ];
|
||||||
}
|
}
|
||||||
|
|
||||||
element-text {
|
element-text {
|
||||||
@@ -107,3 +105,18 @@ element-text.selected {
|
|||||||
prompt, entry, element-text {
|
prompt, entry, element-text {
|
||||||
vertical-align: 0.5;
|
vertical-align: 0.5;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mode-switcher {
|
||||||
|
children: [ button ];
|
||||||
|
}
|
||||||
|
|
||||||
|
button {
|
||||||
|
padding: 4 0 4 0;
|
||||||
|
text-color: @zx-text;
|
||||||
|
text-transform: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
button.selected {
|
||||||
|
text-color: @zx-background;
|
||||||
|
background-color: @zx-accent;
|
||||||
|
}
|
||||||
|
|||||||
@@ -20,15 +20,13 @@
|
|||||||
|
|
||||||
window {
|
window {
|
||||||
location: center;
|
location: center;
|
||||||
width: 25%;
|
width: 30%;
|
||||||
|
|
||||||
background-color: @zx-background;
|
background-color: @zx-background;
|
||||||
|
|
||||||
border: 0;
|
border: 0;
|
||||||
border-color: @zx-accent;
|
border-color: @zx-accent;
|
||||||
|
|
||||||
//padding: 2 12 8 12;
|
|
||||||
|
|
||||||
children: [mainbox];
|
children: [mainbox];
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -44,7 +42,6 @@ inputbar {
|
|||||||
spacing: 40px;
|
spacing: 40px;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
|
|
||||||
//background-color: @zx-secondary;
|
|
||||||
text-color: @zx-text;
|
text-color: @zx-text;
|
||||||
|
|
||||||
border: 0 0 1px 0;
|
border: 0 0 1px 0;
|
||||||
@@ -72,7 +69,7 @@ listview {
|
|||||||
spacing: 5px;
|
spacing: 5px;
|
||||||
|
|
||||||
border: 0px;
|
border: 0px;
|
||||||
background-color: @zx-transparent; //@zx-background;
|
background-color: @zx-transparent;
|
||||||
|
|
||||||
children: [element];
|
children: [element];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ function __search-history {
|
|||||||
READLINE_POINT=$((0 + ${#command}))
|
READLINE_POINT=$((0 + ${#command}))
|
||||||
}
|
}
|
||||||
|
|
||||||
if [[ "$-" == *i* ]] && which fzf &>/dev/null; then
|
if [[ "$-" == *i* ]] && $(which fzf &>/dev/null); then
|
||||||
bind -r "\C-r"
|
bind -r "\C-r"
|
||||||
bind -x '"\C-r": __search-history'
|
bind -x '"\C-r": __search-history'
|
||||||
fi
|
fi
|
||||||
|
|||||||
Executable
+9
@@ -0,0 +1,9 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
if $(which librewolf &>/dev/null); then
|
||||||
|
librewolf
|
||||||
|
elif $(which librewolf.appimage); then
|
||||||
|
librewolf.appimage
|
||||||
|
else
|
||||||
|
notify-send "[ERROR]" "Failed to start browser"
|
||||||
|
fi
|
||||||
+143
-67
@@ -1,105 +1,181 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
function remove-whitespace {
|
function remove-whitespace {
|
||||||
|
# exclude file types
|
||||||
|
# (ignore generated files/directories)
|
||||||
|
exclude_paths=(
|
||||||
|
".git"
|
||||||
|
)
|
||||||
|
exclude_files=(
|
||||||
|
"*.lst"
|
||||||
|
"*.map"
|
||||||
|
"*.svd"
|
||||||
|
"*.sym"
|
||||||
|
"*.doc"
|
||||||
|
"*.docx"
|
||||||
|
"*.ppt"
|
||||||
|
"*.pptx"
|
||||||
|
)
|
||||||
|
|
||||||
unset line_endings
|
|
||||||
unset help
|
unset help
|
||||||
unset quiet
|
unset silent
|
||||||
|
unset no_action
|
||||||
|
unset path_args
|
||||||
|
unset file_args
|
||||||
|
unset ffunix
|
||||||
unset files
|
unset files
|
||||||
|
unset args
|
||||||
|
unset arguments
|
||||||
|
|
||||||
for arg in $@; do
|
for arg in "$@"; do
|
||||||
case ${arg} in
|
if [[ "${arg}" =~ ^-[a-zA-Z]{2,}$ ]]; then
|
||||||
"-e" | "--eol" | "--end-of-line")
|
temp=($(echo ${arg} | grep --color=never -o "."))
|
||||||
line_endings="true"
|
args+=(${temp[@]/#/-})
|
||||||
continue
|
else
|
||||||
|
args+=("${arg}")
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
for arg in "${args[@]}"; do
|
||||||
|
[[ "${arg}" != "--" ]] && arguments+=("${arg}")
|
||||||
|
done
|
||||||
|
unset args
|
||||||
|
|
||||||
|
for arg in "${arguments[@]}"; do
|
||||||
|
unset arg_found
|
||||||
|
case "${arg}" in
|
||||||
|
"-u" | "--unix")
|
||||||
|
arg_found="true"
|
||||||
|
ffunix="true"
|
||||||
;;
|
;;
|
||||||
"-h" | "--help" | "-help")
|
"-h" | "--help")
|
||||||
|
arg_found="true"
|
||||||
help="true"
|
help="true"
|
||||||
continue
|
|
||||||
;;
|
;;
|
||||||
"-n" | "--quiet")
|
"-n" | "--no-action")
|
||||||
quiet="true"
|
arg_found="true"
|
||||||
continue
|
no_action="true"
|
||||||
|
;;
|
||||||
|
"-s" | "--silent")
|
||||||
|
arg_found="true"
|
||||||
|
silent="true"
|
||||||
;;
|
;;
|
||||||
*) ;;
|
*) ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
if [[ -f "${arg}" ]]; then
|
if [[ -n "${arg_found}" ]]; then
|
||||||
grep -Iq . "${arg}" && files=(${files} "${arg}")
|
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -d "${arg}" ]]; then
|
if [[ -d "${arg}" ]]; then
|
||||||
files=(${files} $(find "${arg}" \
|
path_args+=("${arg}")
|
||||||
-not -path "*/.git/*" \
|
|
||||||
-not -name "*.lst" \
|
|
||||||
-not -name "*.map" \
|
|
||||||
-not -name "*.svd" \
|
|
||||||
-not -name "*.sym" \
|
|
||||||
-type f \
|
|
||||||
-exec grep -Iq . {} \; \
|
|
||||||
-print))
|
|
||||||
continue
|
continue
|
||||||
|
elif [[ -f "${arg}" ]]; then
|
||||||
|
file_args+=("${arg}")
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "(unrecognised argument: '${arg}')"
|
||||||
|
done
|
||||||
|
|
||||||
|
if [[ -n "${ffunix}" ]]; then
|
||||||
|
sed_cmd='s/[[:space:]]\+$//'
|
||||||
|
grep_regex=$'[[:space:]]+$'
|
||||||
|
else
|
||||||
|
sed_cmd='s/[[:blank:]]\+\(\r\?\)$/\1/'
|
||||||
|
grep_regex=$'[[:blank:]]+\r?$'
|
||||||
|
fi
|
||||||
|
|
||||||
|
# compile exclude arguments
|
||||||
|
unset excludes
|
||||||
|
excludes=("(")
|
||||||
|
|
||||||
|
for n in ${!exclude_paths[@]}; do
|
||||||
|
excludes+=("-name" "${exclude_paths[$n]}")
|
||||||
|
if ((${n} < ${#exclude_paths[@]} - 1)); then
|
||||||
|
excludes+=("-o")
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
## search current directory if no argument is provided
|
excludes+=(")" "-type d" "-prune" "-o")
|
||||||
if [[ -z "${files[@]}" ]]; then
|
|
||||||
files=($(find . \
|
|
||||||
-not -path "*/.git/*" \
|
|
||||||
-not -name "*.lst" \
|
|
||||||
-not -name "*.map" \
|
|
||||||
-not -name "*.svd" \
|
|
||||||
-not -name "*.sym" \
|
|
||||||
-type f \
|
|
||||||
-exec grep -Iq . {} \; \
|
|
||||||
-print))
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ -n "${dir_arg}" ]] && [[ -n "${file_arg}" ]]; then
|
for arg in "${exclude_files[@]}"; do
|
||||||
help="true"
|
excludes+=("-not" "-name" "${arg}")
|
||||||
fi
|
done
|
||||||
|
|
||||||
if [[ -n "${help}" ]]; then
|
for arg in "${path_args[@]}"; do
|
||||||
echo "Usage: remove-whitespace [-h] [-n] path [path]"
|
files=("$(
|
||||||
echo ""
|
find "${arg}" \
|
||||||
echo "Remove trailing whitespace from plain text files."
|
${excludes[@]} \
|
||||||
echo "Path points to either a file or directory, or both."
|
-type f \
|
||||||
echo "Directories are search recursively for non binary."
|
-exec grep -EIq "${grep_regex}" {} \; \
|
||||||
echo "If no paths are provided, the current working"
|
-print
|
||||||
echo "directory is search for plain text files."
|
)")
|
||||||
echo ""
|
done
|
||||||
echo "Options:"
|
|
||||||
echo " -e, --eol,"
|
IFS=$'\n'
|
||||||
echo " --end-of-line convert all line endings to unix style"
|
files=(${files})
|
||||||
echo " line endings"
|
unset IFS
|
||||||
echo " -h, --help show this help"
|
|
||||||
echo " -n, --quiet suppress output"
|
for arg in "${file_args[@]}"; do
|
||||||
|
grep -EIq "${grep_regex}" "${arg}" && files+=("${arg}")
|
||||||
|
done
|
||||||
|
|
||||||
|
if [[ -n "${help}" ]] || [[ -z "${file_args[@]} ${path_args[@]}" ]]; then
|
||||||
|
cat <<EOF
|
||||||
|
Usage: remove-whitespace [-h] [-n] path [path]
|
||||||
|
|
||||||
|
Remove trailing whitespace from plain text files.
|
||||||
|
Path points to either a file or directory, or both.
|
||||||
|
Directories are searched recursively.
|
||||||
|
If no paths are provided, the current working
|
||||||
|
directory is searched.
|
||||||
|
|
||||||
|
Options:
|
||||||
|
-u, --unix convert all line endings to unix style
|
||||||
|
line endings
|
||||||
|
-h, --help show this help
|
||||||
|
-n, --no-action do not delete, only detect whitespace
|
||||||
|
this switch forces silent=false
|
||||||
|
-s, --silent suppress output
|
||||||
|
EOF
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
unset trailing_whitespace
|
if [[ -z "${files[@]}" ]]; then
|
||||||
|
echo "no files with trailing whitespace or dos style line endings found"
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
|
||||||
for file in ${files[@]}; do
|
if [[ -z "${no_action}" ]]; then
|
||||||
sed -i 's/\r$//' ${file}
|
for file in "${files[@]}"; do
|
||||||
if [[ -n "$(sed -ne '/[[:blank:]]\+\r\?$/p' ${file})" ]]; then
|
if [[ -n "${ffunix}" ]]; then
|
||||||
if [[ -n "${line_endings}" ]]; then
|
sed -i "${sed_cmd}" "${file}"
|
||||||
sed -i 's/[[:blank:]]\+\(\r\?\)$//' ${file}
|
|
||||||
else
|
else
|
||||||
sed -i 's/[[:blank:]]\+\(\r\?\)$/\1/' ${file}
|
sed -i "${sed_cmd}" "${file}"
|
||||||
fi
|
fi
|
||||||
trailing_whitespace+="${file}\n"
|
done
|
||||||
fi
|
fi
|
||||||
done
|
|
||||||
echo ""
|
|
||||||
|
|
||||||
if [[ -z "${quiet}" ]] &&
|
if [[ -n "${no_action}" ]] &&
|
||||||
[[ -n "${trailing_whitespace}" ]]; then
|
[[ -n "${files}" ]]; then
|
||||||
|
tput setaf 1
|
||||||
|
tput smso
|
||||||
|
echo "The following files contain whitespace:"
|
||||||
|
tput sgr0
|
||||||
|
for file in "${files[@]}"; do
|
||||||
|
echo "${file}"
|
||||||
|
done
|
||||||
|
elif [[ -z "${silent}" ]] &&
|
||||||
|
[[ -n "${files}" ]]; then
|
||||||
tput setaf 1
|
tput setaf 1
|
||||||
tput smso
|
tput smso
|
||||||
echo "The following files contained whitespace:"
|
echo "The following files contained whitespace:"
|
||||||
tput sgr0
|
tput sgr0
|
||||||
echo -e "${trailing_whitespace}"
|
for file in "${files[@]}"; do
|
||||||
|
echo "${file}"
|
||||||
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Executable
+26
@@ -0,0 +1,26 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
unset use_clipboard
|
||||||
|
if [[ "$1" == "-c" ]] || [[ "$1" == "--clipboard" ]]; then
|
||||||
|
use_clipboard="true"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ! $(which maim &>/dev/null); then
|
||||||
|
notify-send "[screenshot]" "missing \`maim\`"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
if [[ -n "${use_clipboard}" ]] && ! $(which xclip &>/dev/null); then
|
||||||
|
notify-send "[screenshot]" "missing \`xclip\`"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ -z "${use_clipboard}" ]]; then
|
||||||
|
screenshots_path="${HOME}/screenshots"
|
||||||
|
echo "${screenshots_path}"
|
||||||
|
if [[ ! -d "${screenshots_path}" ]]; then
|
||||||
|
mkdir "${screenshots_path}"
|
||||||
|
fi
|
||||||
|
maim -suo "${screenshots_path}/$(date '+%Y%m%d_%H%M%S').png"
|
||||||
|
else
|
||||||
|
maim -suo | xclip -selection clipboard -t image/png
|
||||||
|
fi
|
||||||
@@ -2,7 +2,8 @@
|
|||||||
# use interactive shell instead of login shell
|
# use interactive shell instead of login shell
|
||||||
set-option -g default-command "/bin/bash"
|
set-option -g default-command "/bin/bash"
|
||||||
|
|
||||||
# enable rgb colors
|
# configure terminal
|
||||||
|
set -g default-terminal "tmux-256color"
|
||||||
set -ag terminal-overrides ",*:RGB"
|
set -ag terminal-overrides ",*:RGB"
|
||||||
|
|
||||||
# enable mouse support
|
# enable mouse support
|
||||||
|
|||||||
Reference in New Issue
Block a user