├── .gitignore
├── README.md
├── alacritty
├── alacritty.toml
└── keybindings.toml
├── atuin
└── config.toml
├── bottom
└── bottom.toml
├── broot.toml
├── fontconfig
└── fonts.conf
├── gitconfig.toml
├── gitui.ron
├── htoprc
├── mako.ini
├── nix.conf
├── nushell
├── config.nu
├── env.nu
└── scripts
│ ├── aliases.nu
│ ├── atuin.nu
│ ├── autostart.nu
│ ├── git.nu
│ ├── keybindings.nu
│ ├── main.nu
│ ├── menus.nu
│ ├── nix.nu
│ ├── starship.nu
│ └── theme.nu
├── nvim
├── init.lua
├── lua
│ ├── _blink.lua
│ ├── _colours.lua
│ ├── _formatting.lua
│ ├── _gitsigns.lua
│ ├── _keymaps.lua
│ ├── _lspconfig.lua
│ ├── _misc.lua
│ ├── _neo-tree.lua
│ ├── _noice.lua
│ ├── _options.lua
│ ├── _rocks.lua
│ ├── _scrollbar.lua
│ ├── _status_line.lua
│ ├── _telescope.lua
│ ├── _tmux.lua
│ └── _utils.lua
└── rocks.toml
├── sampler.yml
├── starship.toml
├── starship_streamer.toml
├── tmux
├── tmux.conf.main
└── tmux.conf.theme
├── update_symlinks.sh
├── waybar
├── bin
│ ├── idling.sh
│ ├── syncthing.sh
│ ├── weather.sh
│ └── wireguard.sh
├── config
├── config.json
└── style.css
├── wayfire.ini
├── wob.ini
├── xkb-gb-tombh
├── xkb-gb-tombh.xkm
├── xremap.yml
├── zellij
├── config.kdl
└── layouts
│ ├── default.kdl
│ └── monitors.kdl
├── zimrc
├── zprofile.zsh
└── zshrc
/.gitignore:
--------------------------------------------------------------------------------
1 | nvim/plugin/
2 | history.txt
3 | history.sqlite3
4 | waybar/bin/state
5 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Dotfile Configs
2 |
3 | Welcome, welcome. Have a look around, take what you like, ignore what you don't.
4 |
5 | It's unlikely that you'll use this wholesale, but just for point of reference, when setting a new machine or environment, I simply clone the repo and run `./update_symlinks.sh`
6 |
--------------------------------------------------------------------------------
/alacritty/alacritty.toml:
--------------------------------------------------------------------------------
1 | # I can't remember why I needed this?
2 | # import = ["./extended-keys.yaml"]
3 |
4 | [general]
5 | import = ["./keybindings.toml"]
6 |
7 | [bell]
8 | animation = "EaseOutExpo"
9 | duration = 0
10 |
11 | [colors]
12 | draw_bold_text_with_bright_colors = true
13 |
14 | [[colors.indexed_colors]]
15 | color = "#d18616"
16 | index = 16
17 |
18 | [[colors.indexed_colors]]
19 | color = "#ff938a"
20 | index = 17
21 |
22 | [colors.bright]
23 | black = "#444b6a"
24 | blue = "#7da6ff"
25 | cyan = "#0db9d7"
26 | green = "#b9f27c"
27 | magenta = "#bb9af7"
28 | red = "#ff7a93"
29 | white = "#acb0d0"
30 | yellow = "#ff9e64"
31 |
32 | [colors.normal]
33 | black = "#0e0d15"
34 | blue = "#7aa2f7"
35 | cyan = "#449dab"
36 | green = "#9ece6a"
37 | magenta = "#ad8ee6"
38 | red = "#f7768e"
39 | white = "#787c99"
40 | yellow = "#e0af68"
41 |
42 | [colors.primary]
43 | background = "#0e0d15"
44 | foreground = "#a9b1d6"
45 |
46 | [debug]
47 | render_timer = false
48 |
49 | [env]
50 | TERM = "xterm-256color"
51 |
52 | [font]
53 | size = 16
54 |
55 | [font.glyph_offset]
56 | x = 0
57 | y = 0
58 |
59 | [font.normal]
60 | family = "sourcecodepro-with-nerd-fallback"
61 | style = "Regular"
62 |
63 | [font.offset]
64 | x = 0
65 | y = 0
66 |
67 | [[mouse.bindings]]
68 | action = "PasteSelection"
69 | mouse = "Middle"
70 |
71 | # [mouse.double_click]
72 | # threshold = 300
73 |
74 | # [mouse.triple_click]
75 | # threshold = 300
76 |
77 | [selection]
78 | semantic_escape_chars = ",│`|:\"' ()[]{}<>"
79 |
80 | [window]
81 | decorations = "none"
82 | opacity = 0.3
83 |
84 | [window.padding]
85 | x = 0
86 | y = 0
87 |
--------------------------------------------------------------------------------
/alacritty/keybindings.toml:
--------------------------------------------------------------------------------
1 | [[keyboard.bindings]]
2 | action = "Paste"
3 | key = "V"
4 | mods = "Control"
5 |
6 | [[keyboard.bindings]]
7 | action = "Copy"
8 | key = "C"
9 | mods = "Control|Shift"
10 |
11 | [[keyboard.bindings]]
12 | action = "Quit"
13 | key = "Q"
14 | mods = "Command"
15 |
16 | [[keyboard.bindings]]
17 | action = "IncreaseFontSize"
18 | key = "Equals"
19 | mods = "Control"
20 |
21 | [[keyboard.bindings]]
22 | action = "DecreaseFontSize"
23 | key = "Comma"
24 | mods = "Control"
25 |
26 | [[keyboard.bindings]]
27 | action = "PasteSelection"
28 | key = "Insert"
29 | mods = "Shift"
30 |
31 | [[keyboard.bindings]]
32 | chars = "\u001B[1;3H"
33 | key = "Home"
34 | mods = "Alt"
35 |
36 | [[keyboard.bindings]]
37 | chars = "\u001B[1;2H"
38 | key = "Home"
39 | mode = "AppCursor"
40 | mods = "Shift"
41 |
42 | [[keyboard.bindings]]
43 | chars = "\u001BOH"
44 | key = "Home"
45 | mode = "AppCursor"
46 |
47 | [[keyboard.bindings]]
48 | chars = "\u001B[1~"
49 | key = "Home"
50 | mode = "~AppCursor"
51 |
52 | [[keyboard.bindings]]
53 | chars = "\u001B[1;3F"
54 | key = "End"
55 | mods = "Alt"
56 |
57 | [[keyboard.bindings]]
58 | chars = "\u001B[1;2F"
59 | key = "End"
60 | mode = "AppCursor"
61 | mods = "Shift"
62 |
63 | [[keyboard.bindings]]
64 | chars = "\u001BOF"
65 | key = "End"
66 | mode = "AppCursor"
67 |
68 | [[keyboard.bindings]]
69 | chars = "\u001B[4~"
70 | key = "End"
71 | mode = "~AppCursor"
72 |
73 | [[keyboard.bindings]]
74 | chars = "\u001B[5;3~"
75 | key = "PageUp"
76 | mods = "Alt"
77 |
78 | [[keyboard.bindings]]
79 | chars = "\u001B[5;2~"
80 | key = "PageUp"
81 | mods = "Shift"
82 |
83 | [[keyboard.bindings]]
84 | chars = "\u001B[5;5~"
85 | key = "PageUp"
86 | mods = "Control"
87 |
88 | [[keyboard.bindings]]
89 | chars = "\u001B[5~"
90 | key = "PageUp"
91 |
92 | [[keyboard.bindings]]
93 | chars = "\u001B[6;3~"
94 | key = "PageDown"
95 | mods = "Alt"
96 |
97 | [[keyboard.bindings]]
98 | chars = "\u001B[6;2~"
99 | key = "PageDown"
100 | mods = "Shift"
101 |
102 | [[keyboard.bindings]]
103 | chars = "\u001B[6;5~"
104 | key = "PageDown"
105 | mods = "Control"
106 |
107 | [[keyboard.bindings]]
108 | chars = "\u001B[6~"
109 | key = "PageDown"
110 |
111 | [[keyboard.bindings]]
112 | chars = "\u001B[1;2D"
113 | key = "Left"
114 | mods = "Shift"
115 |
116 | [[keyboard.bindings]]
117 | chars = "\u001B[1;5D"
118 | key = "Left"
119 | mods = "Control"
120 |
121 | [[keyboard.bindings]]
122 | chars = "\u001B[1;1D"
123 | key = "Left"
124 | mods = "Control|Shift"
125 |
126 | [[keyboard.bindings]]
127 | chars = "\u001B[1;3D"
128 | key = "Left"
129 | mods = "Alt"
130 |
131 | [[keyboard.bindings]]
132 | chars = "\u001B[D"
133 | key = "Left"
134 | mode = "~AppCursor"
135 |
136 | [[keyboard.bindings]]
137 | chars = "\u001BOD"
138 | key = "Left"
139 | mode = "AppCursor"
140 |
141 | [[keyboard.bindings]]
142 | chars = "\u001B[1;2C"
143 | key = "Right"
144 | mods = "Shift"
145 |
146 | [[keyboard.bindings]]
147 | chars = "\u001B[1;5C"
148 | key = "Right"
149 | mods = "Control"
150 |
151 | [[keyboard.bindings]]
152 | chars = "\u001B[1;6C"
153 | key = "Right"
154 | mods = "Control|Shift"
155 |
156 | [[keyboard.bindings]]
157 | chars = "\u001B[1;3C"
158 | key = "Right"
159 | mods = "Alt"
160 |
161 | [[keyboard.bindings]]
162 | chars = "\u001B[C"
163 | key = "Right"
164 | mode = "~AppCursor"
165 |
166 | [[keyboard.bindings]]
167 | chars = "\u001BOC"
168 | key = "Right"
169 | mode = "AppCursor"
170 |
171 | [[keyboard.bindings]]
172 | chars = "\u001B[1;2A"
173 | key = "Up"
174 | mods = "Shift"
175 |
176 | [[keyboard.bindings]]
177 | chars = "\u001B[1;5A"
178 | key = "Up"
179 | mods = "Control"
180 |
181 | [[keyboard.bindings]]
182 | chars = "\u001B[1;3A"
183 | key = "Up"
184 | mods = "Alt"
185 |
186 | [[keyboard.bindings]]
187 | chars = "\u001B[A"
188 | key = "Up"
189 | mode = "~AppCursor"
190 |
191 | [[keyboard.bindings]]
192 | chars = "\u001BOA"
193 | key = "Up"
194 | mode = "AppCursor"
195 |
196 | [[keyboard.bindings]]
197 | chars = "\u001B[1;2B"
198 | key = "Down"
199 | mods = "Shift"
200 |
201 | [[keyboard.bindings]]
202 | chars = "\u001B[1;5B"
203 | key = "Down"
204 | mods = "Control"
205 |
206 | [[keyboard.bindings]]
207 | chars = "\u001B[1;3B"
208 | key = "Down"
209 | mods = "Alt"
210 |
211 | [[keyboard.bindings]]
212 | chars = "\u001B[B"
213 | key = "Down"
214 | mode = "~AppCursor"
215 |
216 | [[keyboard.bindings]]
217 | chars = "\u001BOB"
218 | key = "Down"
219 | mode = "AppCursor"
220 |
221 | [[keyboard.bindings]]
222 | chars = "\u001B[Z"
223 | key = "Tab"
224 | mods = "Shift"
225 |
226 | [[keyboard.bindings]]
227 | chars = "\u001B[27;5;9~"
228 | key = "Tab"
229 | mods = "Control"
230 |
231 | [[keyboard.bindings]]
232 | chars = "\u001BOP"
233 | key = "F1"
234 |
235 | [[keyboard.bindings]]
236 | chars = "\u001BOQ"
237 | key = "F2"
238 |
239 | [[keyboard.bindings]]
240 | chars = "\u001BOR"
241 | key = "F3"
242 |
243 | [[keyboard.bindings]]
244 | chars = "\u001BOS"
245 | key = "F4"
246 |
247 | [[keyboard.bindings]]
248 | chars = "\u001B[15~"
249 | key = "F5"
250 |
251 | [[keyboard.bindings]]
252 | chars = "\u001B[17~"
253 | key = "F6"
254 |
255 | [[keyboard.bindings]]
256 | chars = "\u001B[18~"
257 | key = "F7"
258 |
259 | [[keyboard.bindings]]
260 | chars = "\u001B[19~"
261 | key = "F8"
262 |
263 | [[keyboard.bindings]]
264 | chars = "\u001B[20~"
265 | key = "F9"
266 |
267 | [[keyboard.bindings]]
268 | chars = "\u001B[21~"
269 | key = "F10"
270 |
271 | [[keyboard.bindings]]
272 | chars = "\u001B[23~"
273 | key = "F11"
274 |
275 | [[keyboard.bindings]]
276 | chars = "\u001B[24~"
277 | key = "F12"
278 |
279 | [[keyboard.bindings]]
280 | chars = "\u007F"
281 | key = "Back"
282 |
283 | [[keyboard.bindings]]
284 | chars = "\u001B\u007F"
285 | key = "Back"
286 | mods = "Alt"
287 |
288 | [[keyboard.bindings]]
289 | chars = "\u001B[2~"
290 | key = "Insert"
291 |
292 | [[keyboard.bindings]]
293 | chars = "\u001B[3~"
294 | key = "Delete"
295 |
296 | [[keyboard.bindings]]
297 | chars = "\u001B[65;6u"
298 | key = "A"
299 | mods = "Control|Shift"
300 |
301 | [[keyboard.bindings]]
302 | chars = "\u001B[68;6u"
303 | key = "D"
304 | mods = "Control|Shift"
305 |
306 | [[keyboard.bindings]]
307 | chars = "\u001B[69;6u"
308 | key = "E"
309 | mods = "Control|Shift"
310 |
311 | [[keyboard.bindings]]
312 | chars = "\u001B[74;6u"
313 | key = "J"
314 | mods = "Control|Shift"
315 |
--------------------------------------------------------------------------------
/atuin/config.toml:
--------------------------------------------------------------------------------
1 | ## where to store your database, default is your system data directory
2 | ## linux/mac: ~/.local/share/atuin/history.db
3 | ## windows: %USERPROFILE%/.local/share/atuin/history.db
4 | # db_path = "~/.history.db"
5 |
6 | ## where to store your encryption key, default is your system data directory
7 | ## linux/mac: ~/.local/share/atuin/key
8 | ## windows: %USERPROFILE%/.local/share/atuin/key
9 | # key_path = "~/.key"
10 |
11 | ## where to store your auth session token, default is your system data directory
12 | ## linux/mac: ~/.local/share/atuin/session
13 | ## windows: %USERPROFILE%/.local/share/atuin/session
14 | # session_path = "~/.session"
15 |
16 | ## date format used, either "us" or "uk"
17 | dialect = "uk"
18 |
19 | ## enable or disable automatic sync
20 | # auto_sync = true
21 |
22 | ## enable or disable automatic update checks
23 | # update_check = true
24 |
25 | ## address of the sync server
26 | # sync_address = "https://api.atuin.sh"
27 |
28 | ## how often to sync history. note that this is only triggered when a command
29 | ## is ran, so sync intervals may well be longer
30 | ## set it to 0 to sync after every command
31 | # sync_frequency = "1h"
32 |
33 | ## which search mode to use
34 | ## possible values: prefix, fulltext, fuzzy, skim
35 | search_mode = "fuzzy"
36 |
37 | ## which filter mode to use
38 | ## possible values: global, host, session, directory
39 | # filter_mode = "global"
40 |
41 | ## which filter mode to use when atuin is invoked from a shell up-key binding
42 | ## the accepted values are identical to those of "filter_mode"
43 | ## leave unspecified to use same mode set in "filter_mode"
44 | filter_mode_shell_up_key_binding = "directory"
45 |
46 | ## which style to use
47 | ## possible values: auto, full, compact
48 | # style = "auto"
49 |
50 | ## the maximum number of lines the interface should take up
51 | ## set it to 0 to always go full screen
52 | inline_height = 9
53 |
54 | ## enable or disable showing a preview of the selected command
55 | ## useful when the command is longer than the terminal width and is cut off
56 | show_preview = false
57 | show_tabs = false
58 | show_help = false
59 | invert = true
60 |
61 | ## what to do when the escape key is pressed when searching
62 | ## possible values: return-original, return-query
63 | # exit_mode = "return-original"
64 |
65 | ## possible values: emacs, subl
66 | # word_jump_mode = "emacs"
67 |
68 | ## characters that count as a part of a word
69 | # word_chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
70 |
71 | ## number of context lines to show when scrolling by pages
72 | # scroll_context_lines = 1
73 |
74 | ## use ctrl instead of alt as the shortcut modifier key for numerical UI shortcuts
75 | ## alt-0 .. alt-9
76 | # ctrl_n_shortcuts = false
77 |
78 | ## prevent commands matching any of these regexes from being written to history.
79 | ## Note that these regular expressions are unanchored, i.e. if they don't start
80 | ## with ^ or end with $, they'll match anywhere in the command.
81 | ## For details on the supported regular expression syntax, see
82 | ## https://docs.rs/regex/latest/regex/#syntax
83 | # history_filter = [
84 | # "^secret-cmd",
85 | # "^innocuous-cmd .*--secret=.+"
86 | # ]
87 |
88 | ## prevent commands run with cwd matching any of these regexes from being written
89 | ## to history. Note that these regular expressions are unanchored, i.e. if they don't
90 | ## start with ^ or end with $, they'll match anywhere in CWD.
91 | ## For details on the supported regular expression syntax, see
92 | ## https://docs.rs/regex/latest/regex/#syntax
93 | # cwd_filter = [
94 | # "^/very/secret/area"
95 | # ]
96 |
--------------------------------------------------------------------------------
/bottom/bottom.toml:
--------------------------------------------------------------------------------
1 | # This is a default config file for bottom. All of the settings are commented
2 | # out by default; if you wish to change them uncomment and modify as you see
3 | # fit.
4 |
5 | # This group of options represents a command-line flag/option. Flags explicitly
6 | # added when running (ie: btm -a) will override this config file if an option
7 | # is also set here.
8 |
9 | [flags]
10 | # Whether to hide the average cpu entry.
11 | #hide_avg_cpu = false
12 | # Whether to use dot markers rather than braille.
13 | #dot_marker = false
14 | # The update rate of the application.
15 | #rate = 1000
16 | # Whether to put the CPU legend to the left.
17 | #left_legend = false
18 | # Whether to set CPU% on a process to be based on the total CPU or just current usage.
19 | #current_usage = false
20 | # Whether to group processes with the same name together by default.
21 | #group_processes = false
22 | # Whether to make process searching case sensitive by default.
23 | #case_sensitive = false
24 | # Whether to make process searching look for matching the entire word by default.
25 | #whole_word = false
26 | # Whether to make process searching use regex by default.
27 | #regex = false
28 | # Defaults to Celsius. Temperature is one of:
29 | #temperature_type = "k"
30 | #temperature_type = "f"
31 | #temperature_type = "c"
32 | #temperature_type = "kelvin"
33 | #temperature_type = "fahrenheit"
34 | #temperature_type = "celsius"
35 | # The default time interval (in milliseconds).
36 | default_time_value = "60s"
37 | # The time delta on each zoom in/out action (in milliseconds).
38 | #time_delta = 15000
39 | # Override layout default widget
40 | #default_widget_type = "proc"
41 | #default_widget_count = 1
42 | # Use basic mode
43 | #basic = false
44 | # Use the old network legend style
45 | #use_old_network_legend = false
46 | # Remove space in tables
47 | # hide_table_gap = true
48 | # Disable mouse clicks
49 | #disable_click = false
50 | # Built-in themes. Valid values are "default", "default-light", "gruvbox", "gruvbox-light"
51 | #color = "default"
52 | # Show memory values in the processes widget as values by default
53 | #mem_as_value = false
54 | # Show tree mode by default in the processes widget.
55 | #tree = false
56 |
57 | # These are all the components that support custom theming. Note that colour support
58 | # will depend on terminal support.
59 |
60 | #[colors] # Uncomment if you want to use custom colors
61 | # Represents the colour of table headers (processes, CPU, disks, temperature).
62 | #table_header_color="LightBlue"
63 | # Represents the colour of the label each widget has.
64 | #widget_title_color="Gray"
65 | # Represents the average CPU color.
66 | #avg_cpu_color="Red"
67 | # Represents the colour the core will use in the CPU legend and graph.
68 | #cpu_core_colors=["LightMagenta", "LightYellow", "LightCyan", "LightGreen", "LightBlue", "LightRed", "Cyan", "Green", "Blue", "Red"]
69 | # Represents the colour RAM will use in the memory legend and graph.
70 | #ram_color="LightMagenta"
71 | # Represents the colour SWAP will use in the memory legend and graph.
72 | #swap_color="LightYellow"
73 | # Represents the colour rx will use in the network legend and graph.
74 | #rx_color="LightCyan"
75 | # Represents the colour tx will use in the network legend and graph.
76 | #tx_color="LightGreen"
77 | # Represents the colour of the border of unselected widgets.
78 | #border_color="Gray"
79 | # Represents the colour of the border of selected widgets.
80 | #highlighted_border_color="LightBlue"
81 | # Represents the colour of most text.
82 | #text_color="Gray"
83 | # Represents the colour of text that is selected.
84 | #selected_text_color="Black"
85 | # Represents the background colour of text that is selected.
86 | #selected_bg_color="LightBlue"
87 | # Represents the colour of the lines and text of the graph.
88 | #graph_color="Gray"
89 | # Represents the colours of the battery based on charge
90 | #high_battery_color="green"
91 | #medium_battery_color="yellow"
92 | #low_battery_color="red"
93 |
94 | # Layout - layouts follow a pattern like this:
95 | # [[row]] represents a row in the application.
96 | # [[row.child]] represents either a widget or a column.
97 | # [[row.child.child]] represents a widget.
98 | #
99 | # All widgets must have the type value set to one of ["cpu", "mem", "proc", "net", "temp", "disk", "empty"].
100 | # All layout components have a ratio value - if this is not set, then it defaults to 1.
101 | # The default widget layout:
102 | [[row]]
103 | ratio=10
104 | [[row.child]]
105 | type="cpu"
106 | [[row]]
107 | ratio=30
108 | [[row.child]]
109 | ratio=2
110 | type="net"
111 | # [[row.child]]
112 | # type="proc"
113 | # default=true
114 |
115 |
116 | # Filters - you can hide specific temperature and disks using filters. This is admittedly a bit
117 | # hard to use as of now, and there is a planned interface for managing this in the future:
118 | #[disk_filter]
119 | #is_list_ignored = false
120 | #list = ["/dev/sda\\d+", "/dev/nvme0n1p2"]
121 | #regex = true
122 | #case_sensitive = false
123 |
124 | #[temp_filter]
125 | #is_list_ignored = false
126 | #list = ["cpu", "wifi"]
127 | #regex = false
128 | #case_sensitive = false
129 |
--------------------------------------------------------------------------------
/broot.toml:
--------------------------------------------------------------------------------
1 |
2 | # This configuration file lets you define new commands
3 | # or change the shortcut or triggering keys of built-in verbs.
4 | # You can change the colors of broot too.
5 | #
6 | # Configuration documentation is available at https://dystroy.org/broot
7 | #
8 |
9 | # syntax_theme = "base16-ocean.light"
10 | # syntax_theme = "InspiredGitHub"
11 | icon_theme = "vscode"
12 |
13 | #####################
14 | # user defined verbs:
15 |
16 | # If $EDITOR isn't set on your computer, you should either set it
17 | # or just replace it with your editor of choice in the 'execution'
18 | # pattern.
19 | # Example:
20 | # execution = "/usr/bin/nvim {file}"
21 | [[verbs]]
22 | invocation = "edit"
23 | key = "ctrl-e"
24 | shortcut = "e"
25 | execution = "$EDITOR {file}"
26 |
27 | [[verbs]]
28 | invocation = "create {subpath}"
29 | execution = "$EDITOR {directory}/{subpath}"
30 |
31 | # If $PAGER isn't set on your computer, you should either set it
32 | # or just replace it with your viewer of choice in the 'execution'
33 | # pattern.
34 | # Example:
35 | # execution = "less {file}"
36 | [[verbs]]
37 | name = "view"
38 | key = "enter"
39 | invocation = "view"
40 | leave_broot = false
41 | execution = "handlr open {file}"
42 |
43 | # [[verbs]]
44 | # internal = ":move_to_panel"
45 | # key = "alt-."
46 |
47 | #####################
48 | # Skin
49 | [skin]
50 | default = "rgb(235, 219, 178) none / rgb(189, 174, 147) rgb(40, 40, 40)"
51 |
52 | # If you want to change the colors of broot,
53 | # uncomment the following bloc and start messing
54 | # with the various values
55 | # Note that some of those colors might not correcly
56 | # render on terminals with low capabilities
57 | #
58 | # [skin]
59 | # default = "gray(20) gray(1)"
60 | # tree = "rgb(89, 73, 101) none"
61 | # file = "gray(21) none"
62 | # directory = "rgb(255, 152, 0) none bold"
63 | # exe = "rgb(17, 164, 181) none"
64 | # link = "Magenta none"
65 | # pruning = "rgb(89, 73, 101) none Italic"
66 | # permissions = "gray(12) none "
67 | # owner = "gray(12) none "
68 | # group = "gray(12) none "
69 | # selected_line = "none gray(3)"
70 | # char_match = "yellow none"
71 | # file_error = "Red none"
72 | # flag_label = "gray(16) none"
73 | # flag_value = "rgb(255, 152, 0) none bold"
74 | # input = "White none"
75 | # status_error = "Red gray(2)"
76 | # status_job = "ansi(220) gray(5)"
77 | # status_normal = "gray(20) gray(3)"
78 | # status_italic = "rgb(255, 152, 0) None"
79 | # status_bold = "rgb(255, 152, 0) None bold"
80 | # status_code = "ansi(229) gray(5)"
81 | # status_ellipsis = "gray(19) gray(1)"
82 | # scrollbar_track = "rgb(80, 50, 0) none"
83 | # scrollbar_thumb = "rgb(255, 187, 0) none"
84 | # help_paragraph = "gray(20) none"
85 | # help_bold = "rgb(255, 187, 0) none bold"
86 | # help_italic = "Magenta rgb(30, 30, 40) italic"
87 | # help_code = "gray(21) gray(3)"
88 | # help_headers = "rgb(255, 187, 0) none"
89 |
90 | # You may find other skins on
91 | # https://dystroy.org/broot/documentation/configuration/#colors
92 | # for example a skin suitable for white backgrounds
93 |
94 |
--------------------------------------------------------------------------------
/fontconfig/fonts.conf:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | true
7 |
8 |
9 |
10 | sourcecodepro-with-nerd-fallback
11 |
12 | SauceCodePro Nerd Font
13 | Noto Color Emoji
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/gitconfig.toml:
--------------------------------------------------------------------------------
1 | [push]
2 | default = tracking
3 | autoSetupRemote = true
4 | [commit]
5 | gpgsign = true
6 | [pull]
7 | ff = only
8 | [gpg]
9 | program = gpg2
10 |
11 | [diff]
12 | colorMoved = default
13 |
14 | [pager]
15 | diff = delta
16 | log = delta
17 | reflog = delta
18 | show = delta
19 |
20 | [delta]
21 | navigate = true
22 | side-by-side = false
23 | tabs = 2
24 | true-color = always
25 |
26 | # Tokyo Night
27 | minus-style = syntax "#37222c"
28 | minus-non-emph-style = syntax "#37222c"
29 | minus-emph-style = syntax "#713137"
30 | minus-empty-line-marker-style = syntax "#37222c"
31 | line-numbers-minus-style = "#914c54"
32 | plus-style = syntax "#20303b"
33 | plus-non-emph-style = syntax "#20303b"
34 | plus-emph-style = syntax "#2c5a66"
35 | plus-empty-line-marker-style = syntax "#20303b"
36 | line-numbers-plus-style = "#449dab"
37 | line-numbers-zero-style = "#3b4261"
38 |
39 | [interactive]
40 | diffFilter = delta --color-only
41 |
42 | [init]
43 | defaultBranch = main
44 |
45 |
--------------------------------------------------------------------------------
/gitui.ron:
--------------------------------------------------------------------------------
1 | (
2 | selected_tab: Some(Rgb(187, 154, 247)),
3 | command_fg: Some(Rgb(86, 95, 137)),
4 | selection_bg: Some(Rgb(41, 46, 66)),
5 | selection_fg: Some(Rgb(125, 207, 255)),
6 | cmdbar_bg: Some(Rgb(26, 27, 38)),
7 | cmdbar_extra_lines_bg: Some(Rgb(26, 27, 38)),
8 | disabled_fg: Some(Rgb(86, 95, 137)),
9 | diff_line_add: Some(Rgb(158, 206, 106)),
10 | diff_line_delete: Some(Rgb(247, 118, 142)),
11 | diff_file_added: Some(Rgb(115, 218, 202)),
12 | diff_file_removed: Some(Rgb(219, 75, 75)),
13 | diff_file_moved: Some(Rgb(255, 0, 124)),
14 | diff_file_modified: Some(Rgb(224, 175, 104)),
15 | commit_hash: Some(Rgb(187, 154, 247)),
16 | commit_time: Some(Rgb(26, 188, 156)),
17 | commit_author: Some(Rgb(158, 206, 106)),
18 | danger_fg: Some(Rgb(247, 118, 142)),
19 | push_gauge_bg: Some(Rgb(26, 27, 38)),
20 | push_gauge_fg: Some(Rgb(192, 202, 245)),
21 | tag_fg: Some(Rgb(255, 0, 124)),
22 | branch_fg: Some(Rgb(224, 175, 104)),
23 | )
--------------------------------------------------------------------------------
/htoprc:
--------------------------------------------------------------------------------
1 | # Beware! This file is rewritten by htop when settings are changed in the interface.
2 | # The parser is also very primitive, and not human-friendly.
3 | htop_version=3.3.0
4 | config_reader_min_version=3
5 | fields=0 48 17 18 38 39 40 2 46 47 49 1
6 | hide_kernel_threads=1
7 | hide_userland_threads=1
8 | hide_running_in_container=0
9 | shadow_other_users=0
10 | show_thread_names=0
11 | show_program_path=1
12 | highlight_base_name=0
13 | highlight_deleted_exe=1
14 | shadow_distribution_path_prefix=0
15 | highlight_megabytes=1
16 | highlight_threads=1
17 | highlight_changes=0
18 | highlight_changes_delay_secs=5
19 | find_comm_in_cmdline=1
20 | strip_exe_from_cmdline=1
21 | show_merged_command=0
22 | header_margin=1
23 | screen_tabs=1
24 | detailed_cpu_time=0
25 | cpu_count_from_one=0
26 | show_cpu_usage=1
27 | show_cpu_frequency=0
28 | show_cpu_temperature=0
29 | degree_fahrenheit=0
30 | update_process_names=0
31 | account_guest_in_cpu_meter=0
32 | color_scheme=0
33 | enable_mouse=1
34 | delay=15
35 | hide_function_bar=0
36 | topology_affinity=0
37 | header_layout=two_50_50
38 | column_meters_0=LeftCPUs Memory Swap
39 | column_meter_modes_0=1 1 1
40 | column_meters_1=RightCPUs Tasks LoadAverage Uptime
41 | column_meter_modes_1=1 2 2 2
42 | tree_view=0
43 | sort_key=46
44 | tree_sort_key=0
45 | sort_direction=-1
46 | tree_sort_direction=1
47 | tree_view_always_by_pid=0
48 | all_branches_collapsed=0
49 | screen:Main=PID USER PRIORITY NICE M_VIRT M_RESIDENT M_SHARE STATE PERCENT_CPU PERCENT_MEM TIME Command
50 | .sort_key=PERCENT_CPU
51 | .tree_sort_key=PID
52 | .tree_view_always_by_pid=0
53 | .tree_view=0
54 | .sort_direction=-1
55 | .tree_sort_direction=1
56 | .all_branches_collapsed=0
57 | screen:I/O=PID USER IO_PRIORITY IO_RATE IO_READ_RATE IO_WRITE_RATE PERCENT_SWAP_DELAY PERCENT_IO_DELAY Command
58 | .sort_key=IO_RATE
59 | .tree_sort_key=PID
60 | .tree_view_always_by_pid=0
61 | .tree_view=0
62 | .sort_direction=-1
63 | .tree_sort_direction=1
64 | .all_branches_collapsed=0
65 |
--------------------------------------------------------------------------------
/mako.ini:
--------------------------------------------------------------------------------
1 | sort=-time
2 | layer=overlay
3 | width=300
4 | height=110
5 | border-size=0
6 | border-radius=3
7 | icons=1
8 | max-icon-size=64
9 | default-timeout=10000
10 | ignore-timeout=1
11 | font=SauceCodePro Nerd Font 12
12 | text-alignment=center
13 |
14 | [urgency=low]
15 | border-color=#cccccc
16 |
17 | [urgency=normal]
18 | background-color=#c3e88d22
19 |
20 | [urgency=high]
21 | background-color=#30281c22
22 | default-timeout=0
23 |
24 | [category=mpd]
25 | default-timeout=2000
26 | group-by=category
27 |
28 |
--------------------------------------------------------------------------------
/nix.conf:
--------------------------------------------------------------------------------
1 | extra-experimental-features = flakes nix-command
2 |
--------------------------------------------------------------------------------
/nushell/config.nu:
--------------------------------------------------------------------------------
1 |
2 | use starship.nu
3 |
4 | source theme.nu
5 | source main.nu
6 | source menus.nu
7 | source keybindings.nu
8 | source git.nu
9 | source aliases.nu
10 | source atuin.nu
11 |
12 | source autostart.nu
13 |
14 |
--------------------------------------------------------------------------------
/nushell/env.nu:
--------------------------------------------------------------------------------
1 | # Nushell Environment Config File
2 | #
3 | # version = "0.96.1"
4 |
5 | # If you want previously entered commands to have a different prompt from the usual one,
6 | # you can uncomment one or more of the following lines.
7 | # This can be useful if you have a 2-line prompt and it's taking up a lot of space
8 | # because every command entered takes up 2 lines instead of 1. You can then uncomment
9 | # the line below so that previously entered commands show with a single `🚀`.
10 | # $env.TRANSIENT_PROMPT_COMMAND = {|| "🚀 " }
11 | # $env.TRANSIENT_PROMPT_INDICATOR = {|| "" }
12 | # $env.TRANSIENT_PROMPT_INDICATOR_VI_INSERT = {|| "" }
13 | # $env.TRANSIENT_PROMPT_INDICATOR_VI_NORMAL = {|| "" }
14 | # $env.TRANSIENT_PROMPT_MULTILINE_INDICATOR = {|| "" }
15 | # $env.TRANSIENT_PROMPT_COMMAND_RIGHT = {|| "" }
16 |
17 | # Specifies how environment variables are:
18 | # - converted from a string to a value on Nushell startup (from_string)
19 | # - converted from a value back to a string when running external commands (to_string)
20 | # Note: The conversions happen *after* config.nu is loaded
21 | $env.ENV_CONVERSIONS = {
22 | "PATH": {
23 | from_string: { |s| $s | split row (char esep) | path expand --no-symlink }
24 | to_string: { |v| $v | path expand --no-symlink | str join (char esep) }
25 | }
26 | "Path": {
27 | from_string: { |s| $s | split row (char esep) | path expand --no-symlink }
28 | to_string: { |v| $v | path expand --no-symlink | str join (char esep) }
29 | }
30 | }
31 |
32 | # Directories to search for scripts when calling source or use
33 | # The default for this is $nu.default-config-dir/scripts
34 | $env.NU_LIB_DIRS = [
35 | ($nu.default-config-dir | path join 'scripts') # add /scripts
36 | ($nu.data-dir | path join 'completions') # default home for nushell completions
37 | # ($env.NUPM_HOME | path join "modules")
38 | ]
39 |
40 | # Directories to search for plugin binaries when calling register
41 | # The default for this is $nu.default-config-dir/plugins
42 | $env.NU_PLUGIN_DIRS = [
43 | ($nu.default-config-dir | path join 'plugins') # add /plugins
44 | ]
45 |
46 | # To add entries to PATH (on Windows you might use Path), you can use the following pattern:
47 | # $env.PATH = ($env.PATH | split row (char esep) | prepend '/some/path')
48 | # An alternate way to add entries to $env.PATH is to use the custom command `path add`
49 | # which is built into the nushell stdlib:
50 | use std "path add"
51 | $env.PATH = ($env.PATH | split row (char esep))
52 | path add ~/.cargo/bin
53 | path add ~/bin
54 | path add ~/.local/bin
55 | $env.PATH = ($env.PATH | uniq)
56 |
57 | # $env.PATH = (
58 | # $env.PATH
59 | # | split row (char esep)
60 | # | ....
61 | # | prepend ($env.NUPM_HOME | path join "scripts")
62 | # | uniq
63 | # )
64 |
65 | # To load from a custom file you can use:
66 | # source ($nu.default-config-dir | path join 'custom.nu')
67 |
68 | $env.XDG_DATA_DIR = "/home/tombh/.local/share"
69 | $env.GTK_THEME = "Adwaita:dark"
70 | $env.GSETTINGS_SCHEMA_DIR = "/usr/share/glib-2.0/schemas"
71 | $env.COTP_DB_PATH = "/home/tombh/.config/cotp/db.cotp"
72 | $env.LANG = "en_GB.UTF-8"
73 | $env.NUPM_HOME = ($env.XDG_DATA_DIR | path join "nupm")
74 | $env.EDITOR = "nvim"
75 | $env.GPG_TTY = (tty | str trim)
76 | $env.DISPLAY = ":0"
77 | $env.VK_ICD_FILENAMES = "/usr/share/vulkan/icd.d"
78 |
79 |
80 | if $env.USER == "streamer" {
81 | $env.CARGO_BUILD_JOBS = 6
82 | $env.DISPLAY = ":1"
83 | }
84 |
85 | if $env.USER == "tombh" {
86 | source nix.nu
87 | }
88 |
89 |
--------------------------------------------------------------------------------
/nushell/scripts/aliases.nu:
--------------------------------------------------------------------------------
1 | alias s = sudo --preserve-env=PATH --preserve-env=HOME env
2 | alias se = sudoedit
3 |
4 | alias dI = sudo dnf install -y
5 | alias dR = sudo dnf remove
6 | alias dU = sudo dnf upgrade --refresh
7 |
8 | alias nI = tbx nix_install
9 | alias nR = nix-env --uninstall
10 | alias nU = nix-env --upgrade
11 |
12 | alias less = less -r
13 | alias ff = fd . -type f -name
14 | alias be = bundle exec
15 | alias kc = kubectl
16 | alias grbim = ~/bin/tbx git_rebase_interactive_detect_base
17 | alias gs = git status -u
18 | alias o = handlr open
19 | alias e = nvim
20 |
21 | alias laa = lsd --long --git --almost-all
22 | # alias lad = la --sort time
23 | # alias las = la --sort size
24 |
25 | def la [path?] {
26 | (
27 | ^lsd
28 | --blocks date,user,size,name
29 | --group-dirs first
30 | --date relative
31 | --sort time
32 | --reverse
33 | --almost-all
34 | ($path | default .)
35 | )
36 | }
37 |
--------------------------------------------------------------------------------
/nushell/scripts/atuin.nu:
--------------------------------------------------------------------------------
1 | # Source this in your ~/.config/nushell/config.nu
2 | $env.ATUIN_SESSION = (atuin uuid)
3 | hide-env -i ATUIN_HISTORY_ID
4 |
5 | # Magic token to make sure we don't record commands run by keybindings
6 | let ATUIN_KEYBINDING_TOKEN = $"# (random uuid)"
7 |
8 | let _atuin_pre_execution = {||
9 | if ($nu | get -i history-enabled) == false {
10 | return
11 | }
12 | let cmd = (commandline)
13 | if ($cmd | is-empty) {
14 | return
15 | }
16 | if not ($cmd | str starts-with $ATUIN_KEYBINDING_TOKEN) {
17 | $env.ATUIN_HISTORY_ID = (atuin history start -- $cmd)
18 | }
19 | }
20 |
21 | let _atuin_pre_prompt = {||
22 | let last_exit = $env.LAST_EXIT_CODE
23 | if 'ATUIN_HISTORY_ID' not-in $env {
24 | return
25 | }
26 | with-env { ATUIN_LOG: error } {
27 | do { atuin history end $'--exit=($last_exit)' -- $env.ATUIN_HISTORY_ID } | complete
28 |
29 | }
30 | hide-env ATUIN_HISTORY_ID
31 | }
32 |
33 | def _atuin_search_cmd [...flags: string] {
34 | let nu_version = do {
35 | let version = version
36 | let major = $version.major?
37 | if $major != null {
38 | # These members are only available in versions > 0.92.2
39 | [$major $version.minor $version.patch]
40 | } else {
41 | # So fall back to the slower parsing when they're missing
42 | $version.version | split row '.' | into int
43 | }
44 | }
45 | [
46 | $ATUIN_KEYBINDING_TOKEN,
47 | ([
48 | `with-env { ATUIN_LOG: error, ATUIN_QUERY: (commandline) } {`,
49 | (if $nu_version.0 <= 0 and $nu_version.1 <= 90 { 'commandline' } else { 'commandline edit' }),
50 | (if $nu_version.1 >= 92 { '(run-external atuin search' } else { '(run-external --redirect-stderr atuin search' }),
51 | ($flags | append [--interactive] | each {|e| $'"($e)"'}),
52 | (if $nu_version.1 >= 92 { ' e>| str trim)' } else {' | complete | $in.stderr | str substring ..-1)'}),
53 | `}`,
54 | ] | flatten | str join ' '),
55 | ] | str join "\n"
56 | }
57 |
58 | $env.config = ($env | default {} config).config
59 | $env.config = ($env.config | default {} hooks)
60 | $env.config = (
61 | $env.config | upsert hooks (
62 | $env.config.hooks
63 | | upsert pre_execution (
64 | $env.config.hooks | get -i pre_execution | default [] | append $_atuin_pre_execution)
65 | | upsert pre_prompt (
66 | $env.config.hooks | get -i pre_prompt | default [] | append $_atuin_pre_prompt)
67 | )
68 | )
69 |
70 | $env.config = ($env.config | default [] keybindings)
71 |
72 | $env.config = (
73 | $env.config | upsert keybindings (
74 | $env.config.keybindings
75 | | append {
76 | name: atuin
77 | modifier: control
78 | keycode: char_r
79 | mode: [emacs, vi_normal, vi_insert]
80 | event: { send: executehostcommand cmd: (_atuin_search_cmd) }
81 | }
82 | )
83 | )
84 |
85 | $env.config = (
86 | $env.config | upsert keybindings (
87 | $env.config.keybindings
88 | | append {
89 | name: atuin
90 | modifier: none
91 | keycode: up
92 | mode: [emacs, vi_normal, vi_insert]
93 | event: {
94 | until: [
95 | {send: menuup}
96 | {send: executehostcommand cmd: (_atuin_search_cmd '--shell-up-key-binding') }
97 | ]
98 | }
99 | }
100 | )
101 | )
102 |
103 |
--------------------------------------------------------------------------------
/nushell/scripts/autostart.nu:
--------------------------------------------------------------------------------
1 | def --env load_keychain [] {
2 | let keychain_env = (
3 | keychain
4 | --eval
5 | --dir $"($env.HOME)/.config/keychain"
6 | --quiet
7 | --noask
8 | --agents gpg,ssh
9 | id_rsa id_ed25519_github
10 | | lines
11 | | where not ($it | is-empty)
12 | | parse "{k}={v}; export {k2};"
13 | | select k v
14 | | transpose --header-row
15 | | into record
16 | )
17 |
18 | # print $keychain_env
19 | $keychain_env | load-env
20 | }
21 |
22 | if (tty) == "/dev/tty1" or (tty) == "/dev/tty2" {
23 | load_keychain
24 |
25 | # Hack for when tmux-resurrect doesn't save the last state file
26 | # TODO: port to nushell? Or move to fish!??
27 | # pushd ~/.config/tmux/resurrect
28 | # ln -sf "$(ls -Art | tail -n3 | head -n1)" last
29 | # popd
30 |
31 | hide-env DISPLAY
32 | # Note that each user has its own `/run/user/1000/wayland-1`.
33 | # Therefore, user `streamer` won't have `wayland-2` for example.
34 | WAYLAND_DISPLAY="wayland-1" tmux start-server
35 | dbus-run-session /opt/wayfire/bin/wayfire > "~/log/wayfire.log"
36 | # killall tmux
37 | }
38 |
39 |
--------------------------------------------------------------------------------
/nushell/scripts/git.nu:
--------------------------------------------------------------------------------
1 | def git_current_branch [] {
2 | git branch --show-current | str trim -c "\n"
3 | }
4 |
5 | alias s = git status -sb
6 | alias g = git
7 | alias ga = git add
8 | alias gaa = git add --all
9 | alias gapa = git add --patch
10 | alias gau = git add --update
11 | alias gb = git branch
12 | alias gba = git branch -a
13 | alias gbd = git branch -d
14 | alias gbl = git blame -b -w
15 | alias gbnm = git branch --no-merged
16 | alias gbr = git branch --remote
17 | alias gbs = git bisect
18 | alias gbsb = git bisect bad
19 | alias gbsg = git bisect good
20 | alias gbsr = git bisect reset
21 | alias gbss = git bisect start
22 | alias gc = git commit -v
23 | alias gc! = git commit -v --amend
24 | alias gca = git commit -v -a
25 | alias gca! = git commit -v -a --amend
26 | alias gcam = git commit -a -m
27 | alias gcan! = git commit -v -a --no-edit --amend
28 | alias gcans! = git commit -v -a -s --no-edit --amend
29 | alias gcb = git checkout -b
30 | alias gcd = git checkout develop
31 | alias gcf = git config --list
32 | alias gcl = git clone --recursive
33 | alias gclean = git clean -fd
34 | alias gcm = git checkout master
35 | alias gcmsg = git commit -m
36 | alias gcn! = git commit -v --no-edit --amend
37 | alias gco = git checkout
38 | alias gcount = git shortlog -sn
39 | alias gcp = git cherry-pick
40 | alias gcpa = git cherry-pick --abort
41 | alias gcpc = git cherry-pick --continue
42 | alias gcs = git commit -S
43 | alias gcsm = git commit -s -m
44 | alias gd = git diff
45 | alias gds = git diff --staged
46 | alias gdt = git diff-tree --no-commit-id --name-only -r
47 | alias gdw = git diff --word-diff
48 | alias gf = git fetch
49 | alias gfa = git fetch --all --prune
50 | alias gfo = git fetch origin
51 | alias gg = git gui citool
52 | alias gga = git gui citool --amend
53 | alias ggpull = git pull origin (git_current_branch)
54 | alias ggpur = ggu
55 | alias ggpush = git push origin (git_current_branch)
56 | alias ggsup = git branch --set-upstream-to=origin/(git_current_branch)
57 | alias ghh = git help
58 | alias gignore = git update-index --assume-unchanged
59 | alias gk = gitk --all --branches
60 | alias gke = gitk --all (git log -g --pretty=%h)
61 | alias gl = git pull
62 | alias glg = git log --stat
63 | alias glgg = git log --graph
64 | alias glgga = git log --graph --decorate --all
65 | alias glgm = git log --graph --max-count=10
66 | alias glgp = git log --stat -p
67 | alias glo = git log --oneline --decorate
68 | alias globurl = noglob urlglobber
69 | alias glog = git log --oneline --decorate --graph
70 | alias gloga = git log --oneline --decorate --graph --all
71 | alias glol = git log --graph --pretty=\%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset\ --abbrev-commit
72 | alias glola = git log --graph --pretty=\%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset\ --abbrev-commit --all
73 | alias glp = _git_log_prettily
74 | alias glum = git pull upstream master
75 | alias gm = git merge
76 | alias gmom = git merge origin/master
77 | alias gmt = git mergetool --no-prompt
78 | alias gmtvim = git mergetool --no-prompt --tool=vimdiff
79 | alias gmum = git merge upstream/master
80 | alias gp = git push
81 | alias gpf = git push --force-with-lease --force-if-includes
82 | alias gpd = git push --dry-run
83 | def gpoat [...tags] {
84 | git push origin --all
85 | git push origin --tags ...$tags
86 | }
87 | def gpristine [] {
88 | git reset --hard
89 | git clean -dfx
90 | }
91 | alias gpsup = git push --set-upstream origin (git_current_branch)
92 | alias gpu = git push upstream
93 | alias gpv = git push -v
94 | alias gr = git remote
95 | alias gra = git remote add
96 | alias grb = git rebase
97 | alias grba = git rebase --abort
98 | alias grbc = git rebase --continue
99 | alias grbi = git rebase -i
100 | alias grbm = git rebase master
101 | alias grbs = git rebase --skip
102 | alias grep = grep --color=auto --exclude-dir={.bzr,CVS,.git,.hg,.svn}
103 | alias grh = git reset HEAD
104 | alias grhh = git reset HEAD --hard
105 | alias grmv = git remote rename
106 | alias grrm = git remote remove
107 | alias grset = git remote set-url
108 | alias grt = cd (git rev-parse --show-toplevel or echo ".")
109 | alias gru = git reset --
110 | alias grup = git remote update
111 | alias grv = git remote -v
112 | alias gsb = git status -sb
113 | alias gsd = git svn dcommit
114 | alias gsi = git submodule init
115 | alias gsps = git show --pretty=short --show-signature
116 | alias gsr = git svn rebase
117 | alias gss = git status -s
118 | alias gst = git status
119 | alias gsta = git stash save
120 | alias gstaa = git stash apply
121 | alias gstc = git stash clear
122 | alias gstd = git stash drop
123 | alias gstl = git stash list
124 | alias gstp = git stash pop
125 | alias gsts = git stash show --text
126 | alias gsu = git submodule update
127 | alias gts = git tag -s
128 | def gtv [] {
129 | git tag | sort
130 | }
131 | alias gunignore = git update-index --no-assume-unchanged
132 | alias gup = git pull --rebase
133 | alias gupv = git pull --rebase -v
134 | alias gwch = git whatchanged -p --abbrev-commit --pretty=medium
135 |
--------------------------------------------------------------------------------
/nushell/scripts/keybindings.nu:
--------------------------------------------------------------------------------
1 | $env.config.keybindings = [
2 | {
3 | name: completion_menu
4 | modifier: none
5 | keycode: tab
6 | mode: [emacs vi_normal vi_insert]
7 | event: {
8 | until: [
9 | { send: menu name: completion_menu }
10 | { send: menunext }
11 | { edit: complete }
12 | ]
13 | }
14 | }
15 | {
16 | name: ide_completion_menu
17 | modifier: control
18 | keycode: char_n
19 | mode: [emacs vi_normal vi_insert]
20 | event: {
21 | until: [
22 | { send: menu name: ide_completion_menu }
23 | { send: menunext }
24 | { edit: complete }
25 | ]
26 | }
27 | }
28 | {
29 | name: history_menu
30 | modifier: control
31 | keycode: char_r
32 | mode: [emacs, vi_insert, vi_normal]
33 | event: { send: menu name: history_menu }
34 | }
35 | {
36 | name: help_menu
37 | modifier: none
38 | keycode: f1
39 | mode: [emacs, vi_insert, vi_normal]
40 | event: { send: menu name: help_menu }
41 | }
42 | {
43 | name: completion_previous_menu
44 | modifier: shift
45 | keycode: backtab
46 | mode: [emacs, vi_normal, vi_insert]
47 | event: { send: menuprevious }
48 | }
49 | {
50 | name: next_page_menu
51 | modifier: control
52 | keycode: char_x
53 | mode: emacs
54 | event: { send: menupagenext }
55 | }
56 | {
57 | name: undo_or_previous_page_menu
58 | modifier: control
59 | keycode: char_z
60 | mode: emacs
61 | event: {
62 | until: [
63 | { send: menupageprevious }
64 | { edit: undo }
65 | ]
66 | }
67 | }
68 | {
69 | name: escape
70 | modifier: none
71 | keycode: escape
72 | mode: [emacs, vi_normal, vi_insert]
73 | event: { send: esc } # NOTE: does not appear to work
74 | }
75 | {
76 | name: cancel_command
77 | modifier: control
78 | keycode: char_c
79 | mode: [emacs, vi_normal, vi_insert]
80 | event: { send: ctrlc }
81 | }
82 | {
83 | name: quit_shell
84 | modifier: control
85 | keycode: char_d
86 | mode: [emacs, vi_normal, vi_insert]
87 | event: { send: ctrld }
88 | }
89 | {
90 | name: clear_screen
91 | modifier: control
92 | keycode: char_l
93 | mode: [emacs, vi_normal, vi_insert]
94 | event: { send: clearscreen }
95 | }
96 | {
97 | name: search_history
98 | modifier: control
99 | keycode: char_q
100 | mode: [emacs, vi_normal, vi_insert]
101 | event: { send: searchhistory }
102 | }
103 | {
104 | name: open_command_editor
105 | modifier: control
106 | keycode: char_o
107 | mode: [emacs, vi_normal, vi_insert]
108 | event: { send: openeditor }
109 | }
110 | {
111 | name: move_up
112 | modifier: none
113 | keycode: up
114 | mode: [emacs, vi_normal, vi_insert]
115 | event: {
116 | until: [
117 | { send: menuup }
118 | { send: up }
119 | ]
120 | }
121 | }
122 | {
123 | name: move_down
124 | modifier: none
125 | keycode: down
126 | mode: [emacs, vi_normal, vi_insert]
127 | event: {
128 | until: [
129 | { send: menudown }
130 | { send: down }
131 | ]
132 | }
133 | }
134 | {
135 | name: move_left
136 | modifier: none
137 | keycode: left
138 | mode: [emacs, vi_normal, vi_insert]
139 | event: {
140 | until: [
141 | { send: menuleft }
142 | { send: left }
143 | ]
144 | }
145 | }
146 | {
147 | name: move_right_or_take_history_hint
148 | modifier: none
149 | keycode: right
150 | mode: [emacs, vi_normal, vi_insert]
151 | event: {
152 | until: [
153 | { send: historyhintcomplete }
154 | { send: menuright }
155 | { send: right }
156 | ]
157 | }
158 | }
159 | {
160 | name: move_one_word_left
161 | modifier: control
162 | keycode: left
163 | mode: [emacs, vi_normal, vi_insert]
164 | event: { edit: movewordleft }
165 | }
166 | {
167 | name: move_one_word_right_or_take_history_hint
168 | modifier: control
169 | keycode: right
170 | mode: [emacs, vi_normal, vi_insert]
171 | event: {
172 | until: [
173 | { send: historyhintwordcomplete }
174 | { edit: movewordright }
175 | ]
176 | }
177 | }
178 | {
179 | name: move_to_line_start
180 | modifier: none
181 | keycode: home
182 | mode: [emacs, vi_normal, vi_insert]
183 | event: { edit: movetolinestart }
184 | }
185 | {
186 | name: move_to_line_start
187 | modifier: control
188 | keycode: char_a
189 | mode: [emacs, vi_normal, vi_insert]
190 | event: { edit: movetolinestart }
191 | }
192 | {
193 | name: move_to_line_end_or_take_history_hint
194 | modifier: none
195 | keycode: end
196 | mode: [emacs, vi_normal, vi_insert]
197 | event: {
198 | until: [
199 | { send: historyhintcomplete }
200 | { edit: movetolineend }
201 | ]
202 | }
203 | }
204 | {
205 | name: move_to_line_end_or_take_history_hint
206 | modifier: control
207 | keycode: char_e
208 | mode: [emacs, vi_normal, vi_insert]
209 | event: {
210 | until: [
211 | { send: historyhintcomplete }
212 | { edit: movetolineend }
213 | ]
214 | }
215 | }
216 | {
217 | name: move_to_line_start
218 | modifier: control
219 | keycode: home
220 | mode: [emacs, vi_normal, vi_insert]
221 | event: { edit: movetolinestart }
222 | }
223 | {
224 | name: move_to_line_end
225 | modifier: control
226 | keycode: end
227 | mode: [emacs, vi_normal, vi_insert]
228 | event: { edit: movetolineend }
229 | }
230 | {
231 | name: move_up
232 | modifier: control
233 | keycode: char_p
234 | mode: [emacs, vi_normal, vi_insert]
235 | event: {
236 | until: [
237 | { send: menuup }
238 | { send: up }
239 | ]
240 | }
241 | }
242 | {
243 | name: move_down
244 | modifier: control
245 | keycode: char_t
246 | mode: [emacs, vi_normal, vi_insert]
247 | event: {
248 | until: [
249 | { send: menudown }
250 | { send: down }
251 | ]
252 | }
253 | }
254 | {
255 | name: delete_one_character_backward
256 | modifier: none
257 | keycode: backspace
258 | mode: [emacs, vi_insert]
259 | event: { edit: backspace }
260 | }
261 | {
262 | name: delete_one_word_backward
263 | modifier: control
264 | keycode: backspace
265 | mode: [emacs, vi_insert]
266 | event: { edit: backspaceword }
267 | }
268 | {
269 | name: delete_one_character_forward
270 | modifier: none
271 | keycode: delete
272 | mode: [emacs, vi_insert]
273 | event: { edit: delete }
274 | }
275 | {
276 | name: delete_one_character_forward
277 | modifier: control
278 | keycode: delete
279 | mode: [emacs, vi_insert]
280 | event: { edit: delete }
281 | }
282 | {
283 | name: delete_one_character_backward
284 | modifier: control
285 | keycode: char_h
286 | mode: [emacs, vi_insert]
287 | event: { edit: backspace }
288 | }
289 | {
290 | name: delete_one_word_backward
291 | modifier: control
292 | keycode: char_w
293 | mode: [emacs, vi_insert]
294 | event: { edit: backspaceword }
295 | }
296 | {
297 | name: move_left
298 | modifier: none
299 | keycode: backspace
300 | mode: vi_normal
301 | event: { edit: moveleft }
302 | }
303 | {
304 | name: newline_or_run_command
305 | modifier: none
306 | keycode: enter
307 | mode: emacs
308 | event: { send: enter }
309 | }
310 | {
311 | name: move_left
312 | modifier: control
313 | keycode: char_b
314 | mode: emacs
315 | event: {
316 | until: [
317 | { send: menuleft }
318 | { send: left }
319 | ]
320 | }
321 | }
322 | {
323 | name: move_right_or_take_history_hint
324 | modifier: control
325 | keycode: char_f
326 | mode: emacs
327 | event: {
328 | until: [
329 | { send: historyhintcomplete }
330 | { send: menuright }
331 | { send: right }
332 | ]
333 | }
334 | }
335 | {
336 | name: redo_change
337 | modifier: control
338 | keycode: char_g
339 | mode: emacs
340 | event: { edit: redo }
341 | }
342 | {
343 | name: undo_change
344 | modifier: control
345 | keycode: char_z
346 | mode: emacs
347 | event: { edit: undo }
348 | }
349 | {
350 | name: paste_before
351 | modifier: control
352 | keycode: char_y
353 | mode: emacs
354 | event: { edit: pastecutbufferbefore }
355 | }
356 | {
357 | name: cut_word_left
358 | modifier: control
359 | keycode: char_w
360 | mode: emacs
361 | event: { edit: cutwordleft }
362 | }
363 | {
364 | name: cut_line_to_end
365 | modifier: control
366 | keycode: char_k
367 | mode: emacs
368 | event: { edit: cuttoend }
369 | }
370 | {
371 | name: cut_line_from_start
372 | modifier: control
373 | keycode: char_u
374 | mode: emacs
375 | event: { edit: cutfromstart }
376 | }
377 | {
378 | name: swap_graphemes
379 | modifier: control
380 | keycode: char_t
381 | mode: emacs
382 | event: { edit: swapgraphemes }
383 | }
384 | {
385 | name: move_one_word_left
386 | modifier: alt
387 | keycode: left
388 | mode: emacs
389 | event: { edit: movewordleft }
390 | }
391 | {
392 | name: move_one_word_right_or_take_history_hint
393 | modifier: alt
394 | keycode: right
395 | mode: emacs
396 | event: {
397 | until: [
398 | { send: historyhintwordcomplete }
399 | { edit: movewordright }
400 | ]
401 | }
402 | }
403 | {
404 | name: move_one_word_left
405 | modifier: alt
406 | keycode: char_b
407 | mode: emacs
408 | event: { edit: movewordleft }
409 | }
410 | {
411 | name: move_one_word_right_or_take_history_hint
412 | modifier: alt
413 | keycode: char_f
414 | mode: emacs
415 | event: {
416 | until: [
417 | { send: historyhintwordcomplete }
418 | { edit: movewordright }
419 | ]
420 | }
421 | }
422 | {
423 | name: delete_one_word_forward
424 | modifier: alt
425 | keycode: delete
426 | mode: emacs
427 | event: { edit: deleteword }
428 | }
429 | {
430 | name: delete_one_word_backward
431 | modifier: alt
432 | keycode: backspace
433 | mode: emacs
434 | event: { edit: backspaceword }
435 | }
436 | {
437 | name: delete_one_word_backward
438 | modifier: alt
439 | keycode: char_m
440 | mode: emacs
441 | event: { edit: backspaceword }
442 | }
443 | {
444 | name: cut_word_to_right
445 | modifier: alt
446 | keycode: char_d
447 | mode: emacs
448 | event: { edit: cutwordright }
449 | }
450 | {
451 | name: upper_case_word
452 | modifier: alt
453 | keycode: char_u
454 | mode: emacs
455 | event: { edit: uppercaseword }
456 | }
457 | {
458 | name: lower_case_word
459 | modifier: alt
460 | keycode: char_l
461 | mode: emacs
462 | event: { edit: lowercaseword }
463 | }
464 | {
465 | name: capitalize_char
466 | modifier: alt
467 | keycode: char_c
468 | mode: emacs
469 | event: { edit: capitalizechar }
470 | }
471 | # The following bindings with `*system` events require that Nushell has
472 | # been compiled with the `system-clipboard` feature.
473 | # This should be the case for Windows, macOS, and most Linux distributions
474 | # Not available for example on Android (termux)
475 | # If you want to use the system clipboard for visual selection or to
476 | # paste directly, uncomment the respective lines and replace the version
477 | # using the internal clipboard.
478 | {
479 | name: copy_selection
480 | modifier: control_shift
481 | keycode: char_c
482 | mode: emacs
483 | event: { edit: copyselection }
484 | # event: { edit: copyselectionsystem }
485 | }
486 | {
487 | name: cut_selection
488 | modifier: control_shift
489 | keycode: char_x
490 | mode: emacs
491 | event: { edit: cutselection }
492 | # event: { edit: cutselectionsystem }
493 | }
494 | # {
495 | # name: paste_system
496 | # modifier: control_shift
497 | # keycode: char_v
498 | # mode: emacs
499 | # event: { edit: pastesystem }
500 | # }
501 | {
502 | name: select_all
503 | modifier: control_shift
504 | keycode: char_a
505 | mode: emacs
506 | event: { edit: selectall }
507 | }
508 |
509 | {
510 | name: change_dir_with_fzf
511 | modifier: alt
512 | keycode: char_c
513 | mode: emacs
514 | event: {
515 | send: executehostcommand,
516 | cmd: "
517 | cd (
518 | atuin search --format "{directory}"
519 | | rg -v "^unknown"
520 | | lines
521 | | uniq
522 | | to text
523 | | fzf
524 | --height=40%
525 | )
526 | "
527 | }
528 | }
529 |
530 | {
531 | name: fuzzy_filefind_fzf
532 | modifier: control
533 | keycode: char_t
534 | mode: [emacs, vi_normal, vi_insert]
535 | event: [
536 | {
537 | send: ExecuteHostCommand
538 | cmd: "commandline edit (
539 | if ((commandline | str trim | str length) == 0) {
540 |
541 | # if empty, search and use result
542 | (fzf --height=40% --layout=reverse | decode utf-8 | str trim)
543 |
544 | } else if (commandline | str ends-with ' ') {
545 |
546 | # if trailing space, search and append result
547 | [
548 | (commandline)
549 | (fzf --height=40% --layout=reverse | decode utf-8 | str trim)
550 | ] | str join
551 |
552 | } else {
553 | # otherwise search for last token
554 |
555 | [
556 | (commandline | split words | reverse | skip 1 | reverse | str join ' ')
557 | (fzf
558 | --height=40%
559 | --layout=reverse
560 | -q (commandline | split words | last)
561 | | decode utf-8 | str trim)
562 | ] | str join ' '
563 |
564 | }
565 | )"
566 | }
567 | ]
568 | }
569 | ]
570 |
--------------------------------------------------------------------------------
/nushell/scripts/main.nu:
--------------------------------------------------------------------------------
1 | # External completer example
2 | # let carapace_completer = {|spans|
3 | # carapace $spans.0 nushell ...$spans | from json
4 | # }
5 |
6 | # The default config record. This is where much of your global configuration is setup.
7 | $env.config = {
8 | show_banner: false # true or false to enable or disable the welcome banner at startup
9 |
10 | ls: {
11 | use_ls_colors: true # use the LS_COLORS environment variable to colorize output
12 | clickable_links: true # enable or disable clickable links. Your terminal has to support links.
13 | }
14 |
15 | rm: {
16 | always_trash: false # always act as if -t was given. Can be overridden with -p
17 | }
18 |
19 | table: {
20 | mode: none # basic, compact, compact_double, light, thin, with_love, rounded, reinforced, heavy, none, other
21 | index_mode: always # "always" show indexes, "never" show indexes, "auto" = show indexes when a table has "index" column
22 | show_empty: true # show 'empty list' and 'empty record' placeholders for command output
23 | padding: { left: 1, right: 1 } # a left right padding of each column in a table
24 | trim: {
25 | methodology: wrapping # wrapping or truncating
26 | wrapping_try_keep_words: true # A strategy used by the 'wrapping' methodology
27 | truncating_suffix: "..." # A suffix used by the 'truncating' methodology
28 | }
29 | header_on_separator: false # show header text on separator/border line
30 | # abbreviated_row_count: 10 # limit data rows from top and bottom after reaching a set point
31 | }
32 |
33 | error_style: "fancy" # "fancy" or "plain" for screen reader-friendly error messages
34 |
35 | # datetime_format determines what a datetime rendered in the shell would look like.
36 | # Behavior without this configuration point will be to "humanize" the datetime display,
37 | # showing something like "a day ago."
38 | datetime_format: {
39 | # normal: '%a, %d %b %Y %H:%M:%S %z' # shows up in displays of variables or other datetime's outside of tables
40 | # table: '%m/%d/%y %I:%M:%S%p' # generally shows up in tabular outputs such as ls. commenting this out will change it to the default human readable datetime format
41 | }
42 |
43 | explore: {
44 | status_bar_background: { fg: "#1D1F21", bg: "#C4C9C6" },
45 | command_bar_text: { fg: "#C4C9C6" },
46 | highlight: { fg: "black", bg: "yellow" },
47 | status: {
48 | error: { fg: "white", bg: "red" },
49 | warn: {}
50 | info: {}
51 | },
52 | selected_cell: { bg: light_blue },
53 | }
54 |
55 | history: {
56 | max_size: 100_000 # Session has to be reloaded for this to take effect
57 | sync_on_enter: true # Enable to share history between multiple sessions, else you have to close the session to write history to file
58 | file_format: "sqlite" # "sqlite" or "plaintext"
59 | isolation: false # only available with sqlite file_format. true enables history isolation, false disables it. true will allow the history to be isolated to the current session using up/down arrows. false will allow the history to be shared across all sessions.
60 | }
61 |
62 | completions: {
63 | case_sensitive: false # set to true to enable case-sensitive completions
64 | quick: true # set this to false to prevent auto-selecting completions when only one remains
65 | partial: true # set this to false to prevent partial filling of the prompt
66 | algorithm: "prefix" # prefix or fuzzy
67 | external: {
68 | enable: true # set to false to prevent nushell looking into $env.PATH to find more suggestions, `false` recommended for WSL users as this look up may be very slow
69 | max_results: 100 # setting it lower can improve completion performance at the cost of omitting some options
70 | completer: null # check 'carapace_completer' above as an example
71 | }
72 | use_ls_colors: true # set this to true to enable file/path/directory completions using LS_COLORS
73 | }
74 |
75 | filesize: {
76 | metric: false # true => KB, MB, GB (ISO standard), false => KiB, MiB, GiB (Windows standard)
77 | format: "auto" # b, kb, kib, mb, mib, gb, gib, tb, tib, pb, pib, eb, eib, auto
78 | }
79 |
80 | cursor_shape: {
81 | emacs: line # block, underscore, line, blink_block, blink_underscore, blink_line, inherit to skip setting cursor shape (line is the default)
82 | vi_insert: block # block, underscore, line, blink_block, blink_underscore, blink_line, inherit to skip setting cursor shape (block is the default)
83 | vi_normal: underscore # block, underscore, line, blink_block, blink_underscore, blink_line, inherit to skip setting cursor shape (underscore is the default)
84 | }
85 |
86 | color_config: $dark_theme # if you want a more interesting theme, you can replace the empty record with `$dark_theme`, `$light_theme` or another custom record
87 | # use_grid_icons: true
88 | footer_mode: 25 # always, never, number_of_rows, auto
89 | float_precision: 2 # the precision for displaying floats in tables
90 | buffer_editor: null # command that will be used to edit the current line buffer with ctrl+o, if unset fallback to $env.EDITOR and $env.VISUAL
91 | use_ansi_coloring: true
92 | bracketed_paste: true # enable bracketed paste, currently useless on windows
93 | edit_mode: emacs # emacs, vi
94 | shell_integration: {
95 | # osc2 abbreviates the path if in the home_dir, sets the tab/window title, shows the running command in the tab/window title
96 | osc2: true
97 | # osc7 is a way to communicate the path to the terminal, this is helpful for spawning new tabs in the same directory
98 | osc7: true
99 | # osc8 is also implemented as the deprecated setting ls.show_clickable_links, it shows clickable links in ls output if your terminal supports it. show_clickable_links is deprecated in favor of osc8
100 | osc8: true
101 | # osc9_9 is from ConEmu and is starting to get wider support. It's similar to osc7 in that it communicates the path to the terminal
102 | osc9_9: false
103 | # osc133 is several escapes invented by Final Term which include the supported ones below.
104 | # 133;A - Mark prompt start
105 | # 133;B - Mark prompt end
106 | # 133;C - Mark pre-execution
107 | # 133;D;exit - Mark execution finished with exit code
108 | # This is used to enable terminals to know where the prompt is, the command is, where the command finishes, and where the output of the command is
109 | osc133: true
110 | # osc633 is closely related to osc133 but only exists in visual studio code (vscode) and supports their shell integration features
111 | # 633;A - Mark prompt start
112 | # 633;B - Mark prompt end
113 | # 633;C - Mark pre-execution
114 | # 633;D;exit - Mark execution finished with exit code
115 | # 633;E - NOT IMPLEMENTED - Explicitly set the command line with an optional nonce
116 | # 633;P;Cwd= - Mark the current working directory and communicate it to the terminal
117 | # and also helps with the run recent menu in vscode
118 | osc633: true
119 | # reset_application_mode is escape \x1b[?1l and was added to help ssh work better
120 | reset_application_mode: true
121 | }
122 | render_right_prompt_on_last_line: false # true or false to enable or disable right prompt to be rendered on last line of the prompt.
123 | use_kitty_protocol: false # enables keyboard enhancement protocol implemented by kitty console, only if your terminal support this.
124 | highlight_resolved_externals: true # true enables highlighting of external commands in the repl resolved by which.
125 | recursion_limit: 50 # the maximum number of times nushell allows recursion before stopping it
126 |
127 | plugins: {} # Per-plugin configuration. See https://www.nushell.sh/contributor-book/plugins.html#configuration.
128 |
129 | plugin_gc: {
130 | # Configuration for plugin garbage collection
131 | default: {
132 | enabled: true # true to enable stopping of inactive plugins
133 | stop_after: 10sec # how long to wait after a plugin is inactive to stop it
134 | }
135 | plugins: {
136 | # alternate configuration for specific plugins, by name, for example:
137 | #
138 | # gstat: {
139 | # enabled: false
140 | # }
141 | }
142 | }
143 |
144 | hooks: {
145 | pre_prompt: [{ null }] # run before the prompt is shown
146 | pre_execution: [{ null }] # run before the repl input is run
147 | env_change: {
148 | PWD: [{|before, after| null }] # run if the PWD environment is different since the last repl input
149 | }
150 | display_output: "if (term size).columns >= 100 { table -e } else { table }" # run to display the output of a pipeline
151 | command_not_found: { null } # return an error message when a command is not found
152 | }
153 | }
154 |
--------------------------------------------------------------------------------
/nushell/scripts/menus.nu:
--------------------------------------------------------------------------------
1 | $env.config.menus = [
2 | # Configuration for default nushell menus
3 | # Note the lack of source parameter
4 | {
5 | name: completion_menu
6 | only_buffer_difference: false
7 | marker: "| "
8 | type: {
9 | layout: columnar
10 | columns: 4
11 | col_width: 20 # Optional value. If missing all the screen width is used to calculate column width
12 | col_padding: 2
13 | }
14 | style: {
15 | text: green
16 | selected_text: { attr: r }
17 | description_text: yellow
18 | match_text: { attr: u }
19 | selected_match_text: { attr: ur }
20 | }
21 | }
22 | {
23 | name: ide_completion_menu
24 | only_buffer_difference: false
25 | marker: "| "
26 | type: {
27 | layout: ide
28 | min_completion_width: 0,
29 | max_completion_width: 50,
30 | max_completion_height: 10, # will be limited by the available lines in the terminal
31 | padding: 0,
32 | border: true,
33 | cursor_offset: 0,
34 | description_mode: "prefer_right"
35 | min_description_width: 0
36 | max_description_width: 50
37 | max_description_height: 10
38 | description_offset: 1
39 | # If true, the cursor pos will be corrected, so the suggestions match up with the typed text
40 | #
41 | # C:\> str
42 | # str join
43 | # str trim
44 | # str split
45 | correct_cursor_pos: false
46 | }
47 | style: {
48 | text: green
49 | selected_text: { attr: r }
50 | description_text: yellow
51 | match_text: { attr: u }
52 | selected_match_text: { attr: ur }
53 | }
54 | }
55 | {
56 | name: history_menu
57 | only_buffer_difference: true
58 | marker: "? "
59 | type: {
60 | layout: list
61 | page_size: 10
62 | }
63 | style: {
64 | text: green
65 | selected_text: green_reverse
66 | description_text: yellow
67 | }
68 | }
69 | {
70 | name: help_menu
71 | only_buffer_difference: true
72 | marker: "? "
73 | type: {
74 | layout: description
75 | columns: 4
76 | col_width: 20 # Optional value. If missing all the screen width is used to calculate column width
77 | col_padding: 2
78 | selection_rows: 4
79 | description_rows: 10
80 | }
81 | style: {
82 | text: green
83 | selected_text: green_reverse
84 | description_text: yellow
85 | }
86 | }
87 | ]
88 |
--------------------------------------------------------------------------------
/nushell/scripts/nix.nu:
--------------------------------------------------------------------------------
1 | export-env {
2 | if ([$env.HOME $env.USER] | all {nu-check}) {
3 |
4 | # Set up the per-user profile.
5 | mut NIX_LINK = [$env.HOME '.nix-profile'] | path join;
6 | mut NIX_LINK_NEW = [$env.HOME '.local/state/nix/profile'];
7 | if 'XDG_STATE_HOME' in $env {
8 | $NIX_LINK_NEW = [$env.XDG_STATE_HOME 'nix/profile'];
9 | }
10 | $NIX_LINK_NEW = ($NIX_LINK_NEW | path join);
11 | if ($NIX_LINK_NEW | path exists) {
12 | $NIX_LINK = $NIX_LINK_NEW;
13 | }
14 |
15 | # Set up environment.
16 | # This part should be kept in sync with nixpkgs:nixos/modules/programs/environment.nix
17 | let NIX_PROFILES = (['@localstatedir@/nix/profiles/default' $NIX_LINK] | str join ' ');
18 |
19 | # Populate bash completions, .desktop files, etc
20 | mut XDG_DATA_DIRS = '';
21 | if 'XDG_DATA_DIRS' not-in $env {
22 | # According to XDG spec the default is /usr/local/share:/usr/share, don't set something that prevents that default
23 | $XDG_DATA_DIRS = (['/usr/local/share' '/usr/share'] | str join (char esep));
24 | }
25 | $XDG_DATA_DIRS = (
26 | $XDG_DATA_DIRS
27 | | split row (char esep)
28 | | append ([$NIX_LINK 'share'] | path join)
29 | | append '/nix/var/nix/profiles/default/share'
30 | | str join (char esep)
31 | );
32 |
33 | # Set $NIX_SSL_CERT_FILE so that Nixpkgs applications like curl work.
34 | mut NIX_SSL_CERT_FILE = '';
35 | if ('/etc/ssl/certs/ca-certificates.crt' | path exists) { # NixOS, Ubuntu, Debian, Gentoo, Arch
36 | $NIX_SSL_CERT_FILE = '/etc/ssl/certs/ca-certificates.crt';
37 | } else if ('/etc/ssl/ca-bundle.pem' | path exists) { # openSUSE Tumbleweed
38 | $NIX_SSL_CERT_FILE = '/etc/ssl/ca-bundle.pem';
39 | } else if ('/etc/ssl/certs/ca-bundle.crt' | path exists) { # Old NixOS
40 | $NIX_SSL_CERT_FILE = '/etc/ssl/certs/ca-bundle.crt';
41 | } else if ('/etc/pki/tls/certs/ca-bundle.crt' | path exists) { # Fedora, CentOS
42 | $NIX_SSL_CERT_FILE = '/etc/pki/tls/certs/ca-bundle.crt';
43 | } else if ([$NIX_LINK 'etc/ssl/certs/ca-bundle.crt'] | path join | path exists) { # fall back to cacert in Nix profile
44 | $NIX_SSL_CERT_FILE = ([$NIX_LINK 'etc/ssl/certs/ca-bundle.crt'] | path join);
45 | } else if ([$NIX_LINK 'etc/ca-bundle.crt'] | path join | path exists) { # old cacert in Nix profile
46 | $NIX_SSL_CERT_FILE = ([$NIX_LINK '/etc/ca-bundle.crt'] | path join);
47 | }
48 |
49 | # Only use MANPATH if it is already set. In general `man` will just simply
50 | # pick up `.nix-profile/share/man` because is it close to `.nix-profile/bin`
51 | # which is in the $PATH. For more info, run `manpath -d`.
52 | if ('MANPATH' in $env) {
53 | export-env {
54 | $env.MANPATH = ([$NIX_LINK 'share/man'] | path join | append $"(char esep)($env.MANPATH)")
55 | }
56 | }
57 |
58 | $env.NIX_PROFILES = $NIX_PROFILES
59 | $env.XDG_DATA_DIRS = $XDG_DATA_DIRS
60 | $env.NIX_SSL_CERT_FILE = $NIX_SSL_CERT_FILE
61 | $env.PATH = ($env.PATH | prepend ([$NIX_LINK 'bin'] | path join))
62 | }
63 | }
64 |
--------------------------------------------------------------------------------
/nushell/scripts/starship.nu:
--------------------------------------------------------------------------------
1 | # this file is both a valid
2 | # - overlay which can be loaded with `overlay use starship.nu`
3 | # - module which can be used with `use starship.nu`
4 | # - script which can be used with `source starship.nu`
5 | export-env { $env.STARSHIP_SHELL = "nu"; load-env {
6 | STARSHIP_SESSION_KEY: (random chars -l 16)
7 | PROMPT_MULTILINE_INDICATOR: (
8 | ^starship prompt --continuation
9 | )
10 |
11 | # Does not play well with default character module.
12 | # TODO: Also Use starship vi mode indicators?
13 | PROMPT_INDICATOR: ""
14 |
15 | PROMPT_COMMAND: {||
16 | # jobs are not supported
17 | (
18 | ^starship prompt
19 | --cmd-duration $env.CMD_DURATION_MS
20 | $"--status=($env.LAST_EXIT_CODE)"
21 | --terminal-width (term size).columns
22 | )
23 | }
24 |
25 | config: ($env.config? | default {} | merge {
26 | render_right_prompt_on_last_line: true
27 | })
28 |
29 | PROMPT_COMMAND_RIGHT: {||
30 | (
31 | ^starship prompt
32 | --right
33 | --cmd-duration $env.CMD_DURATION_MS
34 | $"--status=($env.LAST_EXIT_CODE)"
35 | --terminal-width (term size).columns
36 | )
37 | }
38 | }}
39 |
--------------------------------------------------------------------------------
/nushell/scripts/theme.nu:
--------------------------------------------------------------------------------
1 | # For more information on defining custom themes, see
2 | # https://www.nushell.sh/book/coloring_and_theming.html
3 | # And here is the theme collection
4 | # https://github.com/nushell/nu_scripts/tree/main/themes
5 | let dark_theme = {
6 | # color for nushell primitives
7 | separator: white
8 | leading_trailing_space_bg: { attr: n } # no fg, no bg, attr none effectively turns this off
9 | header: green_bold
10 | empty: blue
11 | # Closures can be used to choose colors for specific values.
12 | # The value (in this case, a bool) is piped into the closure.
13 | # eg) {|| if $in { 'light_cyan' } else { 'light_gray' } }
14 | bool: light_cyan
15 | int: white
16 | filesize: cyan
17 | duration: white
18 | date: purple
19 | range: white
20 | float: white
21 | string: white
22 | nothing: white
23 | binary: white
24 | cell-path: white
25 | row_index: green_bold
26 | record: white
27 | list: white
28 | block: white
29 | hints: dark_gray
30 | search_result: { bg: red fg: white }
31 | shape_and: purple_bold
32 | shape_binary: purple_bold
33 | shape_block: blue_bold
34 | shape_bool: light_cyan
35 | shape_closure: green_bold
36 | shape_custom: green
37 | shape_datetime: cyan_bold
38 | shape_directory: cyan
39 | shape_external: cyan
40 | shape_externalarg: green_bold
41 | shape_external_resolved: light_yellow_bold
42 | shape_filepath: cyan
43 | shape_flag: blue_bold
44 | shape_float: purple_bold
45 | # shapes are used to change the cli syntax highlighting
46 | shape_garbage: { fg: white bg: red attr: b }
47 | shape_glob_interpolation: cyan_bold
48 | shape_globpattern: cyan_bold
49 | shape_int: purple_bold
50 | shape_internalcall: cyan_bold
51 | shape_keyword: cyan_bold
52 | shape_list: cyan_bold
53 | shape_literal: blue
54 | shape_match_pattern: green
55 | shape_matching_brackets: { attr: u }
56 | shape_nothing: light_cyan
57 | shape_operator: yellow
58 | shape_or: purple_bold
59 | shape_pipe: purple_bold
60 | shape_range: yellow_bold
61 | shape_record: cyan_bold
62 | shape_redirection: purple_bold
63 | shape_signature: green_bold
64 | shape_string: green
65 | shape_string_interpolation: cyan_bold
66 | shape_table: blue_bold
67 | shape_variable: purple
68 | shape_vardecl: purple
69 | shape_raw_string: light_purple
70 | }
71 |
--------------------------------------------------------------------------------
/nvim/init.lua:
--------------------------------------------------------------------------------
1 | require("_rocks")
2 |
3 | local tmp = vim.g.rocks_nvim
4 | tmp._log_level = vim.log.levels.DEBUG
5 | vim.g.rocks_nvim = tmp
6 |
7 | require("_utils")
8 | require("_colours")
9 |
10 | require("_keymaps")
11 | require("_neo-tree")
12 | require("_tmux")
13 | require("_lspconfig")
14 | require("_noice")
15 | require("_gitsigns")
16 | require("_blink")
17 | require("_status_line")
18 | require("_options")
19 | require("_formatting")
20 | require("_scrollbar")
21 | require("_telescope")
22 | require("_misc")
23 |
24 | require('local-highlight').setup({ insert_mode = true })
25 | require('nvim-autopairs').setup()
26 | vim.cmd.packadd("novim-mode")
27 |
--------------------------------------------------------------------------------
/nvim/lua/_blink.lua:
--------------------------------------------------------------------------------
1 | require("blink.cmp").setup(
2 | {
3 | keymap = {
4 | [''] = {
5 | function(cmp)
6 | if cmp.snippet_active() then
7 | return cmp.accept()
8 | else
9 | return cmp.select_next()
10 | end
11 | end,
12 | 'snippet_forward',
13 | 'fallback'
14 | },
15 | [''] = { 'select_prev', 'fallback' },
16 | [''] = { 'accept', 'fallback' },
17 | [''] = { 'hide', 'fallback' },
18 | [''] = { 'hide', 'fallback' },
19 | [''] = { 'hide', 'fallback' },
20 | },
21 | completion = {
22 | trigger = {
23 | -- show_on_trigger_character = true,
24 | -- show_on_accept_on_trigger_character = true
25 | },
26 | menu = {
27 | -- auto_show = true,
28 | scrollbar = false
29 | }
30 | },
31 | sources = {
32 | providers = {
33 | snippets = {
34 | opts = {
35 | -- TODO: file an issue about this in blink or rocks?
36 | search_paths = { "~/.local/share/nvim/site/pack/luarocks/opt/friendly-snippets/snippets/" }
37 | }
38 | }
39 | },
40 | }
41 | }
42 | )
43 |
--------------------------------------------------------------------------------
/nvim/lua/_colours.lua:
--------------------------------------------------------------------------------
1 | local is_github_theme_loaded, _ = pcall(require, "tokyonight")
2 | if is_github_theme_loaded then
3 | ---@class tokyonight.Config
4 | require("tokyonight").setup({
5 | style = "night", -- The theme comes in three styles, `storm`, a darker variant `night` and `day`
6 | transparent = true, -- Enable this to disable setting the background color
7 | lualine_bold = true, -- When `true`, section headers in the lualine theme will be bold
8 |
9 | --- You can override specific color groups to use other groups or a hex color
10 | --- function will be called with a ColorScheme tables
11 | -- on_colors = function(_colors) end,
12 |
13 | --- You can override specific highlights to use other groups or a hex color
14 | --- function will be called with a Highlights and ColorScheme table
15 | on_highlights = function(highlights, colours)
16 | -- Borderless Telescope
17 | local prompt = "#2d3149"
18 | highlights.TelescopeNormal = {
19 | bg = colours.bg_dark,
20 | fg = colours.fg_dark,
21 | }
22 | highlights.TelescopeBorder = {
23 | bg = colours.bg_dark,
24 | fg = colours.bg_dark,
25 | }
26 | highlights.TelescopePromptNormal = {
27 | bg = prompt,
28 | }
29 | highlights.TelescopePromptBorder = {
30 | bg = prompt,
31 | fg = prompt,
32 | }
33 | highlights.TelescopePromptTitle = {
34 | bg = prompt,
35 | fg = prompt,
36 | }
37 | highlights.TelescopePreviewTitle = {
38 | bg = colours.bg_dark,
39 | fg = colours.bg_dark,
40 | }
41 | highlights.TelescopeResultsTitle = {
42 | bg = colours.bg_dark,
43 | fg = colours.bg_dark,
44 | }
45 |
46 | highlights.CursorLineNr = {
47 | bg = highlights.CursorLine.bg,
48 | fg = highlights.CursorLine.fg
49 | }
50 |
51 | highlights.LspInlayHint = {
52 | fg = require("tokyonight.util").blend_bg(highlights.LspInlayHint.fg, 0.5)
53 | }
54 |
55 |
56 | -- TODO: They don't work 😢
57 | highlights.NonText = {
58 | fg = '#111111',
59 | }
60 | highlights.ExtraWhitespace = {
61 | bg = '#ff0000'
62 | }
63 | end,
64 | })
65 |
66 | vim.cmd([[colorscheme tokyonight]])
67 | end
68 |
--------------------------------------------------------------------------------
/nvim/lua/_formatting.lua:
--------------------------------------------------------------------------------
1 | vim.api.nvim_create_autocmd('BufWritePre', {
2 | pattern = '*',
3 | callback = function()
4 | if vim.b._formatting_disabled ~= true then
5 | vim.lsp.buf.format({
6 | async = false,
7 | timeout_ms = 10000,
8 | filter = function(client)
9 | -- Never use Typescript LSP to format, rely on Prettier instead
10 | return client.name ~= "tsserver"
11 | end,
12 | })
13 | end
14 | end
15 | })
16 |
17 | vim.api.nvim_create_user_command("FormatEnable", function()
18 | vim.b._formatting_disabled = false
19 | vim.notify("Auto-formatting enabled for buffer")
20 | end, {})
21 |
22 | vim.api.nvim_create_user_command("FormatDisable", function()
23 | vim.b._formatting_disabled = true
24 | vim.notify("Auto-formatting disabled for buffer")
25 | end, {})
26 |
--------------------------------------------------------------------------------
/nvim/lua/_gitsigns.lua:
--------------------------------------------------------------------------------
1 | require("gitsigns").setup({
2 | signs = {
3 | add = { text = '┃' },
4 | change = { text = '┃' },
5 | topdelete = { text = "‾" },
6 | changedelete = { text = "—" },
7 | delete = { text = "_" },
8 | untracked = { text = "┆" },
9 | },
10 | signs_staged = {
11 | add = { text = "│" },
12 | change = { text = "│" },
13 | topdelete = { text = '‾' },
14 | changedelete = { text = "—" },
15 | delete = { text = '_' },
16 | untracked = { text = '┆' },
17 | },
18 | signs_staged_enable = true,
19 | numhl = false,
20 | linehl = false,
21 | watch_gitdir = {
22 | interval = 100,
23 | follow_files = true,
24 | },
25 | sign_priority = 6,
26 | update_debounce = 100,
27 | status_formatter = nil,
28 | word_diff = false,
29 | current_line_blame = true, -- Toggle with `:Gitsigns toggle_current_line_blame`
30 | current_line_blame_opts = {
31 | virt_text = true,
32 | virt_text_pos = "eol", -- 'eol' | 'overlay' | 'right_align'
33 | delay = 100,
34 | ignore_whitespace = false,
35 | },
36 | diff_opts = {
37 | internal = true,
38 | },
39 | })
40 |
41 | require("scrollbar.handlers.gitsigns").setup()
42 |
43 | _G.keymap("", function()
44 | require("gitsigns").stage_hunk()
45 | end)
46 | _G.keymap("", function()
47 | require("gitsigns").reset_hunk()
48 | end)
49 | _G.keymap("", function()
50 | require("gitsigns").preview_hunk()
51 | end)
52 |
--------------------------------------------------------------------------------
/nvim/lua/_keymaps.lua:
--------------------------------------------------------------------------------
1 | _G.keymap = function(key, main_command, selection_command)
2 | local options = { noremap = true, silent = true }
3 |
4 | if type(main_command) == "string" then
5 | main_command = string.format("%s", main_command)
6 | end
7 |
8 | vim.keymap.set({ "i", "n", "c" }, key, main_command, options)
9 |
10 | if selection_command then
11 | -- selection_command = string.format(":'<,'>%s", selection_command)
12 | main_command = selection_command
13 | end
14 |
15 | vim.keymap.set("v", key, main_command, options)
16 | end
17 |
18 | _G.keymap(
19 | "",
20 | function() require('Comment.api').toggle.linewise.current() end,
21 | "(comment_toggle_linewise_visual)"
22 | )
23 |
24 | _G.keymap("", "call novim_mode#ClosePane()")
25 | _G.keymap("", "redo") -- Why doesn't ` or ` work? 🥺
26 | _G.keymap("", "b #")
27 |
28 | -- Jump history navigation
29 | _G.keymap("", 'exec "normal \\"')
30 | _G.keymap("", 'exec "normal 1 \\"')
31 |
--------------------------------------------------------------------------------
/nvim/lua/_lspconfig.lua:
--------------------------------------------------------------------------------
1 | local servers = {
2 | "cssls",
3 | "stylelint_lsp",
4 | "rust_analyzer",
5 | "lua_ls",
6 | "bashls",
7 | "eslint",
8 | "html",
9 | "jsonls",
10 | "terraformls",
11 | "pyright",
12 | "gopls",
13 | "golangci_lint_ls",
14 | "vuels",
15 | "ruff",
16 | "ts_ls",
17 | "tinymist",
18 | "marksman",
19 | "nushell",
20 |
21 | --- Problems installing
22 | -- "solargraph",
23 | -- "wgsl_analyzer",
24 | }
25 |
26 | vim.diagnostic.config({
27 | underline = true,
28 | virtual_text = {
29 | spacing = 2,
30 | },
31 | virtual_lines = true,
32 | severity_sort = true,
33 | signs = {
34 | text = {
35 | [vim.diagnostic.severity.ERROR] = " ",
36 | [vim.diagnostic.severity.WARN] = " ",
37 | [vim.diagnostic.severity.INFO] = " ",
38 | [vim.diagnostic.severity.HINT] = " ",
39 | },
40 | },
41 | float = {
42 | show_header = true,
43 | source = "always",
44 | border = "none",
45 | focusable = false,
46 | },
47 | update_in_insert = true,
48 | flags = {
49 | debounce_text_changes = 1000,
50 | },
51 | })
52 |
53 | vim.lsp.log.set_level(vim.lsp.log.OFF)
54 |
55 | local function on_attach(_client, _bufnr)
56 | _G.keymap("", vim.lsp.buf.code_action)
57 | _G.keymap("", vim.diagnostic.open_float)
58 | _G.keymap("", vim.lsp.buf.rename)
59 | _G.keymap("", vim.lsp.buf.hover)
60 |
61 | _G.keymap("", vim.lsp.buf.signature_help)
62 | _G.keymap("", vim.lsp.buf.type_definition)
63 | _G.keymap("", vim.lsp.buf.declaration)
64 |
65 | _G.keymap("", function()
66 | require('telescope.builtin').lsp_definitions({ reuse_win = true })
67 | end)
68 | _G.keymap("", function()
69 | require('telescope.builtin').lsp_references(
70 | {
71 | include_declaration = false,
72 | reuse_win = true
73 | }
74 | )
75 | end)
76 | _G.keymap("", function()
77 | require('telescope.builtin').lsp_implementations({ reuse_win = true })
78 | end)
79 |
80 | _G.keymap("", function() require('telescope.builtin').diagnostics({ bufnr = 0 }) end)
81 | _G.keymap("", function() require('telescope.builtin').diagnostics({}) end)
82 | end
83 |
84 | for _, server in pairs(servers) do
85 | local capabiltiies = {}
86 |
87 | local config = {
88 | on_attach = on_attach,
89 | capabiltiies = require("blink.cmp").get_lsp_capabilities(capabiltiies),
90 | }
91 |
92 | if server == "lua_ls" then
93 | config.settings = {
94 | Lua = {
95 | diagnostics = {
96 | globals = { "vim", "describe", "it", "before_each", "after_each" },
97 | },
98 | },
99 | }
100 | end
101 |
102 | if server == "rust_analyzer" then
103 | config.settings = {
104 | ["rust-analyzer"] = {
105 | -- cargo = {
106 | -- cfgs = { spirv = "" },
107 | -- },
108 | checkOnSave = {
109 | overrideCommand = {
110 | "cargo",
111 | "clippy",
112 | "--message-format=json",
113 | "--all",
114 | "--all-targets",
115 | -- "--all-features",
116 | -- "--",
117 | -- "-W",
118 | -- "clippy::all",
119 | -- "-W",
120 | -- "clippy::pedantic",
121 | -- "-W",
122 | -- "clippy::restriction",
123 | -- "-W",
124 | -- "clippy::nursery",
125 | -- "-W",
126 | -- "clippy::cargo",
127 | -- "-W",
128 | -- "missing_docs",
129 | },
130 | },
131 | -- Just to get cfg(not(test)) to not show warning
132 | diagnostics = { disabled = { "inactive-code" } },
133 | },
134 | }
135 | end
136 |
137 | require("lspconfig")[server].setup(config)
138 | end
139 |
140 | local is_mason_installed, _ = pcall(require, "mason")
141 | if is_mason_installed then
142 | -- `nu` is already installed
143 | _G.removeByKey(servers, "nushell")
144 |
145 | require("mason").setup()
146 | require("mason-lspconfig").setup({
147 | -- A list of servers to automatically install if they're not already installed.
148 | -- This setting has no relation with the `automatic_installation` setting.
149 | ---@type string[]
150 | ensure_installed = servers,
151 |
152 | -- Whether servers that are set up (via lspconfig) should be automatically installed if they're not already installed.
153 | -- This setting has no relation with the `ensure_installed` setting.
154 | -- Can either be:
155 | -- - false: Servers are not automatically installed.
156 | -- - true: All servers set up via lspconfig are automatically installed.
157 | -- - { exclude: string[] }: All servers set up via lspconfig, except the ones provided in the list, are automatically installed.
158 | -- Example: automatic_installation = { exclude = { "rust_analyzer", "solargraph" } }
159 | ---@type boolean
160 | automatic_installation = true,
161 |
162 | -- See `:h mason-lspconfig.setup_handlers()`
163 | ---@type table?
164 | handlers = nil,
165 | })
166 | end
167 |
168 | vim.api.nvim_create_user_command("LSPInlayHintsEnable", function()
169 | vim.lsp.inlay_hint.enable(true)
170 | end, {})
171 |
172 | vim.api.nvim_create_user_command("LSPInlayHintsDisable", function()
173 | vim.lsp.inlay_hint.enable(false)
174 | end, {})
175 |
--------------------------------------------------------------------------------
/nvim/lua/_misc.lua:
--------------------------------------------------------------------------------
1 | -- Remember cursor position
2 | -- Thanks to: https://github.com/creativenull/dotfiles/blob/9ae60de4f926436d5682406a5b801a3768bbc765/config/nvim/init.lua#L70-L86
3 | vim.api.nvim_create_autocmd('BufReadPost', {
4 | callback = function(args)
5 | local valid_line = vim.fn.line([['"]]) >= 1 and vim.fn.line([['"]]) < vim.fn.line('$')
6 | local not_commit = vim.b[args.buf].filetype ~= 'commit'
7 |
8 | if valid_line and not_commit then
9 | vim.cmd([[normal! g`"]])
10 | end
11 | end,
12 | })
13 |
--------------------------------------------------------------------------------
/nvim/lua/_neo-tree.lua:
--------------------------------------------------------------------------------
1 | require("neo-tree").setup({
2 | close_if_last_window = true,
3 | popup_border_style = "rounded",
4 | default_component_configs = {
5 | modified = {
6 | symbol = "",
7 | },
8 | },
9 | filesystem = {
10 | use_libuv_file_watcher = true,
11 | follow_current_file = { enabled = true },
12 | hijack_netrw_behavior = "open_default",
13 | filtered_items = {
14 | visible = true, -- when true, they will just be displayed differently than normal items
15 | hide_hidden = false,
16 | },
17 | },
18 | window = {
19 | width = 30,
20 | },
21 | })
22 |
23 | _G.keymap("", "Neotree focus")
24 |
25 | _G.keymap("", "Neotree show toggle")
26 | _G.keymap("", "Neotree float git_status")
27 |
28 | vim.api.nvim_create_autocmd('UIEnter', {
29 | pattern = '*',
30 | callback = function()
31 | if vim.bo.filetype == "gitcommit" then
32 | return
33 | end
34 |
35 | -- The `vim.schedule` gives neo-tree a moment to set itself up to not be identified as
36 | -- a normal text file.
37 | if vim.bo.filetype ~= "" then
38 | if vim.fn.winwidth("%") > 120 then
39 | vim.schedule(function()
40 | vim.api.nvim_command("Neotree show")
41 | end)
42 | end
43 | else
44 | if vim.fn.winwidth("%") > 120 then
45 | -- Doesn't look like there's a file, so choose one
46 | -- TODO: But files without extensions, for example, don't report a filetype 🤔
47 | vim.schedule(function()
48 | vim.api.nvim_command("Neotree focus")
49 | end)
50 | end
51 | end
52 | end
53 | })
54 |
55 | vim.api.nvim_create_autocmd('FocusGained', {
56 | pattern = '*',
57 | callback = function()
58 | require("neo-tree.sources.manager").refresh("filesystem")
59 | require("neo-tree.events").fire_event("git_event")
60 | end
61 | })
62 |
--------------------------------------------------------------------------------
/nvim/lua/_noice.lua:
--------------------------------------------------------------------------------
1 | require("noice").setup({
2 | routes = {
3 | { filter = { event = "msg_show", kind = "", find = "written" }, view = "mini" },
4 | { filter = { event = "msg_show", kind = "", find = "yanked into" }, view = "mini" },
5 | { filter = { find = "Format request failed" }, view = "mini" },
6 |
7 | { filter = { event = "msg_show", kind = "", find = "line less;" }, skip = true },
8 | { filter = { event = "msg_show", kind = "", find = "fewer lines" }, skip = true },
9 | { filter = { event = "msg_show", kind = "", find = "lines;" }, skip = true },
10 | { filter = { event = "msg_show", kind = "", find = "before;" }, skip = true },
11 | { filter = { event = "msg_show", kind = "", find = "after;" }, skip = true },
12 | { filter = { event = "msg_show", kind = "", find = "change;" }, skip = true },
13 | { filter = { event = "msg_show", kind = "", find = "changes;" }, skip = true },
14 | { filter = { event = "msg_show", kind = "", find = "Already at oldest change" }, skip = true },
15 | { filter = { event = "msg_show", kind = "", find = "Already at newest change" }, skip = true },
16 | }
17 | })
18 |
--------------------------------------------------------------------------------
/nvim/lua/_options.lua:
--------------------------------------------------------------------------------
1 | -- Tabs should be real tabs and be disaplyed as 2 wide
2 | vim.opt.expandtab = false
3 | vim.opt.shiftwidth = 2
4 | vim.opt.softtabstop = 2
5 | vim.opt.tabstop = 2
6 |
7 | -- Don't keep backups.
8 | -- Also is needed for filesystem watchers to detect when we save a file.
9 | vim.opt.swapfile = false
10 | vim.opt.backup = false
11 | vim.opt.writebackup = false
12 |
13 | -- Show the current line background
14 | vim.opt.cursorline = true
15 |
16 | -- The gutter is always 2-wide, so there's no jarring screen jump when gutters
17 | -- get icons in them.
18 | vim.opt.signcolumn = "yes"
19 | vim.opt.numberwidth = 2
20 |
21 | -- 24 bit colours
22 | vim.opt.termguicolors = true
23 |
24 | -- Don't wrap long lines
25 | vim.opt.wrap = false
26 |
27 | --
28 | vim.opt.cursorlineopt = 'screenline' -- TODO: Add to Novim-mode?
29 |
30 | -- Various "hidden" chars, but don't seem to work 😞
31 | vim.list = true
32 | vim.opt.fillchars = { eob = ' ', diff = ' ', foldopen = '▾', foldsep = '│', foldclose = '▸' }
33 | vim.opt.listchars = { tab = '——', eol = '↲', nbsp = '␣', trail = ' ', extends = '⟩', precedes = '⟨' }
34 |
35 | -- Why??
36 | vim.opt.hidden = true
37 | vim.opt.ignorecase = true
38 |
39 | -- Git signs and word-under-cursor highlight
40 | vim.opt.updatetime = 250
41 |
42 | -- Use tmux.nvim's special nvim/tmux pane navigation
43 | vim.g.novim_mode_use_pane_controls = 0
44 |
--------------------------------------------------------------------------------
/nvim/lua/_rocks.lua:
--------------------------------------------------------------------------------
1 | do
2 | -- Specifies where to install/use rocks.nvim
3 | local install_location = vim.fs.joinpath(vim.fn.stdpath("data"), "rocks")
4 |
5 | -- Set up configuration options related to rocks.nvim (recommended to leave as default)
6 | local rocks_config = {
7 | rocks_path = vim.fs.normalize(install_location),
8 | }
9 |
10 | vim.g.rocks_nvim = rocks_config
11 |
12 | -- Configure the package path (so that plugin code can be found)
13 | local luarocks_path = {
14 | vim.fs.joinpath(rocks_config.rocks_path, "share", "lua", "5.1", "?.lua"),
15 | vim.fs.joinpath(rocks_config.rocks_path, "share", "lua", "5.1", "?", "init.lua"),
16 | }
17 | package.path = package.path .. ";" .. table.concat(luarocks_path, ";")
18 |
19 | -- Configure the C path (so that e.g. tree-sitter parsers can be found)
20 | local luarocks_cpath = {
21 | vim.fs.joinpath(rocks_config.rocks_path, "lib", "lua", "5.1", "?.so"),
22 | vim.fs.joinpath(rocks_config.rocks_path, "lib64", "lua", "5.1", "?.so"),
23 | }
24 | package.cpath = package.cpath .. ";" .. table.concat(luarocks_cpath, ";")
25 |
26 | -- Load all installed plugins, including rocks.nvim itself
27 | vim.opt.runtimepath:append(
28 | vim.fs.joinpath(rocks_config.rocks_path, "lib", "luarocks", "rocks-5.1", "rocks.nvim", "*")
29 | )
30 | end
31 |
32 | -- If rocks.nvim is not installed then install it!
33 | if not pcall(require, "rocks") then
34 | local rocks_location = vim.fs.joinpath(vim.fn.stdpath("cache"), "rocks.nvim")
35 |
36 | if not vim.uv.fs_stat(rocks_location) then
37 | -- Pull down rocks.nvim
38 | vim.fn.system({
39 | "git",
40 | "clone",
41 | "--filter=blob:none",
42 | "https://github.com/nvim-neorocks/rocks.nvim",
43 | rocks_location,
44 | })
45 | end
46 | assert(vim.v.shell_error == 0, "rocks.nvim installation failed. Try exiting and re-entering Neovim!")
47 |
48 | vim.fn.system({
49 | "which",
50 | "lua",
51 | })
52 | assert(vim.v.shell_error == 0, "`lua` not installed")
53 |
54 | vim.fn.system({
55 | "which",
56 | "luajit",
57 | })
58 | assert(vim.v.shell_error == 0, "`luajit` not installed")
59 |
60 | vim.cmd.source(vim.fs.joinpath(rocks_location, "bootstrap.lua"))
61 |
62 | vim.fn.delete(rocks_location, "rf")
63 | end
64 |
--------------------------------------------------------------------------------
/nvim/lua/_scrollbar.lua:
--------------------------------------------------------------------------------
1 | local colors = require("tokyonight.colors").setup()
2 |
3 | require("scrollbar").setup({
4 | handle = {
5 | text = " ",
6 | blend = 20,
7 | color = colors.bg_highlight,
8 | color_nr = nil, -- cterm
9 | highlight = "CursorLine",
10 | hide_if_all_visible = true, -- Hides handle if all lines are visible
11 | },
12 | marks = {
13 | GitAdd = {
14 | text = "│",
15 | },
16 | GitChange = {
17 | text = "│",
18 | },
19 | },
20 | excluded_filetypes = {
21 | "prompt",
22 | "TelescopePrompt",
23 | "noice",
24 | "neo-tree",
25 | },
26 | handlers = {
27 | cursor = false,
28 | gitsigns = true, -- Requires gitsigns
29 | },
30 | })
31 |
--------------------------------------------------------------------------------
/nvim/lua/_status_line.lua:
--------------------------------------------------------------------------------
1 | local active_lsp_clients = function()
2 | local bufnr = vim.api.nvim_get_current_buf()
3 |
4 | local clients = vim.lsp.buf_get_clients(bufnr)
5 | if next(clients) == nil then
6 | return ""
7 | end
8 |
9 | local c = {}
10 | for _, client in pairs(clients) do
11 | table.insert(c, client.name)
12 | end
13 | return "\u{f085} " .. table.concat(c, ",")
14 | end
15 |
16 | require("lualine").setup({
17 | options = {
18 | icons_enabled = true,
19 | theme = "tokyonight",
20 | component_separators = { left = "", right = "" },
21 | section_separators = { left = "", right = "" },
22 | disabled_filetypes = {},
23 | always_divide_middle = true,
24 | globalstatus = true,
25 | refresh = {
26 | statusline = 50,
27 | },
28 | },
29 | sections = {
30 | lualine_a = {
31 | {
32 | "filename",
33 | path = 1,
34 | symbols = {
35 | modified = " ", -- Text to show when the file is modified.
36 | readonly = " ", -- Text to show when the file is non-modifiable or readonly.
37 | unnamed = "[No Name]", -- Text to show for unnamed buffers.
38 | },
39 | },
40 | },
41 | lualine_b = {
42 | "branch",
43 | { "diff", symbols = { added = " ", modified = " ", removed = " " } },
44 | {
45 | "diagnostics",
46 | update_in_insert = true,
47 | symbols = { error = " ", warn = " ", info = " ", hint = " " },
48 | },
49 | },
50 | lualine_c = {},
51 | lualine_x = {},
52 | lualine_y = { active_lsp_clients },
53 | lualine_z = { "location" },
54 | },
55 | lualine_c = {},
56 | inactive_sections = {
57 | lualine_a = {},
58 | lualine_b = {},
59 | lualine_c = { "filename" },
60 | lualine_x = {},
61 | lualine_y = {},
62 | lualine_z = {},
63 | },
64 | tabline = {},
65 | extensions = { "neo-tree", "mason" },
66 | })
67 |
--------------------------------------------------------------------------------
/nvim/lua/_telescope.lua:
--------------------------------------------------------------------------------
1 | require("telescope").setup({
2 | defaults = {
3 | mappings = {
4 | i = {
5 | [""] = require("telescope.actions").close,
6 | },
7 | },
8 | },
9 | extensions = {
10 | -- Converts menus (eg LSP code actions) to Telescope UIs
11 | ["ui-select"] = {
12 | require("telescope.themes").get_dropdown({
13 | layout_strategy = "horizontal",
14 | layout_config = {
15 | horizontal = {
16 | width = 75,
17 | height = 25,
18 | },
19 | },
20 | }),
21 | },
22 | },
23 | })
24 | require("telescope").load_extension("ui-select")
25 |
26 | _G.keymap("", "Telescope find_files")
27 |
28 | _G.keymap("", function()
29 | require("telescope.builtin").commands()
30 | end)
31 |
32 | _G.keymap("", function()
33 | require("telescope.builtin").buffers({ sort_mru = true, ignore_current_buffer = true })
34 | end)
35 |
36 | vim.g.novim_mode_use_finding = 0
37 | _G.keymap("", function()
38 | require("telescope.builtin").current_buffer_fuzzy_find()
39 | end)
40 |
41 | _G.keymap("", "Telescope resume")
42 | _G.keymap("", "Telescope command_history")
43 |
44 | _G.keymap("", function()
45 | require("telescope.builtin").live_grep()
46 | end)
47 |
48 | _G.keymap("", function()
49 | require("telescope.builtin").live_grep({
50 | vimgrep_arguments = {
51 | "rg",
52 | "--color=never",
53 | "--no-heading",
54 | "--with-filename",
55 | "--line-number",
56 | "--column",
57 | "--smart-case",
58 | "-uuu",
59 | },
60 | })
61 | end)
62 |
63 | _G.keymap("", function()
64 | require("telescope.builtin").lsp_document_symbols({ symbols = 'function' })
65 | end)
66 |
--------------------------------------------------------------------------------
/nvim/lua/_tmux.lua:
--------------------------------------------------------------------------------
1 | require("tmux").setup({
2 | copy_sync = {
3 | -- enables copy sync. by default, all registers are synchronized.
4 | -- to control which registers are synced, see the `sync_*` options.
5 | enable = false,
6 | },
7 | navigation = {
8 | -- cycles to opposite pane while navigating into the border
9 | cycle_navigation = true,
10 |
11 | -- enables default keybindings (C-hjkl) for normal mode
12 | enable_default_keybindings = false,
13 |
14 | -- prevents unzoom tmux when navigating beyond vim border
15 | persist_zoom = false,
16 | },
17 | resize = {
18 | -- enables default keybindings (A-hjkl) for normal mode
19 | enable_default_keybindings = true,
20 |
21 | -- sets resize steps for x axis
22 | resize_step_x = 1,
23 |
24 | -- sets resize steps for y axis
25 | resize_step_y = 1,
26 | },
27 | })
28 |
29 | _G.keymap("", function()
30 | require("tmux").move_left()
31 | end)
32 |
33 | _G.keymap("", function()
34 | require("tmux").move_right()
35 | end)
36 |
37 | _G.keymap("", function()
38 | require("tmux").move_top()
39 | end)
40 |
41 | _G.keymap("", function()
42 | require("tmux").move_bottom()
43 | end)
44 |
--------------------------------------------------------------------------------
/nvim/lua/_utils.lua:
--------------------------------------------------------------------------------
1 | _G.startswith = function(self, str)
2 | return self:find("^" .. str) ~= nil
3 | end
4 |
5 | _G.removeByKey = function(table, value)
6 | for i, v in pairs(table) do
7 | if (v == value) then
8 | table[i] = nil
9 | end
10 | end
11 | end
12 |
--------------------------------------------------------------------------------
/nvim/rocks.toml:
--------------------------------------------------------------------------------
1 | # This is your rocks.nvim plugins declaration file.
2 | # Here is a small yet pretty detailed example on how to use it:
3 |
4 | #n List of non-Neovim rocks.
5 | # This includes things like `toml` or other lua packages.
6 | [rocks]
7 |
8 | # List of Neovim plugins to install alongside their versions.
9 | # If the plugin name contains a dot then you must add quotes to the key name!
10 | [plugins]
11 | "rocks.nvim" = "2.43.1"
12 | "tokyonight.nvim" = "4.11.0"
13 | "neo-tree.nvim" = "3.30"
14 | "tmux.nvim" = "scm"
15 | "mason.nvim" = "1.11.0"
16 | "mason-lspconfig.nvim" = "1.32.0"
17 | "noice.nvim" = "4.10.0"
18 | "rocks-git.nvim" = "2.5.2"
19 | "lualine.nvim" = "scm"
20 | "comment.nvim" = "0.8.0"
21 | "telescope-ui-select.nvim" = "scm"
22 | "rocks-treesitter.nvim" = "1.3.0"
23 | friendly-snippets = "scm"
24 | nvim-autopairs = "scm"
25 | nvim-notify = "3.15.0"
26 |
27 | tree-sitter-rust = "0.0.41"
28 | tree-sitter-just = "0.0.36"
29 | tree-sitter-toml = "0.0.31"
30 | tree-sitter-python = "0.0.40"
31 | tree-sitter-yaml = "0.0.31"
32 | tree-sitter-javascript = "0.0.36"
33 | tree-sitter-nu = "0.0.33"
34 | tree-sitter-bash = "0.0.40"
35 | tree-sitter-gitignore = "0.0.29"
36 | tree-sitter-kdl = "0.0.29"
37 | tree-sitter-ini = "0.0.29"
38 | tree-sitter-tmux = "0.0.29"
39 | tree-sitter-markdown = "0.0.37"
40 | tree-sitter-json = "0.0.36"
41 | tree-sitter-css = "0.0.36"
42 |
43 | tree-sitter-gitcommit = "0.0.33"
44 | tree-sitter-git_rebase = "0.0.29"
45 | tree-sitter-diff = "0.0.32"
46 | tree-sitter-xml = "0.0.36"
47 | tree-sitter-ron = "0.0.29"
48 | tree-sitter-make = "0.0.29"
49 | tree-sitter-html = "0.0.36"
50 | tree-sitter-wgsl = "0.0.31"
51 | tree-sitter-desktop = "0.0.8"
52 | tree-sitter-go = "0.0.39"
53 | "gitsigns.nvim"= "1.0.0"
54 | tree-sitter-ruby = "0.0.35"
55 | "diffview.nvim" = "scm"
56 | tree-sitter-glsl = "0.0.30"
57 | tree-sitter-sql = "0.0.40"
58 |
59 | [plugins."blink.cmp"]
60 | git = "saghen/blink.cmp"
61 | rev = "v0.12.3"
62 |
63 | [plugins.novim-mode]
64 | git = "tombh/novim-mode"
65 | rev = "next"
66 | opt = true
67 |
68 | [plugins."telescope.nvim"]
69 | git = "nvim-telescope/telescope.nvim"
70 | rev = "78857db"
71 |
72 | [plugins.nvim-scrollbar]
73 | git = "petertriho/nvim-scrollbar"
74 | rev = "6994eb9f73d5fdc36ee2c8717940e8c853e51a49"
75 |
76 | [plugins."local-highlight.nvim"]
77 | git = "tzachar/local-highlight.nvim"
78 | rev = "c8e5fa9a945b7e99bccba2c9993b4d7a0327173d"
79 |
80 | [treesitter]
81 | auto_highlight = "all"
82 | auto_install = "prompt" # true | false
83 | disable = []
84 |
85 |
--------------------------------------------------------------------------------
/sampler.yml:
--------------------------------------------------------------------------------
1 | runcharts:
2 | - title: Ping times 10mins
3 | position: [[0, 22], [80, 20]]
4 | rate-ms: 10000
5 | legend:
6 | enabled: true
7 | details: false
8 | scale: 2
9 | items:
10 | - label: GOOGLE
11 | color: 178
12 | sample: tbx ping_just_ms www.google.com
13 | - label: BING
14 | sample: tbx ping_just_ms www.bing.com
15 | - title: Ping times 10s
16 | position: [[0, 0], [80, 23]]
17 | rate-ms: 1000
18 | legend:
19 | enabled: true
20 | details: false
21 | scale: 2
22 | items:
23 | - label: GOOGLE
24 | color: 178
25 | sample: tbx ping_just_ms www.google.com 0.1
26 | - label: BING
27 | sample: tbx ping_just_ms www.bing.com 0.1
28 |
--------------------------------------------------------------------------------
/starship.toml:
--------------------------------------------------------------------------------
1 | # format = """$character"""
2 | # right_format = """$git_status"""
3 |
4 | [character]
5 | success_symbol = "[](fg:#007cb1)"
6 | error_symbol = "[](fg:red)"
7 |
8 | [battery]
9 | disabled = true
10 |
11 | [package]
12 | disabled = true
13 |
14 | [directory]
15 | style = "fg:#007cb1"
16 |
17 | [kubernetes]
18 | disabled = true
19 |
20 | [gcloud]
21 | disabled = true
22 |
23 | [aws]
24 | disabled = true
25 |
26 | [git_branch]
27 | format = '[$symbol$branch(:$remote_branch)]($style) '
28 |
29 | [git_status]
30 | format = '([$all_status$ahead_behind]($style) )'
31 | conflicted = "⚠️ "
32 | ahead = "⇡${count}"
33 | diverged = "⇕⇡${ahead_count}⇣${behind_count}"
34 | behind = "⇣${count}"
35 | untracked = "[ ](fg:#ffc0cb)"
36 | stashed = "[ ](blue)"
37 | modified = "[ ](yellow)"
38 | staged = '[$count](green)'
39 | renamed = "➡️ "
40 | deleted = " "
41 |
--------------------------------------------------------------------------------
/starship_streamer.toml:
--------------------------------------------------------------------------------
1 | # format = """$character"""
2 | # right_format = """$git_status"""
3 |
4 | [character]
5 | success_symbol = "[ ](fg:#007cb1)"
6 | error_symbol = "[ ](fg:red)"
7 |
8 | [battery]
9 | disabled = true
10 |
11 | [package]
12 | disabled = true
13 |
14 | [directory]
15 | style = "fg:#007cb1"
16 |
17 | [kubernetes]
18 | disabled = true
19 |
20 | [gcloud]
21 | disabled = true
22 |
23 | [aws]
24 | disabled = true
25 |
26 | [git_branch]
27 | format = '[$symbol$branch(:$remote_branch)]($style) '
28 |
29 | [git_status]
30 | format = '([$all_status$ahead_behind]($style) )'
31 | conflicted = "⚠️ "
32 | ahead = "⇡${count}"
33 | diverged = "⇕⇡${ahead_count}⇣${behind_count}"
34 | behind = "⇣${count}"
35 | untracked = "[ ](fg:#ffc0cb)"
36 | stashed = "[ ](blue)"
37 | modified = "[ ](yellow)"
38 | staged = '[$count](green)'
39 | renamed = "➡️ "
40 | deleted = " "
41 |
42 | # [shell]
43 | # disabled = false
44 |
--------------------------------------------------------------------------------
/tmux/tmux.conf.main:
--------------------------------------------------------------------------------
1 | base_path="$HOME/.config/tmux"
2 |
3 | setenv -g TMUX_PLUGIN_MANAGER_PATH "$base_path/plugins/"
4 |
5 | # Unbind ALL keybindings whilst REBINDING defaults
6 | # run-shell '\
7 | # export f=$(mktemp) \
8 | # && tmux -f /dev/null -L temp start-server \; list-keys > $f \
9 | # && tmux unbind -a \; source-file $f'
10 | # Reload tmux config
11 | bind-key R source-file $base_path/tmux.conf \; display-message "$base_path/tmux.conf reloaded"
12 |
13 | # List of plugins
14 | set -g @plugin 'tmux-plugins/tpm'
15 | set -g @plugin 'tmux-plugins/tmux-sensible'
16 | set -g @plugin 'tmux-plugins/tmux-resurrect'
17 | set -g @plugin 'tmux-plugins/tmux-continuum'
18 | set -g @plugin 'tmux-plugins/tmux-open'
19 | set -g @plugin 'tmux-plugins/tmux-prefix-highlight'
20 | set -g @plugin 'fcsonline/tmux-thumbs'
21 |
22 | if "test ! -d $base_path/plugins/tpm" \
23 | "run 'git clone https://github.com/tmux-plugins/tpm $base_path/plugins/tpm && $base_path/plugins/tpm/bin/install_plugins'"
24 |
25 | source-file "$base_path/theme.conf"
26 |
27 | # Neovim's `:checkhealth` recomends `tmux-256color`
28 | set -g default-terminal "tmux-256color"
29 | set -g set-clipboard on
30 |
31 | # What's this for?
32 | set -ga terminal-overrides ",xterm-256color:RGB"
33 |
34 | set -ga terminal-features "sync"
35 |
36 | # undercurl support
37 | set -as terminal-overrides ',*:Smulx=\E[4::%p1%dm'
38 | # underscore colours - needs tmux-3.0
39 | set -as terminal-overrides ',*:Setulc=\E[58::2::%p1%{65536}%/%d::%p1%{256}%/%{255}%&%d::%p1%{255}%&%d%;m'
40 |
41 | # I think this forces the client window size to be the biggest one
42 | set -g window-size latest
43 | setw -g aggressive-resize on
44 |
45 | # Detects whether Vim is currently loaded
46 | is_vim="ps -o state= -o comm= -t '#{pane_tty}' | grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'"
47 | # is_vim="^ps -o state= -o comm= -t '#{pane_tty}' | grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|l?n?vim?x?|fzf)(diff)?$'"
48 |
49 | # Hmm 🙄 Needed for Home/End in Neovim
50 | # See: https://github.com/neovim/neovim/issues/6134#issuecomment-758475291
51 | bind-key -n Home send Escape "OH"
52 | bind-key -n End send Escape "OF"
53 |
54 | # The main shortcut to access all tmux's commands
55 | set-option -g prefix C-a
56 |
57 | # Mouse support. Clicking in panes to switch to them, etc
58 | set -g mouse on
59 |
60 | # Update tmux pane titles
61 | set -g allow-rename 1
62 |
63 | # So vim knows when it gets focus. Used so that autoread detects changes
64 | # to files not made by the editor. Requires 'tmux-plugins/vim-tmux-focus-events'
65 | # in vim.
66 | set -g focus-events on
67 | # Makes vim more responsive inside tmux??
68 | set -g escape-time 0
69 |
70 | # Try to save on memory by limiting how far you can scrollback
71 | set -g history-limit 10000
72 |
73 | # Smart pane switching with awareness of Vim splits.
74 | # See: https://github.com/christoomey/vim-tmux-navigator
75 | bind-key -n M-Left select-pane -L
76 | bind-key -n M-Down select-pane -D
77 | bind-key -n M-Right select-pane -R
78 | bind-key -n M-Up select-pane -U
79 |
80 |
81 | bind-key -n M-Left if-shell "$is_vim" 'send-keys M-Left' { if -F '#{pane_at_left}' '' 'select-pane -L' }
82 | bind-key -n M-Down if-shell "$is_vim" 'send-keys M-Down' { if -F '#{pane_at_bottom}' '' 'select-pane -D' }
83 | bind-key -n M-Right if-shell "$is_vim" 'send-keys M-Right' { if -F '#{pane_at_right}' '' 'select-pane -R' }
84 | bind-key -n M-Up if-shell "$is_vim" 'send-keys M-Up' { if -F '#{pane_at_top}' '' 'select-pane -U' }
85 |
86 | bind-key -T copy-mode-vi M-Left if -F '#{pane_at_left}' '' 'select-pane -L'
87 | bind-key -T copy-mode-vi M-Down if -F '#{pane_at_bottom}' '' 'select-pane -D'
88 | bind-key -T copy-mode-vi M-Right if -F '#{pane_at_right}' '' 'select-pane -R'
89 | bind-key -T copy-mode-vi M-Up if -F '#{pane_at_top}' '' 'select-pane -U'
90 |
91 | # Gotta bind the same nav keys for 'scroll' mode
92 | bind-key -T copy-mode-vi M-Left select-pane -L
93 | bind-key -T copy-mode-vi M-Down select-pane -D
94 | bind-key -T copy-mode-vi M-Up select-pane -U
95 | bind-key -T copy-mode-vi M-Right select-pane -R
96 |
97 | # Basic navigation
98 | bind -n C-M-Right next-window
99 | bind -n C-M-Left previous-window
100 | bind -n C-M-Up switch-client -n
101 | bind -n C-M-Down switch-client -p
102 |
103 | # Making splits
104 | bind | split-window -h -c "#{pane_current_path}"
105 | bind \\ split-window -h -c "#{pane_current_path}"
106 | bind - split-window -v -c "#{pane_current_path}"
107 | bind _ split-window -v -c "#{pane_current_path}"
108 |
109 | # Copying and pasting
110 | set-window-option -g mode-keys vi
111 | # Easily get into copy mode but don't mess with Vim.
112 | bind -n Pageup if-shell "$is_vim" "send-keys Pageup" "copy-mode -u"
113 | # Conventional shortcuts for copy and paste
114 | bind-key -T copy-mode-vi C-c send-keys -X copy-selection-and-cancel
115 | bind -n S-Left if-shell "$is_vim" "send-keys S-Left" "copy-mode \; send -X begin-selection \; send-keys Left"
116 | bind -n S-Right if-shell "$is_vim" "send-keys S-Right" "copy-mode \; send -X begin-selection \; send-keys Right"
117 | bind -n C-Up if-shell "$is_vim" "send-keys C-Up" "copy-mode \; send-keys Up"
118 | bind -n C-Down if-shell "$is_vim" "send-keys C-Down" "copy-mode \; send-keys Down"
119 |
120 | # Rather complex code to make SHIFT+ARROW keys work as you'd normally expect during selection
121 | bind -n -T copy-mode-vi Left send-keys -X clear-selection \; send-keys -X cursor-left
122 | bind -n -T copy-mode-vi S-Left \
123 | if-shell -F '#{selection_present}' \
124 | "send-keys -X cursor-left" \
125 | "send-keys -X begin-selection \; send-keys -X cursor-left"
126 | bind -n -T copy-mode-vi Right send-keys -X clear-selection \; send-keys -X cursor-right
127 | bind -n -T copy-mode-vi S-Right \
128 | if-shell -F '#{selection_present}' \
129 | "send-keys -X cursor-right" \
130 | "send-keys -X begin-selection \; send-keys -X cursor-right"
131 | bind -n -T copy-mode-vi Up send-keys -X clear-selection \; send-keys -X cursor-up
132 | bind -n -T copy-mode-vi S-Up \
133 | if-shell -F '#{selection_present}' \
134 | "send-keys -X cursor-up" \
135 | "send-keys -X begin-selection \; send-keys -X cursor-up"
136 | bind -n -T copy-mode-vi Down send-keys -X clear-selection \; send-keys -X cursor-down
137 | bind -n -T copy-mode-vi S-Down \
138 | if-shell -F '#{selection_present}' \
139 | "send-keys -X cursor-down" \
140 | "send-keys -X begin-selection \; send-keys -X cursor-down"
141 |
142 | # ALT+d select current word
143 | bind -n M-d if-shell "$is_vim" "send-keys M-d" "copy-mode \; send-keys b \; send -X begin-selection \; send-keys E"
144 | # CTRL+d select current word
145 | bind -n -T copy-mode-vi C-d send-keys b \; send -X begin-selection \; send-keys E
146 | # CTRL+LEFT/RIGHT move by word
147 | bind -n -T copy-mode-vi C-Left send-keys b
148 | bind -n -T copy-mode-vi C-Right send-keys E
149 |
150 | # ALT+z zoom-focusses the current pane
151 | bind -n M-z resize-pane -Z
152 |
153 | set -g @continuum-restore 'on'
154 | # set -g @resurrect-capture-pane-contents 'on'
155 | set -g @resurrect-processes 'nvim htop btm tail "sudo bandwhich" "sampler --config ~/.config/sampler.yml"'
156 | set -g @resurrect-dir "$base_path/resurrect"
157 |
158 | set -g @thumbs-osc52 1
159 |
160 | # This version of booting ressurect works for `tmux start-server` as well. Which is nice for starting
161 | # tmux in the backgrounda at boot.
162 | run -b "$base_path/plugins/tmux-resurrect/scripts/restore.sh r"
163 |
164 | # Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
165 | run "$base_path/plugins/tpm/tpm"
166 |
--------------------------------------------------------------------------------
/tmux/tmux.conf.theme:
--------------------------------------------------------------------------------
1 | # Themepack format options
2 | set -goq @themepack-status-left-area-left-format "#S"
3 | set -goq @themepack-status-left-area-middle-format "#(whoami)"
4 | set -goq @themepack-status-left-area-right-format "#I:#P"
5 | set -goq @themepack-status-right-area-left-format "%H:%M:%S"
6 | set -goq @themepack-status-right-area-middle-format "%d-%b-%y"
7 | set -goq @themepack-status-right-area-right-format "#H"
8 | set -goq @themepack-window-status-current-format "#I:#W#F"
9 | set -goq @themepack-window-status-format "#I:#W#F"
10 |
11 | # Customizable prefixes and suffixes for @themepack-* format options
12 | set -goq @themepack-status-left-area-left-prefix ""
13 | set -goq @themepack-status-left-area-left-suffix ""
14 | set -goq @themepack-status-left-area-middle-prefix ""
15 | set -goq @themepack-status-left-area-middle-suffix ""
16 | set -goq @themepack-status-left-area-right-prefix ""
17 | set -goq @themepack-status-left-area-right-suffix ""
18 | set -goq @themepack-status-right-area-left-prefix ""
19 | set -goq @themepack-status-right-area-left-suffix ""
20 | set -goq @themepack-status-right-area-middle-prefix ""
21 | set -goq @themepack-status-right-area-middle-suffix ""
22 | set -goq @themepack-status-right-area-right-prefix ""
23 | set -goq @themepack-status-right-area-right-suffix ""
24 | set -goq @themepack-window-status-current-prefix ""
25 | set -goq @themepack-window-status-current-suffix ""
26 | set -goq @themepack-window-status-prefix ""
27 | set -goq @themepack-window-status-suffix ""
28 |
29 | # Apply prefixes and suffixes to @themepack-* format options
30 | set -gqF @themepack-status-left-area-left-format "#{@themepack-status-left-area-left-prefix}#{@themepack-status-left-area-left-format}#{@themepack-status-left-area-left-suffix}"
31 | set -gqF @themepack-status-left-area-middle-format "#{@themepack-status-left-area-middle-prefix}#{@themepack-status-left-area-middle-format}#{@themepack-status-left-area-middle-suffix}"
32 | set -gqF @themepack-status-left-area-right-format "#{@themepack-status-left-area-right-prefix}#{@themepack-status-left-area-right-format}#{@themepack-status-left-area-right-suffix}"
33 | set -gqF @themepack-status-right-area-left-format "#{@themepack-status-right-area-left-prefix}#{@themepack-status-right-area-left-format}#{@themepack-status-right-area-left-suffix}"
34 | set -gqF @themepack-status-right-area-middle-format "#{@themepack-status-right-area-middle-prefix}#{@themepack-status-right-area-middle-format}#{@themepack-status-right-area-middle-suffix}"
35 | set -gqF @themepack-status-right-area-right-format "#{@themepack-status-right-area-right-prefix}#{@themepack-status-right-area-right-format}#{@themepack-status-right-area-right-suffix}"
36 | set -gqF @themepack-window-status-current-format "#{@themepack-window-status-current-prefix}#{@themepack-window-status-current-format}#{@themepack-window-status-current-suffix}"
37 | set -gqF @themepack-window-status-format "#{@themepack-window-status-prefix}#{@themepack-window-status-format}#{@themepack-window-status-suffix}"
38 |
39 | # Powerline color options
40 | set -goq @powerline-color-main-1 colour24
41 | set -goq @powerline-color-main-2 colour33
42 | set -goq @powerline-color-main-3 colour31
43 | set -goq @powerline-color-black-1 colour232
44 | set -goq @powerline-color-grey-1 colour233
45 | set -goq @powerline-color-grey-2 colour235
46 | set -goq @powerline-color-grey-3 colour238
47 | set -goq @powerline-color-grey-4 colour240
48 | set -goq @powerline-color-grey-5 colour243
49 | set -goq @powerline-color-grey-6 colour245
50 |
51 | set -goq @active-colour black
52 | set -goq @inactive-colour colour234
53 |
54 | # Powerline options
55 | set -goqF @powerline-color-activity-1 "#{@powerline-color-grey-6}"
56 | set -goqF @powerline-status-bg "#{@powerline-color-grey-1}"
57 | set -goqF @powerline-status-fg "#{@powerline-color-grey-4}"
58 | set -goqF @powerline-status-left-area-left-bg "#{@powerline-color-main-1}"
59 | set -goqF @powerline-status-left-area-left-fg "#{@powerline-status-bg}"
60 | set -goqF @powerline-status-left-area-middle-bg "#{@powerline-status-fg}"
61 | set -goqF @powerline-status-left-area-middle-fg "#{@powerline-status-bg}"
62 | set -goqF @powerline-status-left-area-right-bg "#{@powerline-color-grey-2}"
63 | set -goqF @powerline-status-left-area-right-fg "#{@powerline-status-fg}"
64 | set -goqF @powerline-status-left-bg "#{@powerline-color-grey-1}"
65 | set -goqF @powerline-status-left-fg "#{@powerline-color-grey-5}"
66 | set -goqF @powerline-status-right-area-left-bg "#{@powerline-color-grey-2}"
67 | set -goqF @powerline-status-right-area-left-fg "#{@powerline-status-fg}"
68 | set -goqF @powerline-status-right-area-middle-bg "#{@powerline-status-fg}"
69 | set -goqF @powerline-status-right-area-middle-fg "#{@powerline-status-bg}"
70 | set -goqF @powerline-status-right-area-right-bg "#{@powerline-color-grey-6}"
71 | set -goqF @powerline-status-right-area-right-fg "#{@powerline-status-bg}"
72 | set -goqF @powerline-status-right-bg "#{@powerline-color-grey-1}"
73 | set -goqF @powerline-status-right-fg "#{@powerline-color-grey-5}"
74 |
75 | # Theme options
76 | set -goqF @theme-clock-mode-colour "#{@powerline-color-main-1}"
77 | set -goq @theme-clock-mode-style 24
78 | set -goqF @theme-display-panes-active-colour "#{@powerline-color-grey-6}"
79 | set -goqF @theme-display-panes-colour "#{@powerline-color-grey-1}"
80 | set -goqF @theme-message-bg "#{@powerline-color-main-1}"
81 | set -goqF @theme-message-command-bg "#{@powerline-color-main-1}"
82 | set -goqF @theme-message-command-fg "#{@powerline-color-black-1}"
83 | set -goqF @theme-message-fg "#{@powerline-color-black-1}"
84 | set -goqF @theme-mode-bg "#{@powerline-color-main-1}"
85 | set -goqF @theme-mode-fg "#{@powerline-color-black-1}"
86 | set -goq @theme-pane-active-border-bg "#{@active-colour}"
87 | set -goqF @theme-pane-active-border-fg "#{@active-colour}"
88 | set -goq @theme-pane-border-bg "#{@inactive-colour}"
89 | set -goqF @theme-pane-border-fg "#{@powerline-color-grey-1}"
90 | set -goqF @theme-status-bg "#{@powerline-status-bg}"
91 | set -goqF @theme-status-fg "#{@powerline-status-fg}"
92 | set -goq @theme-status-interval 1
93 | set -goq @theme-status-justify centre
94 | set -goqF @theme-status-left "#[fg=#{@powerline-status-left-area-left-fg},bg=#{@powerline-status-left-area-left-bg},bold] #{@themepack-status-left-area-left-format} #[fg=#{@powerline-status-left-area-left-bg},bg=#{@powerline-status-left-area-middle-bg},nobold]#[fg=#{@powerline-status-left-area-middle-fg},bg=#{@powerline-status-left-area-middle-bg}] #{@themepack-status-left-area-middle-format} #[fg=#{@powerline-status-left-area-middle-bg},bg=#{@powerline-status-left-area-right-bg}]#[fg=#{@powerline-status-left-area-right-fg},bg=#{@powerline-status-left-area-right-bg}] #{@themepack-status-left-area-right-format} #[fg=#{@powerline-status-left-area-right-bg},bg=#{@theme-status-bg},nobold]"
95 | set -goqF @theme-status-left-bg "#{@powerline-status-left-bg}"
96 | set -goqF @theme-status-left-fg "#{@powerline-status-left-fg}"
97 | set -goq @theme-status-left-length 40
98 | set -goqF @theme-status-right "#[fg=#{@powerline-status-right-area-left-bg},bg=#{@theme-status-bg}]#[fg=#{@powerline-status-right-area-left-fg},bg=#{@powerline-status-right-area-left-bg}] #{@themepack-status-right-area-left-format} #[fg=#{@powerline-status-right-area-middle-bg},bg=#{@powerline-status-right-area-left-bg}]#[fg=#{@powerline-status-right-area-middle-fg},bg=#{@powerline-status-right-area-middle-bg}] #{@themepack-status-right-area-middle-format} #[fg=#{@powerline-status-right-area-right-bg},bg=#{@powerline-status-right-area-middle-bg}]#[fg=#{@powerline-status-right-area-right-fg},bg=#{@powerline-status-right-area-right-bg},bold] #{@themepack-status-right-area-right-format} "
99 | set -goqF @theme-status-right-bg "#{@powerline-status-right-bg}"
100 | set -goqF @theme-status-right-fg "#{@powerline-status-right-fg}"
101 | set -goq @theme-status-right-length 150
102 | set -goqF @theme-window-status-activity-bg "#{@theme-status-bg}"
103 | set -goqF @theme-window-status-activity-fg "#{@powerline-color-activity-1}"
104 | set -goq @theme-window-status-separator ""
105 | set -goqF @theme-window-status-current-bg "#{@powerline-color-black-1}"
106 | set -goqF @theme-window-status-current-fg "#{@powerline-color-main-2}"
107 | set -goqF @theme-window-status-format " #{@themepack-window-status-format} "
108 | set -goqF @theme-window-status-current-format "#[fg=#{@theme-status-bg},bg=#{@theme-window-status-current-bg}]#[fg=#{@theme-window-status-current-fg},nobold] #{@themepack-window-status-current-format} #[fg=#{@theme-status-bg},bg=#{@theme-window-status-current-bg},nobold]"
109 |
110 | # Customizable prefixes and suffixes for @theme-* format options
111 | set -goq @theme-status-left-prefix ""
112 | set -goq @theme-status-left-suffix ""
113 | set -goq @theme-status-right-prefix ""
114 | set -goq @theme-status-right-suffix ""
115 | set -goq @theme-window-status-current-prefix ""
116 | set -goq @theme-window-status-current-suffix ""
117 | set -goq @theme-window-status-prefix ""
118 | set -goq @theme-window-status-suffix ""
119 |
120 | # Apply prefixes and suffixes to @theme-* format options
121 | set -gqF @theme-status-left "#{@theme-status-left-prefix}#{@theme-status-left}#{@theme-status-left-suffix}"
122 | set -gqF @theme-status-right "#{@theme-status-right-prefix}#{@theme-status-right}#{@theme-status-right-suffix}"
123 | set -gqF @theme-window-status-current-format "#{@theme-window-status-current-prefix}#{@theme-window-status-current-format}#{@theme-window-status-current-suffix}"
124 | set -gqF @theme-window-status-format "#{@theme-window-status-prefix}#{@theme-window-status-format}#{@theme-window-status-suffix}"
125 |
126 | # Apply @theme-* options to Tmux
127 | set -gF display-panes-active-colour "#{@theme-display-panes-active-colour}"
128 | set -gF display-panes-colour "#{@theme-display-panes-colour}"
129 | set -gF message-command-style "fg=#{@theme-message-command-fg},bg=#{@theme-message-command-bg}"
130 | set -gF message-style "fg=#{@theme-message-fg},bg=#{@theme-message-bg}"
131 | set -gF status-interval "#{@theme-status-interval}"
132 | set -gF status-justify "#{@theme-status-justify}"
133 | set -gF status-left "#{@theme-status-left}"
134 | set -gF status-left-length "#{@theme-status-left-length}"
135 | set -gF status-left-style "fg=#{@theme-status-left-fg},bg=#{@theme-status-left-bg}"
136 | set -gF status-right "#{@theme-status-right}"
137 | set -gF status-right-length "#{@theme-status-right-length}"
138 | set -gF status-right-style "fg=#{@theme-status-right-fg},bg=#{@theme-status-right-bg}"
139 | set -gF status-style "fg=#{@theme-status-fg},bg=#{@theme-status-bg}"
140 | set -gwF clock-mode-colour "#{@theme-clock-mode-colour}"
141 | set -gwF clock-mode-style "#{@theme-clock-mode-style}"
142 | set -gwF mode-style "fg=#{@theme-mode-fg},bg=#{@theme-mode-bg}"
143 | set -gwF pane-active-border-style "fg=#{@theme-pane-active-border-fg},bg=#{@theme-pane-active-border-bg}"
144 | set -gwF pane-border-style "fg=#{@theme-pane-border-fg},bg=#{@theme-pane-border-bg}"
145 | set -gwF window-status-activity-style "fg=#{@theme-window-status-activity-fg},bg=#{@theme-window-status-activity-bg}"
146 | set -gwF window-status-current-format "#{@theme-window-status-current-format}"
147 | set -gwF window-status-current-style "fg=#{@theme-window-status-current-fg},bg=#{@theme-window-status-current-bg}"
148 | set -gwF window-status-format "#{@theme-window-status-format}"
149 | set -gwF window-status-separator "#{@theme-window-status-separator}"
150 |
151 | set -g window-style 'bg=#{@inactive-colour}'
152 | set -g window-active-style 'bg=#{@active-colour}'
153 |
154 |
--------------------------------------------------------------------------------
/update_symlinks.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | set -e
4 | set -x
5 |
6 | SCRIPT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd)
7 |
8 | ATUIN_DB_PATH=~/.local/share/atuin
9 | DOTISH_PATH=/publicish/syncable
10 | SYNCMISC_PATH=/home/tombh/Syncthing/SyncMisc
11 |
12 | if [ "$HOSTNAME" == remote-box ]; then
13 | DOTISH_PATH=/home/tombh/storage/Syncthing/Dotish
14 | SYNCMISC_PATH=/home/tombh/storage/Syncthing/SyncMisc
15 | fi
16 |
17 | function update_symlink {
18 | local file=$1
19 | local destination=$2
20 | ln -sf "$SCRIPT_DIR/$file" "$destination"
21 | }
22 |
23 | mkdir -p \
24 | ~/bin \
25 | ~/.xkb/symbols \
26 | ~/.config/tmux \
27 | ~/.config/broot \
28 | ~/.config/tmux \
29 | ~/.config/htop \
30 | ~/.config/gitui \
31 | ~/.config/nix \
32 | ~/.config/nushell \
33 | ~/.config/mako
34 |
35 | # Sync seperately to work around the history file
36 | update_symlink nushell/scripts ~/.config/nushell
37 | update_symlink nushell/config.nu ~/.config/nushell
38 | update_symlink nushell/env.nu ~/.config/nushell
39 |
40 | # ZSH
41 | update_symlink zshrc ~/.zshrc
42 | update_symlink zimrc ~/.zimrc
43 | update_symlink zprofile.zsh ~/.zprofile
44 |
45 | update_symlink gitconfig.toml ~/.gitconfig_public
46 | update_symlink atuin ~/.config/
47 | update_symlink broot.toml ~/.config/broot/conf.toml
48 | update_symlink nvim ~/.config/
49 | update_symlink fontconfig ~/.config/
50 | update_symlink htoprc ~/.config/htop/
51 | update_symlink tmux/tmux.conf.theme ~/.config/tmux/theme.conf
52 | update_symlink tmux/tmux.conf.main ~/.config/tmux/tmux.conf
53 | update_symlink xkb-gb-tombh ~/.xkb/symbols/gb-tombh
54 | update_symlink sampler.yml ~/.config/
55 | update_symlink bottom ~/.config/
56 | update_symlink gitui.ron ~/.config/gitui/theme.ron
57 | update_symlink nix.conf ~/.config/nix
58 | update_symlink zellij ~/.config/
59 |
60 | if [ "$HOSTNAME" != remote-box ]; then
61 | ln -sf /publicish/SourceCodeProNerd ~/.local/share/fonts
62 | update_symlink alacritty ~/.config/
63 | update_symlink wayfire.ini ~/.config/
64 | update_symlink mako.ini ~/.config/mako/config
65 | update_symlink wob.ini ~/.config/
66 | update_symlink waybar ~/.config/
67 | fi
68 |
69 | if [ "$USER" == "tombh" ]; then
70 | update_symlink starship.toml ~/.config/
71 |
72 | if [ "$HOSTNAME" == remote-box ]; then
73 | ln -sf "$DOTISH_PATH"/tbx/tbx ~/bin/tbx
74 | ln -sf "$SYNCMISC_PATH"/config/atuin/remote-db "$ATUIN_DB_PATH"
75 | else
76 | ln -sf "$DOTISH_PATH"/tbx/tbx ~/bin/tbx
77 | ln -sf "$SYNCMISC_PATH"/config/atuin/tombh-db "$ATUIN_DB_PATH"
78 | fi
79 | fi
80 |
81 | if [ "$USER" == "streamer" ]; then
82 | ln -sf "$DOTISH_PATH"/tbx/tbx ~/bin/tbx
83 | ln -sf /publicish/atuin-streamer-db "$ATUIN_DB_PATH"
84 | update_symlink starship_streamer.toml ~/.config/starship.toml
85 | fi
86 |
--------------------------------------------------------------------------------
/waybar/bin/idling.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | status="$(loginctl show-session --property=IdleHint)"
4 | if [[ "$status" == "IdleHint=yes" ]]; then
5 | icon=" "
6 | else
7 | icon=" "
8 | fi
9 |
10 | echo -n "{\"text\": \"$icon\"}"
11 |
--------------------------------------------------------------------------------
/waybar/bin/syncthing.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | status="$(systemctl is-active syncthing@tombh)"
4 | if [[ "$status" == "active" ]]; then
5 | icon=" "
6 | else
7 | icon=" "
8 | fi
9 |
10 | echo -n "{\"text\": \"$icon\"}"
11 |
--------------------------------------------------------------------------------
/waybar/bin/weather.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | # temperature="$(
4 | # curl --silent \
5 | # -A "api.met.no@tombh.co.uk" \
6 | # "https://api.met.no/weatherapi/locationforecast/2.0/compact?lat=-34.6&lon=-58.38" \
7 | # | jq '.properties.timeseries[0].data.instant.details.air_temperature'
8 | # )"
9 | #
10 | # echo -n "{\"text\": \" 🌡️$temperature°C\"}"
11 |
12 | lookup_latitude="-34.6"
13 | lookup_longitude="-58.38"
14 | domain="tombh.co.uk"
15 | request_by="Tom BH api.met.no@$domain"
16 |
17 | api_endpoint="https://api.met.no/weatherapi/locationforecast/2.0/compact?lat=$lookup_latitude&lon=$lookup_longitude"
18 | state_dir="$(dirname $0)/state"
19 | mkdir -p "$state_dir"
20 |
21 | if [ -f "$state_dir/header.txt" ]; then
22 | last_modified=$(grep -i '^Last-Modified:' "$state_dir/header.txt" | sed 's/Last-Modified: //I')
23 | fi
24 |
25 | if [ -n "$last_modified" ]; then
26 | #"Sending conditional GET with If-Modified-Since: $last_modified"
27 |
28 | http_code=$(curl -s \
29 | -A "$request_by" \
30 | -w "%{http_code}" \
31 | -H "If-Modified-Since: $last_modified" \
32 | -D "$state_dir/header.txt" \
33 | -o "$state_dir/cache.json" \
34 | "$api_endpoint")
35 | else
36 | # "No Last-Modified info found; performing a normal GET..."
37 | curl -s \
38 | -A "$request_by" \
39 | -D "$state_dir/header.txt" \
40 | -o "$state_dir/cache.json" \
41 | "$api_endpoint"
42 | fi
43 |
44 | declare -A units
45 | while IFS= read -r line; do
46 | key="${line%%=*}"
47 | value="${line#*=}"
48 | units["$key"]="$value"
49 | done < <(
50 | jq -r '.properties.meta.units
51 | |to_entries[]
52 | |"\(.key)=\(.value)"' "$state_dir/cache.json"
53 | )
54 |
55 | declare -A details
56 | while IFS= read -r line; do
57 | key="${line%%=*}"
58 | value="${line#*=}"
59 | details["$key"]="$value"
60 | done < <(
61 | jq -r '.properties.timeseries[0].data.instant.details
62 | |to_entries[]
63 | |"\(.key)=\(.value)"' "$state_dir/cache.json"
64 | )
65 |
66 | echo -n "{\"text\": \" 🌡️${details[air_temperature]}°C\", \"tooltip\":\"rel. humidity: ${details[relative_humidity]}${units[relative_humidity]}\\n pressure: ${details[air_pressure_at_sea_level]} ${units[air_pressure_at_sea_level]}\"}"
67 |
--------------------------------------------------------------------------------
/waybar/bin/wireguard.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | interface=$(wg show interfaces)
4 |
5 | if [ -n "$interface" ]; then
6 | interface=" $interface"
7 | fi
8 |
9 | echo -n "{\"text\": \"$interface\"}"
10 |
--------------------------------------------------------------------------------
/waybar/config:
--------------------------------------------------------------------------------
1 | // =============================================================================
2 | //
3 | // Waybar configuration
4 | //
5 | // Configuration reference: https://github.com/Alexays/Waybar/wiki/Configuration
6 | //
7 | // =============================================================================
8 | [{
9 | "include": [
10 | "~/.config/waybar/config.json",
11 | ]
12 | }]
13 |
14 |
--------------------------------------------------------------------------------
/waybar/config.json:
--------------------------------------------------------------------------------
1 | {
2 | "layer": "top",
3 | "position": "top",
4 | "height": 64,
5 | "//width": 1908,
6 | "modules-left": [
7 | "wlr/taskbar",
8 | "network",
9 | "custom/syncthing",
10 | "custom/vpn",
11 | "custom/weather"
12 | ],
13 | "modules-center": [],
14 | "modules-right": [
15 | "cpu",
16 | "pulseaudio",
17 | "memory",
18 | "temperature",
19 | "disk",
20 | "custom/keyboard-layout",
21 | "battery",
22 | "tray",
23 | "clock#date",
24 | "clock#time",
25 | "custom/idling",
26 | "idle_inhibitor"
27 | ],
28 | "wlr/taskbar": {
29 | "format": "{icon}",
30 | "icon-size": 14,
31 | "icon-theme": "Numix-Circle",
32 | "tooltip-format": "{title}",
33 | "on-click": "activate",
34 | "on-click-middle": "close"
35 | },
36 | "battery": {
37 | "interval": 10,
38 | "states": {
39 | "warning": 30,
40 | "critical": 15
41 | },
42 | "format": "{icon}{capacity}%",
43 | "format-discharging": "{icon}{capacity}%",
44 | "format-icons": [
45 | " ",
46 | " ",
47 | " ",
48 | " ",
49 | " "
50 | ],
51 | "tooltip": true
52 | },
53 | "clock#time": {
54 | "interval": 1,
55 | "format": "{:%H:%M}",
56 | "tooltip": false
57 | },
58 | "clock#date": {
59 | "interval": 10,
60 | "format": " {:%e %b %Y}",
61 | "tooltip-format": "{:%e %B %Y}"
62 | },
63 | "cpu": {
64 | "interval": 5,
65 | "format": " {usage}%({load}){min_frequency}/{avg_frequency}/{max_frequency}GHz",
66 | "states": {
67 | "warning": 70,
68 | "critical": 90
69 | }
70 | },
71 | "memory": {
72 | "interval": 5,
73 | "format": " {}%",
74 | "states": {
75 | "warning": 70,
76 | "critical": 90
77 | }
78 | },
79 | "disk": {
80 | "interval": 30,
81 | "format": " {percentage_used}%",
82 | "states": {
83 | "warning": 90,
84 | "critical": 95
85 | }
86 | },
87 | "network": {
88 | "interval": 5,
89 | "interface": "wlp1s0f0",
90 | "format-wifi": " {signalStrength}% \"{essid}\"",
91 | "format-ethernet": " {ipaddr}",
92 | "format-disconnected": "⚠ Disconnected",
93 | "tooltip-format": "{ifname}\n {bandwidthUpBytes}\n {bandwidthDownBytes}",
94 | "tooltip-format-wifi": "{ifname}\n {bandwidthUpBytes}\n {bandwidthDownBytes}\nFrequency: {frequency}",
95 | "tooltip-format-disconnected": "N/a",
96 | "//tooltip-format": "{ifname}: {ipaddr}"
97 | },
98 | "pulseaudio": {
99 | "format": "{icon} {volume}%",
100 | "format-bluetooth": "{icon} {volume}%",
101 | "format-muted": "",
102 | "format-icons": {
103 | "headphone": "",
104 | "hands-free": "",
105 | "headset": "",
106 | "phone": "",
107 | "portable": "",
108 | "car": "",
109 | "default": [
110 | "",
111 | ""
112 | ]
113 | },
114 | "scroll-step": 1,
115 | "on-click": "pavucontrol"
116 | },
117 | "temperature": {
118 | "//hwmon-path-abs": "/sys/class/thermal/thermal_zone0/hwmon1",
119 | "//input-filename": "temp",
120 | "critical-threshold": 80,
121 | "interval": 5,
122 | "format": "{icon}{temperatureC}°C",
123 | "format-icons": [
124 | "",
125 | "",
126 | "",
127 | "",
128 | ""
129 | ],
130 | "tooltip": true
131 | },
132 | "tray": {
133 | "icon-size": 15,
134 | "spacing": 10
135 | },
136 | "custom/vpn": {
137 | "format": "{}",
138 | "exec": "~/.config/waybar/bin/wireguard.sh",
139 | "return-type": "json",
140 | "interval": 5
141 | },
142 | "custom/idling": {
143 | "format": "{}",
144 | "exec": "~/.config/waybar/bin/idling.sh",
145 | "return-type": "json",
146 | "interval": 1
147 | },
148 | "idle_inhibitor": {
149 | "format": "{icon}",
150 | "format-icons": {
151 | "activated": "",
152 | "deactivated": ""
153 | }
154 | },
155 | "custom/syncthing": {
156 | "format": "{}",
157 | "exec": "~/.config/waybar/bin/syncthing.sh",
158 | "return-type": "json",
159 | "interval": 1
160 | },
161 | "custom/weather": {
162 | "format": "{}",
163 | "exec": "~/.config/waybar/bin/weather.sh",
164 | "return-type": "json",
165 | "interval": 60
166 | }
167 | }
168 |
--------------------------------------------------------------------------------
/waybar/style.css:
--------------------------------------------------------------------------------
1 | /* =============================================================================
2 | *
3 | * Waybar configuration
4 | *
5 | * Configuration reference: https://github.com/Alexays/Waybar/wiki/Configuration
6 | *
7 | * =========================================================================== */
8 |
9 | /* -----------------------------------------------------------------------------
10 | * Keyframes
11 | * -------------------------------------------------------------------------- */
12 |
13 | @keyframes blink-warning {
14 | 70% {
15 | color: white;
16 | }
17 |
18 | to {
19 | color: white;
20 | background-color: orange;
21 | }
22 | }
23 |
24 | @keyframes blink-critical {
25 | 70% {
26 | color: white;
27 | }
28 |
29 | to {
30 | color: white;
31 | background-color: #f7768e;
32 | }
33 | }
34 |
35 | @keyframes blink-bad {
36 | 70% {
37 | color: white;
38 | }
39 |
40 | to {
41 | color: #f7768e;
42 | }
43 | }
44 |
45 | /* -----------------------------------------------------------------------------
46 | * Base styles
47 | * -------------------------------------------------------------------------- */
48 |
49 | /* Reset all styles */
50 | * {
51 | border: none;
52 | border-radius: 0;
53 | min-height: 0;
54 | margin: 0;
55 | padding: 0;
56 | }
57 |
58 | /* The whole bar */
59 | #waybar {
60 | background: #000000;
61 | color: #a9b1d6;
62 | font-family: SauceCodePro Nerd Font;
63 | font-size: 17px;
64 | }
65 |
66 | /* Each module */
67 | #battery,
68 | #clock,
69 | #cpu,
70 | #custom-keyboard-layout,
71 | #memory,
72 | #mode,
73 | #network,
74 | #pulseaudio,
75 | #temperature,
76 | #tray {
77 | padding-left: 10px;
78 | padding-right: 10px;
79 | padding-bottom: 0px;
80 | }
81 |
82 | /* -----------------------------------------------------------------------------
83 | * Module styles
84 | * -------------------------------------------------------------------------- */
85 |
86 | #taskbar {
87 | margin-bottom: 0px;
88 | padding-bottom: 0px;
89 | margin-left: 10px;
90 | }
91 |
92 | #clock.time {
93 | padding-right: 0px;
94 | }
95 |
96 | #clock.right {
97 | padding-right: 0px;
98 | color: #323232;
99 | }
100 |
101 | #battery {
102 | animation-timing-function: linear;
103 | animation-iteration-count: infinite;
104 | animation-direction: alternate;
105 | }
106 |
107 | #battery.warning {
108 | color: #e0af68;
109 | }
110 |
111 | #battery.critical {
112 | color: #f7768e;
113 | }
114 |
115 | #battery.warning.discharging {
116 | animation-name: blink-warning;
117 | animation-duration: 3s;
118 | }
119 |
120 | #battery.critical.discharging {
121 | animation-name: blink-critical;
122 | animation-duration: 2s;
123 | }
124 |
125 | #clock {
126 | font-weight: bold;
127 | }
128 |
129 | #cpu {
130 | /* No styles */
131 | }
132 |
133 | #cpu.warning {
134 | color: #e0af68;
135 | }
136 |
137 | #cpu.critical {
138 | color: #f7768e;
139 | }
140 |
141 | #memory {
142 | animation-timing-function: linear;
143 | animation-iteration-count: infinite;
144 | animation-direction: alternate;
145 | }
146 |
147 | #memory.warning {
148 | color: #e0af68;
149 | }
150 |
151 | #memory.critical {
152 | color: #f7768e;
153 | animation-name: blink-critical;
154 | animation-duration: 2s;
155 | }
156 |
157 | #disk.warning {
158 | color: #e0af68;
159 | }
160 |
161 | #disk.critical {
162 | color: #f7768e;
163 | animation-name: blink-critical;
164 | animation-duration: 2s;
165 | }
166 |
167 | #mode {
168 | background: #64727d;
169 | border-top: 2px solid white;
170 | /* To compensate for the top border and still have vertical centering */
171 | padding-bottom: 2px;
172 | }
173 |
174 | #network {
175 | /* No styles */
176 | }
177 |
178 | #network.disconnected {
179 | color: #e0af68;
180 | }
181 |
182 | #pulseaudio {
183 | /* No styles */
184 | }
185 |
186 | #pulseaudio.muted {
187 | /* No styles */
188 | }
189 |
190 | #custom-spotify {
191 | color: rgb(102, 220, 105);
192 | }
193 |
194 | #temperature {
195 | /* No styles */
196 | }
197 |
198 | #temperature.critical {
199 | color: #f7768e;
200 | }
201 |
202 | #tray {
203 | /* No styles */
204 | }
205 |
206 | #idle_inhibitor {
207 | margin-right: 10px;
208 | }
209 |
210 | #idle_inhibitor.activated {
211 | color: #f7768e;
212 | animation-name: blink-bad;
213 | animation-duration: 1s;
214 | animation-timing-function: linear;
215 | animation-iteration-count: infinite;
216 | animation-direction: alternate;
217 | }
218 |
219 | #workspaces button {
220 | border-top: 2px solid transparent;
221 | /* To compensate for the top border and still have vertical centering */
222 | padding-bottom: 2px;
223 | padding-left: 10px;
224 | padding-right: 10px;
225 | color: #888888;
226 | }
227 |
228 | #workspaces button.focused {
229 | border-color: #4c7899;
230 | color: white;
231 | background-color: #285577;
232 | }
233 |
234 | #workspaces button.urgent {
235 | border-color: #c9545d;
236 | color: #c9545d;
237 | }
238 |
--------------------------------------------------------------------------------
/wayfire.ini:
--------------------------------------------------------------------------------
1 | # Input configuration ──────────────────────────────────────────────────────────
2 | [input]
3 | # See Input options for a complete reference.
4 | # https://github.com/WayfireWM/wayfire/wiki/Configuration#input
5 |
6 | # xkb_variant = dvorak,bepo
7 | xkb_layout = gb-tombh
8 | ; xkb_layout = gb
9 |
10 | disable_touchpad_while_typing = true
11 | mouse_cursor_speed = -0.3
12 |
13 | # Output configuration ─────────────────────────────────────────────────────────
14 |
15 | # Example configuration:
16 | #
17 | # [output:eDP-1]
18 | # mode = 1920x1200@60000
19 | # layout = 0,0
20 | # transform = normal
21 | # scale = 1.000000
22 | #
23 | # You can get the names of your outputs with wlr-randr.
24 | # https://github.com/emersion/wlr-randr
25 | #
26 | # See also kanshi for configuring your outputs automatically.
27 | # https://wayland.emersion.fr/kanshi/
28 | #
29 | # See Output options for a complete reference.
30 | # https://github.com/WayfireWM/wayfire/wiki/Configuration#output
31 |
32 | [background]
33 | # Full path to image or directory of images
34 | image = '/home/tombh/Downloads/photo1703770788.jpeg'
35 |
36 | [output:eDP-1]
37 | # mode = 1920x1080@60000
38 | # position = 0,0
39 | # transform = normal
40 | ; scale = 1.42
41 | ; scale = 1
42 |
43 | # Core options ─────────────────────────────────────────────────────────────────
44 |
45 | [core]
46 |
47 | # List of plugins to be enabled.
48 | # See the Configuration document for a complete list.
49 | plugins = \
50 | ipc \
51 | ipc-rules \
52 | demo-ipc \
53 | alpha \
54 | animate \
55 | autostart \
56 | command \
57 | cube \
58 | decoration \
59 | blur \
60 | expo \
61 | fast-switcher \
62 | fisheye \
63 | grid \
64 | invert \
65 | move \
66 | oswitch \
67 | place \
68 | resize \
69 | switcher \
70 | session-lock \
71 | scale \
72 | vswitch \
73 | window-rules \
74 | wobbly \
75 | wrot \
76 | wm-actions \
77 | wsets \
78 | zoom \
79 | foreign-toplevel
80 |
81 | # idle \ #(screensaver)
82 |
83 | # Close focused window.
84 | close_top_view = KEY_Q | KEY_F4
85 |
86 | # Workspaces arranged into a grid: 3 × 3.
87 | vwidth = 2
88 | vheight = 2
89 |
90 | # Prefer client-side decoration or server-side decoration
91 | preferred_decoration_mode = client
92 |
93 | # Mouse bindings ───────────────────────────────────────────────────────────────
94 |
95 | # Drag windows by holding down Super and left mouse button.
96 | # [move]
97 | # activate = BTN_LEFT
98 |
99 | # Resize them with right mouse button + Super.
100 | [resize]
101 | activate = BTN_MIDDLE
102 |
103 | # Zoom in the desktop by scrolling + Super.
104 | [zoom]
105 | modifier =
106 |
107 | # Change opacity by scrolling with Super + Alt.
108 | [alpha]
109 | modifier =
110 |
111 | [blur]
112 | # toggle = BTN_LEFT
113 | # blur_by_default = alacritty_oneshot
114 | mode = normal
115 | method = gaussian
116 | # 0/5 dfault 1
117 | kawase_degrade = 0
118 | box_degrade = 1
119 | gaussian_degrade = 3
120 | ; 0/25 default 5
121 | kawase_offset = 5
122 | box_offset = 3
123 | gaussian_offset = 3
124 | ; 0/10 default 2
125 | kawase_iterations = 5
126 | box_iterations = 10
127 | gaussian_iterations = 10
128 |
129 | # Rotate windows with the mouse.
130 | [wrot]
131 | activate = BTN_RIGHT
132 |
133 | # Fisheye effect.
134 | [fisheye]
135 | toggle = KEY_F
136 |
137 | # Startup commands ─────────────────────────────────────────────────────────────
138 |
139 | [autostart]
140 |
141 | # Background color
142 | background = 'sleep 10 && swaybg -c "#010007"'
143 |
144 | # Automatically start background and panel.
145 | # Set to false if you want to override the default clients.
146 | autostart_wf_shell = false
147 |
148 | # Status bar
149 | panel = waybar
150 |
151 | # Output configuration
152 | # https://wayland.emersion.fr/kanshi/
153 | outputs = kanshi
154 |
155 | # Notifications
156 | # https://wayland.emersion.fr/mako/
157 | notifications = mako
158 |
159 | # Screen color temperature
160 | gamma = gammastep -l -33.5:-70.1
161 |
162 | # Idle configuration
163 | # https://github.com/swaywm/swayidle
164 | # https://github.com/swaywm/swaylock
165 | idle = ~/bin/tbx idle_command
166 |
167 | # XDG desktop portal for screenshots, streaming, etc
168 | xdg_portal_setup = dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=wayfire
169 |
170 | # ibus = ibus-daemon -drxR && ibus engine xkb:gb:extd:eng
171 |
172 | # clipman = wl-paste -t text --watch clipman store 1>> ~/log/clipman.log 2>&1
173 | cliphist-text = wl-paste --type text --watch cliphist store 1>> ~/log/cliphist.log 2>&1
174 | cliphist-image = wl-paste --type image --watch cliphist store 1>> ~/log/cliphist.log 2>&1
175 |
176 | tbx_autostart = ~/bin/tbx autostart
177 |
178 | [idle]
179 | # Disables the compositor going idle with Super + i.
180 | # This will lock your screen after 300 seconds of inactivity, then turn off
181 | # your displays after another 300 seconds.
182 | # toggle = KEY_I
183 | # screensaver_timeout = 300
184 | dpms_timeout = 1800
185 |
186 |
187 | # Applications ─────────────────────────────────────────────────────────────────
188 | [command]
189 |
190 | # Start your launcher
191 | # https://hg.sr.ht/~scoopta/wofi
192 | # Note: Add mode=run or mode=drun to ~/.config/wofi/config.
193 | # You can also specify the mode with --show option.
194 | binding_launcher = KEY_SPACE
195 | # command_launcher = wofi --show drun --gtk-dark
196 | command_launcher = ~/bin/tbx launch
197 | # command_launcher = kitty -o "remember_window_size=no" -o "initial_window_width=60c" -o "initial_window_height=30c" xstarter
198 |
199 | binding_quick_cli = KEY_ENTER
200 | command_quick_cli = alacritty
201 |
202 | # Screen locker
203 | # https://github.com/swaywm/swaylock
204 | binding_lock = KEY_ESC
205 | command_lock = swaylock -f -c 000000
206 |
207 | # Screenshots
208 | # https://wayland.emersion.fr/grim/
209 | # https://wayland.emersion.fr/slurp/
210 | binding_screenshot = KEY_S
211 | command_screenshot = grim ~/Downloads/screenshots/$(date '+%F_%T').webp
212 | binding_screenshot_interactive = KEY_S
213 | command_screenshot_interactive = ~/bin/tbx screenshot
214 |
215 | # Volume controls
216 | repeatable_binding_volume_up = KEY_VOLUMEUP
217 | command_volume_up = ~/bin/tbx volume_up
218 | repeatable_binding_volume_down = KEY_VOLUMEDOWN
219 | command_volume_down = ~/bin/tbx volume_down
220 | binding_mute = KEY_MUTE
221 | command_mute = pamixer --toggle-mute
222 |
223 | # Screen brightness
224 | repeatable_binding_light_up = KEY_BRIGHTNESSUP
225 | command_light_up = ~/bin/tbx brightness_up
226 | repeatable_binding_light_down = KEY_BRIGHTNESSDOWN
227 | command_light_down = ~/bin/tbx brightness_down
228 | repeatable_binding_light_up_fine = KEY_BRIGHTNESSUP
229 | command_light_up_fine = ~/bin/tbx brightness_up_fine
230 | repeatable_binding_light_down_fine = KEY_BRIGHTNESSDOWN
231 | command_light_down_fine = ~/bin/tbx brightness_down_fine
232 |
233 | # Emojis
234 | binding_emojis = KEY_E
235 | command_emojis = ~/bin/tbx unicode_gui_selector emoji
236 | binding_unicode = KEY_E
237 | command_unicode = ~/bin/tbx unicode_gui_selector
238 |
239 | # View clipboard history
240 | binding_clipman = KEY_C
241 | command_clipman = cliphist list | wofi --dmenu | cliphist decode | wl-copy
242 |
243 | binding_toggle_scratch = KEY_ENTER
244 | command_toggle_scratch = wf-utils peek_titled_window Alacritty scratch
245 |
246 | binding_toggle_remote = KEY_R
247 | command_toggle_remote = ~/bin/tbx streamer_peek_remote
248 |
249 | binding_history = KEY_H
250 | command_history = ONEOFF="~/bin/tbx launch_history" alacritty
251 |
252 | binding_wlogout = KEY_Q
253 | command_wlogout = wlogout
254 |
255 | binding_translate = KEY_T
256 | command_translate = ~/bin/tbx translate_popup
257 |
258 | binding_audio_toggle = KEY_NEXTSONG
259 | command_audio_toggle = ~/bin/tbx toggle_audio_output
260 |
261 | # Windows ──────────────────────────────────────────────────────────────────────
262 |
263 | # Position the windows in certain regions of the output.
264 | [grid]
265 | #
266 | # ⇱ ↑ ⇲ │ 7 8 9
267 | # ← f → │ 4 5 6
268 | # ⇱ ↓ ⇲ d │ 1 2 3 0
269 | # ‾ ‾
270 | #slot_bl = KEY_KP1
271 | #slot_b = KEY_KP2
272 | #slot_br = KEY_KP3
273 | slot_l = KEY_LEFT | KEY_KP4
274 | slot_c = KEY_Z
275 | slot_r = KEY_RIGHT | KEY_KP6
276 | #slot_tl = KEY_KP7
277 | #slot_t = KEY_KP8
278 | #slot_tr = KEY_KP9
279 | # Restore default.
280 | restore = KEY_D | KEY_KP0
281 |
282 | [decoration]
283 | border_size = 0
284 | title_height = 0
285 | ignore_views = all
286 |
287 | # Change active window with an animation.
288 | [switcher]
289 | next_view = KEY_RIGHT
290 | prev_view = KEY_LEFT
291 | speed = 100
292 |
293 | # Simple active window switcher.
294 | [fast-switcher]
295 | activate = KEY_TAB
296 |
297 | # Workspaces ───────────────────────────────────────────────────────────────────
298 |
299 | # Switch to workspace.
300 | [vswitch]
301 | binding_left = KEY_LEFT
302 | binding_down = KEY_DOWN
303 | binding_up = KEY_UP
304 | binding_right = KEY_RIGHT
305 | # Move the focused window with the same key-bindings, but add Shift.
306 | # binding_win_left = KEY_LEFT
307 | # binding_win_down = KEY_DOWN
308 | # binding_win_up = KEY_UP
309 | # binding_win_right = KEY_RIGHT
310 |
311 | wraparound = false
312 |
313 | [wsets]
314 | wset_1 = KEY_1
315 | wset_2 = KEY_2
316 |
317 | # Show the current workspace row as a cube.
318 | [cube]
319 | activate = BTN_LEFT
320 | # Switch to the next or previous workspace.
321 | #rotate_left = KEY_H
322 | #rotate_right = KEY_L
323 |
324 | # Show an overview of all workspaces.
325 | [expo]
326 | toggle = KEY_A
327 | # Select a workspace.
328 | # Workspaces are arranged into a grid of 3 × 3.
329 | # The numbering is left to right, line by line.
330 | #
331 | # ⇱ k ⇲
332 | # h ⏎ l
333 | # ⇱ j ⇲
334 | # ‾ ‾
335 | # See core.vwidth and core.vheight for configuring the grid.
336 | # select_workspace_1 = KEY_Q
337 | # select_workspace_2 = KEY_W
338 | # select_workspace_3 = KEY_E
339 | # select_workspace_4 = KEY_A
340 | # select_workspace_5 = KEY_S
341 | # select_workspace_6 = KEY_D
342 | # select_workspace_7 = KEY_Z
343 | # select_workspace_8 = KEY_X
344 | # select_workspace_9 = KEY_C
345 |
346 | [scale]
347 | toggle = KEY_P
348 | toggle_all = KEY_P
349 | duration = 500
350 | interact = false
351 | inactive_alpha = 0.5
352 | title_font_size = 13
353 | title_overlay = all
354 | title_position = bottom
355 |
356 | # Outputs ──────────────────────────────────────────────────────────────────────
357 |
358 | # Change focused output.
359 | # [oswitch]
360 | # Switch to the next output.
361 | # next_output = KEY_O
362 | # Same with the window.
363 | # next_output_with_win = KEY_O
364 |
365 | # Invert the colors of the whole output.
366 | [invert]
367 | toggle = KEY_V
368 |
369 | # Rules ────────────────────────────────────────────────────────────────────────
370 |
371 | # You can get the properties of your applications with the following command:
372 | # $ WAYLAND_DEBUG=1 alacritty 2>&1 | kak
373 | #
374 | # See Window rules for a complete reference.
375 | # https://github.com/WayfireWM/wayfire/wiki/Configuration#window-rules
376 | [window-rules]
377 | alacritty_blur = on created if app_id is "Alacritty" then set alpha 1
378 | mako_blur = on created if app_id is "notifications" then set alpha 1
379 |
380 | [wm-actions]
381 | toggle_always_on_top = KEY_X
382 | toggle_sticky = KEY_X
383 | # minimize = KEY_DOWN
384 | # maximize = KEY_UP;
385 |
386 |
--------------------------------------------------------------------------------
/wob.ini:
--------------------------------------------------------------------------------
1 | timeout = 1000
2 | anchor = bottom center
3 | height = 10
4 | width = 3024
5 | border_size = 0
6 | bar_padding = 0
7 | bar_color = 00ffd2
8 |
--------------------------------------------------------------------------------
/xkb-gb-tombh:
--------------------------------------------------------------------------------
1 | partial xkb_types "super-arrows" {
2 | Virtual_modifiers Super;
3 | type "SUPER_LEVEL2" {
4 | modifiers= Super;
5 | map[Super]= Level2;
6 | level_name[Level1]= "Base";
7 | level_name[Level2]= "Super";
8 | };
9 | };
10 |
11 | default partial xkb_symbols "basic" {
12 | include "gb"
13 |
14 | name[Group1] = "English (UK, international with tombh's tweaks)";
15 | key { [ n, N, ntilde, Ntilde ] };
16 | key {[ backslash ]};
17 | key {[ bar ]};
18 |
19 | key {
20 | type[Group1]="SUPER_LEVEL2",
21 | symbols[Group1] = [ Left, Home ]
22 | };
23 | key {
24 | type[Group1]="SUPER_LEVEL2",
25 | symbols[Group1] = [ Right, End ]
26 | };
27 | key {
28 | type[Group1]="SUPER_LEVEL2",
29 | symbols[Group1] = [ Up, Next ]
30 | };
31 | key {
32 | type[Group1]="SUPER_LEVEL2",
33 | symbols[Group1] = [ Down, Prior ]
34 | };
35 | };
36 |
--------------------------------------------------------------------------------
/xkb-gb-tombh.xkm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tombh/dotfiles/14e6dfc657c5e37197352cfdd05969969bbe0fad/xkb-gb-tombh.xkm
--------------------------------------------------------------------------------
/xremap.yml:
--------------------------------------------------------------------------------
1 | # modmap:
2 | # - name: Except Chrome
3 | # application:
4 | # not: Google-chrome
5 | # remap:
6 | # CapsLock: Esc
7 | keymap:
8 | - name: CTRL+ARROWS
9 | remap:
10 | Super-Left: Home
11 | Super-Right: End
12 | Super-Up: PageUp
13 | Super-Down: PageDown
14 | Super-Shift-Up: C-PageUp
15 | Super-Shift-Down: C-PageDown
16 |
17 | C-Super-Up: C-Super-Up
18 | C-Super-Down: C-Super-Down
19 | C-Super-Right: C-Super-Right
20 | C-Super-Left: C-Super-Left
21 | PageUp: KEY_UNKNOWN
22 | PageDown: KEY_UNKNOWN
23 | Home: KEY_UNKNOWN
24 | End: KEY_UNKNOWN
25 |
--------------------------------------------------------------------------------
/zellij/config.kdl:
--------------------------------------------------------------------------------
1 | // If you'd like to override the default keybindings completely, be sure to change "keybinds" to "keybinds clear-defaults=true"
2 | keybinds {
3 | normal {
4 | // uncomment this and adjust key if using copy_on_select=false
5 | // bind "Alt c" { Copy; }
6 | }
7 | locked {
8 | bind "Ctrl g" { SwitchToMode "Normal"; }
9 | }
10 | resize {
11 | bind "Ctrl n" { SwitchToMode "Normal"; }
12 | bind "h" "Left" { Resize "Increase Left"; }
13 | bind "j" "Down" { Resize "Increase Down"; }
14 | bind "k" "Up" { Resize "Increase Up"; }
15 | bind "l" "Right" { Resize "Increase Right"; }
16 | bind "H" { Resize "Decrease Left"; }
17 | bind "J" { Resize "Decrease Down"; }
18 | bind "K" { Resize "Decrease Up"; }
19 | bind "L" { Resize "Decrease Right"; }
20 | bind "=" "+" { Resize "Increase"; }
21 | bind "-" { Resize "Decrease"; }
22 | }
23 | pane {
24 | bind "Ctrl p" { SwitchToMode "Normal"; }
25 | bind "h" "Left" { MoveFocus "Left"; }
26 | bind "l" "Right" { MoveFocus "Right"; }
27 | bind "j" "Down" { MoveFocus "Down"; }
28 | bind "k" "Up" { MoveFocus "Up"; }
29 | bind "p" { SwitchFocus; }
30 | bind "n" { NewPane; SwitchToMode "Normal"; }
31 | bind "d" { NewPane "Down"; SwitchToMode "Normal"; }
32 | bind "r" { NewPane "Right"; SwitchToMode "Normal"; }
33 | bind "x" { CloseFocus; SwitchToMode "Normal"; }
34 | bind "f" { ToggleFocusFullscreen; SwitchToMode "Normal"; }
35 | bind "z" { TogglePaneFrames; SwitchToMode "Normal"; }
36 | bind "w" { ToggleFloatingPanes; SwitchToMode "Normal"; }
37 | bind "e" { TogglePaneEmbedOrFloating; SwitchToMode "Normal"; }
38 | bind "c" { SwitchToMode "RenamePane"; PaneNameInput 0;}
39 | }
40 | move {
41 | bind "Ctrl h" { SwitchToMode "Normal"; }
42 | bind "n" "Tab" { MovePane; }
43 | bind "p" { MovePaneBackwards; }
44 | bind "h" "Left" { MovePane "Left"; }
45 | bind "j" "Down" { MovePane "Down"; }
46 | bind "k" "Up" { MovePane "Up"; }
47 | bind "l" "Right" { MovePane "Right"; }
48 | }
49 | tab {
50 | bind "Ctrl t" { SwitchToMode "Normal"; }
51 | bind "r" { SwitchToMode "RenameTab"; TabNameInput 0; }
52 | bind "h" "Left" "Up" "k" { GoToPreviousTab; }
53 | bind "l" "Right" "Down" "j" { GoToNextTab; }
54 | bind "n" { NewTab; SwitchToMode "Normal"; }
55 | bind "x" { CloseTab; SwitchToMode "Normal"; }
56 | bind "s" { ToggleActiveSyncTab; SwitchToMode "Normal"; }
57 | bind "b" { BreakPane; SwitchToMode "Normal"; }
58 | bind "]" { BreakPaneRight; SwitchToMode "Normal"; }
59 | bind "[" { BreakPaneLeft; SwitchToMode "Normal"; }
60 | bind "1" { GoToTab 1; SwitchToMode "Normal"; }
61 | bind "2" { GoToTab 2; SwitchToMode "Normal"; }
62 | bind "3" { GoToTab 3; SwitchToMode "Normal"; }
63 | bind "4" { GoToTab 4; SwitchToMode "Normal"; }
64 | bind "5" { GoToTab 5; SwitchToMode "Normal"; }
65 | bind "6" { GoToTab 6; SwitchToMode "Normal"; }
66 | bind "7" { GoToTab 7; SwitchToMode "Normal"; }
67 | bind "8" { GoToTab 8; SwitchToMode "Normal"; }
68 | bind "9" { GoToTab 9; SwitchToMode "Normal"; }
69 | bind "Tab" { ToggleTab; }
70 | }
71 | scroll {
72 | bind "Ctrl s" { SwitchToMode "Normal"; }
73 | bind "e" { EditScrollback; SwitchToMode "Normal"; }
74 | bind "s" { SwitchToMode "EnterSearch"; SearchInput 0; }
75 | bind "Ctrl c" { ScrollToBottom; SwitchToMode "Normal"; }
76 | bind "j" "Down" { ScrollDown; }
77 | bind "k" "Up" { ScrollUp; }
78 | bind "Ctrl f" "PageDown" "Right" "l" { PageScrollDown; }
79 | bind "Ctrl b" "PageUp" "Left" "h" { PageScrollUp; }
80 | bind "d" { HalfPageScrollDown; }
81 | bind "u" { HalfPageScrollUp; }
82 | // uncomment this and adjust key if using copy_on_select=false
83 | // bind "Alt c" { Copy; }
84 | }
85 | search {
86 | bind "Ctrl s" { SwitchToMode "Normal"; }
87 | bind "Ctrl c" { ScrollToBottom; SwitchToMode "Normal"; }
88 | bind "j" "Down" { ScrollDown; }
89 | bind "k" "Up" { ScrollUp; }
90 | bind "Ctrl f" "PageDown" "Right" "l" { PageScrollDown; }
91 | bind "Ctrl b" "PageUp" "Left" "h" { PageScrollUp; }
92 | bind "d" { HalfPageScrollDown; }
93 | bind "u" { HalfPageScrollUp; }
94 | bind "n" { Search "down"; }
95 | bind "p" { Search "up"; }
96 | bind "c" { SearchToggleOption "CaseSensitivity"; }
97 | bind "w" { SearchToggleOption "Wrap"; }
98 | bind "o" { SearchToggleOption "WholeWord"; }
99 | }
100 | entersearch {
101 | bind "Ctrl c" "Esc" { SwitchToMode "Scroll"; }
102 | bind "Enter" { SwitchToMode "Search"; }
103 | }
104 | renametab {
105 | bind "Ctrl c" { SwitchToMode "Normal"; }
106 | bind "Esc" { UndoRenameTab; SwitchToMode "Tab"; }
107 | }
108 | renamepane {
109 | bind "Ctrl c" { SwitchToMode "Normal"; }
110 | bind "Esc" { UndoRenamePane; SwitchToMode "Pane"; }
111 | }
112 | session {
113 | bind "Ctrl o" { SwitchToMode "Normal"; }
114 | bind "Ctrl s" { SwitchToMode "Scroll"; }
115 | bind "d" { Detach; }
116 | bind "w" {
117 | LaunchOrFocusPlugin "zellij:session-manager" {
118 | floating true
119 | move_to_focused_tab true
120 | };
121 | SwitchToMode "Normal"
122 | }
123 | }
124 | tmux {
125 | bind "[" { SwitchToMode "Scroll"; }
126 | bind "Ctrl b" { Write 2; SwitchToMode "Normal"; }
127 | bind "\"" { NewPane "Down"; SwitchToMode "Normal"; }
128 | bind "%" { NewPane "Right"; SwitchToMode "Normal"; }
129 | bind "z" { ToggleFocusFullscreen; SwitchToMode "Normal"; }
130 | bind "c" { NewTab; SwitchToMode "Normal"; }
131 | bind "," { SwitchToMode "RenameTab"; }
132 | bind "p" { GoToPreviousTab; SwitchToMode "Normal"; }
133 | bind "n" { GoToNextTab; SwitchToMode "Normal"; }
134 | bind "Left" { MoveFocus "Left"; SwitchToMode "Normal"; }
135 | bind "Right" { MoveFocus "Right"; SwitchToMode "Normal"; }
136 | bind "Down" { MoveFocus "Down"; SwitchToMode "Normal"; }
137 | bind "Up" { MoveFocus "Up"; SwitchToMode "Normal"; }
138 | bind "h" { MoveFocus "Left"; SwitchToMode "Normal"; }
139 | bind "l" { MoveFocus "Right"; SwitchToMode "Normal"; }
140 | bind "j" { MoveFocus "Down"; SwitchToMode "Normal"; }
141 | bind "k" { MoveFocus "Up"; SwitchToMode "Normal"; }
142 | bind "o" { FocusNextPane; }
143 | bind "d" { Detach; }
144 | bind "Space" { NextSwapLayout; }
145 | bind "x" { CloseFocus; SwitchToMode "Normal"; }
146 | }
147 | shared_except "locked" {
148 | bind "Ctrl g" { SwitchToMode "Locked"; }
149 | bind "Ctrl q" { Quit; }
150 | bind "Alt n" { NewPane; }
151 | bind "Alt h" "Alt Left" { MoveFocusOrTab "Left"; }
152 | bind "Alt l" "Alt Right" { MoveFocusOrTab "Right"; }
153 | bind "Alt j" "Alt Down" { MoveFocus "Down"; }
154 | bind "Alt k" "Alt Up" { MoveFocus "Up"; }
155 | bind "Alt =" "Alt +" { Resize "Increase"; }
156 | bind "Alt -" { Resize "Decrease"; }
157 | bind "Alt [" { PreviousSwapLayout; }
158 | bind "Alt ]" { NextSwapLayout; }
159 | }
160 | shared_except "normal" "locked" {
161 | bind "Enter" "Esc" { SwitchToMode "Normal"; }
162 | }
163 | shared_except "pane" "locked" {
164 | bind "Ctrl p" { SwitchToMode "Pane"; }
165 | }
166 | shared_except "resize" "locked" {
167 | bind "Ctrl n" { SwitchToMode "Resize"; }
168 | }
169 | shared_except "scroll" "locked" {
170 | bind "Ctrl s" { SwitchToMode "Scroll"; }
171 | }
172 | shared_except "session" "locked" {
173 | bind "Ctrl o" { SwitchToMode "Session"; }
174 | }
175 | shared_except "tab" "locked" {
176 | bind "Ctrl t" { SwitchToMode "Tab"; }
177 | }
178 | shared_except "move" "locked" {
179 | bind "Ctrl h" { SwitchToMode "Move"; }
180 | }
181 | shared_except "tmux" "locked" {
182 | bind "Ctrl b" { SwitchToMode "Tmux"; }
183 | }
184 | }
185 |
186 | plugins {
187 | tab-bar { path "tab-bar"; }
188 | status-bar { path "status-bar"; }
189 | strider { path "strider"; }
190 | compact-bar { path "compact-bar"; }
191 | session-manager { path "session-manager"; }
192 | }
193 |
194 | // Choose what to do when zellij receives SIGTERM, SIGINT, SIGQUIT or SIGHUP
195 | // eg. when terminal window with an active zellij session is closed
196 | // Options:
197 | // - detach (Default)
198 | // - quit
199 | //
200 | // on_force_close "quit"
201 |
202 | // Send a request for a simplified ui (without arrow fonts) to plugins
203 | // Options:
204 | // - true
205 | // - false (Default)
206 | //
207 | // simplified_ui true
208 |
209 | // Choose the path to the default shell that zellij will use for opening new panes
210 | // Default: $SHELL
211 | //
212 | // default_shell "fish"
213 |
214 | // Choose the path to override cwd that zellij will use for opening new panes
215 | //
216 | // default_cwd ""
217 |
218 | // Toggle between having pane frames around the panes
219 | // Options:
220 | // - true (default)
221 | // - false
222 | //
223 | pane_frames false
224 |
225 | // Toggle between having Zellij lay out panes according to a predefined set of layouts whenever possible
226 | // Options:
227 | // - true (default)
228 | // - false
229 | //
230 | // auto_layout true
231 |
232 | // Whether sessions should be serialized to the cache folder (including their tabs/panes, cwds and running commands) so that they can later be resurrected
233 | // Options:
234 | // - true (default)
235 | // - false
236 | //
237 | // session_serialization false
238 |
239 | // Whether pane viewports are serialized along with the session, default is false
240 | // Options:
241 | // - true
242 | // - false (default)
243 | // serialize_pane_viewport true
244 |
245 | // Scrollback lines to serialize along with the pane viewport when serializing sessions, 0
246 | // defaults to the scrollback size. If this number is higher than the scrollback size, it will
247 | // also default to the scrollback size. This does nothing if `serialize_pane_viewport` is not true.
248 | //
249 | // scrollback_lines_to_serialize 10000
250 |
251 | // Define color themes for Zellij
252 | // For more examples, see: https://github.com/zellij-org/zellij/tree/main/example/themes
253 | // Once these themes are defined, one of them should to be selected in the "theme" section of this file
254 | //
255 | themes {
256 | tokyo-night {
257 | fg 169 177 214
258 | bg 26 27 38
259 | black 56 62 90
260 | red 249 51 87
261 | green 158 206 106
262 | yellow 224 175 104
263 | blue 122 162 247
264 | magenta 187 154 247
265 | cyan 42 195 222
266 | white 192 202 245
267 | orange 255 158 100
268 | }
269 | }
270 |
271 | // Choose the theme that is specified in the themes section.
272 | // Default: default
273 | //
274 | theme "tokyo-night"
275 |
276 | // The name of the default layout to load on startup
277 | // Default: "default"
278 | //
279 | // default_layout "compact"
280 |
281 | // Choose the mode that zellij uses when starting up.
282 | // Default: normal
283 | //
284 | // default_mode "locked"
285 |
286 | // Toggle enabling the mouse mode.
287 | // On certain configurations, or terminals this could
288 | // potentially interfere with copying text.
289 | // Options:
290 | // - true (default)
291 | // - false
292 | //
293 | // mouse_mode false
294 |
295 | // Configure the scroll back buffer size
296 | // This is the number of lines zellij stores for each pane in the scroll back
297 | // buffer. Excess number of lines are discarded in a FIFO fashion.
298 | // Valid values: positive integers
299 | // Default value: 10000
300 | //
301 | // scroll_buffer_size 10000
302 |
303 | // Provide a command to execute when copying text. The text will be piped to
304 | // the stdin of the program to perform the copy. This can be used with
305 | // terminal emulators which do not support the OSC 52 ANSI control sequence
306 | // that will be used by default if this option is not set.
307 | // Examples:
308 | //
309 | // copy_command "xclip -selection clipboard" // x11
310 | // copy_command "wl-copy" // wayland
311 | // copy_command "pbcopy" // osx
312 |
313 | // Choose the destination for copied text
314 | // Allows using the primary selection buffer (on x11/wayland) instead of the system clipboard.
315 | // Does not apply when using copy_command.
316 | // Options:
317 | // - system (default)
318 | // - primary
319 | //
320 | // copy_clipboard "primary"
321 |
322 | // Enable or disable automatic copy (and clear) of selection when releasing mouse
323 | // Default: true
324 | //
325 | // copy_on_select false
326 |
327 | // Path to the default editor to use to edit pane scrollbuffer
328 | // Default: $EDITOR or $VISUAL
329 | //
330 | // scrollback_editor "/usr/bin/vim"
331 |
332 | // When attaching to an existing session with other users,
333 | // should the session be mirrored (true)
334 | // or should each user have their own cursor (false)
335 | // Default: false
336 | //
337 | // mirror_session true
338 |
339 | // The folder in which Zellij will look for layouts
340 | //
341 | // layout_dir "/path/to/my/layout_dir"
342 |
343 | // The folder in which Zellij will look for themes
344 | //
345 | // theme_dir "/path/to/my/theme_dir"
346 |
347 | // Enable or disable the rendering of styled and colored underlines (undercurl).
348 | // May need to be disabled for certain unsupported terminals
349 | // Default: true
350 | //
351 | // styled_underlines false
352 |
353 |
--------------------------------------------------------------------------------
/zellij/layouts/default.kdl:
--------------------------------------------------------------------------------
1 | layout {
2 | default_tab_template {
3 | pane size=1 borderless=true {
4 | plugin location="zellij:tab-bar"
5 | }
6 | children
7 | pane size=2 borderless=true {
8 | plugin location="zellij:status-bar"
9 | }
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/zellij/layouts/monitors.kdl:
--------------------------------------------------------------------------------
1 | layout {
2 | pane_template name="tbh-borderless" borderless=true
3 | pane split_direction="vertical" {
4 | pane split_direction="horizontal" {
5 | pane {
6 | name "Bandwhich"
7 | command "sudo"
8 | args "/home/tombh/.nix-profile/bin/bandwhich"
9 | }
10 | pane {
11 | name "Borgmatic"
12 | command "~/bin/tbx"
13 | args "watch_borgmatic_latest_diff"
14 | }
15 | }
16 | pane {
17 | pane {
18 | name "DNF Updates"
19 | command "~/bin/tbx"
20 | args "watch_dnf_available_updates"
21 | }
22 | pane split_direction="vertical" {
23 | pane {
24 | name "Nix Updates"
25 | command "~/bin/tbx"
26 | args "watch_nix_available_updates"
27 | }
28 | pane {
29 | name "Cargo Updates"
30 | command "~/bin/tbx"
31 | args "watch_cargo_available_updates"
32 | }
33 | }
34 | pane {
35 | name "Syncthing"
36 | command "watch"
37 | args "stc"
38 | }
39 | }
40 | }
41 | pane split_direction="vertical" size="30%" {
42 | tbh-borderless command="btm"
43 | tbh-borderless command="htop"
44 | }
45 | }
46 |
47 | pane_frames true
48 |
--------------------------------------------------------------------------------
/zimrc:
--------------------------------------------------------------------------------
1 | zmodule zsh-users/zsh-completions --fpath src
2 | zmodule completion
3 | zmodule zsh-users/zsh-syntax-highlighting
4 | zmodule zsh-users/zsh-autosuggestions
5 | zmodule zsh-users/zsh-history-substring-search
6 | zmodule zdharma-continuum/fast-syntax-highlighting
7 | zmodule ohmyzsh/ohmyzsh --fpath 'plugins/extract' --source 'plugins/extract/extract.plugin.zsh'
8 | zmodule ohmyzsh/ohmyzsh --fpath 'plugins/git' --source 'plugins/git/git.plugin.zsh'
9 | zmodule marlonrichert/zsh-edit
10 |
--------------------------------------------------------------------------------
/zprofile.zsh:
--------------------------------------------------------------------------------
1 | export GTK_THEME=Adwaita:dark
2 | export MOZ_ENABLE_WAYLAND=1
3 | export MOZ_GTK_TITLEBAR_DECORATION=client
4 | export XDG_SESSION_TYPE=wayland
5 | export XDG_CURRENT_DESKTOP=wayfire
6 | export XDG_DATA_DIR=~/.local/share
7 | export PYTHON_KEYRING_BACKEND=keyring.backends.null.Keyring
8 |
9 | export INPUT_METHOD=ibus
10 | export GTK_IM_MODULE=ibus
11 | export XMODIFIERS=@im=ibus
12 | export QT_IM_MODULE=ibus
13 |
14 | # export MESA_GL_VERSION_OVERRIDE=3.3
15 | # export MESA_GLSL_VERSION_OVERRIDE=330
16 | # export MESA_GLES_VERSION_OVERRIDE=3.1
17 |
18 | export PATH=$PATH:/usr/sbin
19 | export PAGER=less
20 |
21 | # User binaries
22 | export PATH="$HOME/bin:$PATH"
23 | export PATH="$HOME/.local/bin:$PATH"
24 |
25 | export COTP_DB_PATH=~/.config/cotp/db.cotp
26 |
27 | # Nix package manager
28 | # Single user (currently on my Fedora)
29 | nix_init=$HOME/.nix-profile/etc/profile.d/nix.sh
30 | [ -f $nix_init ] && source $nix_init
31 |
32 | # Rust
33 | [ -f $HOME/.cargo/env ] && source $HOME/.cargo/env
34 |
35 | # Record history in Erlang REPL
36 | export ERL_AFLAGS="-kernel shell_history enabled"
37 |
38 | # Java / Android SDK
39 | export _JAVA_AWT_WM_NONREPARENTING=1
40 | export STUDIO_JDK=/usr/lib/jvm/java-14-openjdk
41 | export ANDROID_SDK_ROOT=~/Android/Sdk/
42 | export ANDROID_HOME=$ANDROID_SDK_ROOT
43 |
44 | export GPG_TTY=$(tty)
45 | gpg-connect-agent updatestartuptty /bye >/dev/null
46 |
47 | # Python poetry
48 | [ -f $HOME/.poetry/env ] && source $HOME/.poetry/env
49 |
50 | # __pycache__
51 | export PYTHONPYCACHEPREFIX=$HOME/.cache/pycache
52 |
53 | # Golang
54 | export GOPATH=~/.go
55 | export GOBIN=~/.go/bin
56 | export PATH=$PATH:$GOBIN
57 |
58 | # Personal
59 | secrets=$HOME/Syncthing/SyncMisc/secrets.env
60 | [ -f $secrets ] && source $secrets
61 |
62 | # NVM/Node
63 | export PATH=$PATH:./node_modules/.bin:
64 |
65 | # All of the languages
66 | eval "$(mise activate zsh)"
67 |
68 | # It's best for tmux to set TERM=tmux for various reasons, but for eveyrthing else we
69 | # need this.
70 | export TERM=xterm-256color
71 |
72 | if [[ $(tty) = /dev/tty1 ]]; then
73 | eval $(keychain --eval --dir $HOME/.config/keychain --quiet --noask --agents gpg,ssh id_rsa)
74 | pushd ~/.config/tmux/resurrect
75 | ln -sf "$(ls -Art | tail -n3 | head -n1)" last
76 | popd
77 | WAYLAND_DISPLAY=wayland-1 tmux start-server
78 | exec wayfire > "$HOME/log/wayfire.log"
79 | killall tmux || true
80 | fi
81 |
82 | if [[ $(tty) = /dev/tty1 ]]; then
83 | fi
84 |
85 | if [[ $(tty) = /dev/tty2 ]]; then
86 | fi
87 |
--------------------------------------------------------------------------------
/zshrc:
--------------------------------------------------------------------------------
1 | [[ -o interactive ]] || return
2 |
3 | _zshrc_finished=false
4 |
5 | TRAPEXIT() {
6 | if [ $_zshrc_finished = false ]; then
7 | _debug "⚠ .zshrc didn't finish"
8 | else
9 | _debug "✨ .zshrc completed"
10 | fi
11 | }
12 |
13 | function _error () {
14 | >&2 echo "$1"
15 | }
16 |
17 | function _debug () {
18 | if [ "$ZSH_DEBUG" = 1 ]; then
19 | _error "$1"
20 | fi
21 | }
22 |
23 | zstyle ':zim:zmodule' use 'degit'
24 | ZIM_HOME=~/.zim
25 | # Download zimfw plugin manager if missing.
26 | if [[ ! -e ${ZIM_HOME}/zimfw.zsh ]]; then
27 | curl -fsSL --create-dirs -o ${ZIM_HOME}/zimfw.zsh \
28 | https://github.com/zimfw/zimfw/releases/latest/download/zimfw.zsh
29 | fi
30 | # Install missing modules, and update ${ZIM_HOME}/init.zsh if missing or outdated.
31 | if [[ ! ${ZIM_HOME}/init.zsh -nt ${ZDOTDIR:-${HOME}}/.zimrc ]]; then
32 | source ${ZIM_HOME}/zimfw.zsh init -q
33 | fi
34 | source ${ZIM_HOME}/init.zsh
35 |
36 | # History settings
37 | export HISTFILE=~/.zhistory
38 | export SAVEHIST=100000
39 | export HISTSIZE=100000
40 | setopt BANG_HIST # Treat the '!' character specially during expansion.
41 | setopt EXTENDED_HISTORY # Write the history file in the ":start:elapsed;command" format.
42 | setopt INC_APPEND_HISTORY # Write to the history file immediately, not when the shell exits.
43 | setopt SHARE_HISTORY # Share history between all sessions.
44 | setopt HIST_EXPIRE_DUPS_FIRST # Expire duplicate entries first when trimming history.
45 | setopt HIST_IGNORE_DUPS # Don't record an entry that was just recorded again.
46 | setopt HIST_IGNORE_ALL_DUPS # Delete old recorded entry if new entry is a duplicate.
47 | setopt HIST_FIND_NO_DUPS # Do not display a line previously found.
48 | setopt HIST_IGNORE_SPACE # Don't record an entry starting with a space.
49 | setopt HIST_SAVE_NO_DUPS # Don't write duplicate entries in the history file.
50 | setopt HIST_REDUCE_BLANKS # Remove superfluous blanks before recording entry.
51 | setopt HIST_VERIFY # Don't execute immediately upon history expansion.
52 | setopt HIST_BEEP # Beep when accessing nonexistent history.
53 |
54 | # Include hidden files in completions
55 | setopt globdots
56 |
57 | # Just type the name of a cd'able location and press return to get there
58 | setopt auto_cd
59 |
60 | # Ensure Home/End do what their meant to
61 | bindkey "^[[1~" beginning-of-line
62 | bindkey "^[[4~" end-of-line
63 |
64 | ## Require marlonrichert/zsh-edit plugin
65 | # CTRL+ARROW to move by words
66 | bindkey "^[[1;5C" forward-subword
67 | bindkey "^[[1;5D" backward-subword
68 | # CTRL+BACKSPACE deletes whole word
69 | bindkey "^H" backward-kill-subword
70 |
71 | # Bind UP/DOWN to search through history
72 | bindkey "^[[A" history-substring-search-up
73 | bindkey "^[[B" history-substring-search-down
74 |
75 | export XDG_CONFIG_HOME=$HOME/.config
76 |
77 | # Aliases
78 | alias 'rm'='rm -I'
79 | alias 's'='sudo --preserve-env=PATH --preserve-env=HOME env'
80 | alias 'se'='sudoedit'
81 |
82 | alias 'p'='paru'
83 | alias 'pS'='paru -S'
84 | alias 'pR'='paru -Rsc'
85 | alias 'pU'='tbx pacman_update'
86 |
87 | alias 'dI'='sudo dnf install -y'
88 | alias 'dR'='sudo dnf remove'
89 | alias 'dU'='sudo dnf upgrade --refresh'
90 |
91 | alias 'nI'='nix-env --install --attr'
92 | alias 'nR'='nix-env --uninstall'
93 | alias 'nU'='nix-env --upgrade'
94 |
95 | alias 'gs'='git status -u'
96 | alias 'o'='handlr open'
97 | alias 'e'='nvim'
98 | alias 'la'='
99 | lsd \
100 | --blocks date,user,size,name \
101 | --group-dirs first \
102 | --date relative \
103 | --sort time \
104 | --reverse\
105 | --almost-all'
106 | alias 'laa'='lsd --long --git --almost-all'
107 | alias 'lad'='la --sort time'
108 | alias 'las'='la --sort size'
109 | alias 'less'='less -r'
110 | alias ff='fd . -type f -name'
111 | alias be='bundle exec'
112 | alias kc='kubectl'
113 | alias grbim='~/bin/tbx git_rebase_interactive_detect_base'
114 |
115 |
116 | function gbn {
117 | branch_name=$1
118 | git checkout -B "$branch_name" main
119 | }
120 |
121 | function ghcopr {
122 | export GH_FORCE_TTY=100%
123 | gh pr list | \
124 | fzf \
125 | --ansi \
126 | --preview 'gh pr view {1}' \
127 | --preview-window down --header-lines 3 |
128 | awk '{print $1}' |
129 | xargs gh pr checkout
130 | }
131 |
132 | function gcofz {
133 | git branch \
134 | --sort=-committerdate | \
135 | grep -v '^\*' | \
136 | fzf --reverse --info=inline | \
137 | xargs git checkout
138 | }
139 |
140 | # Pressing CTRL+SPACE after alias expands it
141 | function expand-alias() {
142 | zle _expand_alias
143 | zle self-insert
144 | }
145 | zle -N expand-alias
146 | bindkey '^[ ' expand-alias
147 |
148 | export FZF_CTRL_T_OPTS="
149 | --preview 'bat -n --color=always {}'
150 | --bind 'ctrl-/:change-preview-window(down|hidden|)'"
151 |
152 | FZF_ALT_C_COMMAND="atuin search --format "{directory}" | rg -v "^unknown" | sort | uniq"
153 | FZF_ALT_C_OPTS="--preview 'lsd --color always --tree {}'"
154 |
155 | [ -f /usr/share/fzf/shell/key-bindings.zsh ] && source /usr/share/fzf/shell/key-bindings.zsh
156 | [ -f /usr/share/fzf/key-bindings.zsh ] && source /usr/share/fzf/key-bindings.zsh
157 |
158 | ATUIN_NOBIND=1
159 | eval "$(atuin init zsh --disable-up-arrow)"
160 | bindkey '^r' _atuin_search_widget
161 |
162 | # Multi-user (currently on remote Debian)
163 | if [ -e '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh' ]; then
164 | . '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh'
165 | fi
166 |
167 | export EDITOR=$(which nvim)
168 |
169 | # timg TTY image viewer: display images with correct aspect ratio on remote server
170 | if [[ $(cat /etc/hostname) = "remote-box" ]]; then
171 | export TIMG_FONT_WIDTH_CORRECT=1.0
172 | fi
173 |
174 | # Set xterm option to enable CTRL-TAB, see:
175 | # https://github.com/alacritty/alacritty/issues/4451
176 | echo -ne '\e[>4;1m'
177 |
178 | # This script was automatically generated by the broot program
179 | # More information can be found in https://github.com/Canop/broot
180 | # This function starts broot and executes the command
181 | # it produces, if any.
182 | # It's needed because some shell commands, like `cd`,
183 | # have no useful effect if executed in a subshell.
184 | function br {
185 | local cmd cmd_file code
186 | cmd_file=$(mktemp)
187 | if broot --outcmd "$cmd_file" "$@"; then
188 | cmd=$(<"$cmd_file")
189 | rm -f "$cmd_file"
190 | EDITOR=vi eval "$cmd"
191 | else
192 | code=$?
193 | rm -f "$cmd_file"
194 | return "$code"
195 | fi
196 | }
197 | zle -N br
198 | bindkey '^b' br
199 |
200 | # Prompt
201 | eval "$(starship init zsh)"
202 |
203 | # Rye Python and Python packages manager
204 | [ -f "$HOME/.rye/env" ] && source "$HOME/.rye/env"
205 |
206 | if [[ -n $ONEOFF ]]; then
207 | eval "$ONEOFF"
208 | exit
209 | fi
210 |
211 | _zshrc_finished=true
212 |
213 | if [ -e /home/tombh/.nix-profile/etc/profile.d/nix.sh ]; then . /home/tombh/.nix-profile/etc/profile.d/nix.sh; fi # added by Nix installer
214 |
--------------------------------------------------------------------------------