Compare commits

..
15 Commits
12 changed files with 252 additions and 248 deletions
+34
View File
@@ -0,0 +1,34 @@
[user]
name = Bartal Laearsson
email = bartal@flo.fo
signingkey = ~/.ssh/id_ed25519.pub
[commit]
gpgsign = true
[tag]
gpgsign = true
[gpg]
format = ssh
[gpg "ssh"]
allowedSignersFile = ~/.ssh/allowed_signers
[core]
editor = nvim
autocrlf = input
[pull]
rebase = true
[push]
autoSetupRemote = true
[init]
defaultBranch = main
[merge]
conflictstyle = diff3
[diff]
colorMoved = zebra
[credential]
helper = store
[credential "https://git.public.fl%C3%B3.fo"]
helper =
helper = !tea login helper
[credential "https://git.public.xn--fl-6ja.fo"]
helper =
helper = !tea login helper
+65 -9
View File
@@ -83,6 +83,39 @@ require("lazy").setup({
}, },
}, },
{
"MeanderingProgrammer/render-markdown.nvim",
dependencies = { "nvim-treesitter/nvim-treesitter", "nvim-tree/nvim-web-devicons" },
opts = {},
ft = { "markdown", "norg", "rmd", "org", "codecompanion" },
},
{
"iamcco/markdown-preview.nvim",
cmd = { "MarkdownPreviewToggle", "MarkdownPreview", "MarkdownPreviewStop" },
build = "cd app && yarn install",
init = function()
vim.g.mkdp_filetypes = { "markdown" }
end,
ft = { "markdown" },
},
{
"stevearc/oil.nvim",
---@module 'oil'
---@type oil.SetupOpts
opts = {
view_options = {
show_hidden = true,
},
},
dependencies = { "nvim-tree/nvim-web-devicons" },
lazy = false,
keys = {
{ "-", "<cmd>Oil<cr>", desc = "Open parent directory" },
},
},
{ {
"nvim-telescope/telescope.nvim", "nvim-telescope/telescope.nvim",
enabled = true, enabled = true,
@@ -174,7 +207,7 @@ require("lazy").setup({
end, end,
}, },
{ {
"neovim/nvim-lspconfig", "neovim/nvim-lspconfig",
dependencies = { dependencies = {
{ "j-hui/fidget.nvim", opts = {} }, { "j-hui/fidget.nvim", opts = {} },
@@ -277,7 +310,32 @@ require("lazy").setup({
vim.lsp.enable(name) vim.lsp.enable(name)
end end
end, end,
}, },
{
"ray-x/go.nvim",
dependencies = {
"ray-x/guihua.lua",
"neovim/nvim-lspconfig",
"nvim-treesitter/nvim-treesitter",
"L3MON4D3/LuaSnip",
},
event = { "CmdlineEnter" },
ft = { "go", "gomod", "gowork", "gotmpl" },
build = ':lua require("go.install").update_all_sync()',
opts = {},
config = function(_, opts)
require("go").setup(opts)
local format_sync_grp = vim.api.nvim_create_augroup("GoFormat", { clear = true })
vim.api.nvim_create_autocmd("BufWritePre", {
pattern = "*.go",
callback = function()
require("go.format").goimports()
end,
group = format_sync_grp,
})
end,
},
{ {
"stevearc/conform.nvim", "stevearc/conform.nvim",
@@ -355,16 +413,14 @@ require("lazy").setup({
}, },
{ {
"folke/tokyonight.nvim", "rebelot/kanagawa.nvim",
priority = 1000, priority = 1000,
config = function() config = function()
---@diagnostic disable-next-line: missing-fields ---@diagnostic disable-next-line: missing-fields
require("tokyonight").setup({ require("kanagawa").setup({
styles = { theme = "wave",
comments = { italic = true },
},
}) })
vim.cmd.colorscheme("tokyonight-night") vim.cmd.colorscheme("kanagawa")
end, end,
}, },
@@ -383,6 +439,7 @@ require("lazy").setup({
config = function() config = function()
require("mini.ai").setup({ n_lines = 500 }) require("mini.ai").setup({ n_lines = 500 })
require("mini.surround").setup() require("mini.surround").setup()
require("mini.pairs").setup()
local statusline = require("mini.statusline") local statusline = require("mini.statusline")
statusline.setup({ use_icons = vim.g.have_nerd_font }) statusline.setup({ use_icons = vim.g.have_nerd_font })
---@diagnostic disable-next-line: duplicate-set-field ---@diagnostic disable-next-line: duplicate-set-field
@@ -487,4 +544,3 @@ require("lazy").setup({
}, },
}, },
}) })
+24
View File
@@ -0,0 +1,24 @@
{
"LuaSnip": { "branch": "master", "commit": "642b0c595e11608b4c18219e93b88d7637af27bc" },
"blink.cmp": { "branch": "main", "commit": "78336bc89ee5365633bcf754d93df01678b5c08f" },
"conform.nvim": { "branch": "master", "commit": "016802de402556da54c36bd7359b441266b01cdd" },
"fidget.nvim": { "branch": "main", "commit": "6f793b2bcd2d35e201c09520f698bb763220908a" },
"gitsigns.nvim": { "branch": "main", "commit": "5be654f2232c10ddcad19c1607a67b6b4b78fc29" },
"go.nvim": { "branch": "master", "commit": "0768d79bbebdb1a112a845f9cd6293bfbd544dab" },
"guess-indent.nvim": { "branch": "main", "commit": "84a4987ff36798c2fc1169cbaff67960aed9776f" },
"guihua.lua": { "branch": "master", "commit": "4c513d5dac550af77034cced421967b393261509" },
"kanagawa.nvim": { "branch": "master", "commit": "bb85e4bfc8d89b0e62c8fa53ccdd13d12e2f77b3" },
"lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" },
"markdown-preview.nvim": { "branch": "master", "commit": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee" },
"mini.nvim": { "branch": "main", "commit": "629bf6792187e11b4829411c1648f86f28df3963" },
"nvim-lspconfig": { "branch": "master", "commit": "d2011e1dd0c27569c551f16b688d86029ae015c9" },
"nvim-treesitter": { "branch": "main", "commit": "c9f9ed6c1892f629ea399f4ee7905f2686fa13f2" },
"nvim-web-devicons": { "branch": "master", "commit": "2ae6958df7ced50baac5035cec0c15799eedfbf7" },
"oil.nvim": { "branch": "master", "commit": "b73018b75affd13fa38e2fc94ef753b465f770d7" },
"plenary.nvim": { "branch": "master", "commit": "74b06c6c75e4eeb3108ec01852001636d85a932b" },
"render-markdown.nvim": { "branch": "main", "commit": "4663eb3ecd538bd5062628fb6d95bbe6bdca78f6" },
"telescope-fzf-native.nvim": { "branch": "main", "commit": "b25b749b9db64d375d782094e2b9dce53ad53a40" },
"telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" },
"telescope.nvim": { "branch": "master", "commit": "427b576c16792edad01a92b89721d923c19ad60f" },
"todo-comments.nvim": { "branch": "main", "commit": "31e3c38ce9b29781e4422fc0322eb0a21f4e8668" }
}
+10 -6
View File
@@ -1,7 +1,6 @@
# Sway workstation configuration translated from NixOS behavior.
set $mod Mod4 set $mod Mod4
set $term foot -e tmux new-session -A -s main set $term ghostty
set $browser zen set $browser brave-origin
set $menu rofi -show drun set $menu rofi -show drun
font pango:DejaVu Sans Mono 10 font pango:DejaVu Sans Mono 10
@@ -9,6 +8,10 @@ font pango:DejaVu Sans Mono 10
output * scale 1 output * scale 1
output * bg ~/.config/sway/tux.png fill output * bg ~/.config/sway/tux.png fill
# Disable the laptop panel while the lid is closed.
bindswitch --reload lid:on exec ~/.config/sway/scripts/lid-output off
bindswitch --reload lid:off exec ~/.config/sway/scripts/lid-output on
input type:keyboard { input type:keyboard {
xkb_layout fo xkb_layout fo
xkb_model pc105 xkb_model pc105
@@ -22,8 +25,8 @@ input type:touchpad {
gaps inner 5 gaps inner 5
gaps outer 10 gaps outer 10
smart_gaps on smart_gaps on
default_border pixel 2 default_border none
default_floating_border pixel 2 default_floating_border none
client.focused #33ccff #33ccff #1a1b26 #33ccff #33ccff client.focused #33ccff #33ccff #1a1b26 #33ccff #33ccff
client.focused_inactive #595959 #595959 #c0caf5 #595959 #595959 client.focused_inactive #595959 #595959 #c0caf5 #595959 #595959
@@ -31,6 +34,8 @@ client.unfocused #595959 #595959 #c0caf5 #595959 #595959
floating_modifier $mod normal floating_modifier $mod normal
exec /usr/local/bin/pcloud
# Applications and session # Applications and session
bindsym $mod+t exec $term bindsym $mod+t exec $term
bindsym $mod+b exec $browser bindsym $mod+b exec $browser
@@ -115,4 +120,3 @@ exec dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSO
exec /usr/libexec/lxqt-policykit-agent exec /usr/libexec/lxqt-policykit-agent
exec nm-applet --indicator exec nm-applet --indicator
exec mako exec mako
exec ~/.config/waybar/launch.sh
+20
View File
@@ -0,0 +1,20 @@
#!/usr/bin/env bash
set -euo pipefail
state="${1:-}"
internal_output="$(
swaymsg -t get_outputs -r |
jq -r '.[] | select(.name | test("^(eDP|LVDS)")) | .name' |
head -n 1
)"
if [ -z "$internal_output" ]; then
exit 0
fi
case "$state" in
off) swaymsg output "$internal_output" disable ;;
on) swaymsg output "$internal_output" enable ;;
*) exit 2 ;;
esac
-44
View File
@@ -1,44 +0,0 @@
{
"layer": "top",
"position": "top",
"height": 34,
"margin-top": 8,
"margin-left": 0,
"margin-right": 0,
"modules-left": ["sway/workspaces", "sway/window"],
"modules-center": ["clock"],
"modules-right": ["pulseaudio", "network", "battery", "tray"],
"sway/workspaces": {
"all-outputs": true,
"disable-scroll": true,
"format": "{name}"
},
"sway/window": {
"max-length": 40
},
"clock": {
"format": "{:%a %b %d %I:%M %p}"
},
"battery": {
"format": "{capacity}%"
},
"network": {
"format-wifi": "wifi {essid}",
"format-ethernet": "wired",
"format-disconnected": "offline",
"on-click": "nm-connection-editor"
},
"pulseaudio": {
"format": "vol {volume}%",
"format-muted": "muted",
"on-click": "pavucontrol"
}
}
-21
View File
@@ -1,21 +0,0 @@
#!/usr/bin/env bash
set -euo pipefail
config_dir="${XDG_CONFIG_HOME:-$HOME/.config}/waybar"
base_config="$config_dir/config"
runtime_config="$config_dir/config.runtime"
width=$(swaymsg -r -t get_outputs | jq -r '[.[] | select(.focused)][0] // .[0] // {rect: {width: 1440}} | .rect.width // 1440')
if ! [[ "$width" =~ ^[0-9]+$ ]] || (( width == 0 )); then
width=1440
fi
margin=$((width * 125 / 1000))
jq --argjson margin "$margin" '
.["margin-left"] = $margin
| .["margin-right"] = $margin
' "$base_config" > "$runtime_config"
exec waybar -c "$runtime_config"
-49
View File
@@ -1,49 +0,0 @@
@import "themes/current.css";
* {
font-family: "DejaVu Sans Mono", monospace;
font-size: 13px;
border: none;
border-radius: 10px;
}
window#waybar {
background: @bar-bg;
color: @text;
border-radius: 18px;
border: 1px solid @border;
}
window#waybar > box {
padding: 0 4px;
}
#workspaces label {
padding: 0 10px;
margin: 5px 3px;
color: @text;
background: transparent;
}
#workspaces .active {
background: @accent;
color: @accent-fg;
}
#window {
padding: 0 12px;
margin: 5px 4px;
background: @accent;
color: @accent-fg;
font-weight: bold;
}
#clock,
#battery,
#network,
#pulseaudio,
#tray {
padding: 0 12px;
margin: 5px 4px;
background: @module-bg;
}
-7
View File
@@ -1,7 +0,0 @@
@define-color bar-bg rgba(17, 17, 27, 0.82);
@define-color module-bg rgba(49, 50, 68, 0.85);
@define-color border rgba(203, 166, 247, 0.35);
@define-color text #cdd6f4;
@define-color accent #cba6f7;
@define-color accent-fg #11111b;
-6
View File
@@ -1,6 +0,0 @@
@define-color bar-bg rgba(17, 17, 27, 0.82);
@define-color module-bg rgba(49, 50, 68, 0.85);
@define-color border rgba(203, 166, 247, 0.35);
@define-color text #cdd6f4;
@define-color accent #cba6f7;
@define-color accent-fg #11111b;
-6
View File
@@ -1,6 +0,0 @@
@define-color bar-bg rgba(249, 245, 215, 0.88);
@define-color module-bg rgba(235, 219, 178, 0.86);
@define-color border rgba(181, 118, 20, 0.35);
@define-color text #3c3836;
@define-color accent #b57614;
@define-color accent-fg #f9f5d7;
-1
View File
@@ -10,7 +10,6 @@ alias gsw='git switch'
alias gst='git status' alias gst='git status'
alias ga='git add .' alias ga='git add .'
alias gtree="git log --graph --all --pretty=format:'%C(yellow)%h%Creset%C(cyan)%d%Creset %s %C(dim)(%cr) <%an>%Creset'" alias gtree="git log --graph --all --pretty=format:'%C(yellow)%h%Creset%C(cyan)%d%Creset %s %C(dim)(%cr) <%an>%Creset'"
alias typ='typora --enable-features=UseOzonePlatform --ozone-platform=wayland &'
export XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}" export XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}"
export GOPATH="${GOPATH:-$HOME/go}" export GOPATH="${GOPATH:-$HOME/go}"