Skip to content

Commit

Permalink
chore: tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
tmm committed Nov 15, 2023
1 parent 884cba7 commit ef8a45c
Show file tree
Hide file tree
Showing 6 changed files with 86 additions and 63 deletions.
59 changes: 27 additions & 32 deletions .config/nix/files/fish/functions/change_appearance.fish
Original file line number Diff line number Diff line change
@@ -1,39 +1,34 @@
function change_appearance --argument appearance_setting
set -l appearance light # default value
if test -z $appearance_setting
set -l val (defaults read -g AppleInterfaceStyle) >/dev/null
if test $status -eq 0
set appearance dark
set -l appearance light # default value
if test -z $appearance_setting
set -l val (defaults read -g AppleInterfaceStyle) >/dev/null
if test $status -eq 0
set appearance dark
end
else
switch $appearance_setting
case light
osascript -l JavaScript -e "Application('System Events').appearancePreferences.darkMode = false" >/dev/null
set appearance light
case dark
osascript -l JavaScript -e "Application('System Events').appearancePreferences.darkMode = true" >/dev/null
set appearance dark
end
end
else
switch $appearance_setting
case light
osascript -l JavaScript -e "Application('System Events').appearancePreferences.darkMode = false" >/dev/null
set appearance light
case dark
osascript -l JavaScript -e "Application('System Events').appearancePreferences.darkMode = true" >/dev/null
set appearance dark
end
end

# change neovim
for addr in (ls $(echo $TMPDIR)nvim.$(echo $USER)/*/nvim.*.0)
switch $appearance
case dark
nvim --server $addr --remote-send ':set background=dark<CR>'
case light
nvim --server $addr --remote-send ':set background=light<CR>'
# change neovim
for addr in (ls $(echo $TMPDIR)nvim.$(echo $USER)/*/nvim.*.0)
switch $appearance
case dark
nvim --server $addr --remote-send ':set background=dark<CR>'
case light
nvim --server $addr --remote-send ':set background=light<CR>'
end
end
end

# change and reload ghostty appearance
# https://github.com/mitchellh/ghostty/issues/601
# change and reload ghostty appearance
# https://github.com/mitchellh/ghostty/issues/601

