Compare commits
1
Commits
master
..
ae68470a02
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ae68470a02 |
@@ -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()
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
{{ .chezmoi.homeDir }}/.config/agents/AGENTS.md
|
|
||||||
@@ -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)
|
||||||
@@ -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