dotfiles
bugabingas dorkfiles
owned by bugabinga
Merge branch 'trunk' of github.com:bugabinga/dotfiles into trunk
cb2ab56c4d8d23500de50579f301904998b979c6
Oliver Jan Krylow <oliver@bugabinga.net> ·
unsigned
Browse filesCompare with HEAD
Changed files (4)
bootstripper.java
Modified 5 5 import java.
nio.
file.
Files;
6 6 import java.
nio.
file.
LinkOption;
7 7 import java.
nio.
file.
Path;
8 -import java.
util.
Comparator;
8 +import java.
util.
List;
9 +import java.
util.
function.
BiFunction;
10 11 class bootstripper {
11 12 public static void main(
String[] arguments)
throws Throwable {
58 59 log(
"Creating symlinks as defined in {0} file.",
59 60 emphasize_local(symlinks_file.getFileName().toString()));
60 61 var lines
= Files.readAllLines(symlinks_file);
61 - String source
= null;
62 - String target
= null;
63 - for (
String line
: lines) {
70 - if (target
!= null) {
71 - link(root, source, target);
62 + for_each_mapping(lines, (source, target)
-> link(root, source, target));
78 65 static void delete_symlinks(
Path root,
Path symlinks_file) throws
Throwable {
79 66 log(
"Deleting symlinks as defined in {0} file.",
80 67 emphasize_local(symlinks_file.getFileName().toString()));
82 68 var lines
= Files.readAllLines(symlinks_file);
83 - String source
= null;
84 - String target
= null;
85 - for (
String line
: lines) {
92 - if (target
!= null) {
93 - delete(root, source, target);
69 + for_each_mapping(lines, (source, target)
-> delete(root, source, target));
100 72 static void delete(
Path root,
String source,
String target) throws
Throwable {
219 191 static void log(
String message,
Object... arguments) {
220 192 System.out.println(format(message, arguments));
195 + static interface ThrowUp<A, B> {
196 + default Throwable gurgh(
A a,
B b) {
200 + }
catch (
Throwable vomit) {
205 + void apply(
A a,
B b)
throws Throwable;
208 + static void for_each_mapping(
List<
String> lines,
ThrowUp<
String,
String> block)
210 + String source
= null;
211 + String target
= null;
212 + for (
String line
: lines) {
213 + if (line.isBlank())
215 + if (source
== null)
219 + if (target
!= null) {
220 + var vomit
= block.gurgh(source, target);
wezterm/bugabinga/key_binds.lua
Modified 1 1 local wez
= require 'wezterm' 2 -local leader
= {
key =
'Grave',
mods =
'CTRL' }
2 +local leader
= {
key =
'raw:255'}
4 4 local resize_pane_mode
= 'ﭕ Resize Pane Mode' 5 5 local activate_pane_mode
= ' Activate Pane Mode' 20 - mods =
'LEADER|CTRL',
21 - action = wez.action.ActivateKeyTable {
22 - name = activate_pane_mode,
156 148 {
key =
'Escape',
action =
'PopKeyTable' },
157 149 {
key =
'Enter',
action =
'PopKeyTable' },
159 - [activate_pane_mode]
= {
160 - {
key =
'LeftArrow',
action = wez.action.ActivatePaneDirection
'Left' },
161 - {
key =
'h',
action = wez.action.ActivatePaneDirection
'Left' },
163 - {
key =
'RightArrow',
action = wez.action.ActivatePaneDirection
'Right' },
164 - {
key =
'l',
action = wez.action.ActivatePaneDirection
'Right' },
166 - {
key =
'UpArrow',
action = wez.action.ActivatePaneDirection
'Up' },
167 - {
key =
'k',
action = wez.action.ActivatePaneDirection
'Up' },
169 - {
key =
'DownArrow',
action = wez.action.ActivatePaneDirection
'Down' },
170 - {
key =
'j',
action = wez.action.ActivatePaneDirection
'Down' },
173 - {
key =
'Escape',
action =
'PopKeyTable' },
174 - {
key =
'Enter',
action =
'PopKeyTable' },
176 151 [font_size_mode]
= {
177 152 {
key =
'+',
action = wez.action.IncreaseFontSize },
178 153 {
key =
'-',
action = wez.action.DecreaseFontSize },
wezterm/bugabinga/status.lua
Modified 5 5 local zoomed = function(pane)
6 6 local tab
= pane:tab()
7 7 local any_is_zoomed
= false 8 - for _, info
in ipairs(tab:panes_with_info())
do 9 - if info.is_zoomed
then 10 - any_is_zoomed
= true 9 + for _, info
in ipairs(tab:panes_with_info())
do 10 + if info.is_zoomed
then 11 + any_is_zoomed
= true 13 15 return any_is_zoomed
and '🔎 Zoomed Pane' .. DELIMITER
or '' wezterm/wezterm.lua
Modified 29 + debug_key_events =
true,
29 32 font_size = font_size,
30 33 warn_about_missing_glyphs =
false,
31 34 color_scheme = dark_mode,
32 35 color_schemes = nugu,
36 + window_background_opacity =
1.0,
39 + default_cwd = wez.home_dir,
33 40 default_prog = {
'nu',
'--login',
'--interactive' },
34 41 default_cursor_style =
'SteadyBlock',
35 42 cursor_blink_rate =
0,
36 - cursor_thickness =
'1.0cell',
43 + cursor_thickness =
'0.6cell',
37 44 window_decorations = window_decorations,
38 45 enable_tab_bar =
true,