Compare commits
1
Commits
master
..
ae68470a02
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ae68470a02 |
No files matched your search
@@ -0,0 +1,16 @@
|
|||||||
|
[".config/kitty/kitty-gruvbox-theme"]
|
||||||
|
type = "archive"
|
||||||
|
url = "https://github.com/wdomitrz/kitty-gruvbox-theme/archive/master.tar.gz"
|
||||||
|
exact = false
|
||||||
|
stripComponents = 1
|
||||||
|
refreshPeriod = "168h"
|
||||||
|
|
||||||
|
[".config/variety/plugins/verse.py"]
|
||||||
|
type = "file"
|
||||||
|
url = "https://raw.githubusercontent.com/Crissium/variety-daily-verse/master/verse.py"
|
||||||
|
refreshPeriod = "168h"
|
||||||
|
|
||||||
|
[".local/share/xxtools"]
|
||||||
|
type = "git-repo"
|
||||||
|
url = "https://github.com/Piraty/xxtools.git"
|
||||||
|
refreshPeriod = "168h"
|
||||||
@@ -1,38 +0,0 @@
|
|||||||
[".config/kitty/kitty-gruvbox-theme"]
|
|
||||||
type = "archive"
|
|
||||||
url = "https://github.com/wdomitrz/kitty-gruvbox-theme/archive/master.tar.gz"
|
|
||||||
exact = false
|
|
||||||
stripComponents = 1
|
|
||||||
refreshPeriod = "168h"
|
|
||||||
|
|
||||||
[".config/variety/plugins/verse.py"]
|
|
||||||
type = "file"
|
|
||||||
url = "https://raw.githubusercontent.com/Crissium/variety-daily-verse/master/verse.py"
|
|
||||||
refreshPeriod = "168h"
|
|
||||||
|
|
||||||
[".local/share/xxtools"]
|
|
||||||
type = "git-repo"
|
|
||||||
url = "https://github.com/Piraty/xxtools.git"
|
|
||||||
refreshPeriod = "168h"
|
|
||||||
|
|
||||||
{{ if env "ANDROID_ROOT" }}
|
|
||||||
# Termux doesn't package these zsh plugins individually (unlike our Linux
|
|
||||||
# machines, which get them from Nix via home-manager), so fetch them directly.
|
|
||||||
# dot_zshrc's plugin-sourcing loop already checks
|
|
||||||
# "$HOME/.local/share/$plugin/$plugin.zsh", which is exactly where a plain
|
|
||||||
# git clone of each plugin's repo puts the file we need.
|
|
||||||
[".local/share/zsh-autosuggestions"]
|
|
||||||
type = "git-repo"
|
|
||||||
url = "https://github.com/zsh-users/zsh-autosuggestions.git"
|
|
||||||
refreshPeriod = "168h"
|
|
||||||
|
|
||||||
[".local/share/zsh-syntax-highlighting"]
|
|
||||||
type = "git-repo"
|
|
||||||
url = "https://github.com/zsh-users/zsh-syntax-highlighting.git"
|
|
||||||
refreshPeriod = "168h"
|
|
||||||
|
|
||||||
[".local/share/zsh-history-substring-search"]
|
|
||||||
type = "git-repo"
|
|
||||||
url = "https://github.com/zsh-users/zsh-history-substring-search.git"
|
|
||||||
refreshPeriod = "168h"
|
|
||||||
{{ end }}
|
|
||||||
@@ -16,7 +16,3 @@ README.md
|
|||||||
{{ if or (eq .chezmoi.hostname "daybreak") (eq .chezmoi.hostname "epoch") (eq .chezmoi.hostname "circadian") (eq .chezmoi.hostname "twilight") (env "ANDROID_ROOT") }}
|
{{ if or (eq .chezmoi.hostname "daybreak") (eq .chezmoi.hostname "epoch") (eq .chezmoi.hostname "circadian") (eq .chezmoi.hostname "twilight") (env "ANDROID_ROOT") }}
|
||||||
.config/python
|
.config/python
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{ if not (env "ANDROID_ROOT") }}
|
|
||||||
.termux/termux.properties
|
|
||||||
{{ end }}
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
# Agent instructions
|
|
||||||
|
|
||||||
## Commits
|
|
||||||
|
|
||||||
- Do not add a `Co-authored-by` trailer (or any other agent attribution) to commit messages.
|
|
||||||
- Before committing, show the proposed commit message and wait for approval. Apply any edits I request, then commit.
|
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
[Added Associations]
|
||||||
|
application/json=nvim.desktop;
|
||||||
|
application/pdf=firefox.desktop;libreoffice-draw.desktop;chromium-browser.desktop;org.inkscape.Inkscape.desktop;krita_pdf.desktop;display-im7.q16.desktop;
|
||||||
|
application/x-docbook+xml=nvim.desktop;
|
||||||
|
application/x-yaml=nvim.desktop;
|
||||||
|
text/csv=libreoffice-calc.desktop;krita_csv.desktop;nvim.desktop;vim.desktop;libreoffice-writer.desktop;okularApplication_txt.desktop;
|
||||||
|
text/markdown=nvim.desktop;
|
||||||
|
text/plain=wine-Programs-Kvaser Database Editor 3-Kvaser Database Editor 3.desktop;nvim.desktop;libreoffice-writer.desktop;vim.desktop;
|
||||||
|
text/x-cmake=nvim.desktop;
|
||||||
|
x-scheme-handler/geo=openstreetmap-geo-handler.desktop;
|
||||||
|
|
||||||
|
[Default Applications]
|
||||||
|
application/json=nvim.desktop;
|
||||||
|
application/pdf=firefox.desktop;
|
||||||
|
application/x-docbook+xml=nvim.desktop;
|
||||||
|
application/x-yaml=nvim.desktop;
|
||||||
|
text/csv=libreoffice-calc.desktop;
|
||||||
|
text/html=default-browser.desktop
|
||||||
|
text/markdown=nvim.desktop;
|
||||||
|
text/plain=wine-Programs-Kvaser Database Editor 3-Kvaser Database Editor 3.desktop;
|
||||||
|
text/x-cmake=nvim.desktop;
|
||||||
|
x-scheme-handler/geo=openstreetmap-geo-handler.desktop;
|
||||||
|
x-scheme-handler/opencode=ai.opencode.desktop.desktop
|
||||||
@@ -1,69 +0,0 @@
|
|||||||
#!/usr/bin/env python3
|
|
||||||
{{ $browser := "firefox.desktop" }}{{ if hasPrefix "UGC" .chezmoi.hostname }}{{ $browser = "default-browser.desktop" }}{{ end }}
|
|
||||||
# chezmoi modify_ script: merge a curated set of default associations into the
|
|
||||||
# machine's existing mimeapps.list (read from stdin) instead of replacing the
|
|
||||||
# whole file, so each machine keeps its own entries.
|
|
||||||
import sys
|
|
||||||
|
|
||||||
BROWSER = "{{ $browser }}"
|
|
||||||
SECTION = "[Default Applications]"
|
|
||||||
|
|
||||||
# Associations enforced on every machine, in [Default Applications].
|
|
||||||
ENFORCED = {
|
|
||||||
"application/json": "nvim.desktop",
|
|
||||||
"application/x-docbook+xml": "nvim.desktop",
|
|
||||||
"application/x-yaml": "nvim.desktop",
|
|
||||||
"text/markdown": "nvim.desktop",
|
|
||||||
"text/x-cmake": "nvim.desktop",
|
|
||||||
"text/html": BROWSER,
|
|
||||||
"x-scheme-handler/http": BROWSER,
|
|
||||||
"x-scheme-handler/https": BROWSER,
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
def main():
|
|
||||||
lines = sys.stdin.read().splitlines()
|
|
||||||
|
|
||||||
# Split into sections, preserving header lines and body order. The first
|
|
||||||
# (headerless) section holds any preamble before the first [Header].
|
|
||||||
sections = [[None, []]]
|
|
||||||
for line in lines:
|
|
||||||
stripped = line.strip()
|
|
||||||
if stripped.startswith("[") and stripped.endswith("]"):
|
|
||||||
sections.append([stripped, []])
|
|
||||||
else:
|
|
||||||
sections[-1][1].append(line)
|
|
||||||
|
|
||||||
target = next((s for s in sections if s[0] == SECTION), None)
|
|
||||||
if target is None:
|
|
||||||
target = [SECTION, []]
|
|
||||||
sections.append(target)
|
|
||||||
|
|
||||||
remaining = dict(ENFORCED)
|
|
||||||
body = []
|
|
||||||
for line in target[1]:
|
|
||||||
key = line.split("=", 1)[0].strip() if "=" in line else None
|
|
||||||
if key in remaining:
|
|
||||||
body.append("{}={};".format(key, remaining.pop(key)))
|
|
||||||
else:
|
|
||||||
body.append(line)
|
|
||||||
|
|
||||||
# Append any still-missing enforced keys before trailing blank lines.
|
|
||||||
trailing = []
|
|
||||||
while body and body[-1].strip() == "":
|
|
||||||
trailing.insert(0, body.pop())
|
|
||||||
for key, val in ENFORCED.items():
|
|
||||||
if key in remaining:
|
|
||||||
body.append("{}={};".format(key, val))
|
|
||||||
body.extend(trailing)
|
|
||||||
target[1] = body
|
|
||||||
|
|
||||||
out = []
|
|
||||||
for header, section_body in sections:
|
|
||||||
if header is not None:
|
|
||||||
out.append(header)
|
|
||||||
out.extend(section_body)
|
|
||||||
sys.stdout.write("\n".join(out) + "\n")
|
|
||||||
|
|
||||||
|
|
||||||
main()
|
|
||||||
+10
-16
@@ -22,22 +22,20 @@ vim.keymap.set('n', '<C-L>', '<C-W><C-L>')
|
|||||||
vim.keymap.set('', '<C-c>', '"+y<CR>')
|
vim.keymap.set('', '<C-c>', '"+y<CR>')
|
||||||
|
|
||||||
-- coc.nvim - remap <cr> to make it confirm completion.
|
-- coc.nvim - remap <cr> to make it confirm completion.
|
||||||
if not vim.g.is_termux then
|
vim.keymap.set('i', '<cr>', function()
|
||||||
vim.keymap.set('i', '<cr>', function()
|
|
||||||
if vim.fn['coc#pum#visible']() == 1 then return vim.fn['coc#pum#confirm']() end
|
if vim.fn['coc#pum#visible']() == 1 then return vim.fn['coc#pum#confirm']() end
|
||||||
return '<cr>'
|
return '<cr>'
|
||||||
end, { expr=true })
|
end, { expr=true })
|
||||||
|
|
||||||
-- coc.nvim - use <Tab> / <S-Tab> to navigate completion list
|
-- coc.nvim - use <Tab> / <S-Tab> to navigate completion list
|
||||||
vim.keymap.set('i', '<Tab>', function()
|
vim.keymap.set('i', '<Tab>', function()
|
||||||
if vim.fn['coc#pum#visible']() == 1 then return vim.fn['coc#pum#next'](1) end
|
if vim.fn['coc#pum#visible']() == 1 then return vim.fn['coc#pum#next'](1) end
|
||||||
return '<Tab>'
|
return '<Tab>'
|
||||||
end, { expr=true })
|
end, { expr=true })
|
||||||
vim.keymap.set('i', '<S-Tab>', function()
|
vim.keymap.set('i', '<S-Tab>', function()
|
||||||
if vim.fn['coc#pum#visible']() == 1 then return vim.fn['coc#pum#prev'](1) end
|
if vim.fn['coc#pum#visible']() == 1 then return vim.fn['coc#pum#prev'](1) end
|
||||||
return '<S-Tab>'
|
return '<S-Tab>'
|
||||||
end, { expr=true })
|
end, { expr=true })
|
||||||
end
|
|
||||||
|
|
||||||
-- Code search? https://news.ycombinator.com/item?id=41739452
|
-- Code search? https://news.ycombinator.com/item?id=41739452
|
||||||
vim.keymap.set('n', 'gv', '<c-w>v<cmd>lua vim.lsp.buf.definition()<CR>', opts)
|
vim.keymap.set('n', 'gv', '<c-w>v<cmd>lua vim.lsp.buf.definition()<CR>', opts)
|
||||||
@@ -55,8 +53,7 @@ vim.api.nvim_create_autocmd(
|
|||||||
)
|
)
|
||||||
|
|
||||||
-- treesitter
|
-- treesitter
|
||||||
if not vim.g.is_termux then
|
require'nvim-treesitter.configs'.setup {
|
||||||
require'nvim-treesitter.configs'.setup {
|
|
||||||
highlight = {
|
highlight = {
|
||||||
enable = true,
|
enable = true,
|
||||||
-- Setting this to true will run `:h syntax` and tree-sitter at the same time.
|
-- Setting this to true will run `:h syntax` and tree-sitter at the same time.
|
||||||
@@ -68,13 +65,10 @@ if not vim.g.is_termux then
|
|||||||
indent = {
|
indent = {
|
||||||
enable = true
|
enable = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
end
|
|
||||||
|
|
||||||
-- Install coc extensions
|
-- Install coc extensions
|
||||||
if not vim.g.is_termux then
|
vim.g.coc_global_extensions = {'coc-json', 'coc-lua', 'coc-pyright', 'coc-rust-analyzer', 'coc-yaml', 'coc-eslint'}
|
||||||
vim.g.coc_global_extensions = {'coc-json', 'coc-lua', 'coc-pyright', 'coc-rust-analyzer', 'coc-yaml', 'coc-eslint'}
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Turn on nice things
|
-- Turn on nice things
|
||||||
vim.opt.clipboard:append("unnamedplus")
|
vim.opt.clipboard:append("unnamedplus")
|
||||||
|
|||||||
@@ -7,23 +7,13 @@ end
|
|||||||
-- Only required if you have packer configured as `opt`
|
-- Only required if you have packer configured as `opt`
|
||||||
vim.cmd [[packadd packer.nvim]]
|
vim.cmd [[packadd packer.nvim]]
|
||||||
|
|
||||||
-- Skip heavyweight plugins (LSP completion, treesitter) on resource-constrained
|
|
||||||
-- environments like Termux, where they're slow/flaky to install and build and
|
|
||||||
-- generally unnecessary for quick edits. Termux sets $TERMUX_VERSION natively.
|
|
||||||
local is_termux = os.getenv('TERMUX_VERSION') ~= nil
|
|
||||||
vim.g.is_termux = is_termux
|
|
||||||
|
|
||||||
return require('packer').startup(function(use)
|
return require('packer').startup(function(use)
|
||||||
-- Packer can manage itself
|
-- Packer can manage itself
|
||||||
use 'wbthomason/packer.nvim'
|
use 'wbthomason/packer.nvim'
|
||||||
|
|
||||||
if not is_termux then
|
|
||||||
-- LSP / COMPLETION --
|
-- LSP / COMPLETION --
|
||||||
use {'neoclide/coc.nvim', branch = "release"}
|
use {'neoclide/coc.nvim', branch = "release"}
|
||||||
|
|
||||||
use {'nvim-treesitter/nvim-treesitter', run = ':TSUpdate'}
|
|
||||||
end
|
|
||||||
|
|
||||||
-- automatically adjust tab based on current file
|
-- automatically adjust tab based on current file
|
||||||
use 'tpope/vim-sleuth'
|
use 'tpope/vim-sleuth'
|
||||||
|
|
||||||
@@ -35,6 +25,8 @@ return require('packer').startup(function(use)
|
|||||||
|
|
||||||
use 'lukas-reineke/indent-blankline.nvim'
|
use 'lukas-reineke/indent-blankline.nvim'
|
||||||
|
|
||||||
|
use {'nvim-treesitter/nvim-treesitter', run = ':TSUpdate'}
|
||||||
|
|
||||||
-- Automatically set up your configuration after cloning packer.nvim
|
-- Automatically set up your configuration after cloning packer.nvim
|
||||||
-- Put this at the end after all plugins
|
-- Put this at the end after all plugins
|
||||||
if packer_bootstrap then
|
if packer_bootstrap then
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
{{ .chezmoi.homeDir }}/.config/agents/AGENTS.md
|
|
||||||
@@ -120,7 +120,7 @@ stats_enabled = True
|
|||||||
# copyto_enabled = <True or False>, default is False
|
# copyto_enabled = <True or False>, default is False
|
||||||
# copyto_folder = <Default or Path to a custom folder>, the default is Default
|
# copyto_folder = <Default or Path to a custom folder>, the default is Default
|
||||||
# Default means to use the XDG Pictures folder when home folder is unencrypted and /usr/share/backgrounds when it is encrypted.
|
# Default means to use the XDG Pictures folder when home folder is unencrypted and /usr/share/backgrounds when it is encrypted.
|
||||||
copyto_enabled = False
|
copyto_enabled = True
|
||||||
copyto_folder = Default
|
copyto_folder = Default
|
||||||
|
|
||||||
# Clock settings
|
# Clock settings
|
||||||
@@ -161,7 +161,7 @@ clock_date_font = Serif 30
|
|||||||
# A tutorial on "annotating" with ImageMagick that you may use as a reference: http://www.imagemagick.org/Usage/annotating/
|
# A tutorial on "annotating" with ImageMagick that you may use as a reference: http://www.imagemagick.org/Usage/annotating/
|
||||||
# You can get a very uniquely looking clock with some of the more advanced techniques (e.g. circle-shaped text, interesting colors and shading, etc....).
|
# You can get a very uniquely looking clock with some of the more advanced techniques (e.g. circle-shaped text, interesting colors and shading, etc....).
|
||||||
|
|
||||||
clock_filter = "-density 100 -font '%CLOCK_FONT_FILE' -pointsize %CLOCK_FONT_SIZE -gravity SouthEast -fill '#00000044' -annotate 0x0+[%HOFFSET+58]+[%VOFFSET+108] '%H:%M' -fill white -annotate 0x0+[%HOFFSET+60]+[%VOFFSET+110] '%H:%M' -font '%DATE_FONT_FILE' -pointsize %DATE_FONT_SIZE -fill '#00000044' -annotate 0x0+[%HOFFSET+58]+[%VOFFSET+58] '%A, %B %d' -fill white -annotate 0x0+[%HOFFSET+60]+[%VOFFSET+60] '%A, %B %d'"
|
clock_filter = "-density 100 -font `fc-match -f '%{file[0]}' '%CLOCK_FONT_NAME'` -pointsize %CLOCK_FONT_SIZE -gravity SouthEast -fill '#00000044' -annotate 0x0+[%HOFFSET+58]+[%VOFFSET+108] '%H:%M' -fill white -annotate 0x0+[%HOFFSET+60]+[%VOFFSET+110] '%H:%M' -font `fc-match -f '%{file[0]}' '%DATE_FONT_NAME'` -pointsize %DATE_FONT_SIZE -fill '#00000044' -annotate 0x0+[%HOFFSET+58]+[%VOFFSET+58] '%A, %B %d' -fill white -annotate 0x0+[%HOFFSET+60]+[%VOFFSET+60] '%A, %B %d'"
|
||||||
|
|
||||||
# Quotes settings
|
# Quotes settings
|
||||||
# quotes_enabled = <True or False>
|
# quotes_enabled = <True or False>
|
||||||
@@ -213,7 +213,6 @@ slideshow_zoom = 0.2
|
|||||||
slideshow_pan = 0.05
|
slideshow_pan = 0.05
|
||||||
name_regex_enabled = False
|
name_regex_enabled = False
|
||||||
name_regex = .*
|
name_regex = .*
|
||||||
change_lock_screen = False
|
|
||||||
|
|
||||||
# List of sources
|
# List of sources
|
||||||
# Each source is srcX = <enabled or not|source type - one of image, folder, flickr, wallhaven, etc.|location>
|
# Each source is srcX = <enabled or not|source type - one of image, folder, flickr, wallhaven, etc.|location>
|
||||||
@@ -224,12 +223,12 @@ change_lock_screen = False
|
|||||||
src1 = True|favorites|The Favorites folder
|
src1 = True|favorites|The Favorites folder
|
||||||
src2 = True|fetched|The Fetched folder
|
src2 = True|fetched|The Fetched folder
|
||||||
src3 = True|folder|/usr/share/backgrounds
|
src3 = True|folder|/usr/share/backgrounds
|
||||||
src4 = True|apod|NASA's Astronomy Picture of the Day
|
src4 = False|flickr|user:www.flickr.com/photos/peter-levi/;user_id:93647178@N00;
|
||||||
src5 = True|bing|Bing Photo of the Day
|
src5 = True|apod|NASA's Astronomy Picture of the Day
|
||||||
src6 = True|earthview|Google Earth View Wallpapers
|
src6 = True|bing|Bing Photo of the Day
|
||||||
src7 = False|unsplash|High-resolution photos from Unsplash.com
|
src7 = True|earthview|Google Earth View Wallpapers
|
||||||
src8 = False|flickr|user:www.flickr.com/photos/peter-levi/;user_id:93647178@N00;
|
src8 = False|natgeo|National Geographic's photo of the day
|
||||||
src9 = False|natgeo|National Geographic's photo of the day
|
src9 = False|unsplash|High-resolution photos from Unsplash.com
|
||||||
|
|
||||||
# Image filters to apply randomly to every wallpaper (ImageMagick is used for this)
|
# Image filters to apply randomly to every wallpaper (ImageMagick is used for this)
|
||||||
# Each filter is filterX = <enabled or not|filter name|arguments to pass to ImageMagick when calling convert>
|
# Each filter is filterX = <enabled or not|filter name|arguments to pass to ImageMagick when calling convert>
|
||||||
|
|||||||
@@ -42,8 +42,6 @@ fi
|
|||||||
# share history between open shells
|
# share history between open shells
|
||||||
setopt share_history
|
setopt share_history
|
||||||
|
|
||||||
setopt HIST_IGNORE_SPACE
|
|
||||||
|
|
||||||
alias boinctui='boinctui --boinchost=localhost'
|
alias boinctui='boinctui --boinchost=localhost'
|
||||||
alias bt='bluetoothctl'
|
alias bt='bluetoothctl'
|
||||||
alias c='clear'
|
alias c='clear'
|
||||||
@@ -104,26 +102,6 @@ if command -v keychain >/dev/null; then
|
|||||||
else
|
else
|
||||||
ssh-add ~/.ssh/id_rsa
|
ssh-add ~/.ssh/id_rsa
|
||||||
fi
|
fi
|
||||||
elif [ -n "$TERMUX_VERSION" ]; then
|
|
||||||
# No keychain/rbw on Termux. Keep a persistent ssh-agent across sessions
|
|
||||||
# (same idea as keychain above) and prompt for the passphrase right here at
|
|
||||||
# shell start instead of waiting for the first `ssh` invocation. To unlock,
|
|
||||||
# long-press the terminal at the "Enter passphrase" prompt below and choose
|
|
||||||
# "Autofill password" to pull it from Bitwarden.
|
|
||||||
termux_ssh_agent_env="$XDG_STATE_HOME/ssh/agent-env"
|
|
||||||
mkdir -p "$(dirname "$termux_ssh_agent_env")"
|
|
||||||
if [ -z "$SSH_AUTH_SOCK" ] && [ -f "$termux_ssh_agent_env" ]; then
|
|
||||||
. "$termux_ssh_agent_env" >/dev/null
|
|
||||||
kill -0 "$SSH_AGENT_PID" 2>/dev/null || unset SSH_AGENT_PID SSH_AUTH_SOCK
|
|
||||||
fi
|
|
||||||
if [ -z "$SSH_AGENT_PID" ]; then
|
|
||||||
ssh-agent -s > "$termux_ssh_agent_env"
|
|
||||||
. "$termux_ssh_agent_env" >/dev/null
|
|
||||||
fi
|
|
||||||
# Only prompts if the agent doesn't already have a key loaded (e.g. from an
|
|
||||||
# earlier session in this same Termux app lifetime).
|
|
||||||
ssh-add -l >/dev/null 2>&1 || ssh-add ~/.ssh/id_rsa
|
|
||||||
unset termux_ssh_agent_env
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Command not found handler
|
# Command not found handler
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
{{ .chezmoi.homeDir }}/.config/agents/AGENTS.md
|
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
current_layer=$(get_plasma_keyboard_layout)
|
||||||
|
#current_layer=$(timeout 0.1s keyd listen | grep -m 1 '^/' | sed 's/^\///')
|
||||||
|
#if [ "$current_layer" = "qwerty" ]; then
|
||||||
|
# current_layer="basic"
|
||||||
|
#fi
|
||||||
|
DOTOOL_XKB_LAYOUT=us DOTOOL_XKB_VARIANT=$current_layer /usr/bin/dotool "$@"
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
|
import dbus
|
||||||
|
|
||||||
|
def get_keyboard_info():
|
||||||
|
bus = dbus.SessionBus()
|
||||||
|
keyboard = bus.get_object('org.kde.keyboard', '/Layouts')
|
||||||
|
keyboard_interface = dbus.Interface(keyboard, dbus_interface='org.kde.KeyboardLayouts')
|
||||||
|
|
||||||
|
layouts_list = keyboard_interface.getLayoutsList()
|
||||||
|
current_layout_index = keyboard_interface.getLayout()
|
||||||
|
|
||||||
|
return layouts_list, current_layout_index
|
||||||
|
|
||||||
|
def set_keyboard_layout_env(layouts_list, current_layout_index):
|
||||||
|
current_layout = layouts_list[current_layout_index]
|
||||||
|
_, _, name = current_layout
|
||||||
|
|
||||||
|
if "Dvorak" in name:
|
||||||
|
keyboard_layout = "dvorak"
|
||||||
|
elif "US" in name:
|
||||||
|
keyboard_layout = "basic"
|
||||||
|
else:
|
||||||
|
keyboard_layout = "unknown"
|
||||||
|
|
||||||
|
return keyboard_layout
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
layouts_list, current_layout_index = get_keyboard_info()
|
||||||
|
keyboard_layout = set_keyboard_layout_env(layouts_list, current_layout_index)
|
||||||
|
print(keyboard_layout)
|
||||||
@@ -20,11 +20,12 @@ echo
|
|||||||
|
|
||||||
# Get unique package names (strip version info)
|
# Get unique package names (strip version info)
|
||||||
for pkg in $(find "$binpkgs_dir" -maxdepth 1 -name '*.xbps' -type f -printf '%f\n' | sed 's/-[0-9].*//' | sort -u); do
|
for pkg in $(find "$binpkgs_dir" -maxdepth 1 -name '*.xbps' -type f -printf '%f\n' | sed 's/-[0-9].*//' | sort -u); do
|
||||||
# Find all versions of this package, sorted by version (newest first)
|
# Find all versions of this package, sorted by modification time (newest first)
|
||||||
# Keep only the first (newest), remove the rest
|
# Keep only the first (newest), remove the rest
|
||||||
find "$binpkgs_dir" -maxdepth 1 -name "${pkg}-[0-9]*.xbps" -type f -printf '%p\n' | \
|
find "$binpkgs_dir" -maxdepth 1 -name "${pkg}-*.xbps" -type f -printf '%T@ %p\n' | \
|
||||||
sort -rV | \
|
sort -rn | \
|
||||||
tail -n +2 | \
|
tail -n +2 | \
|
||||||
|
cut -d' ' -f2- | \
|
||||||
while read -r old_pkg; do
|
while read -r old_pkg; do
|
||||||
echo "Removing: $(basename "$old_pkg")"
|
echo "Removing: $(basename "$old_pkg")"
|
||||||
rm -f "$old_pkg"
|
rm -f "$old_pkg"
|
||||||
|
|||||||
@@ -1,18 +0,0 @@
|
|||||||
// Smart Close: minimize Cisco Secure Client, close everything else.
|
|
||||||
registerShortcut(
|
|
||||||
"SmartCloseWindow",
|
|
||||||
"Smart Close Window (minimize Cisco Secure Client)",
|
|
||||||
"Ctrl+Alt+Shift+F4", // placeholder default; rebind to your real close shortcut
|
|
||||||
function () {
|
|
||||||
var w = workspace.activeWindow;
|
|
||||||
if (!w) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
var cls = String(w.resourceClass).toLowerCase();
|
|
||||||
if (cls.indexOf("secureclient") !== -1) {
|
|
||||||
w.minimized = true;
|
|
||||||
} else {
|
|
||||||
w.closeWindow();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
);
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
{
|
|
||||||
"KPlugin": {
|
|
||||||
"Id": "smartclose",
|
|
||||||
"Name": "Smart Close Window",
|
|
||||||
"Description": "Minimize Cisco Secure Client instead of closing it; close all other windows normally",
|
|
||||||
"Version": "1.0",
|
|
||||||
"Authors": [{ "Name": "dotfiles" }],
|
|
||||||
"EnabledByDefault": true
|
|
||||||
},
|
|
||||||
"KPackageStructure": "KWin/Script",
|
|
||||||
"X-Plasma-API": "javascript",
|
|
||||||
"X-Plasma-MainScript": "code/main.js"
|
|
||||||
}
|
|
||||||
@@ -1,193 +0,0 @@
|
|||||||
### This is a `.properties` [https://en.wikipedia.org/wiki/.properties] file
|
|
||||||
### for termux app properties and is loaded with the `java.util.Properties.load()`
|
|
||||||
### [https://developer.android.com/reference/java/util/Properties#load(java.io.Reader)]
|
|
||||||
### call by the termux app and must be formatted as per its spec.
|
|
||||||
### To make changes to a property value, uncomment the property line by removing
|
|
||||||
### any hash `#` characters at the start of the line.
|
|
||||||
### After making required changes, save the file and run `termux-reload-settings`
|
|
||||||
### in the terminal for changes to take effect. Some properties require app
|
|
||||||
### process to be restarted to be updated which can be done by force stopping
|
|
||||||
### the app from Android app settings.
|
|
||||||
### All information here can also be found on the
|
|
||||||
### wiki: https://wiki.termux.com/wiki/Terminal_Settings
|
|
||||||
|
|
||||||
###############
|
|
||||||
# General
|
|
||||||
###############
|
|
||||||
|
|
||||||
### Allow external applications to execute arbitrary commands within Termux.
|
|
||||||
### This potentially could be a security issue, so option is disabled by
|
|
||||||
### default. Uncomment to enable.
|
|
||||||
# allow-external-apps = true
|
|
||||||
|
|
||||||
### Default working directory that will be used when launching the app.
|
|
||||||
# default-working-directory = /data/data/com.termux/files/home
|
|
||||||
|
|
||||||
### Uncomment to disable toasts shown on terminal session change.
|
|
||||||
# disable-terminal-session-change-toast = true
|
|
||||||
|
|
||||||
### Uncomment to not show soft keyboard on application start.
|
|
||||||
# hide-soft-keyboard-on-startup = true
|
|
||||||
|
|
||||||
### Uncomment to let keyboard toggle button to enable or disable software
|
|
||||||
### keyboard instead of showing/hiding it.
|
|
||||||
# soft-keyboard-toggle-behaviour = enable/disable
|
|
||||||
|
|
||||||
### Adjust terminal scrollback buffer. Max is 50000. May have negative
|
|
||||||
### impact on performance.
|
|
||||||
# terminal-transcript-rows = 2000
|
|
||||||
|
|
||||||
### Uncomment to use volume keys for adjusting volume and not for the
|
|
||||||
### extra keys functionality.
|
|
||||||
# volume-keys = volume
|
|
||||||
|
|
||||||
###############
|
|
||||||
# Fullscreen mode
|
|
||||||
###############
|
|
||||||
|
|
||||||
### Uncomment to let Termux start in full screen mode.
|
|
||||||
# fullscreen = true
|
|
||||||
|
|
||||||
### Uncomment to attempt workaround layout issues when running in
|
|
||||||
### full screen mode.
|
|
||||||
# use-fullscreen-workaround = true
|
|
||||||
|
|
||||||
###############
|
|
||||||
# Cursor
|
|
||||||
###############
|
|
||||||
|
|
||||||
### Cursor blink rate. Values 0, 100 - 2000.
|
|
||||||
# terminal-cursor-blink-rate = 0
|
|
||||||
|
|
||||||
### Cursor style: block, bar, underline.
|
|
||||||
# terminal-cursor-style = block
|
|
||||||
|
|
||||||
###############
|
|
||||||
# Extra keys
|
|
||||||
###############
|
|
||||||
|
|
||||||
# Custom layout (mine)
|
|
||||||
extra-keys = [['TAB','DRAWER','/',':','UP','-','PGUP'],['ESC','CTRL','ALT','LEFT','DOWN','RIGHT','PGDN']]
|
|
||||||
|
|
||||||
### Settings for choosing which set of symbols to use for illustrating keys.
|
|
||||||
### Choose between default, arrows-only, arrows-all, all and none
|
|
||||||
# extra-keys-style = default
|
|
||||||
|
|
||||||
### Force capitalize all text in extra keys row button labels.
|
|
||||||
# extra-keys-text-all-caps = true
|
|
||||||
|
|
||||||
### Default extra-key configuration
|
|
||||||
# extra-keys = [[ESC, TAB, CTRL, ALT, {key: '-', popup: '|'}, DOWN, UP]]
|
|
||||||
|
|
||||||
### Two rows with more keys
|
|
||||||
# extra-keys = [['ESC','/','-','HOME','UP','END','PGUP'], \
|
|
||||||
# ['TAB','CTRL','ALT','LEFT','DOWN','RIGHT','PGDN']]
|
|
||||||
|
|
||||||
### Configuration with additional popup keys (swipe up from an extra key)
|
|
||||||
# extra-keys = [[ \
|
|
||||||
# {key: ESC, popup: {macro: "CTRL f d", display: "tmux exit"}}, \
|
|
||||||
# {key: CTRL, popup: {macro: "CTRL f BKSP", display: "tmux ←"}}, \
|
|
||||||
# {key: ALT, popup: {macro: "CTRL f TAB", display: "tmux →"}}, \
|
|
||||||
# {key: TAB, popup: {macro: "ALT a", display: A-a}}, \
|
|
||||||
# {key: LEFT, popup: HOME}, \
|
|
||||||
# {key: DOWN, popup: PGDN}, \
|
|
||||||
# {key: UP, popup: PGUP}, \
|
|
||||||
# {key: RIGHT, popup: END}, \
|
|
||||||
# {macro: "ALT j", display: A-j, popup: {macro: "ALT g", display: A-g}}, \
|
|
||||||
# {key: KEYBOARD, popup: {macro: "CTRL d", display: exit}} \
|
|
||||||
# ]]
|
|
||||||
|
|
||||||
### Another configuration with advanced popup key usage designed for more
|
|
||||||
### specific use-cases. In this case, it is designed for working with Vim-like
|
|
||||||
### editors for faster navigation
|
|
||||||
#extra-keys = [ \
|
|
||||||
# [ \
|
|
||||||
# { key: ESC, popup: { macro: ":q\n", display: "QuickExit" } }, \
|
|
||||||
# { key: '/', popup: '\\\\' }, \
|
|
||||||
# { key: '-', popup: '_' }, \
|
|
||||||
# { key: HOME, popup: { macro: "CTRL HOME", display: "Top" } }, \
|
|
||||||
# { key: UP, popup: { macro: "CTRL UP", display: "UP" } }, \
|
|
||||||
# { key: END, popup: { macro: "CTRL END", display: "End" } }, \
|
|
||||||
# { key: ":", popup: ";" }, \
|
|
||||||
# { key: "(", popup: "{" } \
|
|
||||||
# ], \
|
|
||||||
# [ \
|
|
||||||
# { key: TAB, popup: { macro: ":wq\n", display: "Write And Exit" } }, \
|
|
||||||
# { key: CTRL, popup: { macro: ":w\n", display: "Write" } }, \
|
|
||||||
# ALT, \
|
|
||||||
# { key: LEFT, popup: { macro: "CTRL LEFT", display: "Left" } }, \
|
|
||||||
# { key: DOWN, popup: { macro: "CTRL DOWN", display: "Bottom" } }, \
|
|
||||||
# { key: RIGHT, popup: { macro: "CTRL RIGHT", display: "Right" } }, \
|
|
||||||
# { key: "#", popup: "$" }, \
|
|
||||||
# { key: ")", popup: "}" } \
|
|
||||||
# ] \
|
|
||||||
#]
|
|
||||||
|
|
||||||
###############
|
|
||||||
# Colors/themes
|
|
||||||
###############
|
|
||||||
|
|
||||||
### Force black colors for drawer and dialogs
|
|
||||||
# use-black-ui = true
|
|
||||||
|
|
||||||
###############
|
|
||||||
# HW keyboard shortcuts
|
|
||||||
###############
|
|
||||||
|
|
||||||
### Disable hardware keyboard shortcuts.
|
|
||||||
# disable-hardware-keyboard-shortcuts = true
|
|
||||||
|
|
||||||
### Open a new terminal with ctrl + t (volume down + t)
|
|
||||||
# shortcut.create-session = ctrl + t
|
|
||||||
|
|
||||||
### Go one session down with (for example) ctrl + 2
|
|
||||||
# shortcut.next-session = ctrl + 2
|
|
||||||
|
|
||||||
### Go one session up with (for example) ctrl + 1
|
|
||||||
# shortcut.previous-session = ctrl + 1
|
|
||||||
|
|
||||||
### Rename a session with (for example) ctrl + n
|
|
||||||
# shortcut.rename-session = ctrl + n
|
|
||||||
|
|
||||||
###############
|
|
||||||
# Bell key
|
|
||||||
###############
|
|
||||||
|
|
||||||
### Vibrate device (default).
|
|
||||||
# bell-character = vibrate
|
|
||||||
|
|
||||||
### Beep with a sound.
|
|
||||||
# bell-character = beep
|
|
||||||
|
|
||||||
### Ignore bell character.
|
|
||||||
# bell-character = ignore
|
|
||||||
|
|
||||||
###############
|
|
||||||
# Back key
|
|
||||||
###############
|
|
||||||
|
|
||||||
### Send the Escape key.
|
|
||||||
# back-key=escape
|
|
||||||
|
|
||||||
### Hide keyboard or leave app (default).
|
|
||||||
# back-key=back
|
|
||||||
|
|
||||||
###############
|
|
||||||
# Keyboard issue workarounds
|
|
||||||
###############
|
|
||||||
|
|
||||||
### Letters might not appear until enter is pressed on Samsung devices
|
|
||||||
# enforce-char-based-input = true
|
|
||||||
|
|
||||||
### ctrl+space (for marking text in emacs) does not work on some devices
|
|
||||||
# ctrl-space-workaround = true
|
|
||||||
|
|
||||||
###############
|
|
||||||
# Terminal Margin adjustments
|
|
||||||
###############
|
|
||||||
|
|
||||||
### Horizontal (left/right) Margin
|
|
||||||
# terminal-margin-horizontal=3
|
|
||||||
|
|
||||||
### Vertical (top/bottom) Margin
|
|
||||||
# terminal-margin-vertical=0
|
|
||||||
Reference in new issue
Block a user