diff options
| -rw-r--r-- | flake.nix | 2 | ||||
| -rw-r--r-- | modules/desktop/status-bar/polybar/module/battery.nix | 6 | ||||
| -rw-r--r-- | modules/desktop/status-bar/polybar/module/cpu.nix | 2 | ||||
| -rw-r--r-- | modules/desktop/status-bar/polybar/module/date.nix | 2 | ||||
| -rw-r--r-- | modules/desktop/status-bar/polybar/module/kernel-version.nix | 2 | ||||
| -rw-r--r-- | modules/desktop/status-bar/polybar/module/memory.nix | 2 | ||||
| -rw-r--r-- | modules/desktop/status-bar/polybar/module/time.nix | 2 | ||||
| -rw-r--r-- | modules/shell/bash/default.nix | 6 | ||||
| -rw-r--r-- | modules/shell/zsh/zshrc | 15 | ||||
| -rw-r--r-- | modules/tools/editor/neovim/config/options.lua | 20 | ||||
| -rw-r--r-- | modules/tools/file-manager/lf/default.nix | 2 | ||||
| -rw-r--r-- | modules/tools/viewer/bat/default.nix | 4 |
12 files changed, 45 insertions, 20 deletions
@@ -1,5 +1,5 @@ { - description = "Home Manager configuration of arpit"; + description = "Home Manager configuration of arpit."; inputs = { nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; diff --git a/modules/desktop/status-bar/polybar/module/battery.nix b/modules/desktop/status-bar/polybar/module/battery.nix index 4c0bec6..6e25e99 100644 --- a/modules/desktop/status-bar/polybar/module/battery.nix +++ b/modules/desktop/status-bar/polybar/module/battery.nix @@ -6,9 +6,9 @@ with config.scheme.withHashtag; battery = "BAT0"; adapter = "ADP1"; - format-charging = "%{T2}%{F${base07}}<animation-charging>%{F-}%{T-} <label-charging>"; - format-discharging = "%{T2}%{F${base07}}<ramp-capacity>%{F-}%{T-} <label-discharging>"; - format-full-prefix = ""; + format-charging = "%{T2}%{F${base03}}<animation-charging>%{F-}%{T-} <label-charging>"; + format-discharging = "%{T2}%{F${base03}}<ramp-capacity>%{F-}%{T-} <label-discharging>"; + format-full-prefix = " "; ramp-capacity-0 = ""; ramp-capacity-1 = ""; diff --git a/modules/desktop/status-bar/polybar/module/cpu.nix b/modules/desktop/status-bar/polybar/module/cpu.nix index 409ac68..d37b5cc 100644 --- a/modules/desktop/status-bar/polybar/module/cpu.nix +++ b/modules/desktop/status-bar/polybar/module/cpu.nix @@ -4,6 +4,6 @@ with config.scheme.withHashtag; { type = "internal/cpu"; interval = 2; - format-prefix = "%{T2}%{F${base07}} %{F-}%{T-}"; + format-prefix = "%{T2}%{F${base03}} %{F-}%{T-}"; label = "%percentage%%"; } diff --git a/modules/desktop/status-bar/polybar/module/date.nix b/modules/desktop/status-bar/polybar/module/date.nix index e9e7ef6..56e2fa6 100644 --- a/modules/desktop/status-bar/polybar/module/date.nix +++ b/modules/desktop/status-bar/polybar/module/date.nix @@ -6,5 +6,5 @@ with config.scheme.withHashtag; interval = 60; date = "%d/%m/%Y"; label = "%date%"; - format-prefix = "%{T2}%{F${base07}} %{F-}%{T-}"; + format-prefix = "%{T2}%{F${base03}} %{F-}%{T-}"; } diff --git a/modules/desktop/status-bar/polybar/module/kernel-version.nix b/modules/desktop/status-bar/polybar/module/kernel-version.nix index 697c49c..8f94e37 100644 --- a/modules/desktop/status-bar/polybar/module/kernel-version.nix +++ b/modules/desktop/status-bar/polybar/module/kernel-version.nix @@ -5,6 +5,6 @@ with config.scheme.withHashtag; type = "custom/script"; exec = "uname -r"; interval = 1024; - format-prefix = "%{T2}%{F${base07}} %{F-}%{T-}"; + format-prefix = "%{T2}%{F${base03}} %{F-}%{T-}"; label = "%output%"; } diff --git a/modules/desktop/status-bar/polybar/module/memory.nix b/modules/desktop/status-bar/polybar/module/memory.nix index 82851db..79033f1 100644 --- a/modules/desktop/status-bar/polybar/module/memory.nix +++ b/modules/desktop/status-bar/polybar/module/memory.nix @@ -4,6 +4,6 @@ with config.scheme.withHashtag; { type = "internal/memory"; interval = 2; - format-prefix = "%{T2}%{F${base07}} %{F-}%{T-}"; + format-prefix = "%{T2}%{F${base03}} %{F-}%{T-}"; label = "%percentage_used%%"; } diff --git a/modules/desktop/status-bar/polybar/module/time.nix b/modules/desktop/status-bar/polybar/module/time.nix index 9095c98..b8ea545 100644 --- a/modules/desktop/status-bar/polybar/module/time.nix +++ b/modules/desktop/status-bar/polybar/module/time.nix @@ -6,5 +6,5 @@ with config.scheme.withHashtag; interval = 30; time = "%H:%M"; label = "%time%"; - format-prefix = "%{T2}%{F${base07}} %{F-}%{T-}"; + format-prefix = "%{T2}%{F${base03}} %{F-}%{T-}"; } diff --git a/modules/shell/bash/default.nix b/modules/shell/bash/default.nix index 2e65d60..a82f924 100644 --- a/modules/shell/bash/default.nix +++ b/modules/shell/bash/default.nix @@ -19,6 +19,10 @@ programs.bash.enable = true; programs.bash.historyFile = "${config.xdg.cacheHome}/bash/history"; programs.bash.shellAliases = config.shell.alias; - home.file."${config.xdg.cacheHome}/bash/histroy".text = ""; # Create the cache directory and histroy file + + home.activation.createBashCacheDirectory + = lib.hm.dag.entryAfter + [ "writeBoundary" ] + "mkdir -p ${config.xdg.cacheHome}/bash"; }; } diff --git a/modules/shell/zsh/zshrc b/modules/shell/zsh/zshrc index 528bf68..b1872c8 100644 --- a/modules/shell/zsh/zshrc +++ b/modules/shell/zsh/zshrc @@ -5,15 +5,16 @@ autoload -U colors && colors autoload -Uz vcs_info precmd() { vcs_info } -zstyle ':vcs_info:git:*' formats ' %F{yellow}[%F{cyan}%b %c%F{blue}%a%F{yellow}]' -zstyle ':vcs_info:git:*' actionformats ' %F{yellow}[%F{cyan}%b %c%F{blue}%a%F{yellow}]' +zstyle ':vcs_info:git:*' formats '%F{red}┄[%F{cyan}%b%c%F{blue}%a%F{red}]' +zstyle ':vcs_info:git:*' actionformats '%F{red}┄[%F{cyan}%b%c%F{blue}%a%F{red}]' zstyle ':vcs_info:*+set-message:*' hooks git-untracked git-dirty zstyle ':vcs_info:git:*' check-for-changes true -zstyle ':vcs_info:git:*' stagedstr '%F{green}✓%f' -zstyle ':vcs_info:git:*' unstagedstr '%F{red}✗%f' -zstyle ':vcs_info:git:*' aheadstr '%F{blue}⬆%f' -zstyle ':vcs_info:git:*' behindstr '%F{yellow}⬇%f' -PROMPT='%F{red}╭──[%F{green}%m%F{red}@%F{blue}%n%F{red}] %F{magenta}%~%f${vcs_info_msg_0_}%F{red} +zstyle ':vcs_info:git:*' stagedstr ' %F{green}✓%f' +zstyle ':vcs_info:git:*' unstagedstr ' %F{red}✗%f' +zstyle ':vcs_info:git:*' aheadstr ' %F{blue}⬆%f' +zstyle ':vcs_info:git:*' behindstr ' %F{yellow}⬇%f' + +PROMPT='%F{red}╭──[%F{green}%m%F{red}@%F{blue}%n%F{red}]┄[%F{magenta}%~%F{red}]${vcs_info_msg_0_}%(?..%F{red}┄[%F{white}Exit status: %F{yellow}%?%F{red}] ) ╰─>%f ' diff --git a/modules/tools/editor/neovim/config/options.lua b/modules/tools/editor/neovim/config/options.lua index b1fe9cb..17772ca 100644 --- a/modules/tools/editor/neovim/config/options.lua +++ b/modules/tools/editor/neovim/config/options.lua @@ -19,3 +19,23 @@ vim.o.expandtab = false; vim.o.updatetime = 300; vim.o.mouse = "a"; + +-- Force all filetypes to use tabs +vim.api.nvim_create_autocmd("FileType", { + pattern = "*", + callback = function() + vim.bo.expandtab = false; + vim.bo.tabstop = 2; + vim.bo.shiftwidth = 2; + end, +}); + +-- Exception that use spaces +vim.api.nvim_create_autocmd("FileType", { + pattern = {}, + callback = function() + vim.bo.expandtab = true; + vim.bo.tabstop = 2; + vim.bo.shiftwidth = 2; + end, +}); diff --git a/modules/tools/file-manager/lf/default.nix b/modules/tools/file-manager/lf/default.nix index bdbefbc..983b2f2 100644 --- a/modules/tools/file-manager/lf/default.nix +++ b/modules/tools/file-manager/lf/default.nix @@ -22,7 +22,7 @@ #!/bin/sh unset COLORTERM ${if config.tools.viewer.bat.enable then - "bat -pp --line-range=:500 --color=always '$1'" + "bat -pp --line-range=:500 --color=always $1" else "cat"} ''; programs.lf.extraConfig = "set icons"; diff --git a/modules/tools/viewer/bat/default.nix b/modules/tools/viewer/bat/default.nix index ec68eb7..4d52a62 100644 --- a/modules/tools/viewer/bat/default.nix +++ b/modules/tools/viewer/bat/default.nix @@ -11,8 +11,8 @@ tabs = "4"; theme = "custom-theme"; }; - shell.alias."bc" = "${pkgs.bat}/bin/bat -pp"; - shell.alias."bp" = "${pkgs.bat}/bin/bat --paging always"; + shell.alias."cat" = "${pkgs.bat}/bin/bat -pp"; + shell.alias."less" = "${pkgs.bat}/bin/bat --paging always"; home.sessionVariables."PAGER" = "${pkgs.bat}/bin/bat --paging always"; xdg.configFile."bat/themes/custom-theme.tmTheme".source = config.scheme { |
