aboutsummaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorArpit Chakladar <54011232+arpitchakladar@users.noreply.github.com>2024-09-30 22:31:37 +0530
committerArpit Chakladar <54011232+arpitchakladar@users.noreply.github.com>2024-09-30 22:31:37 +0530
commit5f8027fef5ab482be9275aa310ac22dd1d414159 (patch)
treeb0e8712d770e615d1222ebb6b3d3aeb566fe7fb0 /modules
parentb89e5d998891feb55b14220e129c6ee69c98cacb (diff)
downloadhome-manager-config-5f8027fef5ab482be9275aa310ac22dd1d414159.tar.gz
home-manager-config-5f8027fef5ab482be9275aa310ac22dd1d414159.zip
Changed the zsh prompt and forcing neovim to use tabs instead of spaces for all files.
Diffstat (limited to 'modules')
-rw-r--r--modules/desktop/status-bar/polybar/module/battery.nix6
-rw-r--r--modules/desktop/status-bar/polybar/module/cpu.nix2
-rw-r--r--modules/desktop/status-bar/polybar/module/date.nix2
-rw-r--r--modules/desktop/status-bar/polybar/module/kernel-version.nix2
-rw-r--r--modules/desktop/status-bar/polybar/module/memory.nix2
-rw-r--r--modules/desktop/status-bar/polybar/module/time.nix2
-rw-r--r--modules/shell/bash/default.nix6
-rw-r--r--modules/shell/zsh/zshrc15
-rw-r--r--modules/tools/editor/neovim/config/options.lua20
-rw-r--r--modules/tools/file-manager/lf/default.nix2
-rw-r--r--modules/tools/viewer/bat/default.nix4
11 files changed, 44 insertions, 19 deletions
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 {