فهرست منبع

Switch those colors around

Kevin Heinicke 10 ماه پیش
والد
کامیت
5f019540a5
7فایلهای تغییر یافته به همراه42 افزوده شده و 38 حذف شده
  1. 2 1
      install.conf.yaml
  2. 3 0
      nvimrc
  3. 4 0
      sheldon-plugins.toml
  4. 0 37
      taskrc
  5. 12 0
      taskrc-dark
  6. 12 0
      taskrc-light
  7. 9 0
      zshrc

+ 2 - 1
install.conf.yaml

@@ -26,7 +26,8 @@
         create: true
         create: true
         path: external/vim-plug/plug.vim
         path: external/vim-plug/plug.vim
     ~/.gitignore_global: gitignore_global
     ~/.gitignore_global: gitignore_global
-    ~/.taskrc: taskrc
+    ~/.taskrc-light: taskrc-light
+    ~/.taskrc-dark: taskrc-dark
     ~/.p10k.zsh: p10k.zsh
     ~/.p10k.zsh: p10k.zsh
     ~/.local/bin/brew_pyenv_setup:
     ~/.local/bin/brew_pyenv_setup:
         create: true
         create: true

+ 3 - 0
nvimrc

@@ -74,6 +74,9 @@ nnoremap <leader>o :!open build/*.pdf<CR>
 " open Nerdtree with CTRL+n
 " open Nerdtree with CTRL+n
 map <C-n> :NERDTreeToggle<CR>
 map <C-n> :NERDTreeToggle<CR>
 
 
+" set default background according to system
+let background=$UIMODE
+
 " toggle background with ,i
 " toggle background with ,i
 nnoremap <leader>i :let &background = (&background == "dark" ? "light" : "dark")<CR>
 nnoremap <leader>i :let &background = (&background == "dark" ? "light" : "dark")<CR>
 
 

+ 4 - 0
sheldon-plugins.toml

@@ -44,3 +44,7 @@ use = ["modules/git/init.zsh", "init.zsh", "modules/completion/init.zsh"]
 [plugins.docker-cli]
 [plugins.docker-cli]
 github = "docker/cli"
 github = "docker/cli"
 use = ["contrib/completion/zsh/_docker"]
 use = ["contrib/completion/zsh/_docker"]
+
+[plugins.azure-cli]
+github = "azure/azure-cli"
+use = ["az.completion"]

+ 0 - 37
taskrc

@@ -1,37 +0,0 @@
-# [Created by task 2.5.1 11/26/2018 16:45:50]
-# Taskwarrior program configuration file.
-# For more documentation, see http://taskwarrior.org or try 'man task', 'man task-color',
-# 'man task-sync' or 'man taskrc'
-
-# Here is an example of entries that use the default, override and blank values
-#   variable=foo   -- By specifying a value, this overrides the default
-#   variable=      -- By specifying no value, this means no default
-#   #variable=foo  -- By commenting out the line, or deleting it, this uses the default
-
-# Use the command 'task show' to see all defaults and overrides
-
-# Files
-data.location=~/.task
-
-# Customization
-search.case.sensitive=no
-
-# Color theme (uncomment one to use)
-#include /usr/local/Cellar/task/2.5.1/share/doc/task/rc/light-16.theme
-#include /usr/local/Cellar/task/2.5.1/share/doc/task/rc/light-256.theme
-#include /usr/local/Cellar/task/2.5.1/share/doc/task/rc/dark-16.theme
-#include /usr/local/Cellar/task/2.5.1/share/doc/task/rc/dark-256.theme
-#include /usr/local/Cellar/task/2.5.1/share/doc/task/rc/dark-red-256.theme
-#include /usr/local/Cellar/task/2.5.1/share/doc/task/rc/dark-green-256.theme
-#include /usr/local/Cellar/task/2.5.1/share/doc/task/rc/dark-blue-256.theme
-#include /usr/local/Cellar/task/2.5.1/share/doc/task/rc/dark-violets-256.theme
-#include /usr/local/Cellar/task/2.5.1/share/doc/task/rc/dark-yellow-green.theme
-#include /usr/local/Cellar/task/2.5.1/share/doc/task/rc/dark-gray-256.theme
-#include /usr/local/Cellar/task/2.5.1/share/doc/task/rc/dark-gray-blue-256.theme
-#include /usr/local/Cellar/task/2.5.1/share/doc/task/rc/solarized-dark-256.theme
-#include /usr/local/Cellar/task/2.5.1/share/doc/task/rc/solarized-light-256.theme
-include ~/.dotfiles/task.theme
-
-context.focus=(project:bs2dsk or project:thesis) -ideas
-context.work=+dds
-context=work

+ 12 - 0
taskrc-dark

@@ -0,0 +1,12 @@
+# Use the command 'task show' to see all defaults and overrides
+
+# Files
+data.location=~/.task
+
+# Customization
+search.case.sensitive=no
+
+# Color theme (uncomment one to use)
+include /opt/homebrew/Cellar/task/3.1.0/share/doc/task/rc/solarized-dark-256.theme
+
+news.version=3.1.0

+ 12 - 0
taskrc-light

@@ -0,0 +1,12 @@
+# Use the command 'task show' to see all defaults and overrides
+
+# Files
+data.location=~/.task
+
+# Customization
+search.case.sensitive=no
+
+# Color theme (uncomment one to use)
+include /opt/homebrew/Cellar/task/3.1.0/share/doc/task/rc/solarized-light-256.theme
+
+news.version=3.1.0

+ 9 - 0
zshrc

@@ -102,3 +102,12 @@ bindkey '^[[B' history-substring-search-down
 
 
 # Better cp -- must go after compinit and stuff
 # Better cp -- must go after compinit and stuff
 eval "$(zoxide init zsh)"
 eval "$(zoxide init zsh)"
+
+# Store if light or dark mode is active
+if [[ $(defaults read -g AppleInterfaceStyle 2&> /dev/null) == "Dark" ]]
+then
+    UIMODE="dark"
+else
+    UIMODE="light"
+fi
+export TASKRC=~/.taskrc-${UIMODE}