mirror of
https://github.com/js0ny/dotfiles.git
synced 2025-12-21 16:53:00 +00:00
Sync from Windows
This commit is contained in:
parent
1804960bfc
commit
73f008458a
8 changed files with 85 additions and 25 deletions
|
|
@ -108,7 +108,8 @@ global g_ControlRepeatDetected := false
|
||||||
~*^F9::
|
~*^F9::
|
||||||
~*^F10::
|
~*^F10::
|
||||||
~*^F11::
|
~*^F11::
|
||||||
~*^F12:: {
|
~*^F12::
|
||||||
|
{
|
||||||
global g_AbortSendEsc
|
global g_AbortSendEsc
|
||||||
g_AbortSendEsc := true
|
g_AbortSendEsc := true
|
||||||
}
|
}
|
||||||
|
|
|
||||||
43
platforms/win/ahk/Tab.ahk
Normal file
43
platforms/win/ahk/Tab.ahk
Normal file
|
|
@ -0,0 +1,43 @@
|
||||||
|
#Requires AutoHotkey v2.0
|
||||||
|
#SingleInstance Force
|
||||||
|
|
||||||
|
Tab Up:: Send '{Tab ' (A_PriorKey = 'Tab' ? 1 : times) '}'
|
||||||
|
Tab:: global times := ''
|
||||||
|
|
||||||
|
#HotIf GetKeyState('Tab', 'P')
|
||||||
|
h::Left
|
||||||
|
n::Down
|
||||||
|
e::Up
|
||||||
|
i::Right
|
||||||
|
H::Home
|
||||||
|
I::End
|
||||||
|
u::PgUp
|
||||||
|
d::PgDn
|
||||||
|
1::F1
|
||||||
|
2::F2
|
||||||
|
3::F3
|
||||||
|
4::F4
|
||||||
|
5::F5
|
||||||
|
6::F6
|
||||||
|
7::F7
|
||||||
|
8::F8
|
||||||
|
9::F9
|
||||||
|
0::F10
|
||||||
|
-::F11
|
||||||
|
=::F12
|
||||||
|
+:: global times .= ThisHotkey
|
||||||
|
#HotIf
|
||||||
|
|
||||||
|
Enter Up:: Send '{Enter ' (A_PriorKey = 'Enter' ? 1 : times) '}'
|
||||||
|
Enter:: global times := ''
|
||||||
|
|
||||||
|
#HotIf GetKeyState('Enter', 'P')
|
||||||
|
b:: {
|
||||||
|
Run("vivaldi.exe")
|
||||||
|
}
|
||||||
|
t:: {
|
||||||
|
Run("wezterm-gui.exe")
|
||||||
|
}
|
||||||
|
c:: {
|
||||||
|
Run("code.exe")
|
||||||
|
}
|
||||||
|
|
@ -189,7 +189,7 @@ const mapLists = {
|
||||||
e: "k",
|
e: "k",
|
||||||
i: "l",
|
i: "l",
|
||||||
// l <-> i
|
// l <-> i
|
||||||
l: "i",
|
l: "gi", // Focus on first input box by default
|
||||||
L: "I",
|
L: "I",
|
||||||
// k <-> n
|
// k <-> n
|
||||||
k: "n",
|
k: "n",
|
||||||
|
|
@ -209,7 +209,7 @@ const mapLists = {
|
||||||
// gh/gi -> Prev/Next History
|
// gh/gi -> Prev/Next History
|
||||||
gh: "S",
|
gh: "S",
|
||||||
gi: "D",
|
gi: "D",
|
||||||
gl: "gi", // Focus on first input box
|
gl: "i", // Use `gl` to search and focus on input box
|
||||||
// t -> Open Link in New Tab
|
// t -> Open Link in New Tab
|
||||||
t: "gf",
|
t: "gf",
|
||||||
// 缩放
|
// 缩放
|
||||||
|
|
@ -322,7 +322,7 @@ searchAliases.forEach(([alias, name, url]) => {
|
||||||
// #region Site-specific
|
// #region Site-specific
|
||||||
|
|
||||||
// This is a global keymap
|
// This is a global keymap
|
||||||
mapkey(",s", "[s]hare without parameter", function () {
|
mapkey("yY", "yank link without parameter", function () {
|
||||||
const url = new URL(window.location.href);
|
const url = new URL(window.location.href);
|
||||||
Clipboard.write(url.origin + url.pathname);
|
Clipboard.write(url.origin + url.pathname);
|
||||||
});
|
});
|
||||||
|
|
@ -359,11 +359,11 @@ mapkey(",e", "Edit last input", function () {
|
||||||
var btn = qs("div.ds-icon-button");
|
var btn = qs("div.ds-icon-button");
|
||||||
btn[btn.length - 5].click();
|
btn[btn.length - 5].click();
|
||||||
}, { domain: /chat.deepseek.com/ });
|
}, { domain: /chat.deepseek.com/ });
|
||||||
mapkey(",y", "Yank last oupput", function () {
|
mapkey(",y", "[y]ank last oupput", function () {
|
||||||
var btn = qs("div.ds-icon-button");
|
var btn = qs("div.ds-icon-button");
|
||||||
btn[btn.length - 4].click();
|
btn[btn.length - 4].click();
|
||||||
}, { domain: /chat.deepseek.com/ });
|
}, { domain: /chat.deepseek.com/ });
|
||||||
mapkey(",r", "Regenerate last output", function () {
|
mapkey(",r", "[r]egenerate last output", function () {
|
||||||
var btn = qs("div.ds-icon-button");
|
var btn = qs("div.ds-icon-button");
|
||||||
btn[btn.length - 3].click();
|
btn[btn.length - 3].click();
|
||||||
}, { domain: /chat.deepseek.com/ });
|
}, { domain: /chat.deepseek.com/ });
|
||||||
|
|
@ -425,7 +425,8 @@ mapkey(",p", "Switch to GitHub Page", function () {
|
||||||
repo = href.split("/")[4];
|
repo = href.split("/")[4];
|
||||||
window.location.href = gh.pageLink(owner, repo);
|
window.location.href = gh.pageLink(owner, repo);
|
||||||
}, { domain: /github.com/ });
|
}, { domain: /github.com/ });
|
||||||
mapkey(",r", "Copy short [r]efeference owner/repo", function () {
|
/// This might be useful for Vim plugins
|
||||||
|
mapkey(",y", "[y]ank short refeference owner/repo", function () {
|
||||||
const href = window.location.href;
|
const href = window.location.href;
|
||||||
owner = href.split("/")[3];
|
owner = href.split("/")[3];
|
||||||
repo = href.split("/")[4];
|
repo = href.split("/")[4];
|
||||||
|
|
@ -475,10 +476,7 @@ mapkey(",S", "Open Source in GitHub (New Page)", function () {
|
||||||
/**
|
/**
|
||||||
* 0 - 网络
|
* 0 - 网络
|
||||||
* 1 - 学术
|
* 1 - 学术
|
||||||
* 2 - 数学
|
* 2 - 社交
|
||||||
* 3 - 写作
|
|
||||||
* 4 - 视频
|
|
||||||
* 5 - 社交
|
|
||||||
*/
|
*/
|
||||||
const perplexityFocusOn = function (n) {
|
const perplexityFocusOn = function (n) {
|
||||||
q("div.rounded-md").querySelectorAll("span")[1].click()
|
q("div.rounded-md").querySelectorAll("span")[1].click()
|
||||||
|
|
@ -492,7 +490,7 @@ mapkey(",b", "Add Perplexity [b]ookmark", function () {
|
||||||
q("div.sticky.left-0").querySelectorAll("button")[2].click()
|
q("div.sticky.left-0").querySelectorAll("button")[2].click()
|
||||||
}, { domain: /perplexity.ai/ });
|
}, { domain: /perplexity.ai/ });
|
||||||
mapkey(",w", "Toggle [w]riting/[w]eb Search", function () {
|
mapkey(",w", "Toggle [w]riting/[w]eb Search", function () {
|
||||||
perplexityFocusOn(3);
|
perplexityFocusOn(0);
|
||||||
}, { domain: /perplexity.ai/ });
|
}, { domain: /perplexity.ai/ });
|
||||||
mapkey(",s", "[s]tart Generating", function () {
|
mapkey(",s", "[s]tart Generating", function () {
|
||||||
var btns = qs("span.grow button");
|
var btns = qs("span.grow button");
|
||||||
|
|
@ -502,7 +500,7 @@ mapkey(",y", "[y]ank Last Output", function () {
|
||||||
var toolbars = qs("div.mt-sm");
|
var toolbars = qs("div.mt-sm");
|
||||||
var last = toolbars[toolbars.length - 1];
|
var last = toolbars[toolbars.length - 1];
|
||||||
var btns = last.querySelectorAll("button");
|
var btns = last.querySelectorAll("button");
|
||||||
btns[4].click();
|
btns[5].click();
|
||||||
}, { domain: /perplexity.ai/ });
|
}, { domain: /perplexity.ai/ });
|
||||||
mapkey(",r", "Change model to [r]egenerate last output", function () {
|
mapkey(",r", "Change model to [r]egenerate last output", function () {
|
||||||
var toolbars = qs("div.mt-sm");
|
var toolbars = qs("div.mt-sm");
|
||||||
|
|
|
||||||
|
|
@ -20,4 +20,5 @@
|
||||||
;; Swap ; and :
|
;; Swap ; and :
|
||||||
(map! :leader
|
(map! :leader
|
||||||
";" #'execute-extended-command
|
";" #'execute-extended-command
|
||||||
":" #'pp-eval-expression)
|
":" #'pp-eval-expression
|
||||||
|
"f h" #'consult-recent-file)
|
||||||
|
|
|
||||||
|
|
@ -178,7 +178,7 @@
|
||||||
;;zig ; C, but simpler
|
;;zig ; C, but simpler
|
||||||
|
|
||||||
:email
|
:email
|
||||||
(mu4e +org +gmail)
|
;;(mu4e +org +gmail)
|
||||||
;;notmuch
|
;;notmuch
|
||||||
;;(wanderlust +gmail)
|
;;(wanderlust +gmail)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@
|
||||||
|
|
||||||
;;
|
;;
|
||||||
|
|
||||||
(setq org-todo-keywords '((sequence "TODO(t)" "NEXT(n)" "WAIT(w@/!)" "|" "DONE(d!)" "CANCELLED(c@)")
|
(setq org-todo-keywords '((sequence "TODO(t)" "NEXT(n)" "WAIT(w@/!)" "|" "DONE(d@/!)" "CANCELLED(c@)")
|
||||||
(sequence "[ ](T)" "[-](P)" "[?](Q)" "|" "[X](D)")))
|
(sequence "[ ](T)" "[-](P)" "[?](Q)" "|" "[X](D)")))
|
||||||
|
|
||||||
;; Keymaps
|
;; Keymaps
|
||||||
|
|
@ -40,7 +40,9 @@
|
||||||
(setq org-capture-templates
|
(setq org-capture-templates
|
||||||
'(("t" "Task" entry (file+headline "~/OrgFiles/tasks/inbox.org" "Tasks")
|
'(("t" "Task" entry (file+headline "~/OrgFiles/tasks/inbox.org" "Tasks")
|
||||||
"* TODO %?\n %U\n %a\n %i"
|
"* TODO %?\n %U\n %a\n %i"
|
||||||
:empty-lines 1)))
|
:empty-lines 1)
|
||||||
|
("n" "Note" entry (file+headline "~/OrgFiles/tasks/inbox.org" "Notes"))
|
||||||
|
))
|
||||||
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -64,3 +66,12 @@
|
||||||
:m "N" #'org-agenda-priority-up
|
:m "N" #'org-agenda-priority-up
|
||||||
:m "E" #'org-agenda-priority-down
|
:m "E" #'org-agenda-priority-down
|
||||||
:m "i" #'evil-forward-char)
|
:m "i" #'evil-forward-char)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
;; (use-package! org-download
|
||||||
|
;; :after org
|
||||||
|
;; :custom
|
||||||
|
;; (setq org-download-screenshot-method
|
||||||
|
;; "pwsh.exe -File 'D:\\script.ps1'")
|
||||||
|
;; )
|
||||||
|
|
|
||||||
7
tools/doom/snippets/org-mode/unnumbered
Normal file
7
tools/doom/snippets/org-mode/unnumbered
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
# -*- mode: snippet -*-
|
||||||
|
# name: unnumbered
|
||||||
|
# key: unnumbered
|
||||||
|
# --
|
||||||
|
:PROPERTIES:
|
||||||
|
:UNNUMBERED: t
|
||||||
|
:END:
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
local mode_arrow = { "n", "v", "s", "x" }
|
local mode_arrow = { "n", "v", "s", "x", "o" }
|
||||||
|
|
||||||
local keymaps_basic = { -- Modification of Original Keymap - Colemak
|
local keymaps_basic = { -- Modification of Original Keymap - Colemak
|
||||||
-- https://github.com/LazyVim/LazyVim/blob/d1529f650fdd89cb620258bdeca5ed7b558420c7/lua/lazyvim/config/keymaps.lua#L8
|
-- https://github.com/LazyVim/LazyVim/blob/d1529f650fdd89cb620258bdeca5ed7b558420c7/lua/lazyvim/config/keymaps.lua#L8
|
||||||
|
|
@ -56,17 +56,16 @@ local keymaps_basic = { -- Modification of Original Keymap - Colemak
|
||||||
{ mode = mode_arrow, keys = "i", cmd = "l", opts = { desc = "Right", silent = true } },
|
{ mode = mode_arrow, keys = "i", cmd = "l", opts = { desc = "Right", silent = true } },
|
||||||
{ keys = "H", cmd = ":bprevious<CR>", opts = { desc = "Previous Buffer" } },
|
{ keys = "H", cmd = ":bprevious<CR>", opts = { desc = "Previous Buffer" } },
|
||||||
{ keys = "I", cmd = ":bnext<CR>", opts = { desc = "Next Buffer" } },
|
{ keys = "I", cmd = ":bnext<CR>", opts = { desc = "Next Buffer" } },
|
||||||
{ keys = "N", cmd = "5j", opts = { desc = "Up 5 Lines" } },
|
{ mode = mode_arrow, keys = "N", cmd = "5j", opts = { desc = "Up 5 Lines" } },
|
||||||
{ keys = "E", cmd = "5e", opts = { desc = "Down 5 Lines" } },
|
{ mode = mode_arrow, keys = "E", cmd = "5e", opts = { desc = "Down 5 Lines" } },
|
||||||
{ keys = "Y", cmd = "y$", opts = { desc = "Yank to End of Line" } },
|
{ keys = "Y", cmd = "y$", opts = { desc = "Yank to End of Line" } },
|
||||||
{ keys = "E", cmd = "5k" },
|
{ keys = "E", cmd = "5k" },
|
||||||
-- Text object implementation
|
|
||||||
{ mode = { "n", "o", "x" }, keys = "l", cmd = "i", opts = { desc = "Insert" } },
|
{ mode = { "n", "o", "x" }, keys = "l", cmd = "i", opts = { desc = "Insert" } },
|
||||||
{ keys = "L", cmd = "I", opts = { desc = "Insert at Start of Line" } },
|
{ keys = "L", cmd = "I", opts = { desc = "Insert at Start of Line" } },
|
||||||
{ keys = "k", cmd = "n", opts = { desc = "Next Search" } },
|
{ mode = mode_arrow, keys = "k", cmd = "n", opts = { desc = "Next Search" } },
|
||||||
{ keys = "K", cmd = "N", opts = { desc = "Previous Search" } },
|
{ mode = mode_arrow, keys = "K", cmd = "N", opts = { desc = "Previous Search" } },
|
||||||
{ keys = "j", cmd = "e", opts = { desc = "jump to end of word" } },
|
{ mode = mode_arrow, keys = "j", cmd = "e", opts = { desc = "jump to end of word" } },
|
||||||
{ keys = "J", cmd = "E", opts = { desc = "jump to end of WORD" } },
|
{ mode = mode_arrow, keys = "J", cmd = "E", opts = { desc = "jump to end of WORD" } },
|
||||||
-- https://github.com/LazyVim/LazyVim/blob/d1529f650fdd89cb620258bdeca5ed7b558420c7/lua/lazyvim/config/keymaps.lua#L60
|
-- https://github.com/LazyVim/LazyVim/blob/d1529f650fdd89cb620258bdeca5ed7b558420c7/lua/lazyvim/config/keymaps.lua#L60
|
||||||
{ keys = "<Esc>", cmd = "<Cmd>nohlsearch<Bar>diffupdate<CR>", opts = { desc = "Clear Search Highlight" } },
|
{ keys = "<Esc>", cmd = "<Cmd>nohlsearch<Bar>diffupdate<CR>", opts = { desc = "Clear Search Highlight" } },
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue