Skip to content

Commit 027717b

Browse files
author
Stephan Badragan
committed
fixing jdtls and other random configs after moving to new box
1 parent 2dcb5b4 commit 027717b

File tree

11 files changed

+5144
-6947
lines changed

11 files changed

+5144
-6947
lines changed

.config/git-hooks/prepare-commit-msg

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
#!/usr/bin/env python3
2+
3+
import sys, os, re, subprocess
4+
5+
# Collect the parameters
6+
commit_msg_filepath = sys.argv[1]
7+
if len(sys.argv) > 2:
8+
commit_type = sys.argv[2]
9+
else:
10+
commit_type = ''
11+
if len(sys.argv) > 3:
12+
commit_hash = sys.argv[3]
13+
else:
14+
commit_hash = ''
15+
16+
# print("prepare-commit-msg: File: %s\nType: %s\nHash: %s" % (commit_msg_filepath, commit_type, commit_hash))
17+
18+
# Figure out which branch we're on
19+
try:
20+
branch = subprocess.check_output(['git', 'symbolic-ref', '--short', 'HEAD'], stderr=subprocess.DEVNULL).strip().decode()
21+
except subprocess.CalledProcessError as e:
22+
branch = ""
23+
# print("prepare-commit-msg: On branch '%s'" % branch)
24+
25+
# Populate the commit message with the issue #, if there is one
26+
jira_id_search = re.search(r"\b[A-Z]+-\d+\b", branch)
27+
# print("jira_id_search" , jira_id_search)
28+
jira_id = jira_id_search.group(0) if jira_id_search != None else None
29+
# print("jira_id: '%s'" % jira_id)
30+
if commit_type != 'merge' and jira_id:
31+
with open(commit_msg_filepath, 'r+') as f:
32+
content = f.read()
33+
first_line = content.partition('\n')[0]
34+
if jira_id not in first_line:
35+
f.seek(0, 0)
36+
f.write("%s %s" % (jira_id, content))

.config/karabiner.edn

+24-4
Original file line numberDiff line numberDiff line change
@@ -179,13 +179,33 @@
179179
[:!Cs :!CSy] ; set status
180180
]}
181181

182-
{:des "chrome shortcut override" :rules [
183-
[:condi :google-chrome-app]
182+
{:des "chrome/brave shortcut override" :rules [
183+
[:condi :chrome-browser-apps]
184+
184185
[:!CSi :!COi] ; Open dev tools
185-
[:!Cleft_arrow :!Ch] ; tab prev
186-
[:!Cright_arrow :!Cl] ; tab next
186+
187+
; tab nav
188+
[:!Cleft_arrow :!Tpage_up] ; tab prev
189+
[:!Cright_arrow :!Tpage_down] ; tab next
190+
[:!Ch :!Tpage_up] ; tab prev
191+
[:!Cl :!Tpage_down] ; tab next
192+
193+
; tab move
194+
[:!CSleft_arrow :!TSpage_up] ; tab prev
195+
[:!CSright_arrow :!TSpage_down] ; tab next
196+
[:!CSh :!TSpage_up] ; tab prev
197+
[:!CSl :!TSpage_down] ; tab next
198+
199+
; tab close
200+
[:!Cd :!Cw]
201+
202+
; tab history
203+
[:!Cw :!Copen_bracket]
204+
[:!Ce :!Cclose_bracket]
205+
[:!Cu :!CSt]
187206
]}
188207

208+
189209
{:des "text snippets mode" :rules [
190210
[:condi :kinesis-keyboard]
191211
[:end ["snippet-mode" 1] ["snippet-mode" 0] {:afterup ["snippet-mode" 0]}]

0 commit comments

Comments
 (0)