# change tmux
# switch $appearance
# case dark
# tmux source-file ~/.tmux/tmux-dark.conf
# case light
# tmux source-file ~/.tmux/tmux-light.conf
# end
# change zellij theme
# zelijj options --theme $appearance
end
25 changes: 14 additions & 11 deletions .config/nix/modules/darwin.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{ pkgs, ... }: {
environment = {
systemPackages = [
pkgs.fish
systemPackages = with pkgs; [
fish
];
variables = {
NEXT_TELEMETRY_DISABLED = "1";
Expand All @@ -13,15 +13,9 @@
};
homebrew = {
enable = true;
masApps = {
BetterSnapTool = 417375580;
Craft = 1487937127;
Dato = 1470584107;
"Day One" = 1055511498;
"Pure Paste" = 1611378436;
Velja = 1607635845;
Xcode = 497799835;
};
brews = [
"gnu-sed"
];
casks = [
"1password"
"1password-cli"
Expand All @@ -38,6 +32,15 @@
"raycast"
"remarkable"
];
masApps = {
BetterSnapTool = 417375580;
Craft = 1487937127;
Dato = 1470584107;
"Day One" = 1055511498;
"Pure Paste" = 1611378436;
Velja = 1607635845;
Xcode = 497799835;
};
};
nix.extraOptions = ''
experimental-features = nix-command flakes
Expand Down
3 changes: 2 additions & 1 deletion .config/nix/modules/home-manager.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{ pkgs, ... }: {
home.packages = with pkgs; [
amber
babelfish
bat
cachix
Expand All @@ -10,8 +11,8 @@
fd
fnm
fzf
git
gh
git
jq
neovim
ripgrep
Expand Down
1 change: 0 additions & 1 deletion .config/nvim/TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ nix
- https://github.com/folke/noice.nvim
- https://github.com/b0o/incline.nvim
- https://github.com/lewis6991/satellite.nvim
- https://github.com/jackMort/ChatGPT.nvim

## Misc

Expand Down
57 changes: 41 additions & 16 deletions .config/nvim/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,17 @@ end
vim.opt.runtimepath:prepend(lazypath)

require("lazy").setup({
defaults = { lazy = true },
defaults = {
lazy = true,
},

{
dir = "~/Developer/rsms",
lazy = false,
config = function()
vim.cmd([[colorscheme rsms]])
end,
},

-- dressing.nvim (https://github.com/stevearc/dressing.nvim)
{
Expand Down Expand Up @@ -529,7 +539,6 @@ require("lazy").setup({
globalstatus = false,
icons_enabled = true,
section_separators = "",
theme = "auto",
},
sections = {
lualine_a = {},
Expand Down Expand Up @@ -653,8 +662,17 @@ require("lazy").setup({
opts = {
default_component_configs = {
indent = { with_markers = false },
modified = {
symbol = "",
symbols = {
added = icons.git.added,
deleted = icons.git.removed,
modified = icons.git.modified,
renamed = "",
-- Status type
untracked = "",
ignored = "",
unstaged = "",
staged = "",
conflict = "",
},
},
filesystem = {
Expand Down Expand Up @@ -1162,18 +1180,18 @@ require("lazy").setup({
},

-- rasmus.nvim (https://github.com/kvrohit/rasmus.nvim)
{
"kvrohit/rasmus.nvim",
lazy = false,
config = function()
vim.g.rasmus_italic_comments = false
vim.g.rasmus_italic_keywords = false
vim.g.rasmus_italic_booleans = false
vim.g.rasmus_italic_functions = false
vim.g.rasmus_italic_variables = false
vim.cmd([[colorscheme rasmus]])
end,
},
-- {
-- "kvrohit/rasmus.nvim",
-- lazy = false,
-- config = function()
-- vim.g.rasmus_italic_comments = false
-- vim.g.rasmus_italic_keywords = false
-- vim.g.rasmus_italic_booleans = false
-- vim.g.rasmus_italic_functions = false
-- vim.g.rasmus_italic_variables = false
-- vim.cmd([[colorscheme rasmus]])
-- end,
-- },

-- trouble.nvim (https://github.com/folke/trouble.nvim)
{
Expand Down Expand Up @@ -1229,6 +1247,9 @@ require("lazy").setup({
event = { "BufReadPost", "BufNewFile" },
opts = {
delay = 200,
filetypes_denylist = {
"TelescopePrompt",
},
large_file_cutoff = 2000,
large_file_overrides = {
providers = { "lsp" },
Expand Down Expand Up @@ -1379,6 +1400,10 @@ require("lazy").setup({
panel = { enabled = false },
},
},

{
"rktjmp/lush.nvim",
},
})
vim.keymap.set("n", "<leader>l", "<cmd>:Lazy<cr>")

Expand Down
4 changes: 2 additions & 2 deletions .config/nvim/lazy-lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" },
"copilot-cmp": { "branch": "master", "commit": "72fbaa03695779f8349be3ac54fa8bd77eed3ee3" },
"copilot.lua": { "branch": "master", "commit": "73047082d72fcfdde1f73b7f17ad495cffcbafaa" },
"dressing.nvim": { "branch": "master", "commit": "1f2d1206a03bd3add8aedf6251e4534611de577f" },
"dressing.nvim": { "branch": "master", "commit": "fe3071330a0720ce3695ac915820c8134b22d1b0" },
"edgedb-vim": { "branch": "master", "commit": "7f2516bec3a5ad137347fb703d0b2c88f1478f5b" },
"flash.nvim": { "branch": "main", "commit": "48817af25f51c0590653bbc290866e4890fe1cbe" },
"friendly-snippets": { "branch": "main", "commit": "43727c2ff84240e55d4069ec3e6158d74cb534b6" },
Expand All @@ -16,6 +16,7 @@
"lazy.nvim": { "branch": "main", "commit": "96584866b9c5e998cbae300594d0ccfd0c464627" },
"lsp": { "branch": "master", "commit": "37457f268af5cd6765e589b0dcd7cbd192d8da00" },
"lualine.nvim": { "branch": "master", "commit": "2248ef254d0a1488a72041cfb45ca9caada6d994" },
"lush.nvim": { "branch": "main", "commit": "966aad1accd47fa11fbe2539234f81f678fef2de" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "40301e1c74bc0946eece13edf2b1c561cc497491" },
"mason.nvim": { "branch": "main", "commit": "eabf6d347fdb75be360d4c0ced1145670a171453" },
"mini.bufremove": { "branch": "main", "commit": "f53c7f27e36009fe61563c11cde154b94a0e5b94" },
Expand All @@ -33,7 +34,6 @@
"plenary.nvim": { "branch": "master", "commit": "50012918b2fc8357b87cff2a7f7f0446e47da174" },
"popup.nvim": { "branch": "master", "commit": "b7404d35d5d3548a82149238289fa71f7f6de4ac" },
"promise-async": { "branch": "main", "commit": "e94f35161b8c5d4a4ca3b6ff93dd073eb9214c0e" },
"rasmus.nvim": { "branch": "main", "commit": "f824de95d446686e479781c0c2b778c177da528f" },
"rust-tools.nvim": { "branch": "master", "commit": "0cc8adab23117783a0292a0c8a2fbed1005dc645" },
"telescope.nvim": { "branch": "master", "commit": "20bf20500c95208c3ac0ef07245065bf94dcab15" },
"trouble.nvim": { "branch": "main", "commit": "f1168feada93c0154ede4d1fe9183bf69bac54ea" },
Expand Down

0 comments on commit ef8a45c

Please sign in to comment.