This commit is contained in:
Elizabeth Hunt 2024-08-26 19:34:49 -07:00
parent b7c96907b5
commit 123157c925
Signed by: simponic
GPG Key ID: 2909B9A7FF6213EE
10 changed files with 55 additions and 19 deletions

View File

@ -19,3 +19,4 @@ end
vim.opt.rtp:prepend(lazypath) vim.opt.rtp:prepend(lazypath)
require "plugins" require "plugins"
require "theme"

View File

@ -1,7 +1,6 @@
{ {
"Comment.nvim": { "branch": "master", "commit": "0236521ea582747b58869cb72f70ccfa967d2e89" }, "Comment.nvim": { "branch": "master", "commit": "0236521ea582747b58869cb72f70ccfa967d2e89" },
"LuaSnip": { "branch": "master", "commit": "878ace11983444d865a72e1759dbcc331d1ace4c" }, "LuaSnip": { "branch": "master", "commit": "878ace11983444d865a72e1759dbcc331d1ace4c" },
"auto-dark-mode.nvim": { "branch": "master", "commit": "2b8c938da9a7c9432120266b92936b2c22e8cfb8" },
"bufferline.nvim": { "branch": "main", "commit": "99337f63f0a3c3ab9519f3d1da7618ca4f91cffe" }, "bufferline.nvim": { "branch": "main", "commit": "99337f63f0a3c3ab9519f3d1da7618ca4f91cffe" },
"catppuccin": { "branch": "main", "commit": "5215ea59df6d0a7e27da9a5cd1165e06d1b04cbe" }, "catppuccin": { "branch": "main", "commit": "5215ea59df6d0a7e27da9a5cd1165e06d1b04cbe" },
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
@ -11,9 +10,10 @@
"cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" }, "cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" },
"conform.nvim": { "branch": "master", "commit": "f3b930db4964d60e255c8f9e37b7f2218dfc08cb" }, "conform.nvim": { "branch": "master", "commit": "f3b930db4964d60e255c8f9e37b7f2218dfc08cb" },
"friendly-snippets": { "branch": "main", "commit": "dd2fd1281d4b22e7b4a5bfafa3e142d958e251f2" }, "friendly-snippets": { "branch": "main", "commit": "dd2fd1281d4b22e7b4a5bfafa3e142d958e251f2" },
"fwatch.nvim": { "branch": "main", "commit": "a691f7349dc66285cd75a1a698dd28bca45f2bf8" },
"gitsigns.nvim": { "branch": "main", "commit": "cdfcd9d39d23c46ae9a040de2c6a8b8bf868746e" }, "gitsigns.nvim": { "branch": "main", "commit": "cdfcd9d39d23c46ae9a040de2c6a8b8bf868746e" },
"indent-blankline.nvim": { "branch": "master", "commit": "d98f537c3492e87b6dc6c2e3f66ac517528f406f" }, "indent-blankline.nvim": { "branch": "master", "commit": "d98f537c3492e87b6dc6c2e3f66ac517528f406f" },
"lazy.nvim": { "branch": "main", "commit": "24fa2a97085ca8a7220b5b078916f81e316036fd" }, "lazy.nvim": { "branch": "main", "commit": "077102c5bfc578693f12377846d427f49bc50076" },
"mason.nvim": { "branch": "main", "commit": "49ff59aded1047a773670651cfa40e76e63c6377" }, "mason.nvim": { "branch": "main", "commit": "49ff59aded1047a773670651cfa40e76e63c6377" },
"mini.statusline": { "branch": "main", "commit": "b5d23c5356e837f9e6426ffeed9f5acd0629bc07" }, "mini.statusline": { "branch": "main", "commit": "b5d23c5356e837f9e6426ffeed9f5acd0629bc07" },
"nvim-autopairs": { "branch": "master", "commit": "c15de7e7981f1111642e7e53799e1211d4606cb9" }, "nvim-autopairs": { "branch": "master", "commit": "c15de7e7981f1111642e7e53799e1211d4606cb9" },
@ -24,4 +24,4 @@
"nvim-web-devicons": { "branch": "master", "commit": "b77921fdc44833c994fdb389d658ccbce5490c16" }, "nvim-web-devicons": { "branch": "master", "commit": "b77921fdc44833c994fdb389d658ccbce5490c16" },
"plenary.nvim": { "branch": "master", "commit": "a3e3bc82a3f95c5ed0d7201546d5d2c19b20d683" }, "plenary.nvim": { "branch": "master", "commit": "a3e3bc82a3f95c5ed0d7201546d5d2c19b20d683" },
"telescope.nvim": { "branch": "master", "commit": "349660c0d35da06459ee8589af77de2086b652ce" } "telescope.nvim": { "branch": "master", "commit": "349660c0d35da06459ee8589af77de2086b652ce" }
} }

