Change layout to per-device top level

This commit is contained in:
2026-06-07 01:08:50 +08:00
parent 072e6ae564
commit 42f2931bac
21 changed files with 262 additions and 4038 deletions
+43
View File
@@ -0,0 +1,43 @@
[env]
TERM = "xterm-256color"
[scrolling]
history = 100000
multiplier = 3
[font]
size = 10
[font.normal]
family = "Hack Nerd Font"
style = "Regular"
[font.bold]
family = "Hack Nerd Font"
style = "Bold"
[font.italic]
family = "Hack Nerd Font"
style = "Italic"
[font.bold_italic]
family = "Hack Nerd Font"
style = "Bold Italic"
[cursor]
style = { shape = "Beam", blinking = "On" }
blink_interval = 500
unfocused_hollow = true
[selection]
save_to_clipboard = true
[mouse]
hide_when_typing = true
[keyboard]
bindings = [
{ key = "N", mods = "Control|Shift", action = "CreateNewWindow" },
{ key = "V", mods = "Control|Shift", action = "Paste" },
{ key = "C", mods = "Control|Shift", action = "Copy" }
]
+77
View File
@@ -0,0 +1,77 @@
# Editor
set -gx EDITOR nvim
set -gx VISUAL nvim
# Better defaults
set -gx PAGER less
set -gx LESS "-R --use-color -Dd+r -Du+b"
# XDG paths
set -gx XDG_CONFIG_HOME "$HOME/.config"
set -gx XDG_DATA_HOME "$HOME/.local/share"
set -gx XDG_CACHE_HOME "$HOME/.cache"
# Local binaries
fish_add_path "$HOME/.local/bin"
fish_add_path "$HOME/.cargo/bin"
# Wayland-friendly defaults
set -gx MOZ_ENABLE_WAYLAND 1
set -gx QT_QPA_PLATFORM wayland
set -gx SDL_VIDEODRIVER wayland
set -gx CLUTTER_BACKEND wayland
# Fish behavior
set fish_greeting
# Vi-style bindings
fish_vi_key_bindings
# Useful aliases
alias ls="ls --color=auto"
alias ll="ls -lah"
alias la="ls -A"
alias grep="grep --color=auto"
alias c="clear"
alias v="nvim"
alias svim="sudoedit"
alias gs="git status"
alias ga="git add"
alias gc="git commit"
alias gp="git push"
alias gl="git log --oneline --graph --decorate"
alias pacup="sudo pacman -Syu"
alias pacin="sudo pacman -S"
alias pacrm="sudo pacman -Rns"
alias pacq="pacman -Qs"
alias ls="eza --icons"
alias ll="eza -lah --icons --git"
alias cat="bat"
if type -q zoxide
zoxide init fish | source
end
if type -q fzf
fzf --fish | source
end
# Safer defaults
alias cp="cp -i"
alias mv="mv -i"
alias rm="rm -i"
# Starship prompt
if type -q starship
starship init fish | source
end
if status is-login
and test -z "$WAYLAND_DISPLAY"
and test "$XDG_VTNR" = "1"
exec sway
end
+3
View File
@@ -0,0 +1,3 @@
# This file contains fish universal variable definitions.
# VERSION: 3.0
SETUVAR __fish_initialized:4300
+26
View File
@@ -0,0 +1,26 @@
font=Hack Nerd Font 10
background-color=#1c1c24
text-color=#cdcdcd
border-color=#2f2f3d
progress-color=#7e98e8
border-size=2
border-radius=0
padding=8
margin=6
default-timeout=5000
ignore-timeout=0
[urgency=low]
background-color=#141415
text-color=#c3c3d5
[urgency=normal]
background-color=#1c1c24
text-color=#cdcdcd
[urgency=high]
background-color=#1c1c24
text-color=#d8647e
border-color=#d8647e
+407
View File
@@ -0,0 +1,407 @@
-- ~/.config/nvim/init.lua
-- ============================================================================
-- Leader
-- ============================================================================
vim.g.mapleader = " "
vim.g.maplocalleader = " "
-- ============================================================================
-- Options
-- ============================================================================
vim.o.number = true
vim.o.relativenumber = true
vim.o.mouse = "a"
vim.opt.cursorline = true
vim.o.clipboard = "unnamedplus"
vim.o.swapfile = false
vim.o.backup = false
vim.o.writebackup = false
vim.o.undofile = true
vim.o.ignorecase = true
vim.o.smartcase = true
vim.o.signcolumn = "yes"
vim.o.splitright = true
vim.o.splitbelow = true
vim.o.termguicolors = true
vim.o.winborder = "rounded"
vim.o.updatetime = 250
vim.o.timeoutlen = 1000
vim.o.expandtab = true
vim.o.shiftwidth = 2
vim.o.tabstop = 2
vim.o.softtabstop = 2
vim.o.showmode = false
vim.o.completeopt = "menu,menuone,noselect"
-- ============================================================================
-- Plugins
-- ============================================================================
vim.pack.add({
{ src = "https://github.com/vague-theme/vague.nvim" },
{ src = "https://github.com/neovim/nvim-lspconfig" },
{ src = "https://github.com/saghen/blink.lib" },
{ src = "https://github.com/saghen/blink.cmp" },
{ src = "https://github.com/nvim-treesitter/nvim-treesitter", version = "main" },
{ src = "https://github.com/echasnovski/mini.nvim" },
{ src = "https://github.com/nvim-neo-tree/neo-tree.nvim", version = vim.version.range("3") },
{ src = "https://github.com/nvim-lua/plenary.nvim" },
{ src = "https://github.com/MunifTanjim/nui.nvim" },
{ src = "https://github.com/ibhagwan/fzf-lua" },
{ src = "https://github.com/lewis6991/gitsigns.nvim" },
{ src = "https://github.com/folke/which-key.nvim" },
{ src = "https://github.com/goolord/alpha-nvim" },
{ src = "https://github.com/nvim-tree/nvim-web-devicons" },
{ src = "https://github.com/christoomey/vim-tmux-navigator" },
{ src = "https://github.com/folke/todo-comments.nvim" },
})
-- ============================================================================
-- Theme
-- ============================================================================
vim.cmd.colorscheme("vague")
-- ============================================================================
-- Diagnostics
-- ============================================================================
vim.diagnostic.config({
virtual_text = true,
underline = true,
severity_sort = true,
signs = {
text = {
[vim.diagnostic.severity.ERROR] = "E",
[vim.diagnostic.severity.WARN] = "W",
[vim.diagnostic.severity.INFO] = "I",
[vim.diagnostic.severity.HINT] = "H",
},
},
})
-- ============================================================================
-- Completion
-- ============================================================================
require("blink.cmp").build():pwait()
require("blink.cmp").setup({
completion = {
menu = { auto_show = true },
trigger = { show_on_trigger_character = true },
ghost_text = { enabled = false },
documentation = {
auto_show = true,
auto_show_delay_ms = 200,
},
list = {
selection = {
preselect = false,
auto_insert = false,
},
},
},
keymap = {
preset = "none",
["<C-space>"] = { "show", "show_documentation", "hide_documentation" },
["<C-e>"] = { "hide" },
["<C-up>"] = { "scroll_documentation_up" },
["<C-down>"] = { "scroll_documentation_down" },
["<CR>"] = { "accept", "fallback" },
["<Tab>"] = { "select_next", "fallback" },
["<S-Tab>"] = { "select_prev", "fallback" },
},
sources = {
default = { "lsp", "path", "snippets", "buffer" },
},
fuzzy = {
implementation = "rust",
},
})
-- ============================================================================
-- Treesitter
-- ============================================================================
require("nvim-treesitter").setup({
install_dir = vim.fn.stdpath("data") .. "/site",
})
vim.api.nvim_create_autocmd("FileType", {
group = vim.api.nvim_create_augroup("treesitter_start", { clear = true }),
callback = function(args)
pcall(vim.treesitter.start, args.buf)
end,
})
-- ============================================================================
-- mini.nvim
-- ============================================================================
require("mini.ai").setup()
require("mini.surround").setup()
require("mini.pairs").setup()
require("mini.comment").setup()
require("mini.statusline").setup()
require("mini.tabline").setup()
require("mini.bracketed").setup()
require("mini.icons").setup()
vim.api.nvim_set_hl(0, "MiniTablineCurrent", { link = "Search" })
vim.api.nvim_set_hl(0, "MiniTablineModifiedCurrent", { link = "Search" })
vim.api.nvim_set_hl(0, "MiniTablineModifiedVisible", { link = "DiagnosticWarn" })
vim.api.nvim_set_hl(0, "MiniTablineModifiedHidden", { link = "DiagnosticWarn" })
-- ============================================================================
-- Icons
-- ============================================================================
require("nvim-web-devicons").setup()
-- ============================================================================
-- Todo comments
-- ============================================================================
require("todo-comments").setup()
-- ============================================================================
-- File explorer
-- ============================================================================
require("neo-tree").setup({
close_if_last_window = true,
popup_border_style = "", -- use vim.o.winborder on modern Neovim
enable_git_status = true,
enable_diagnostics = true,
filesystem = {
follow_current_file = {
enabled = true,
},
use_libuv_file_watcher = true,
},
window = {
width = 63,
},
})
vim.keymap.set("n", "<leader>e", "<cmd>Neotree filesystem reveal right toggle<CR>", {
desc = "File explorer",
})
vim.keymap.set("n", "<leader>E", "<cmd>Neotree filesystem reveal current<CR>", {
desc = "File explorer full screen",
})
-- ============================================================================
-- Picker
-- ============================================================================
require("fzf-lua").setup({
{ "fzf-native", "hide" },
actions = {
files = { ["enter"] = require("fzf-lua.actions").file_edit }
},
files = {
formatter = "path.filename_first",
},
oldfiles = {
formatter = "path.filename_first",
},
grep = {
rg_opts = "--column --line-number --no-heading --color=always --smart-case --max-columns=4096",
},
winopts = {
width = 0.56,
height = 0.82,
row = 0.50,
col = 0.50,
preview = {
layout = "horizontal",
horizontal = "right:45%",
},
},
})
vim.keymap.set("n", "<leader>ff", function()
require("fzf-lua").files()
end, { desc = "Find files" })
vim.keymap.set("n", "<leader>fg", function()
require("fzf-lua").live_grep()
end, { desc = "Live grep" })
vim.keymap.set("n", "<leader>fb", function()
require("fzf-lua").buffers()
end, { desc = "Buffers" })
vim.keymap.set("n", "<leader>fh", function()
require("fzf-lua").helptags()
end, { desc = "Help tags" })
vim.keymap.set("n", "<leader>fr", function()
require("fzf-lua").resume()
end, { desc = "Resume picker" })
vim.keymap.set("n", "<leader>fd", function()
require("fzf-lua").diagnostics_document()
end, { desc = "Buffer diagnostics" })
vim.keymap.set("n", "<leader>fD", function()
require("fzf-lua").diagnostics_workspace()
end, { desc = "Workspace diagnostics" })
vim.keymap.set("n", "<leader>fo", function()
require("fzf-lua").oldfiles()
end, { desc = "Recent files" })
vim.keymap.set("n", "<leader>fc", function()
require("fzf-lua").git_status()
end, { desc = "Git status" })
-- ============================================================================
-- Dashboard
-- ============================================================================
require("alpha").setup(require("alpha.themes.theta").config)
-- ============================================================================
-- Git
-- ============================================================================
require("gitsigns").setup()
-- ============================================================================
-- LSP
-- ============================================================================
-- nvim-lspconfig supplies default configs for these.
-- Install the actual language server binaries separately:
-- lua-language-server
-- pyright
-- gopls
vim.lsp.config("lua_ls", {
settings = {
Lua = {
runtime = {
version = "LuaJIT",
},
diagnostics = {
globals = { "vim" },
},
workspace = {
library = vim.api.nvim_get_runtime_file("", true),
},
telemetry = {
enable = false,
},
},
},
})
vim.lsp.enable({
"lua_ls",
"pyright",
"gopls",
})
vim.api.nvim_create_autocmd("LspAttach", {
group = vim.api.nvim_create_augroup("lsp_attach", { clear = true }),
callback = function(event)
local map = function(lhs, rhs, desc)
vim.keymap.set("n", lhs, rhs, {
buffer = event.buf,
desc = desc,
})
end
-- Navigation
map("gd", vim.lsp.buf.definition, "Go to definition")
map("gD", vim.lsp.buf.declaration, "Go to declaration")
map("gi", vim.lsp.buf.implementation, "Go to implementation")
-- Language / LSP actions
map("<leader>lr", vim.lsp.buf.rename, "LSP rename")
map("<leader>lf", function()
vim.lsp.buf.format({ async = true })
end, "LSP format")
map("<leader>la", vim.lsp.buf.code_action, "LSP code action")
map("<leader>lh", vim.lsp.buf.hover, "LSP hover")
map("<leader>ls", vim.lsp.buf.signature_help, "LSP signature help")
map("<leader>ld", vim.diagnostic.open_float, "Line diagnostics")
map("<leader>lq", vim.diagnostic.setloclist, "Diagnostics to loclist")
end,
})
-- ============================================================================
-- General keymaps
-- ============================================================================
vim.keymap.set("n", "<C-h>", "<cmd>TmuxNavigateLeft<CR>", { silent = true })
vim.keymap.set("n", "<C-j>", "<cmd>TmuxNavigateDown<CR>", { silent = true })
vim.keymap.set("n", "<C-k>", "<cmd>TmuxNavigateUp<CR>", { silent = true })
vim.keymap.set("n", "<C-l>", "<cmd>TmuxNavigateRight<CR>", { silent = true })
vim.keymap.set("n", "<Esc>", "<cmd>nohlsearch<CR>", { desc = "Clear search highlight" })
vim.keymap.set("n", "<S-h>", "<cmd>bprevious<CR>", { desc = "Previous buffer" })
vim.keymap.set("n", "<S-l>", "<cmd>bnext<CR>", { desc = "Next buffer" })
vim.keymap.set("n", "<leader>bd", "<cmd>bdelete<CR>", { desc = "Delete buffer" })
vim.keymap.set("n", "<leader>bD", "<cmd>bdelete!<CR>", { desc = "Force delete buffer" })
vim.keymap.set("n", "<leader>bw", "<cmd>bwipe<CR>", { desc = "Wipe buffers" })
vim.keymap.set("n", "<leader>bW", "<cmd>bwipe!<CR>", { desc = "Force wipe buffers" })
vim.keymap.set("n", "<leader>bl", "<cmd>ls<CR>", { desc = "List buffers" })
vim.keymap.set("n", "<leader>bb", "<cmd>buffer #<CR>", { desc = "Switch to last buffer" })
vim.keymap.set("n", "<leader>bf", "<cmd>bfirst<CR>", { desc = "First buffer" })
vim.keymap.set("n", "<leader>bL", "<cmd>blast<CR>", { desc = "Last buffer" })
vim.keymap.set("n", "[d", function()
vim.diagnostic.jump({ count = -1 })
end, {
desc = "Previous diagnostic",
})
vim.keymap.set("n", "]d", function()
vim.diagnostic.jump({ count = 1 })
end, {
desc = "Next diagnostic",
})
-- ============================================================================
-- Keymap help
-- ============================================================================
require("which-key").setup({
preset = "helix",
})
require("which-key").add({
{ "<leader>e", desc = "File explorer" },
{ "<leader>E", desc = "File explorer full screen" },
{ "<leader>f", group = "find" },
{ "<leader>l", group = "language/lsp" },
{ "<leader>g", group = "git" },
{ "<leader>b", group = "buffer" },
})
+70
View File
@@ -0,0 +1,70 @@
{
"plugins": {
"alpha-nvim": {
"rev": "6c6a89d5b068b5251c8bdf0dd57bb921bcfeeb09",
"src": "https://github.com/goolord/alpha-nvim"
},
"blink.cmp": {
"rev": "3db7326f54b73df4789e0fd6274bedda33975fea",
"src": "https://github.com/saghen/blink.cmp"
},
"blink.lib": {
"rev": "b127d48bf8e9ac9cf41f6e0fbead317503f76558",
"src": "https://github.com/saghen/blink.lib"
},
"fzf-lua": {
"rev": "988416cc782dfe28bff3f0da9b8c943b236cd86a",
"src": "https://github.com/ibhagwan/fzf-lua"
},
"gitsigns.nvim": {
"rev": "25050e4ed39e628282831d4cbecb1850454ce915",
"src": "https://github.com/lewis6991/gitsigns.nvim"
},
"mini.nvim": {
"rev": "d5e6f5b843f1d813d9c4bfb242b751dc5ab6f8ae",
"src": "https://github.com/echasnovski/mini.nvim"
},
"neo-tree.nvim": {
"rev": "83e7a2982fd12b9c3d35bc39dd5877cd91a02a61",
"src": "https://github.com/nvim-neo-tree/neo-tree.nvim",
"version": "3.0.0 - 4.0.0"
},
"nui.nvim": {
"rev": "de740991c12411b663994b2860f1a4fd0937c130",
"src": "https://github.com/MunifTanjim/nui.nvim"
},
"nvim-lspconfig": {
"rev": "229b79051b380377664edc4cbd534930154921a1",
"src": "https://github.com/neovim/nvim-lspconfig"
},
"nvim-treesitter": {
"rev": "4916d6592ede8c07973490d9322f187e07dfefac",
"src": "https://github.com/nvim-treesitter/nvim-treesitter",
"version": "'main'"
},
"nvim-web-devicons": {
"rev": "dfbfaa967a6f7ec50789bead7ef87e336c1fa63c",
"src": "https://github.com/nvim-tree/nvim-web-devicons"
},
"plenary.nvim": {
"rev": "74b06c6c75e4eeb3108ec01852001636d85a932b",
"src": "https://github.com/nvim-lua/plenary.nvim"
},
"todo-comments.nvim": {
"rev": "31e3c38ce9b29781e4422fc0322eb0a21f4e8668",
"src": "https://github.com/folke/todo-comments.nvim"
},
"vague.nvim": {
"rev": "8ee15ea4505d64ede559ff1cb112582a6f2ea138",
"src": "https://github.com/vague-theme/vague.nvim"
},
"vim-tmux-navigator": {
"rev": "e41c431a0c7b7388ae7ba341f01a0d217eb3a432",
"src": "https://github.com/christoomey/vim-tmux-navigator"
},
"which-key.nvim": {
"rev": "3aab2147e74890957785941f0c1ad87d0a44c15a",
"src": "https://github.com/folke/which-key.nvim"
}
}
}
+70
View File
@@ -0,0 +1,70 @@
add_newline = true
command_timeout = 1000
format = """
$username\
$hostname\
$directory\
$git_branch\
$git_status\
$python\
$nodejs\
$rust\
$golang\
$cmd_duration\
$line_break\
$character"""
[character]
success_symbol = "[](bold green)"
error_symbol = "[](bold red)"
vimcmd_symbol = "[](bold blue)"
[directory]
style = "bold blue"
truncation_length = 3
truncate_to_repo = true
read_only = " "
[git_branch]
symbol = " "
style = "bold mauve"
format = "[$symbol$branch]($style) "
[git_status]
style = "bold yellow"
format = "[$all_status$ahead_behind]($style) "
conflicted = "=${count} "
ahead = "⇡${count} "
behind = "⇣${count} "
diverged = "⇕⇡${ahead_count}⇣${behind_count} "
untracked = "?${count} "
stashed = "\\$${count} "
modified = "!${count} "
staged = "+${count} "
renamed = "»${count} "
deleted = "✘${count} "
[cmd_duration]
min_time = 500
format = "took [$duration](bold yellow) "
[python]
symbol = " "
format = "[$symbol$version]($style) "
style = "bold green"
[nodejs]
symbol = " "
format = "[$symbol$version]($style) "
style = "bold green"
[rust]
symbol = " "
format = "[$symbol$version]($style) "
style = "bold red"
[golang]
symbol = " "
format = "[$symbol$version]($style) "
style = "bold cyan"
+123
View File
@@ -0,0 +1,123 @@
### Variables
set $mod Mod4
set $left h
set $down j
set $up k
set $right l
set $term alacritty
set $menu bemenu-run -b -i --fn "Hack Nerd Font 10" --prompt "Run:" --list "8 up"
set $b00 #141415
set $b01 #1c1c24
set $b02 #2f2f3d
set $b03 #333738
set $b04 #c3c3d5
set $b05 #cdcdcd
set $red #d8647e
set $yellow #f3be7c
set $hint #7e98e8
set $float #878787
font Hack Nerd Font 10
default_border pixel 3
default_floating_border pixel 3
smart_borders no_gaps
gaps inner 0
gaps outer 0
client.focused $hint $b02 $b05 $hint
client.focused_inactive $b01 $b01 $b04 $b01
client.unfocused $b01 $b01 $b03 $b01
client.urgent $red $red $b05 $red
client.placeholder $b01 $b01 $b04 $b01
client.background $b00
for_window [floating] border pixel 2
exec_always swaybg -c $b00
bar {
colors {
focused_workspace $b01 $b01 $b05
}
swaybar_command waybar
}
input type:keyboard {
xkb_layout "us"
}
output HDMI-A-1 resolution 2560x1440 pos 0 0
workspace 1 output HDMI-A-1
workspace_auto_back_and_forth yes
bindsym $mod+Tab workspace back_and_forth
output * adaptive_sync on
### Key bindings
bindsym $mod+Return exec $term
bindsym $mod+q kill
bindsym $mod+Space exec $menu
bindsym $mod+Shift+c reload
bindsym $mod+Shift+e exec swaymsg exit
bindsym $mod+$left focus left
bindsym $mod+$down focus down
bindsym $mod+$up focus up
bindsym $mod+$right focus right
bindsym $mod+Shift+$left move left
bindsym $mod+Shift+$down move down
bindsym $mod+Shift+$up move up
bindsym $mod+Shift+$right move right
bindsym $mod+1 workspace number 1
bindsym $mod+2 workspace number 2
bindsym $mod+3 workspace number 3
bindsym $mod+4 workspace number 4
bindsym $mod+5 workspace number 5
bindsym $mod+6 workspace number 6
bindsym $mod+7 workspace number 7
bindsym $mod+8 workspace number 8
bindsym $mod+9 workspace number 9
bindsym $mod+0 workspace number 10
bindsym $mod+Shift+1 move container to workspace number 1
bindsym $mod+Shift+2 move container to workspace number 2
bindsym $mod+Shift+3 move container to workspace number 3
bindsym $mod+Shift+4 move container to workspace number 4
bindsym $mod+Shift+5 move container to workspace number 5
bindsym $mod+Shift+6 move container to workspace number 6
bindsym $mod+Shift+7 move container to workspace number 7
bindsym $mod+Shift+8 move container to workspace number 8
bindsym $mod+Shift+9 move container to workspace number 9
bindsym $mod+Shift+0 move container to workspace number 10
bindsym $mod+b splith
bindsym $mod+v splitv
bindsym $mod+equal fullscreen
bindsym $mod+Shift+f floating toggle
bindsym $mod+f focus mode_toggle
bindsym $mod+Shift+minus move scratchpad
bindsym $mod+minus scratchpad show
### Media keys
bindsym --locked XF86AudioMute exec pactl set-sink-mute @DEFAULT_SINK@ toggle
bindsym --locked XF86AudioLowerVolume exec pactl set-sink-volume @DEFAULT_SINK@ -5%
bindsym --locked XF86AudioRaiseVolume exec pactl set-sink-volume @DEFAULT_SINK@ +5%
bindsym --locked XF86AudioMicMute exec pactl set-source-mute @DEFAULT_SOURCE@ toggle
bindsym --locked XF86MonBrightnessDown exec brightnessctl set 5%-
bindsym --locked XF86MonBrightnessUp exec brightnessctl set 5%+
bindsym $mod+Shift+p exec grim -g "$(slurp)" - | wl-copy
bindsym $mod+p exec grim - | wl-copy
exec_always dbus-update-activation-environment --systemd WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP=sway
+61
View File
@@ -0,0 +1,61 @@
unbind C-b
set -g prefix C-a
bind C-a send-prefix
bind -n M-h previous-window
bind -n M-l next-window
unbind x
bind x kill-pane
unbind &
bind & kill-window
set -g default-terminal "tmux-256color"
set -as terminal-overrides ',*:Tc'
set -g detach-on-destroy off
set -g renumber-windows on
set -g base-index 1
setw -g pane-base-index 1
set -g status-position top
set -g status on
set -g status-style "bg=default,fg=white"
set -g status-left ""
set -g status-right ""
set -g status-justify centre
set -g window-status-format "#I: #W"
set -g window-status-current-format "#I: #W"
set -g window-status-separator " "
set -g status-interval 5
set -g pane-border-style "fg=colour240"
set -g pane-active-border-style "fg=white"
set -g mouse on
set -g history-limit 10000
setw -g automatic-rename on
# neovim tmux navigator
vim_pattern='(\S+/)?g?\.?(view|l?n?vim?x?|fzf)(diff)?(-wrapped)?'
is_vim="ps -o state= -o comm= -t '#{pane_tty}' \
| grep -iqE '^[^TXZ ]+ +${vim_pattern}$'"
bind-key -n 'C-h' if-shell "$is_vim" 'send-keys C-h' 'select-pane -L'
bind-key -n 'C-j' if-shell "$is_vim" 'send-keys C-j' 'select-pane -D'
bind-key -n 'C-k' if-shell "$is_vim" 'send-keys C-k' 'select-pane -U'
bind-key -n 'C-l' if-shell "$is_vim" 'send-keys C-l' 'select-pane -R'
tmux_version='$(tmux -V | sed -En "s/^tmux ([0-9]+(.[0-9]+)?).*/\1/p")'
if-shell -b '[ "$(echo "$tmux_version < 3.0" | bc)" = 1 ]' \
"bind-key -n 'C-\\' if-shell \"$is_vim\" 'send-keys C-\\' 'select-pane -l'"
if-shell -b '[ "$(echo "$tmux_version >= 3.0" | bc)" = 1 ]' \
"bind-key -n 'C-\\' if-shell \"$is_vim\" 'send-keys C-\\\\' 'select-pane -l'"
bind-key -T copy-mode-vi 'C-h' select-pane -L
bind-key -T copy-mode-vi 'C-j' select-pane -D
bind-key -T copy-mode-vi 'C-k' select-pane -U
bind-key -T copy-mode-vi 'C-l' select-pane -R
bind-key -T copy-mode-vi 'C-\' select-pane -l
+39
View File
@@ -0,0 +1,39 @@
{
"layer": "bottom",
"position": "bottom",
"height": 20,
"modules-left": ["sway/workspaces"],
"modules-right": ["mpris", "pulseaudio", "temperature", "memory", "cpu", "clock", "tray"],
"sway/workspaces": { "disable-scroll": true },
"clock": { "format": "{:%a %d %b %H:%M:%S}", "interval": 1, "tooltip": false },
"mpris": {
"player": "spotify",
"format": " {title} — {artist} | ",
"title-len": 30,
"artist-len": 20,
"ellipsis": true,
"interval": 2
},
"temperature": {
"format": " | {temperatureC}°C | ",
"critical-threshold": 80,
"interval": 5,
"tooltip": false
/* If it shows 0°C, set one of these explicitly:
"thermal-zone": 0,
or
"hwmon-path": "/sys/class/hwmon/hwmon0/temp1_input"
*/
},
"memory": { "format": "{percentage}% | ", "interval": 5, "tooltip": false },
"cpu": { "format": "{usage}% | ", "interval": 2, "tooltip": false },
"tray": { "spacing": 7 }
}
+40
View File
@@ -0,0 +1,40 @@
* {
font-family: "Hack Nerd Font";
font-size: 11px;
min-height: 0;
}
window#waybar {
background: #141415; /* $b00 */
color: #cdcdcd; /* $b05-ish default text */
}
/* Workspaces: try to mimic your focused_workspace colors */
#workspaces button {
padding: 0 8px;
margin: 0;
border-radius: 0;
border: 0;
background: transparent;
color: #c3c3d5; /* $b04 */
}
#workspaces button.focused {
background: #1c1c24; /* $b01 */
color: #cdcdcd; /* $b05 */
}
#workspaces button.urgent {
background: #d8647e; /* $red */
color: #141415; /* $b00 */
}
/* Right side modules */
#tray {
padding: 0 8px;
}
#custom-ministatus {
padding: 0 8px;
color: #cdcdcd; /* $b05 */
}