From ff513ecd10f97030a0fc580c1db8a7f1ada69109 Mon Sep 17 00:00:00 2001 From: Matt Nish-Lapidus Date: Tue, 24 Sep 2024 23:26:29 -0400 Subject: [PATCH] configuring --- .../fish/functions/fish_greeting.fish | 8 + dotfiles/dot_config/fish/functions/la.fish | 3 + dotfiles/dot_config/fish/functions/lg.fish | 4 + dotfiles/dot_config/fish/functions/ll.fish | 3 + dotfiles/dot_config/fish/functions/ls.fish | 7 + .../dot_config/fish/functions/pullall.fish | 10 + dotfiles/dot_config/fish/functions/sbcl.fish | 4 + dotfiles/dot_config/starship.toml | 201 ++++++++++++++++++ dotfiles/dot_config/wezterm/wezterm.lua | 145 +++++++++++++ home/home.nix | 36 +++- 10 files changed, 417 insertions(+), 4 deletions(-) create mode 100644 dotfiles/dot_config/fish/functions/fish_greeting.fish create mode 100644 dotfiles/dot_config/fish/functions/la.fish create mode 100644 dotfiles/dot_config/fish/functions/lg.fish create mode 100644 dotfiles/dot_config/fish/functions/ll.fish create mode 100644 dotfiles/dot_config/fish/functions/ls.fish create mode 100644 dotfiles/dot_config/fish/functions/pullall.fish create mode 100644 dotfiles/dot_config/fish/functions/sbcl.fish create mode 100644 dotfiles/dot_config/starship.toml create mode 100644 dotfiles/dot_config/wezterm/wezterm.lua diff --git a/dotfiles/dot_config/fish/functions/fish_greeting.fish b/dotfiles/dot_config/fish/functions/fish_greeting.fish new file mode 100644 index 0000000..81a5236 --- /dev/null +++ b/dotfiles/dot_config/fish/functions/fish_greeting.fish @@ -0,0 +1,8 @@ +function fish_greeting + status --is-login + if [ $status = 0 ] + if which figlet > /dev/null + figlet -f "/Users/emenel/.local/flf/wavy.flf" "welcome" + end + end +end diff --git a/dotfiles/dot_config/fish/functions/la.fish b/dotfiles/dot_config/fish/functions/la.fish new file mode 100644 index 0000000..48cf130 --- /dev/null +++ b/dotfiles/dot_config/fish/functions/la.fish @@ -0,0 +1,3 @@ +function la --description 'alias ls -la' + ls -la $argv +end diff --git a/dotfiles/dot_config/fish/functions/lg.fish b/dotfiles/dot_config/fish/functions/lg.fish new file mode 100644 index 0000000..8737a82 --- /dev/null +++ b/dotfiles/dot_config/fish/functions/lg.fish @@ -0,0 +1,4 @@ +function lg --wraps=lazygit --description 'alias lg=lazygit' + lazygit $argv + +end diff --git a/dotfiles/dot_config/fish/functions/ll.fish b/dotfiles/dot_config/fish/functions/ll.fish new file mode 100644 index 0000000..62b6478 --- /dev/null +++ b/dotfiles/dot_config/fish/functions/ll.fish @@ -0,0 +1,3 @@ +function ll --description 'alias ls -l' + ls -l $argv +end diff --git a/dotfiles/dot_config/fish/functions/ls.fish b/dotfiles/dot_config/fish/functions/ls.fish new file mode 100644 index 0000000..4f06a18 --- /dev/null +++ b/dotfiles/dot_config/fish/functions/ls.fish @@ -0,0 +1,7 @@ +function ls --wraps=eza --description 'eza instead of ls' + if type --quiet eza + eza --git --header --icons $argv + else + command ls --color=auto $argv + end +end diff --git a/dotfiles/dot_config/fish/functions/pullall.fish b/dotfiles/dot_config/fish/functions/pullall.fish new file mode 100644 index 0000000..6254284 --- /dev/null +++ b/dotfiles/dot_config/fish/functions/pullall.fish @@ -0,0 +1,10 @@ +function pullall +for dir in * +if test -d $dir +cd $dir +echo "---- " $dir "----" +git pull +cd .. +end +end +end diff --git a/dotfiles/dot_config/fish/functions/sbcl.fish b/dotfiles/dot_config/fish/functions/sbcl.fish new file mode 100644 index 0000000..b56d0f5 --- /dev/null +++ b/dotfiles/dot_config/fish/functions/sbcl.fish @@ -0,0 +1,4 @@ +function sbcl --description 'alias sbcl=rlwrap sbcl' + rlwrap sbcl $argv + +end diff --git a/dotfiles/dot_config/starship.toml b/dotfiles/dot_config/starship.toml new file mode 100644 index 0000000..08d450c --- /dev/null +++ b/dotfiles/dot_config/starship.toml @@ -0,0 +1,201 @@ +"$schema" = 'https://starship.rs/config-schema.json' + +format = "$all$line_break$character" + +[directory] +truncation_length = 0 +truncate_to_repo = false +fish_style_pwd_dir_length = 0 +use_logical_path = true +format = "[$path]($style)[$read_only]($read_only_style) " +repo_root_format = "[$before_root_path]($before_repo_root_style)[$repo_root]($repo_root_style)[$path]($style)[$read_only]($read_only_style) " +style = "blue bold" +disabled = false +read_only = " 󰌾" +read_only_style = "red" +truncation_symbol = "" +home_symbol = "~" +use_os_path_sep = true + +[cmd_duration] +style = '#444444' +format = '([\($duration\)]($style))' + +[aws] +symbol = " " + +[buf] +symbol = " " + +[c] +symbol = " " + +[conda] +symbol = " " + +[crystal] +symbol = " " + +[dart] +symbol = " " + +[docker_context] +symbol = " " + +[elixir] +symbol = " " + +[elm] +symbol = " " + +[fennel] +symbol = " " + +[fossil_branch] +symbol = " " + +[git_branch] +symbol = " " +format = "[$symbol$branch(:$remote_branch)]($style) " + +[git_status] +style = 'blue' +format = '([$all_status$ahead_behind${count}]($style) )' +conflicted = '=$count' +ahead = '⇡$count' +behind = '⇣$count' +diverged = '⇕$count' +up_to_date = '$count' +untracked = '?$count' +stashed = '$$count' +modified = '!$count' +staged = '[+$count](yellow)' +renamed = '»$count' +deleted = '✘$count' +typechanged = "" + +[golang] +symbol = " " + +[guix_shell] +symbol = " " + +[haskell] +symbol = " " + +[haxe] +symbol = " " + +[hg_branch] +symbol = " " + +[hostname] +ssh_symbol = " " + +[java] +symbol = " " + +[julia] +symbol = " " + +[kotlin] +symbol = " " + +[lua] +symbol = " " + +[memory_usage] +symbol = "󰍛 " + +[meson] +symbol = "󰔷 " + +[nim] +symbol = "󰆥 " + +[nix_shell] +symbol = " " + +[nodejs] +symbol = " " + +[ocaml] +symbol = " " + +[os.symbols] +Alpaquita = " " +Alpine = " " +AlmaLinux = " " +Amazon = " " +Android = " " +Arch = " " +Artix = " " +CentOS = " " +Debian = " " +DragonFly = " " +Emscripten = " " +EndeavourOS = " " +Fedora = " " +FreeBSD = " " +Garuda = "󰛓 " +Gentoo = " " +HardenedBSD = "󰞌 " +Illumos = "󰈸 " +Kali = " " +Linux = " " +Mabox = " " +Macos = " " +Manjaro = " " +Mariner = " " +MidnightBSD = " " +Mint = " " +NetBSD = " " +NixOS = " " +OpenBSD = "󰈺 " +openSUSE = " " +OracleLinux = "󰌷 " +Pop = " " +Raspbian = " " +Redhat = " " +RedHatEnterprise = " " +RockyLinux = " " +Redox = "󰀘 " +Solus = "󰠳 " +SUSE = " " +Ubuntu = " " +Unknown = " " +Void = " " +Windows = "󰍲 " + +[package] +symbol = "󰏗 " + +[perl] +symbol = " " + +[php] +symbol = " " + +[pijul_channel] +symbol = " " + +[python] +symbol = " " + +[rlang] +symbol = "󰟔 " + +[ruby] +symbol = " " + +[rust] +symbol = " " + +[scala] +symbol = " " + +[swift] +symbol = " " + +[zig] +symbol = " " diff --git a/dotfiles/dot_config/wezterm/wezterm.lua b/dotfiles/dot_config/wezterm/wezterm.lua new file mode 100644 index 0000000..9592e91 --- /dev/null +++ b/dotfiles/dot_config/wezterm/wezterm.lua @@ -0,0 +1,145 @@ +local wezterm = require 'wezterm' +local config = wezterm.config_builder() +local act = wezterm.action + +-- config.default_prog = { 'fish', '-l' } + +config.enable_wayland = false; + +local bar = wezterm.plugin.require("https://github.com/adriankarlen/bar.wezterm") + +config.font_size = 12 +config.font = wezterm.font { + family = 'JetBrains Mono', + weight = 'Medium' +} + +config.color_scheme = 'Adventure' + +config.colors = { + tab_bar = { + inactive_tab = { + fg_color = "#444444", + bg_color = "#000000" + } + } +} + +config.window_decorations = "TITLE|RESIZE" + +config.window_padding = { + left = 12, + right = 12, + top = 6, + bottom = 6, +} + +config.cursor_thickness = 2 +config.default_cursor_style = 'SteadyBar' + +config.use_fancy_tab_bar = false +config.tab_bar_at_bottom = true + +config.enable_kitty_keyboard = true + +config.keys = { + { + key = ",", + mods = "SUPER", + action = act.SpawnCommandInNewWindow({ + cwd = os.getenv("WEZTERM_CONFIG_DIR"), + args = { os.getenv("SHELL"), "-c", "$EDITOR $WEZTERM_CONFIG_FILE" }, + }), + }, + { + key = 'Enter', + mods = 'SUPER', + action = act.SplitVertical { domain = 'CurrentPaneDomain' }, + }, + { + key = 'Enter', + mods = 'SUPER|SHIFT', + action = act.SplitHorizontal { domain = 'CurrentPaneDomain' }, + }, + { + key = 'k', + mods = 'SUPER', + action = act.Multiple { + act.ClearScrollback 'ScrollbackAndViewport', + act.SendKey { key = 'L', mods = 'CTRL' }, + }, + }, + {key="LeftArrow", mods="SUPER|META", action=act.ActivateTabRelative(-1)}, + {key="RightArrow", mods="SUPER|META", action=act.ActivateTabRelative(1)}, + + {key="UpArrow", mods="SUPER|META", action=act.ActivatePaneDirection("Prev")}, + {key="DownArrow", mods="SUPER|META", action=act.ActivatePaneDirection("Next")}, + + { key='h', mods='SUPER|META', action=wezterm.action{ActivatePaneDirection="Left"} }, + { key='l', mods='SUPER|META', action=wezterm.action{ActivatePaneDirection="Right"} }, + { key='j', mods='SUPER|META', action=wezterm.action{ActivatePaneDirection="Up"} }, + { key='k', mods='SUPER|META', action=wezterm.action{ActivatePaneDirection="Down"} }, +} + +local barconfig = { + position = "bottom", + max_width = 32, + separator = { + space = 2, + left_icon = wezterm.nerdfonts.fa_long_arrow_right, + right_icon = wezterm.nerdfonts.fa_long_arrow_left, + field_icon = wezterm.nerdfonts.indent_line, + }, + modules = { + tabs = { + active_tab_fg = 4, + inactive_tab_fg = 8, -- overridden by tab colour customization near the top + }, + workspace = { + enabled = true, + icon = wezterm.nerdfonts.cod_window, + color = 8, + }, + leader = { + enabled = true, + icon = wezterm.nerdfonts.oct_rocket, + color = 2, + }, + pane = { + enabled = false, + icon = wezterm.nerdfonts.cod_multiple_windows, + color = 7, + }, + username = { + enabled = false, + icon = wezterm.nerdfonts.fa_user, + color = 6, + }, + hostname = { + enabled = false, + icon = wezterm.nerdfonts.cod_server, + color = 8, + }, + clock = { + enabled = false, + icon = wezterm.nerdfonts.md_calendar_clock, + color = 5, + }, + cwd = { + enabled = false, + icon = wezterm.nerdfonts.oct_file_directory, + color = 7, + }, + spotify = { + enabled = false, + icon = wezterm.nerdfonts.fa_spotify, + color = 3, + max_width = 64, + throttle = 15, + }, + }, +} + +bar.apply_to_config(config, barconfig) + +return config diff --git a/home/home.nix b/home/home.nix index 111b32b..b704e59 100644 --- a/home/home.nix +++ b/home/home.nix @@ -15,6 +15,8 @@ ripgrep erdtree age + figlet + ffmpeg pciutils util-linux @@ -22,6 +24,7 @@ libgcc raylib SDL2 + protonplus ruby janet @@ -38,6 +41,8 @@ starship lazygit nnn + isync + msmtp bitwarden-cli bitwarden-desktop @@ -50,7 +55,13 @@ gnome.gnome-tweaks colloid-gtk-theme colloid-icon-theme - + turtle + papers + newsflash + helvum + + librewolf + ungoogled-chromium albert obsidian vlc @@ -89,7 +100,10 @@ }; }; - services.flatpak.enable = true; + services = { + flatpak.enable = true; + tailscale.enable = true; + }; xdg.systemDirs.data = [ "/home/emenel/.local/share/applications" @@ -100,8 +114,22 @@ services.flatpak.packages = [ "io.github.zen_browser.zen" + "com.github.johnfactotum.QuickLookup" ]; - xdg.configFile."wezterm".source = ./dotfiles/dot_config/wezterm; - #xdg.configFile."fish".source = ./ + xdg.configFile."starship.toml".source = ../dotfiles/dot_config/starship.toml; + xdg.configFile."wezterm".source = ../dotfiles/dot_config/wezterm; + + xdg.configFile."fish/functions" = { + source = ../dotfiles/dot_config/fish/functions; + recursive = true; + }; + + #xdg.configFile."fish/functions/ll.fish".source = ../dotfiles/dot_config/fish/functions/ll.fish; + #xdg.configFile."fish/functions/la.fish".source = ../dotfiles/dot_config/fish/functions/la.fish; + #xdg.configFile."fish/functions/lg.fish".source = ../dotfiles/dot_config/fish/functions/lg.fish; + #xdg.configFile."fish/functions/ls.fish".source = ../dotfiles/dot_config/fish/functions/ls.fish; + #xdg.configFile."fish/functions/sbcl.fish".source = ../dotfiles/dot_config/fish/functions/sbcl.fish; + #xdg.configFile."fish/functions/pullall.fish".source = ../dotfiles/dot_config/fish/functions/pullall.fish; + }