Compare commits

42 Commits

Author SHA1 Message Date
Ivar Fatland 72935ac389 swap alt and windows key for meeting room keyboard 2026-08-21 09:00:17 +02:00
Ivar Fatland 00224acc15 add btop and xplr tui floating windows in tmux config 2026-08-19 13:38:09 +02:00
Ivar Fatland 46f5116347 delete questions 2026-08-18 08:55:53 +02:00
Ivar Fatland 2115aff639 notes 2026-08-18 08:55:34 +02:00
Ivar Fatland 21c90c6d03 Merge branch 'master' of ssh://git.roodletoof.org:2222/roodletoof/dotfiles 2026-08-17 08:55:58 +02:00
Ivar Fatland 8e11d7ed04 karabinder updated version 2026-08-17 08:55:57 +02:00
roodletoof b497e885ee TEMP: questions 2026-08-17 01:11:35 +02:00
roodletoof 9d3f3d04af switch to rofi launcher 2026-08-16 02:24:40 +02:00
roodletoof 62e518fbe2 Merge branch 'master' of ssh://git.roodletoof.org:2222/roodletoof/dotfiles 2026-08-11 22:38:51 +02:00
roodletoof ebf8ad121b change font to comic code ligatures 2026-08-11 22:38:26 +02:00
Ivar Fatland 9a9064d173 set font to Comic Code Ligatures 2026-08-11 10:06:14 +02:00
Ivar Fatland d30901f052 open kitty as the default terminal on macbook 2026-08-10 09:48:29 +02:00
Ivar Fatland 54706440cd Merge branch 'master' of ssh://git.roodletoof.org:2222/roodletoof/dotfiles 2026-08-10 09:47:22 +02:00
Ivar Fatland 1ca2f10f09 add kitty config 2026-08-10 09:45:13 +02:00
roodletoof 4b31754f09 remove confirmation of closing kitty terminal 2026-08-07 03:21:46 +02:00
roodletoof 55c5238c74 remove fullscreen and floating disable 2026-08-06 19:25:26 +02:00
roodletoof 870ce279c6 some kitty config 2026-08-06 19:25:07 +02:00
roodletoof 79780f3c50 switch back to kitty terminal 2026-07-31 00:22:21 +02:00
roodletoof 3dcbfe7d27 make most keybinds silent 2026-07-31 00:19:38 +02:00
roodletoof 7687fd009a add keybind to go to pwd in vim 2026-07-31 00:19:29 +02:00
roodletoof c106245c14 update colors
re-align colors
2026-07-30 12:43:21 +02:00
roodletoof 8a85e3cf8b Merge branch 'master' of https://git.roodletoof.org/roodletoof/dotfiles 2026-07-29 15:13:58 +00:00
roodletoof aa12f22983 solid black bg instead
This reverts commit 502cb22980.

solid black bg
2026-07-29 12:57:52 +02:00
roodletoof 502cb22980 remove bg 2026-07-29 12:51:55 +02:00
roodletoof 48de7e5e24 add sync to features (did nothing though) 2026-07-29 12:51:37 +02:00
Ivar Fatland 45f6d6a81a add functionn keys as keyboard commands by default 2026-07-27 01:48:00 +02:00
Ivar Fatland f73f515a67 Revert "rename kanata.kbd to config.kbd"
This reverts commit 7d607c4d27.
2026-07-26 23:13:08 +02:00
Ivar Fatland 7d607c4d27 rename kanata.kbd to config.kbd 2026-07-26 23:09:26 +02:00
Ivar Fatland a3e07bc877 backup apparently updated 2026-07-26 22:36:30 +02:00
Ivar Fatland a7507bb431 sorta kinda working on strings for cmenu. being lazy 2026-07-23 00:18:08 +02:00
Ivar Fatland afda89797a remove the clock to the right 2026-07-23 00:17:03 +02:00
Ivar Fatland e29fd6214f add preview into active sessions 2026-07-22 23:56:30 +02:00
Ivar Fatland 4e87bcfb43 Revert "remove auto-complete and snippy"
This reverts commit d5feef4ddc.
2026-07-22 23:41:22 +02:00
Ivar Fatland 815e31186b carabiner backup 2026-07-22 23:40:39 +02:00
Ivar Fatland d7bc73010d add convenient completion key combo c-k 2026-07-19 17:28:07 +02:00
Ivar Fatland d5feef4ddc remove auto-complete and snippy
foobar
2026-07-19 17:27:49 +02:00
Ivar Fatland c9914b7827 changes in API design 2026-07-18 00:10:14 +02:00
Ivar Fatland 3ec40ce451 embed gohufont 2026-07-18 00:10:04 +02:00
Ivar Fatland 22b6e5a39e updated karabiner config apparently 2026-07-18 00:09:48 +02:00
roodletoof 02f2aa88ad whatevs 2026-07-17 16:20:18 +02:00
roodletoof 510fb5530c ignore some .vim files 2026-07-05 12:10:37 +00:00
roodletoof 5cd7ec9d9e only activate condition if mason-registry is installed 2026-07-05 12:10:21 +00:00
26 changed files with 9857 additions and 210 deletions
+2
View File
@@ -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
View File
@@ -1 +1 @@
open -n -a "alacritty.app" open -n -a "kitty.app"
Binary file not shown.
Binary file not shown.
+6814
View File
File diff suppressed because it is too large Load Diff
+2
View File
@@ -0,0 +1,2 @@
tag:
ctags --langmap=c:.c.h --languages=c -R .
+33 -18
View File
@@ -4,6 +4,8 @@
#include <stdint.h> #include <stdint.h>
#include <stdbool.h> #include <stdbool.h>
#include "utf.h"
typedef struct Color { typedef struct Color {
uint8_t r, g, b; uint8_t r, g, b;
} Color; } Color;
@@ -22,30 +24,43 @@ typedef enum Key {
Count_Key Count_Key
} Key; } Key;
bool KeyIsDown(Key key); bool KeyPressed(Key key);
bool KeyIsUp(Key key); bool InputGetNextPrintable(CodePoint const *out_key);
bool KeyIsJustPressedOrRepeat(Key key);
bool KeyIsJustPressed(Key key);
bool KeyIsJustReleased(Key key);
bool InputGetNextPrintable(char const *out_key);
typedef struct Screen { typedef struct Cell {
void *handle; CodePoint character;
} Screen; Color foreground;
Color background;
} Cell;
typedef struct Window { typedef struct Window {
int width; int width;
int height; int height;
void *handle; Cell *cells;
Screen screen;
} Window; } Window;
Screen ScreenGetFocused(); typedef struct PlatformState {
int ScreenGetWidth(Screen screen); Window *prev;
int ScreenGetHeight(Screen screen); Window *curr;
// Make a window specifically suitable for tools like launchers. } PlatformState;
// Always on top, not resizable, closes on lost focus.
Window ScreenMakeStaticWindow(int x, int y, int width, int height); // Options for the backend. These options don't necessarily apply for all platforms.
void WindowClear(Color color); 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 */ #endif /* PLATFORM */
+43
View File
@@ -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
View File
@@ -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
View File
@@ -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;
}
+9
View File
@@ -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
View File
@@ -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
}
} }
+2 -2
View File
@@ -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
+4
View File
@@ -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"
}
}
]
}
@@ -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" }
@@ -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" }
@@ -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" }
@@ -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
+5 -1
View File
@@ -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 = {
+10
View File
@@ -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
View File
@@ -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
View File
@@ -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