repositories / dotfiles

dotfiles

bugabingas dorkfiles

owned by bugabinga

Merge branch 'trunk' of github.com:bugabinga/dotfiles into trunk

da17c8dd3ad331826dd69a2605d979148401e614

Oliver Krylow <o.krylow@isp-insoft.de> ·

unsigned

Browse filesCompare with HEAD

Changed files (20)

fedora.symlinks

Modified
67 67 neovim
68 68 ~/.config/nvim
70 +systemd/environment.d
71 +~/.config/systemd/environment.d
73 +hypr
74 +~/.config/hypr
76 +fonts
77 +~/.local/share/fonts

helix/config.toml

Modified
1 -theme = "nugu-light"
1 +theme = "nugu-dark"
3 3 [editor]
4 4 shell = ["nu", "--commands"]

hypr/hyprland.conf

Added
new file mode 100644
1 +# This is an example Hyprland config file.
2 +# Refer to the wiki for more information.
3 +# https://wiki.hyprland.org/Configuring/Configuring-Hyprland/
5 +# Please note not all available settings / options are set here.
6 +# For a full list, see the wiki
8 +# You can split this configuration into multiple files
9 +# Create your files separately and then link them to this file like this:
10 +# source = ~/.config/hypr/myColors.conf
13 +################
14 +### MONITORS ###
15 +################
17 +# See https://wiki.hyprland.org/Configuring/Monitors/
18 +monitor=,preferred,auto,auto
21 +###################
22 +### MY PROGRAMS ###
23 +###################
25 +# See https://wiki.hyprland.org/Configuring/Keywords/
27 +# Set programs that you use
28 +$terminal = wezterm
29 +$fileManager = wezterm start yazi
30 +$menu = wofi --show drun
31 +$browser = firefox
32 +$mail = wezterm start aerc
33 +$picker = hyprpicker
34 +$screenshooter = hyprshot
36 +#################
37 +### AUTOSTART ###
38 +#################
40 +# Autostart necessary processes (like notifications daemons, status bars, etc.)
41 +# Or execute your favorite apps at launch like this:
42 +# TODO: i would much rather prefer to manage such stuff with systemd
44 +# import envirnment.d into Hyprland
45 +exec-once = systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP PATH
46 +exec-once = $terminal
47 +# exec-once = hyprpaper
48 +# exec-once = hypridle
49 +# exec-once = hyprdim
50 +# exec-once = hyprlock
51 +# exec-once=wlsunset -l -23 -L -46
52 +exec-once = mako
54 +# TODO: configure eww
55 +# exec-once = eww daemon
56 +# exec-once = eww open bar
58 +#############################
59 +### ENVIRONMENT VARIABLES ###
60 +#############################
62 +# See https://wiki.hyprland.org/Configuring/Environment-variables/
64 +env = XCURSOR_SIZE,48
65 +env = HYPRCURSOR_SIZE,48
68 +#####################
69 +### LOOK AND FEEL ###
70 +#####################
72 +# TODO: get those nugu colors in here
74 +# Refer to https://wiki.hyprland.org/Configuring/Variables/
76 +# https://wiki.hyprland.org/Configuring/Variables/#general
77 +general {
78 + gaps_in = 4
79 + gaps_out = 16
81 + border_size = 2
83 + # https://wiki.hyprland.org/Configuring/Variables/#variable-types for info about colors
84 + col.active_border = rgba(33ccffee) rgba(00ff99ee) 45deg
85 + col.inactive_border = rgba(595959aa)
87 + # Set to true enable resizing windows by clicking and dragging on borders and gaps
88 + resize_on_border = true
90 + # Please see https://wiki.hyprland.org/Configuring/Tearing/ before you turn this on
91 + allow_tearing = false
93 + layout = dwindle
96 +# https://wiki.hyprland.org/Configuring/Variables/#decoration
97 +decoration {
98 + rounding = 8
100 + # Change transparency of focused and unfocused windows
101 + active_opacity = 1.0
102 + inactive_opacity = 1.0
104 + drop_shadow = true
105 + shadow_range = 4
106 + shadow_render_power = 3
107 + col.shadow = rgba(1a1a1aee)
109 + # https://wiki.hyprland.org/Configuring/Variables/#blur
110 + blur {
111 + enabled = true
112 + size = 3
113 + passes = 1
115 + vibrancy = 0.1696
119 +# https://wiki.hyprland.org/Configuring/Variables/#animations
120 +animations {
121 + enabled = true
123 + # Default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more
125 + bezier = myBezier, 0.05, 0.9, 0.1, 1.05
127 + animation = windows, 1, 7, myBezier
128 + animation = windowsOut, 1, 7, default, popin 80%
129 + animation = border, 1, 10, default
130 + animation = borderangle, 1, 8, default
131 + animation = fade, 1, 7, default
132 + animation = workspaces, 1, 6, default
135 +# See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more
136 +dwindle {
137 + pseudotile = true # Master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
138 + preserve_split = true # You probably want this
141 +# See https://wiki.hyprland.org/Configuring/Master-Layout/ for more
142 +master {
143 + new_is_master = true
146 +# https://wiki.hyprland.org/Configuring/Variables/#misc
147 +misc {
148 + force_default_wallpaper = 0 # Set to 0 or 1 to disable the anime mascot wallpapers
149 + disable_hyprland_logo = true # If true disables the random hyprland logo / anime girl background. :(
153 +#############
154 +### INPUT ###
155 +#############
157 +# https://wiki.hyprland.org/Configuring/Variables/#input
158 +input {
159 + kb_layout = us
160 + kb_variant =
161 + kb_model =
162 + kb_options = caps:none
163 + kb_rules =
165 + follow_mouse = 1
166 + accel_profile = flat
167 + natural_scroll = true
169 + sensitivity = 0 # -1.0 - 1.0, 0 means no modification.
171 + touchpad {
172 + natural_scroll = true
175 + tablet {
176 + # TODO: configure when using wacom tablet
180 +# https://wiki.hyprland.org/Configuring/Variables/#gestures
181 +gestures {
182 + workspace_swipe = false
185 +# Example per-device config
186 +# See https://wiki.hyprland.org/Configuring/Keywords/#per-device-input-configs for more
187 +device {
188 + name = epic-mouse-v1
189 + sensitivity = -0.5
193 +####################
194 +### KEYBINDINGSS ###
195 +####################
197 +# See https://wiki.hyprland.org/Configuring/Keywords/
198 +$mainMod = SUPER # Sets "Windows" key as main modifier
200 +# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more
201 +bind = $mainMod, T, exec, $terminal
202 +bind = $mainMod, E, exec, $fileManager
203 +bind = $mainMod, R, exec, $menu
204 +bind = $mainMod, B, exec, $browser
205 +bind = $mainMod, M, exec, $mail
207 +#bind = CTRL ALT SHIFT,backspace, exit,
208 +bind = CTRL ALT SHIFT,backspace, exec, notify-send exit
209 +bind = $mainMod, W, killactive,
210 +bind = $mainMod, P, pseudo, # dwindle
211 +bind = $mainMod, J, togglesplit, # dwindle
212 +bind = $mainMod, V, togglefloating,
214 +# Move focus with mainMod + arrow keys
215 +bind = $mainMod, H, movefocus, l
216 +bind = $mainMod, L, movefocus, r
217 +bind = $mainMod, K, movefocus, u
218 +bind = $mainMod, J, movefocus, d
220 +# Switch workspaces with mainMod + [0-9]
221 +bind = $mainMod, 1, workspace, 1
222 +bind = $mainMod, 2, workspace, 2
223 +bind = $mainMod, 3, workspace, 3
224 +bind = $mainMod, 4, workspace, 4
225 +bind = $mainMod, 5, workspace, 5
226 +bind = $mainMod, 6, workspace, 6
227 +bind = $mainMod, 7, workspace, 7
228 +bind = $mainMod, 8, workspace, 8
229 +bind = $mainMod, 9, workspace, 9
230 +bind = $mainMod, 0, workspace, 10
232 +# Move active window to a workspace with mainMod + SHIFT + [0-9]
233 +bind = $mainMod SHIFT, 1, movetoworkspace, 1
234 +bind = $mainMod SHIFT, 2, movetoworkspace, 2
235 +bind = $mainMod SHIFT, 3, movetoworkspace, 3
236 +bind = $mainMod SHIFT, 4, movetoworkspace, 4
237 +bind = $mainMod SHIFT, 5, movetoworkspace, 5
238 +bind = $mainMod SHIFT, 6, movetoworkspace, 6
239 +bind = $mainMod SHIFT, 7, movetoworkspace, 7
240 +bind = $mainMod SHIFT, 8, movetoworkspace, 8
241 +bind = $mainMod SHIFT, 9, movetoworkspace, 9
242 +bind = $mainMod SHIFT, 0, movetoworkspace, 10
244 +# Example special workspace (scratchpad)
245 +bind = $mainMod, S, togglespecialworkspace, magic
246 +bind = $mainMod SHIFT, S, movetoworkspace, special:magic
248 +# Scroll through existing workspaces with mainMod + scroll
249 +bind = $mainMod, mouse_down, workspace, e+1
250 +bind = $mainMod, mouse_up, workspace, e-1
252 +# Move/resize windows with mainMod + LMB/RMB and dragging
253 +bindm = $mainMod, mouse:272, movewindow
254 +bindm = $mainMod, mouse:273, resizewindow
256 +# fn buttons
257 +binde=,XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-
258 +binde=,XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+
259 +bind =,XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle
260 +bind =,XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle
261 +binde=,XF86MonBrightnessUp, exec, brightnessctl s 10%+
262 +binde=,XF86MonBrightnessDown, exec, brightnessctl s 10%-
263 +bind =,XF86AudioPlay, exec, playerctl play-pause
264 +bind =,XF86AudioPrev, exec, playerctl previous
265 +bind =,XF86AudioNext, exec, playerctl next
267 +# resize submap (mode)
268 +bind=SUPER,R,submap,resize
269 +submap=resize
270 +binde=,L,resizeactive,40 0
271 +binde=,H,resizeactive,-40 0
272 +binde=,K,resizeactive,0 -40
273 +binde=,J,resizeactive,0 40
274 +bind=,escape,submap,reset
275 +bind=,Return,submap,reset
276 +submap=reset
278 +##############################
279 +### WINDOWS AND WORKSPACES ###
280 +##############################
282 +# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more
283 +# See https://wiki.hyprland.org/Configuring/Workspace-Rules/ for workspace rules
285 +# Example windowrule v1
286 +# windowrule = float, ^(kitty)$
288 +# Example windowrule v2
289 +# windowrulev2 = float,class:^(kitty)$,title:^(kitty)$
291 +windowrulev2 = suppressevent maximize, class:.* # You'll probably like this.
294 +# firefox Picture-in-Picture
295 +windowrulev2 = float,class:^(firefox)$,title:^(Picture-in-Picture)$
296 +windowrulev2 = pin,class:^(firefox)$,title:^(Picture-in-Picture)$
297 +windowrulev2 = fakefullscreen,class:^(firefox)$,title:^(Picture-in-Picture)$
298 +# firefox figma micro indicator
299 +windowrulev2 = fakefullscreen,class:^(firefox)$,title:^(Firefox — Sharing Indicator)$
300 +windowrulev2 = float,class:^(firefox)$,title:^(Firefox — Sharing Indicator)$
302 +# common modals
303 +windowrule = float,title:^(Open)$
304 +windowrule = float,title:^(Choose Files)$
305 +windowrule = float,title:^(Save As)$
306 +windowrule = float,title:^(Confirm to replace files)$
307 +windowrule = float,title:^(File Operation Progress)$
308 +windowrulev2 = float,class:^(google-chrome)$,title:^(Open Files)$
309 +windowrulev2 = float,class:^(google-chrome)$,title:^(Open File)$
311 +# window rules to prevent screen from turning off
312 +windowrule = idleinhibit fullscreen,firefox
313 +windowrule = idleinhibit fullscreen,mpv

neovim/README.md

Modified
39 39 # todo
41 41 * try loading lsp async for better startup perf
42 -* warn if trying to load a lsp client, that has no command
42 +* check out vim-dadbod for sql workflows
43 43 * navic highlights do not fit winbar
44 44 * make highlights more visible when expanding snippets
45 45 * cursor restore position on (session?) load jumps one location to somewhere

neovim/lua/bugabinga/lsp/init.lua

Modified
371 371 description = 'Show incoming calls of symbol under cursor.',
372 372 category = 'lsp',
373 373 buffer = bufnr,
374 - keys = '<leader>lci',
374 + keys = '<leader>lc',
375 375 command = vim.lsp.buf.incoming_calls,
379 379 description = 'Show outgoing calls of symbol under cursor.',
380 380 category = 'lsp',
381 381 buffer = bufnr,
382 - keys = '<leader>lco',
382 + keys = '<leader>lC',
383 383 command = vim.lsp.buf.outgoing_calls,

neovim/lua/bugabinga/options/behaviour.lua

Modified
57 57 -- integrate Nushell with nvim
58 58 vim.opt.shell = 'nu'
59 59 vim.opt.shellcmdflag = '--commands'
60 -vim.opt.shellpipe = '| save %s'
60 +vim.opt.shellpipe = 'out+err>| save %s'
61 61 vim.opt.shellredir = '| save %s'
62 62 vim.opt.shellquote = ''
63 63 vim.opt.shellxquote = ''
93 93 -- ask me to force failed commands
94 94 vim.opt.confirm = true
96 -auto 'load_project_if_available' {
97 - description = 'Loads the project root dir as cwd, if it can be determined from a file path.',
98 - events = { 'FileType', },
99 - pattern = '*',
100 - command = function ( event )
101 - local project = require 'std.project'
102 - local ignored = require 'std.ignored'
103 - local table = require 'std.table'
104 - local buffer = event.buf
105 - local file = event.file
106 - local filetype = vim.api.nvim_buf_get_option( buffer, 'filetype' )
107 - if table.contains( ignored.filetypes, filetype ) then return end
108 - local buftype = vim.api.nvim_buf_get_option( buffer, 'buftype' )
109 - if table.contains( ignored.buftypes, buftype ) then return end
110 - local project_root = project.find_root_by_filetype( file, filetype )
111 - if not project_root then return end
112 - local root = vim.fs.normalize( project_root )
113 - local cwd = vim.fs.normalize( vim.uv.cwd() )
114 - if root and cwd ~= root then
115 - vim.uv.chdir( root )
116 - vim.notify( 'Changed root directory to ' .. root .. ' from ' .. cwd )
117 - debug.print( buffer, file, vim.inspect( filetype ), vim.inspect( buftype ) )
118 - end
119 - end,

neovim/lua/bugabinga/options/keymaps.lua

Modified
166 166 map.normal {
167 167 description = 'Toggle ' .. option_name .. ' option',
168 168 category = 'options',
169 - keys = '<leader>to' .. first_char,
169 + keys = '<leader>t' .. first_char,
170 170 command = function ()
171 171 toggler:toggle()

neovim/lua/bugabinga/plugins/treesitter.lua

Modified
178 178 enable = true,
179 179 disable = should_disable,
180 180 swap_next = {
181 - ['<leader>rwn'] = { query = '@parameter.inner', desc = 'Swap parameter with next', },
181 + ['<leader>rn'] = { query = '@parameter.inner', desc = 'Swap parameter with next', },
183 183 swap_previous = {
184 - ['<leader>rwp'] = { query = '@parameter.inner', desc = 'Swap parameter with previous', },
184 + ['<leader>rp'] = { query = '@parameter.inner', desc = 'Swap parameter with previous', },
191 191 border = vim.g.border_style,
192 192 floating_preview_opts = {},
193 193 peek_definition_code = {
194 - ['<leader>lpf'] = { query = '@function.outer', desc = 'Peek definition of outer function.', },
195 - ['<leader>lpc'] = { query = '@class.outer', desc = 'Peek definition of outer class.', },
194 + ['<leader>lp'] = { query = '@function.outer', desc = 'Peek definition of outer function.', },
195 + ['<leader>lP'] = { query = '@class.outer', desc = 'Peek definition of outer class.', },
227 227 mode = 'cursor', -- Line used to calculate context. Choices: 'cursor', 'topline'
228 228 -- Separator between context and content. Should be a single character string, like '-'.
229 229 -- When separator is set, the context will only show up when there are at least 2 lines above cursorline.
230 - separator = nil,
230 + separator = '-',
231 231 zindex = 20, -- The Z-index of the context window
232 232 on_attach = nil, -- (fun(buf: integer): boolean) return false to disable attaching

neovim/lua/bugabinga/plugins/whichkey.lua

Modified
50 50 v = { name = '|v|ersion control', _ = 'which_key_ignore', },
51 51 s = { name = '|s|essions', _ = 'which_key_ignore', },
52 52 r = { name = '|r|efactor', _ = 'which_key_ignore', },
53 - w = { name = 's|w|ap', _ = 'which_key_ignore',
54 - {
55 - p = { name = '|p|arameter', _ = 'which_key_ignore', },
56 - },
57 - },
58 - l = { name = '|l|sp', _ = 'which_key_ignore',
59 - p = { name = '|p|eek', _ = 'which_key_ignore', },
60 - c = { name = '|c|alls', _ = 'which_key_ignore', },
61 - },
62 - t = { name = '|t|oggle', _ = 'which_key_ignore',
63 - {
64 - o = { name = '|o|ptions', _ = 'which_key_ignore', },
65 - },
66 - },
53 + t = { name = '|t|oggle', _ = 'which_key_ignore', },
54 + w = { name = 's|w|ap', _ = 'which_key_ignore', },
67 55 z = { name = 'la|z|y', _ = 'which_key_ignore', },
68 56 [' '] = { name = 'fun', _ = 'which_key_ignore', },
57 + {
58 + p = { name = '|p|arameter', _ = 'which_key_ignore', },
59 + },
60 + l = { name = '|l|sp', _ = 'which_key_ignore',
61 + c = { name = '|c|alls', _ = 'which_key_ignore', },
62 + },
71 65 end,

nushell/config.nu

Modified
5 5 use aliases.nu *
6 6 use todo.nu
7 7 use openssl.nu *
8 -use syncthing.nu
10 9 # for more information on themes see
11 10 # https://github.com/nushell/nushell/blob/main/docs/How_To_Coloring_and_Theming.md
77 76 use_grid_icons: true
78 77 footer_mode: "auto" # always, never, number_of_rows, auto
79 78 completions: {
81 79 quick: true # set this to false to prevent auto-selecting completions when only one remains
82 80 partial: true # set this to false to prevent partial filling of the prompt
82 + hooks: {
83 + pre_prompt: [{||
84 + if (which direnv | is-empty) {
85 + return
86 + }
87 + direnv export json | from json | default {} | load-env
88 + }]
89 + }
84 90 float_precision: 2
85 91 use_ansi_coloring: true
86 92 filesize: {

nushell/modules/aliases.nu

Modified
3 3 # Semantic aliases
4 4 export alias show = bat
5 5 export def list [] { ls --all --long --du --mime-type | where type == dir | append (ls --all --long --du --mime-type | where type != dir) }
6 6 export alias walk = yazi
7 7 export alias browse = firefox
8 -export alias code = nvim
8 +export alias vim = nvim
9 9 export alias edit = nvim --clean
10 10 # TODO ewrite bak command
11 11 export alias backup = bak
13 +export alias userctl = systemctl --user
13 15 # https://gist.github.com/mullnerz/9fff80593d6b442d5c1b
14 16 export alias archive = wget -mpck --html-extension --user-agent="" -e robots=off --wait 1 -P .
29 31 export alias nf = open-editor-with-file-search
31 -def fuzzy-kill [ query:string ] {
33 +export def fkill [ query:string ] {
32 34 let pid = (^ps -ef | sed 1d | fzf -m --query $query | awk '{print $2}')
33 35 if not ($pid | is-empty) {
34 36 kill ($pid | into int )
37 -export alias fkill = fuzzy-kill
40 +export def --env yy [...args] {
41 + let tmp = (mktemp -t "yazi-cwd.XXXXXX")
42 + yazi ...$args --cwd-file $tmp
43 + let cwd = (open $tmp)
44 + if $cwd != "" and $cwd != $env.PWD {
45 + cd $cwd
46 + }
47 + rm -fp $tmp
39 50 # TODO: HOST SPECIFIC ALIASES
40 51 # I do not see a way right now the have different aliases per host with nu.

systemd/environment.d/07_cargo.conf

Added
new file mode 100644
1 +CARGO_HOME=$HOME/.cargo

systemd/environment.d/99_path.conf

Added
new file mode 100644
1 +PATH=$CARGO_HOME/bin:$HOME/.local/bin:$PATH

tools/cargo-tools.nu

Modified
36 36 [ "taplo-cli" "taplo" [] ]
37 37 [ "lms" "lms" [] ]
38 38 [ "gitu" "gitu" [ "--locked" ] ]
39 + [ "yazi-fm" "yazi" [ "--locked" ] ]
40 + [ "yazi-cli" "ya" [ "--locked" ] ]
41 43 # install all my favorite crate, only if they are not already in PATH.

topgrade/topgrade.linux.toml

Modified
25 25 [git]
26 26 # Additional git repositories to pull
27 -repos = ["/home/oli/Workspace/*"]
27 +repos = ["/home/oli/Workspace/*", "/home/oli/Source/*"]
29 29 max_concurrency = 12

wezterm/bugabinga/auto_dark_mode.lua

Modified
20 +-- TODO: what is that good for?
20 21 -- wez.on('window-config-reloaded', function(window)
21 22 -- local overrides = window:get_config_overrides() or {}
22 23 -- local appearance = window:get_appearance()

wezterm/bugabinga/workspaces.lua

Modified
26 26 local dork_ws = 'dorkfiles editing'
27 27 local dork_cwd = WORKSPACE .. '/dotfiles'
28 28 local dork_tab, dork_pane, dork_window = mux.spawn_window { cwd = dork_cwd, workspace = dork_ws }
29 - local dork_top_pane = dork_pane:split { cwd = dork_cwd, direction = 'Top', size = 0.42 }
30 - dork_top_pane:split { cwd = dork_cwd, direction = 'Left', size = 0.69 }
29 + local dork_top_pane = dork_pane:split { cwd = dork_cwd, direction = 'Top', size = 0.69 }
30 + dork_top_pane:split { cwd = dork_cwd, direction = 'Left', size = 0.42 }
31 31 dork_tab:set_title 'Dorkfiles Editing'
32 33 local wezterm_config_tab = dork_window:spawn_tab { cwd = dork_cwd .. '/wezterm' }
33 34 wezterm_config_tab:set_title 'Wezterm'
34 35 wezterm_config_tab:active_pane():split { cwd = dork_cwd .. '/wezterm', direction = 'Left', size = 0.69 }
35 - local helix_config_tab = dork_window:spawn_tab { cwd = dork_cwd .. '/neovim' }
36 - helix_config_tab:set_title 'Neovim'
37 - helix_config_tab:active_pane():split { cwd = dork_cwd .. '/neovim', direction = 'Left', size = 0.69 }
37 + local nvim_config_tab = dork_window:spawn_tab { cwd = dork_cwd .. '/neovim' }
38 + nvim_config_tab:set_title 'Neovim'
39 + nvim_config_tab:active_pane():split { cwd = dork_cwd .. '/neovim', direction = 'Left', size = 0.69 }
40 41 local code_ws = 'code'
41 - local code_cwd = wez.home_dir
42 + local code_cwd = WORKSPACE
42 43 local code_tab, code_pane, code_window = mux.spawn_window { cwd = code_cwd, workspace = code_ws }
43 - local code_top_pane = code_pane:split { cwd = code_cwd, direction = 'Top', size = 0.42 }
44 + local code_top_pane = code_pane:split { cwd = code_cwd, direction = 'Top', size = 0.69 }
44 45 code_pane:split { cwd = code_cwd, direction = 'Right', size = 0.42 }
45 - code_top_pane:split { cwd = code_cwd, direction = 'Right', size = 0.42 }
46 - code_window:spawn_tab { args = { 'nvim' } }
47 46 code_tab:set_title 'Code'
48 47 code_top_pane:activate()
50 49 local default_ws = 'default'
51 50 local default_cwd = wez.home_dir
52 51 local default_tab, default_pane, default_window = mux.spawn_window { cwd = default_cwd, workspace = default_ws }
53 - local default_top_pane = default_pane:split { cwd = default_cwd, direction = 'Top', size = 0.42 }
52 + local default_top_pane = default_pane:split { cwd = default_cwd, direction = 'Top', size = 0.69 }
54 53 default_pane:split { cwd = default_cwd, direction = 'Right', size = 0.42 }
55 54 default_top_pane:split { cwd = default_cwd, direction = 'Right', size = 0.42 }
56 - default_window:spawn_tab { args = { 'btm' } }
57 55 default_tab:set_title 'Default'
58 56 default_top_pane:activate()
68 66 -- check the log file in the wezterm mux server runtime directory
69 67 -- e.g. /run/user/1000/wezterm/log
70 68 wez.on('mux-startup', function()
71 - if win32 then return end
73 69 setup_workspaces()
70 + maximize_window()
74 71 end)

wezterm/nerdfonts

Modified
19 19 iA Writer Mono V
20 20 Inconsolata
21 21 Intel One Mono
22 -Iosevka
23 22 JetBrainsMono
24 23 Lekton
25 24 Liberation Mono

wezterm/wezterm.lua

Modified
20 20 elseif hostname == 'NB-00718' then
21 21 font_size = 15
22 22 elseif hostname == 'fedora' then
23 - font_size = 16
23 + font_size = 13
24 24 local font_names = {}
25 25 local nerdfonts = io.open(wez.config_dir .. '/nerdfonts', 'r')
26 26 if nerdfonts then
34 34 window_decorations = 'NONE'
37 +-- Equivalent to POSIX basename(3)
38 +-- Given "/foo/bar" returns "bar"
39 +-- Given "c:\\foo\\bar" returns "bar"
40 +local function basename(s)
41 + return string.gsub(s, '(.*[/\\])(.*)', '%2')
42 +end
44 +local exec_domains = {
45 + -- Defines a domain called "scoped" that will run the requested
46 + -- command inside its own individual systemd scope.
47 + -- This defines a strong boundary for resource control and can
48 + -- help to avoid OOMs in one pane causing other panes to be
49 + -- killed.
50 + wez.exec_domain('scoped', function(cmd)
51 + -- The "cmd" parameter is a SpawnCommand object.
52 + -- You can log it to see what's inside:
53 + wez.log_info(cmd)
55 + -- Synthesize a human understandable scope name that is
56 + -- (reasonably) unique. WEZTERM_PANE is the pane id that
57 + -- will be used for the newly spawned pane.
58 + -- WEZTERM_UNIX_SOCKET is associated with the wezterm
59 + -- process id.
60 + local env = cmd.set_environment_variables
61 + local ident = 'wezterm-pane-'
62 + .. env.WEZTERM_PANE
63 + .. '-on-'
64 + .. basename(env.WEZTERM_UNIX_SOCKET)
66 + -- Generate a new argument array that will launch a
67 + -- program via systemd-run
68 + local wrapped = {
69 + '/usr/bin/systemd-run',
70 + '--user',
71 + '--scope',
72 + '--description=Shell started by wezterm',
73 + '--same-dir',
74 + '--collect',
75 + '--unit=' .. ident,
76 + }
78 + -- Append the requested command
79 + -- Note that cmd.args may be nil; that indicates that the
80 + -- default program should be used. Here we're using the
81 + -- shell defined by the SHELL environment variable.
82 + for _, arg in ipairs(cmd.args or { os.getenv 'SHELL' }) do
83 + table.insert(wrapped, arg)
84 + end
86 + -- replace the requested argument array with our new one
87 + cmd.args = wrapped
89 + -- and return the SpawnCommand that we want to execute
90 + return cmd
91 + end),
37 94 return {
38 95 -- logs key presses
39 96 -- debug_key_events = true,
42 99 default_prog = { 'nu', '--login' },
43 100 default_cursor_style = 'SteadyBlock',
45 - unix_domains = {
46 - {
47 - name = 'mux'
48 - }
49 - },
102 + exec_domains = exec_domains,
103 + unix_domains = { { name = 'mux' } },
50 104 default_gui_startup_args = { 'connect', 'mux' },
52 106 font = font,

wezterm/wezterm.service

Added
new file mode 100644
1 +[Unit]
2 +Description=Wezterm Multiplexing Server
3 +After=gnome-session.target
5 +[Service]
6 +ExecStart=/usr/bin/wezterm-mux-server
7 +Restart=on-failure
9 +[Install]
10 +WantedBy=gnome-session.target