View File

@ -154,20 +154,10 @@ local plugins = {
end, end,
}, },
-- auto dark mode -- fwatch
{ {
"f-person/auto-dark-mode.nvim", "rktjmp/fwatch.nvim",
opts = { lazy = true,
update_interval = 1000,
set_dark_mode = function()
vim.api.nvim_set_option("background", "dark")
vim.cmd("colorscheme catppuccin-mocha")
end,
set_light_mode = function()
vim.api.nvim_set_option("background", "light")
vim.cmd("colorscheme catppuccin-latte")
end,
},
}, },
} }

View File

@ -0,0 +1,23 @@
local fwatch = require("fwatch")
function Set_theme_at(path)
local f = io.open(path, "rb")
if not f then return nil end
local theme = f:read("*a")
theme = theme:gsub("%s+", "")
f:close()
vim.schedule(function()
if (theme == "light") then
vim.api.nvim_set_option("background", "light")
vim.cmd("colorscheme catppuccin-latte")
else
vim.api.nvim_set_option("background", "dark")
vim.cmd("colorscheme catppuccin-mocha")
end
end)
end
fwatch.watch(os.getenv("HOME") .. "/theme", {
on_event = Set_theme_at
})
Set_theme_at(os.getenv("HOME") .. "/theme")

View File

@ -8,7 +8,7 @@ set $down j
set $up k set $up k
set $right l set $right l
# Your preferred terminal emulator # Your preferred terminal emulator
set $term "/home/lizzy/scripts/alacritty_with_theme.sh" set $term alacritty
set $lock swaylock-corrupter set $lock swaylock-corrupter
set $browser xdg-open "https://static.simponic.xyz/dvd-logo/" set $browser xdg-open "https://static.simponic.xyz/dvd-logo/"
# Your preferred application launcher # Your preferred application launcher

View File

@ -6,6 +6,10 @@ Host git.hatecomputers.club
User git User git
Port 222 Port 222
Host europa
Hostname frens.simponic.xyz
ForwardAgent yes
Host levi Host levi
ForwardAgent yes ForwardAgent yes

View File

@ -0,0 +1,9 @@
eval "$(zoxide init --cmd z zsh)"
if [ "${gnupg_SSH_AUTH_SOCK_by:-0}" -ne $$ ]; then
export SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)"
fi
export GPG_TTY=$(tty)
. /opt/asdf-vm/asdf.sh

View File

@ -11,5 +11,5 @@ function catflavor() {
echo $flavor echo $flavor
} }
echo "set -g @catppuccin_flavour $(catflavor $NEW_THEME)" > ~/.tmux/colors echo "set -g @catppuccin_flavor $(catflavor $NEW_THEME)" > ~/.tmux/colors
tmux source-file ~/.tmux.conf tmux source-file ~/.tmux.conf

8
scripts/theme/hooks/waybar.sh Executable file
View File

@ -0,0 +1,8 @@
#!/bin/bash
NEW_THEME=$2
STYLE=$([ "$NEW_THEME" = "light" ] && echo "style.css" || echo "style.dark.css")
killall waybar
waybar --style=$HOME/.config/waybar/$STYLE &

View File

@ -1,5 +1,6 @@
#!/bin/bash #!/bin/bash
STYLE=$([ -z "$DARK_MODE" ] && echo "style.css" || echo "style.dark.css") THEME=$(gsettings get org.gnome.desktop.interface gtk-theme | tr -d "'")
STYLE=$([ $THEME = "light" ] && echo "style.css" || echo "style.dark.css")
waybar --style=$HOME/.config/waybar/$STYLE & waybar --style=$HOME/.config/waybar/$STYLE &