Compare commits
45 Commits
140db87dd6
..
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 72935ac389 | |||
| 00224acc15 | |||
| 46f5116347 | |||
| 2115aff639 | |||
| 21c90c6d03 | |||
| 8e11d7ed04 | |||
| b497e885ee | |||
| 9d3f3d04af | |||
| 62e518fbe2 | |||
| ebf8ad121b | |||
| 9a9064d173 | |||
| d30901f052 | |||
| 54706440cd | |||
| 1ca2f10f09 | |||
| 4b31754f09 | |||
| 55c5238c74 | |||
| 870ce279c6 | |||
| 79780f3c50 | |||
| 3dcbfe7d27 | |||
| 7687fd009a | |||
| c106245c14 | |||
| 8a85e3cf8b | |||
| aa12f22983 | |||
| 502cb22980 | |||
| 48de7e5e24 | |||
| 45f6d6a81a | |||
| f73f515a67 | |||
| 7d607c4d27 | |||
| a3e07bc877 | |||
| a7507bb431 | |||
| afda89797a | |||
| e29fd6214f | |||
| 4e87bcfb43 | |||
| 815e31186b | |||
| d7bc73010d | |||
| d5feef4ddc | |||
| c9914b7827 | |||
| 3ec40ce451 | |||
| 22b6e5a39e | |||
| 02f2aa88ad | |||
| 9186d50d6d | |||
| 20aedb5caf | |||
| 4d2d6e0803 | |||
| 510fb5530c | |||
| 5cd7ec9d9e |
@@ -9,3 +9,5 @@ st-0.9.2/x.o
|
|||||||
karabiner-ts-config/node_modules
|
karabiner-ts-config/node_modules
|
||||||
__pycache__
|
__pycache__
|
||||||
tags
|
tags
|
||||||
|
vim/.vim/view
|
||||||
|
vim/.vim/.netrwhist
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
open -n -a "alacritty.app"
|
open -n -a "kitty.app"
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,2 @@
|
|||||||
|
tag:
|
||||||
|
ctags --langmap=c:.c.h --languages=c -R .
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// Opens a fuzzy finding window with the given array of strings.
|
||||||
|
// Returns the index of the picked element.
|
||||||
|
// Returns -1 on no selection.
|
||||||
|
int picker(char const *strings, int strings_len, char const *prompt) {
|
||||||
|
}
|
||||||
@@ -0,0 +1,66 @@
|
|||||||
|
#ifndef PLATFORM
|
||||||
|
#define PLATFORM
|
||||||
|
|
||||||
|
#include <stdint.h>
|
||||||
|
#include <stdbool.h>
|
||||||
|
|
||||||
|
#include "utf.h"
|
||||||
|
|
||||||
|
typedef struct Color {
|
||||||
|
uint8_t r, g, b;
|
||||||
|
} Color;
|
||||||
|
|
||||||
|
#define WHITE ((Color){255,255,255})
|
||||||
|
#define BLACK ((Color){0,0,0})
|
||||||
|
|
||||||
|
typedef enum Key {
|
||||||
|
Key_backspace,
|
||||||
|
Key_ctrl,
|
||||||
|
Key_enter,
|
||||||
|
Key_h,
|
||||||
|
Key_n,
|
||||||
|
Key_p,
|
||||||
|
Key_y,
|
||||||
|
Count_Key
|
||||||
|
} Key;
|
||||||
|
|
||||||
|
bool KeyPressed(Key key);
|
||||||
|
bool InputGetNextPrintable(CodePoint const *out_key);
|
||||||
|
|
||||||
|
typedef struct Cell {
|
||||||
|
CodePoint character;
|
||||||
|
Color foreground;
|
||||||
|
Color background;
|
||||||
|
} Cell;
|
||||||
|
|
||||||
|
typedef struct Window {
|
||||||
|
int width;
|
||||||
|
int height;
|
||||||
|
Cell *cells;
|
||||||
|
} Window;
|
||||||
|
|
||||||
|
typedef struct PlatformState {
|
||||||
|
Window *prev;
|
||||||
|
Window *curr;
|
||||||
|
} PlatformState;
|
||||||
|
|
||||||
|
// Options for the backend. These options don't necessarily apply for all platforms.
|
||||||
|
typedef struct PlatformOpts {
|
||||||
|
float window_width_fraction; // decide the width of the window as a fraction of the total resolution. for gui backends
|
||||||
|
float window_height_fraction; // decide the height of the window as a fraction of the total resolution. for gui backends
|
||||||
|
} PlatformOpts;
|
||||||
|
|
||||||
|
PlatformOpts WindowCreateOptsDefault();
|
||||||
|
Window *WindowCreate(PlatformOpts opts);
|
||||||
|
void WindowClear(Window *window, Color color);
|
||||||
|
void WindowFlip(Window *window);
|
||||||
|
|
||||||
|
void PlatformInit(PlatformOpts opts);
|
||||||
|
int PlatformGetWidth();
|
||||||
|
int PlatformGetHeight();
|
||||||
|
|
||||||
|
// TODO: the platform layer would really update the keys being pressed, and
|
||||||
|
// receive a diff in the form of actions. print this line from here and change
|
||||||
|
// colors at these points.
|
||||||
|
|
||||||
|
#endif /* PLATFORM */
|
||||||
+43
@@ -0,0 +1,43 @@
|
|||||||
|
#include <stddef.h>
|
||||||
|
|
||||||
|
#include "str.h"
|
||||||
|
|
||||||
|
static bool intToIndex(String string, int i, size_t *out_index) {
|
||||||
|
int val = 0;
|
||||||
|
bool is_ok = true;
|
||||||
|
if (i >= 0) {
|
||||||
|
val = i;
|
||||||
|
} else {
|
||||||
|
val = string.size + 1 + i;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (val < 0) {
|
||||||
|
val = 0;
|
||||||
|
is_ok = false;
|
||||||
|
} else if (val > string.size) {
|
||||||
|
val = string.size;
|
||||||
|
is_ok = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
*out_index = val;
|
||||||
|
return is_ok;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool StringSub(String string, int start, int end, String *out_substr) {
|
||||||
|
|
||||||
|
size_t start_index = 0;
|
||||||
|
bool start_ok = intToIndex(string, start, &start_index);
|
||||||
|
size_t end_index = 0;
|
||||||
|
bool end_ok = intToIndex(string, end, &end_index);
|
||||||
|
|
||||||
|
if (string.size == 0 || start_index >= end_index) {
|
||||||
|
out_substr->size=0;
|
||||||
|
out_substr->buffer=NULL;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
out_substr->buffer = &string.buffer[start_index];
|
||||||
|
out_substr->size = end_index - start_index;
|
||||||
|
|
||||||
|
return start_ok && end_ok;
|
||||||
|
}
|
||||||
+10
@@ -0,0 +1,10 @@
|
|||||||
|
#include <stddef.h>
|
||||||
|
|
||||||
|
typedef struct String {
|
||||||
|
unsigned char const *buffer;
|
||||||
|
size_t size;
|
||||||
|
} String;
|
||||||
|
|
||||||
|
#define STRING(content) ((String){.buffer=#content, .size=sizeof(#content)-1})
|
||||||
|
|
||||||
|
bool StringSub(String string, int start, int end, String *out_substr);
|
||||||
+65
@@ -0,0 +1,65 @@
|
|||||||
|
#include <stddef.h>
|
||||||
|
|
||||||
|
#include "utf.h"
|
||||||
|
#include "str.h"
|
||||||
|
|
||||||
|
typedef struct Utf8Parser {
|
||||||
|
String str;
|
||||||
|
} Utf8Parser;
|
||||||
|
|
||||||
|
bool Utf8ParserNextCodePoint(Utf8Parser *this, CodePoint *out_codepoint) {
|
||||||
|
uitn8_t const flag_1_bytes = 0;
|
||||||
|
uint8_t const mask_1_bytes = 1 << 7;
|
||||||
|
|
||||||
|
uint8_t const flag_continuation = mask_1_bytes;
|
||||||
|
uint8_t const mask_continuation = (1 << 7) | (1 << 6);
|
||||||
|
|
||||||
|
uint8_t const flag_2_bytes = mask_continuation;
|
||||||
|
uint8_t const mask_2_bytes = (1 << 7) | (1 << 6) | (1 << 5);
|
||||||
|
|
||||||
|
uint8_t const flag_3_bytes = mask_2_bytes;
|
||||||
|
uint8_t const mask_3_bytes = (1 << 7) | (1 << 6) | (1 << 5) | (1 << 4);
|
||||||
|
|
||||||
|
uint8_t const flag_4_bytes = mask_3_bytes;
|
||||||
|
uint8_t const mask_4_bytes = (1 << 7) | (1 << 6) | (1 << 5) | (1 << 4) | (1 << 3);
|
||||||
|
|
||||||
|
if (this->str.size == 0) {
|
||||||
|
*out_codepoint = 0;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((this->str.buffer[0] & mask_1_bytes) == flag_1_bytes) {
|
||||||
|
*out_codepoint = (CodePoint) str[0];
|
||||||
|
bool ok = StringSub(this->str, 1, -1, &this->str);
|
||||||
|
assert(ok && "has to be ok since the size is not 0");
|
||||||
|
return ok;
|
||||||
|
} else
|
||||||
|
}
|
||||||
|
|
||||||
|
// max must be less than or equal to the capacity of target.
|
||||||
|
bool CodePointsFromUtf8String(
|
||||||
|
uint8_t const *str,
|
||||||
|
CodePoint *target,
|
||||||
|
int max
|
||||||
|
) {
|
||||||
|
|
||||||
|
for (size_t i = 0; str[i] != '\0' && max > 0;) {
|
||||||
|
if ((str[i] & mask_1_bytes) == flag_1_bytes) {
|
||||||
|
*target = (CodePoint) str[i];
|
||||||
|
|
||||||
|
target += 1;
|
||||||
|
max -= 1;
|
||||||
|
i += 1;
|
||||||
|
} else
|
||||||
|
if ((str[i] & mask_2_bytes) == flag_2_bytes) {
|
||||||
|
} else
|
||||||
|
if ((str[i] & mask_3_bytes) == flag_3_bytes) {
|
||||||
|
} else
|
||||||
|
if ((str[i] & mask_4_bytes) == flag_4_bytes) {
|
||||||
|
} else {
|
||||||
|
false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
#ifndef UTF
|
||||||
|
#define UTF
|
||||||
|
|
||||||
|
typedef uint32_t CodePoint;
|
||||||
|
|
||||||
|
int CodePointsFromUtf8String(char const *str, CodePoint *target, unsigned int max);
|
||||||
|
|
||||||
|
#endif // UTF
|
||||||
|
|
||||||
+11
-3
@@ -4,11 +4,9 @@ set $left h
|
|||||||
set $down j
|
set $down j
|
||||||
set $up k
|
set $up k
|
||||||
set $right l
|
set $right l
|
||||||
set $term alacritty
|
set $term kitty
|
||||||
set $just just --justfile ~/.config/i3/justfile
|
set $just just --justfile ~/.config/i3/justfile
|
||||||
|
|
||||||
for_window [class=".*"] fullscreen disable
|
|
||||||
for_window [class=".*"] floating disable
|
|
||||||
floating_minimum_size -1 x -1
|
floating_minimum_size -1 x -1
|
||||||
floating_maximum_size -1 x -1
|
floating_maximum_size -1 x -1
|
||||||
|
|
||||||
@@ -135,7 +133,17 @@ bindsym --release XF86MonBrightnessUp exec --no-startup-id brightnessctl set 5%+
|
|||||||
# Screenshot (use scrot instead of grim)
|
# Screenshot (use scrot instead of grim)
|
||||||
bindsym Print exec scrot ~/Pictures/screenshot-%Y-%m-%d-%H%M%S.png
|
bindsym Print exec scrot ~/Pictures/screenshot-%Y-%m-%d-%H%M%S.png
|
||||||
|
|
||||||
|
|
||||||
|
#class border background text indicator child_border
|
||||||
|
client.focused #ffffff #ffffff #000000 #ffffff #ffffff
|
||||||
|
|
||||||
# Status bar (use i3bar + i3status)
|
# Status bar (use i3bar + i3status)
|
||||||
bar {
|
bar {
|
||||||
status_command i3status
|
status_command i3status
|
||||||
|
|
||||||
|
colors {
|
||||||
|
#class border background text
|
||||||
|
focused_workspace #ffffff #ffffff #000000
|
||||||
|
inactive_workspace #333333 #333333 #ffffff
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,9 +3,9 @@ choose-monitor:
|
|||||||
just reset-wallpaper
|
just reset-wallpaper
|
||||||
|
|
||||||
reset-wallpaper:
|
reset-wallpaper:
|
||||||
feh --bg-fill ~/.wallpaper/
|
xsetroot -solid black
|
||||||
|
|
||||||
program-picker:
|
program-picker:
|
||||||
dmenu_run -p 'start program'
|
rofi -show drun
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
)
|
)
|
||||||
|
|
||||||
(defsrc ;;{{{1
|
(defsrc ;;{{{1
|
||||||
|
f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12
|
||||||
grv 1 2 3 4 5 6 7 8 9 0 - = bspc
|
grv 1 2 3 4 5 6 7 8 9 0 - = bspc
|
||||||
tab q w e r t y u i o p [ ] \
|
tab q w e r t y u i o p [ ] \
|
||||||
caps a s d f g h j k l ; ' ret
|
caps a s d f g h j k l ; ' ret
|
||||||
@@ -13,6 +14,7 @@
|
|||||||
)
|
)
|
||||||
|
|
||||||
(deflayer default ;;{{{1
|
(deflayer default ;;{{{1
|
||||||
|
brdn brup bldn blup f5 f6 prev pp next mute vold volu
|
||||||
grv 1 2 3 4 5 6 7 8 9 0 - = bspc
|
grv 1 2 3 4 5 6 7 8 9 0 - = bspc
|
||||||
tab q w e r t y u i o p [ ] \
|
tab q w e r t y u i o p [ ] \
|
||||||
@cap a s d f g h j k l ; ' ret
|
@cap a s d f g h j k l ; ' ret
|
||||||
@@ -21,6 +23,7 @@
|
|||||||
)
|
)
|
||||||
|
|
||||||
(deflayer gaming ;;{{{1
|
(deflayer gaming ;;{{{1
|
||||||
|
f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12
|
||||||
esc 1 2 3 4 5 6 7 8 9 0 - = bspc
|
esc 1 2 3 4 5 6 7 8 9 0 - = bspc
|
||||||
tab q w e r t y u i o p [ ] \
|
tab q w e r t y u i o p [ ] \
|
||||||
XX a s d f g h j k l ; ' ret
|
XX a s d f g h j k l ; ' ret
|
||||||
@@ -29,6 +32,7 @@
|
|||||||
)
|
)
|
||||||
|
|
||||||
(deflayer symbols ;;{{{1
|
(deflayer symbols ;;{{{1
|
||||||
|
f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12
|
||||||
grv @1 @2 @3 @4 @5 @6 @7 @8 @9 @0 _ _ bspc
|
grv @1 @2 @3 @4 @5 @6 @7 @8 @9 @0 _ _ bspc
|
||||||
tab @` @m[ @m] @& @| @^ @_ @m- @+ @m= @nor _ lrld
|
tab @` @m[ @m] @& @| @^ @_ @m- @+ @m= @nor _ lrld
|
||||||
@cap @~ @bl @br @* @m\ bspc ret @? tab @: S-' ret
|
@cap @~ @bl @br @* @m\ bspc ret @? tab @: S-' ret
|
||||||
|
|||||||
@@ -1,118 +0,0 @@
|
|||||||
{
|
|
||||||
"profiles": [
|
|
||||||
{
|
|
||||||
"complex_modifications": {
|
|
||||||
"rules": [
|
|
||||||
{
|
|
||||||
"description": "dual purpose modifiers",
|
|
||||||
"manipulators": [
|
|
||||||
{
|
|
||||||
"from": {
|
|
||||||
"key_code": "spacebar",
|
|
||||||
"modifiers": { "optional": ["any"] }
|
|
||||||
},
|
|
||||||
"to": [
|
|
||||||
{
|
|
||||||
"key_code": "left_shift",
|
|
||||||
"lazy": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"to_if_alone": [{ "key_code": "spacebar" }],
|
|
||||||
"type": "basic"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"from": {
|
|
||||||
"key_code": "caps_lock",
|
|
||||||
"modifiers": { "optional": ["any"] }
|
|
||||||
},
|
|
||||||
"to": [
|
|
||||||
{
|
|
||||||
"key_code": "left_control",
|
|
||||||
"lazy": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"to_if_alone": [{ "key_code": "escape" }],
|
|
||||||
"type": "basic"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"description": "swap alt and cmd",
|
|
||||||
"enabled": false,
|
|
||||||
"manipulators": [
|
|
||||||
{
|
|
||||||
"from": { "key_code": "left_option" },
|
|
||||||
"to": [{ "key_code": "left_command" }],
|
|
||||||
"type": "basic"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"from": { "key_code": "left_command" },
|
|
||||||
"to": [{ "key_code": "left_option" }],
|
|
||||||
"type": "basic"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"name": "KarabinerTS",
|
|
||||||
"selected": true,
|
|
||||||
"virtual_hid_keyboard": { "keyboard_type_v2": "iso" }
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Default profile",
|
|
||||||
"virtual_hid_keyboard": {
|
|
||||||
"country_code": 0,
|
|
||||||
"keyboard_type_v2": "ansi"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"complex_modifications": {
|
|
||||||
"rules": [
|
|
||||||
{
|
|
||||||
"description": "Caps Lock to ESC on tap/Left control on hold",
|
|
||||||
"manipulators": [
|
|
||||||
{
|
|
||||||
"from": {
|
|
||||||
"key_code": "caps_lock",
|
|
||||||
"modifiers": { "optional": ["any"] }
|
|
||||||
},
|
|
||||||
"to": [
|
|
||||||
{
|
|
||||||
"key_code": "left_control",
|
|
||||||
"lazy": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"to_if_alone": [{ "key_code": "escape" }],
|
|
||||||
"type": "basic"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"description": "Space to shift on hold",
|
|
||||||
"manipulators": [
|
|
||||||
{
|
|
||||||
"from": {
|
|
||||||
"key_code": "spacebar",
|
|
||||||
"modifiers": { "optional": ["any"] }
|
|
||||||
},
|
|
||||||
"to": [
|
|
||||||
{
|
|
||||||
"key_code": "left_shift",
|
|
||||||
"lazy": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"to_if_alone": [{ "key_code": "spacebar" }],
|
|
||||||
"type": "basic"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"name": "Modified profile",
|
|
||||||
"virtual_hid_keyboard": {
|
|
||||||
"country_code": 0,
|
|
||||||
"keyboard_type_v2": "iso"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
+15
-15
@@ -35,24 +35,24 @@
|
|||||||
"type": "basic"
|
"type": "basic"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
|
||||||
{
|
|
||||||
"description": "swap alt and cmd",
|
|
||||||
"manipulators": [
|
|
||||||
{
|
|
||||||
"from": { "key_code": "left_option" },
|
|
||||||
"to": [{ "key_code": "left_command" }],
|
|
||||||
"type": "basic"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"from": { "key_code": "left_command" },
|
|
||||||
"to": [{ "key_code": "left_option" }],
|
|
||||||
"type": "basic"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"devices": [
|
||||||
|
{
|
||||||
|
"identifiers": {
|
||||||
|
"is_keyboard": true,
|
||||||
|
"product_id": 21042,
|
||||||
|
"vendor_id": 1155
|
||||||
|
},
|
||||||
|
"simple_modifications": [
|
||||||
|
{
|
||||||
|
"from": { "key_code": "grave_accent_and_tilde" },
|
||||||
|
"to": [{ "key_code": "non_us_backslash" }]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
"name": "KarabinerTS",
|
"name": "KarabinerTS",
|
||||||
"selected": true,
|
"selected": true,
|
||||||
"virtual_hid_keyboard": { "keyboard_type_v2": "iso" }
|
"virtual_hid_keyboard": { "keyboard_type_v2": "iso" }
|
||||||
+15
-15
@@ -35,24 +35,24 @@
|
|||||||
"type": "basic"
|
"type": "basic"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
|
||||||
{
|
|
||||||
"description": "swap alt and cmd",
|
|
||||||
"manipulators": [
|
|
||||||
{
|
|
||||||
"from": { "key_code": "left_option" },
|
|
||||||
"to": [{ "key_code": "left_command" }],
|
|
||||||
"type": "basic"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"from": { "key_code": "left_command" },
|
|
||||||
"to": [{ "key_code": "left_option" }],
|
|
||||||
"type": "basic"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"devices": [
|
||||||
|
{
|
||||||
|
"identifiers": {
|
||||||
|
"is_keyboard": true,
|
||||||
|
"product_id": 21042,
|
||||||
|
"vendor_id": 1155
|
||||||
|
},
|
||||||
|
"simple_modifications": [
|
||||||
|
{
|
||||||
|
"from": { "key_code": "grave_accent_and_tilde" },
|
||||||
|
"to": [{ "key_code": "non_us_backslash" }]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
"name": "KarabinerTS",
|
"name": "KarabinerTS",
|
||||||
"selected": true,
|
"selected": true,
|
||||||
"virtual_hid_keyboard": { "keyboard_type_v2": "iso" }
|
"virtual_hid_keyboard": { "keyboard_type_v2": "iso" }
|
||||||
+15
-15
@@ -35,24 +35,24 @@
|
|||||||
"type": "basic"
|
"type": "basic"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
|
||||||
{
|
|
||||||
"description": "swap alt and cmd",
|
|
||||||
"manipulators": [
|
|
||||||
{
|
|
||||||
"from": { "key_code": "left_option" },
|
|
||||||
"to": [{ "key_code": "left_command" }],
|
|
||||||
"type": "basic"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"from": { "key_code": "left_command" },
|
|
||||||
"to": [{ "key_code": "left_option" }],
|
|
||||||
"type": "basic"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"devices": [
|
||||||
|
{
|
||||||
|
"identifiers": {
|
||||||
|
"is_keyboard": true,
|
||||||
|
"product_id": 21042,
|
||||||
|
"vendor_id": 1155
|
||||||
|
},
|
||||||
|
"simple_modifications": [
|
||||||
|
{
|
||||||
|
"from": { "key_code": "grave_accent_and_tilde" },
|
||||||
|
"to": [{ "key_code": "non_us_backslash" }]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
"name": "KarabinerTS",
|
"name": "KarabinerTS",
|
||||||
"selected": true,
|
"selected": true,
|
||||||
"virtual_hid_keyboard": { "keyboard_type_v2": "iso" }
|
"virtual_hid_keyboard": { "keyboard_type_v2": "iso" }
|
||||||
+15
-15
@@ -35,24 +35,24 @@
|
|||||||
"type": "basic"
|
"type": "basic"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
|
||||||
{
|
|
||||||
"description": "swap alt and cmd",
|
|
||||||
"manipulators": [
|
|
||||||
{
|
|
||||||
"from": { "key_code": "left_option" },
|
|
||||||
"to": [{ "key_code": "left_command" }],
|
|
||||||
"type": "basic"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"from": { "key_code": "left_command" },
|
|
||||||
"to": [{ "key_code": "left_option" }],
|
|
||||||
"type": "basic"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"devices": [
|
||||||
|
{
|
||||||
|
"identifiers": {
|
||||||
|
"is_keyboard": true,
|
||||||
|
"product_id": 21042,
|
||||||
|
"vendor_id": 1155
|
||||||
|
},
|
||||||
|
"simple_modifications": [
|
||||||
|
{
|
||||||
|
"from": { "key_code": "grave_accent_and_tilde" },
|
||||||
|
"to": [{ "key_code": "non_us_backslash" }]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
"name": "KarabinerTS",
|
"name": "KarabinerTS",
|
||||||
"selected": true,
|
"selected": true,
|
||||||
"virtual_hid_keyboard": { "keyboard_type_v2": "iso" }
|
"virtual_hid_keyboard": { "keyboard_type_v2": "iso" }
|
||||||
@@ -0,0 +1,117 @@
|
|||||||
|
{
|
||||||
|
"profiles": [
|
||||||
|
{
|
||||||
|
"complex_modifications": {
|
||||||
|
"rules": [
|
||||||
|
{
|
||||||
|
"description": "dual purpose modifiers",
|
||||||
|
"manipulators": [
|
||||||
|
{
|
||||||
|
"from": {
|
||||||
|
"key_code": "spacebar",
|
||||||
|
"modifiers": { "optional": ["any"] }
|
||||||
|
},
|
||||||
|
"to": [
|
||||||
|
{
|
||||||
|
"key_code": "left_shift",
|
||||||
|
"lazy": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"to_if_alone": [{ "key_code": "spacebar" }],
|
||||||
|
"type": "basic"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": {
|
||||||
|
"key_code": "caps_lock",
|
||||||
|
"modifiers": { "optional": ["any"] }
|
||||||
|
},
|
||||||
|
"to": [
|
||||||
|
{
|
||||||
|
"key_code": "left_control",
|
||||||
|
"lazy": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"to_if_alone": [{ "key_code": "escape" }],
|
||||||
|
"type": "basic"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"devices": [
|
||||||
|
{
|
||||||
|
"identifiers": {
|
||||||
|
"is_keyboard": true,
|
||||||
|
"product_id": 21042,
|
||||||
|
"vendor_id": 1155
|
||||||
|
},
|
||||||
|
"simple_modifications": [
|
||||||
|
{
|
||||||
|
"from": { "key_code": "grave_accent_and_tilde" },
|
||||||
|
"to": [{ "key_code": "non_us_backslash" }]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"name": "KarabinerTS",
|
||||||
|
"selected": true,
|
||||||
|
"virtual_hid_keyboard": { "keyboard_type_v2": "iso" }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Default profile",
|
||||||
|
"virtual_hid_keyboard": {
|
||||||
|
"country_code": 0,
|
||||||
|
"keyboard_type_v2": "ansi"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"complex_modifications": {
|
||||||
|
"rules": [
|
||||||
|
{
|
||||||
|
"description": "Caps Lock to ESC on tap/Left control on hold",
|
||||||
|
"manipulators": [
|
||||||
|
{
|
||||||
|
"from": {
|
||||||
|
"key_code": "caps_lock",
|
||||||
|
"modifiers": { "optional": ["any"] }
|
||||||
|
},
|
||||||
|
"to": [
|
||||||
|
{
|
||||||
|
"key_code": "left_control",
|
||||||
|
"lazy": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"to_if_alone": [{ "key_code": "escape" }],
|
||||||
|
"type": "basic"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "Space to shift on hold",
|
||||||
|
"manipulators": [
|
||||||
|
{
|
||||||
|
"from": {
|
||||||
|
"key_code": "spacebar",
|
||||||
|
"modifiers": { "optional": ["any"] }
|
||||||
|
},
|
||||||
|
"to": [
|
||||||
|
{
|
||||||
|
"key_code": "left_shift",
|
||||||
|
"lazy": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"to_if_alone": [{ "key_code": "spacebar" }],
|
||||||
|
"type": "basic"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"name": "Modified profile",
|
||||||
|
"virtual_hid_keyboard": {
|
||||||
|
"country_code": 0,
|
||||||
|
"keyboard_type_v2": "iso"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -51,6 +51,23 @@
|
|||||||
"to": [{ "key_code": "non_us_backslash" }]
|
"to": [{ "key_code": "non_us_backslash" }]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"identifiers": {
|
||||||
|
"is_keyboard": true,
|
||||||
|
"product_id": 8467,
|
||||||
|
"vendor_id": 16700
|
||||||
|
},
|
||||||
|
"simple_modifications": [
|
||||||
|
{
|
||||||
|
"from": { "key_code": "left_option" },
|
||||||
|
"to": [{ "key_code": "left_command" }]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": { "key_code": "left_command" },
|
||||||
|
"to": [{ "key_code": "left_option" }]
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"name": "KarabinerTS",
|
"name": "KarabinerTS",
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -47,6 +47,7 @@ vim.cmd [=[
|
|||||||
nnoremap ,x <C-x>
|
nnoremap ,x <C-x>
|
||||||
nnoremap ,rl :checktime<CR>
|
nnoremap ,rl :checktime<CR>
|
||||||
nnoremap ,m :wa<CR>:make<CR>
|
nnoremap ,m :wa<CR>:make<CR>
|
||||||
|
inoremap <c-k> <c-x>
|
||||||
|
|
||||||
nnoremap ,cD :call setqflist(filter(getqflist(), 'v:val != getqflist()[getqflist({"idx": 0}).idx - 1]'))<CR>
|
nnoremap ,cD :call setqflist(filter(getqflist(), 'v:val != getqflist()[getqflist({"idx": 0}).idx - 1]'))<CR>
|
||||||
|
|
||||||
@@ -597,7 +598,10 @@ require'lazy'.setup{ --{{{1
|
|||||||
'williamboman/mason.nvim',
|
'williamboman/mason.nvim',
|
||||||
},
|
},
|
||||||
cond = function()
|
cond = function()
|
||||||
local mason_registry = require'mason-registry'
|
local ok, mason_registry = pcall(require, 'mason-registry')
|
||||||
|
if not ok then
|
||||||
|
return false
|
||||||
|
end
|
||||||
return mason_registry.is_installed('roslyn')
|
return mason_registry.is_installed('roslyn')
|
||||||
end,
|
end,
|
||||||
opts = {
|
opts = {
|
||||||
|
|||||||
@@ -166,7 +166,7 @@ func Picker(options []string, pickerOptions ...PickerOption) (choiceIdx int, ok
|
|||||||
func initialize(nOptions int) {
|
func initialize(nOptions int) {
|
||||||
rl.SetTraceLogLevel(rl.LogError)
|
rl.SetTraceLogLevel(rl.LogError)
|
||||||
rl.InitWindow(0, 0, "raymenu")
|
rl.InitWindow(0, 0, "raymenu")
|
||||||
rl.SetWindowState(rl.FlagWindowUndecorated)
|
rl.SetWindowState(rl.FlagWindowUndecorated | rl.FlagWindowTopmost)
|
||||||
rl.SetTargetFPS(
|
rl.SetTargetFPS(
|
||||||
int32(
|
int32(
|
||||||
rl.GetMonitorRefreshRate(
|
rl.GetMonitorRefreshRate(
|
||||||
|
|||||||
@@ -92,6 +92,12 @@ func main() {
|
|||||||
}
|
}
|
||||||
slices.Sort(seshNames)
|
slices.Sort(seshNames)
|
||||||
|
|
||||||
|
printSeshContents := func(name string) (content string, ok bool) {
|
||||||
|
cmd := exec.Command(tmux, "capture-pane", "-epN", "-t", name)
|
||||||
|
stdout, err := cmd.Output()
|
||||||
|
return string(stdout), err == nil
|
||||||
|
}
|
||||||
|
|
||||||
options := []fuzzyfinder.Option{
|
options := []fuzzyfinder.Option{
|
||||||
fuzzyfinder.WithPreviewWindow(
|
fuzzyfinder.WithPreviewWindow(
|
||||||
func(i, width, height int) string {
|
func(i, width, height int) string {
|
||||||
@@ -100,6 +106,10 @@ func main() {
|
|||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
seshName := seshNames[i]
|
seshName := seshNames[i]
|
||||||
|
content, ok := printSeshContents(seshName)
|
||||||
|
if ok {
|
||||||
|
return content
|
||||||
|
}
|
||||||
windows, _ := config[seshName]
|
windows, _ := config[seshName]
|
||||||
builder := strings.Builder{}
|
builder := strings.Builder{}
|
||||||
for _, window := range windows {
|
for _, window := range windows {
|
||||||
|
|||||||
+4
-1
@@ -23,6 +23,8 @@ bind-key c-p switch-client -l
|
|||||||
bind c-g popup -E -w 100% -h 100% -d "#{pane_current_path}" -b rounded lazygit
|
bind c-g popup -E -w 100% -h 100% -d "#{pane_current_path}" -b rounded lazygit
|
||||||
bind c-t popup -E -w 100% -h 100% -b rounded -d "#{pane_current_path}"
|
bind c-t popup -E -w 100% -h 100% -b rounded -d "#{pane_current_path}"
|
||||||
bind c-s popup -E -w 100% -h 100% -b rounded "sesh"
|
bind c-s popup -E -w 100% -h 100% -b rounded "sesh"
|
||||||
|
bind c-b popup -E -w 100% -h 100% -b rounded "btop"
|
||||||
|
bind c-f popup -E -w 100% -h 100% -b rounded "xplr"
|
||||||
bind c-x confirm-before -p "Kill current session #S? (y/n)" kill-session
|
bind c-x confirm-before -p "Kill current session #S? (y/n)" kill-session
|
||||||
|
|
||||||
bind j command-prompt -p "Join window:" "join-pane -h -s %1"
|
bind j command-prompt -p "Join window:" "join-pane -h -s %1"
|
||||||
@@ -30,6 +32,7 @@ bind b break-pane
|
|||||||
|
|
||||||
set -g default-terminal "tmux-256color"
|
set -g default-terminal "tmux-256color"
|
||||||
set -as terminal-overrides ",xterm-256color:Tc"
|
set -as terminal-overrides ",xterm-256color:Tc"
|
||||||
|
set -as terminal-features ',xterm-256color:sync'
|
||||||
set -g base-index 1
|
set -g base-index 1
|
||||||
setw -g pane-base-index 1
|
setw -g pane-base-index 1
|
||||||
set -g renumber-windows on
|
set -g renumber-windows on
|
||||||
@@ -46,7 +49,7 @@ set -g status-position top
|
|||||||
set -g status-left-length 100
|
set -g status-left-length 100
|
||||||
set -g status-style "fg=${gray_light},bg=default"
|
set -g status-style "fg=${gray_light},bg=default"
|
||||||
set -g status-left "#[fg=${green_soft},bold] #S #[fg=${gray_light},nobold] | "
|
set -g status-left "#[fg=${green_soft},bold] #S #[fg=${gray_light},nobold] | "
|
||||||
set -g status-right "#[fg=${gray_dark}]%H:%M"
|
set -g status-right ""
|
||||||
set -g window-status-current-format " #[fg=${white},bold]#I.#W "
|
set -g window-status-current-format " #[fg=${white},bold]#I.#W "
|
||||||
set -g window-status-format " #I.#W "
|
set -g window-status-format " #I.#W "
|
||||||
set -g message-style "fg=${gray_medium},bg=default"
|
set -g message-style "fg=${gray_medium},bg=default"
|
||||||
|
|||||||
+7
-6
@@ -62,12 +62,13 @@ set wildignore=*.o,*.obj,.git/**,tags,*.pyc
|
|||||||
set noswapfile
|
set noswapfile
|
||||||
set makeprg=just
|
set makeprg=just
|
||||||
syntax on
|
syntax on
|
||||||
tnoremap <c-w>c <c-\><c-n><c-w>c
|
tnoremap <silent> <c-w>c <c-\><c-n><c-w>c
|
||||||
xnoremap H ^
|
xnoremap <silent> H ^
|
||||||
xnoremap L $
|
xnoremap <silent> L $
|
||||||
nnoremap Q @@
|
nnoremap <silent> Q @@
|
||||||
nnoremap ,m :make<CR>
|
nnoremap <silent> ,m :make<CR>
|
||||||
nnoremap - :E<CR>
|
nnoremap <silent> - :E<CR>
|
||||||
|
nnoremap <silent> _ :execute 'Explore ' . fnameescape(getcwd())<CR>
|
||||||
|
|
||||||
if has('clipboard')
|
if has('clipboard')
|
||||||
set clipboard^=unnamed,unnamedplus
|
set clipboard^=unnamed,unnamedplus
|
||||||
|
|||||||
Reference in New Issue
Block a user