diff options
| -rw-r--r-- | bspwm/default.nix | 7 | ||||
| -rw-r--r-- | rofi/default.nix | 2 | ||||
| -rw-r--r-- | rofi/theme.nix | 89 | ||||
| -rw-r--r-- | rofi/theme/default.nix | 21 | ||||
| -rw-r--r-- | rofi/theme/theme.rasi | 76 | ||||
| -rw-r--r-- | stylix/default.nix | 1 | ||||
| -rw-r--r-- | sxhkd/default.nix | 10 | ||||
| -rw-r--r-- | sxhkd/scripts/show-keybindings.sh | 13 | ||||
| -rw-r--r-- | zsh/zshrc | 19 |
9 files changed, 140 insertions, 98 deletions
diff --git a/bspwm/default.nix b/bspwm/default.nix index ad06514..5696ba1 100644 --- a/bspwm/default.nix +++ b/bspwm/default.nix @@ -1,9 +1,9 @@ -{ ... }: +{ config, ... }: { xsession.windowManager.bspwm.enable = true; - xsession.windowManager.bspwm.settings = { + xsession.windowManager.bspwm.settings = with config.lib.stylix.colors.withHashtag; { window_gap = 5; split_ratio = 0.5; single_monocle = true; @@ -16,6 +16,9 @@ pointer_action1 = "resize_side"; pointer_action2 = "move"; pointer_action3 = "resize_corner"; + normal_border_color = base02; + active_border_color = base02; + focused_border_color = base03; }; xsession.windowManager.bspwm.rules = { diff --git a/rofi/default.nix b/rofi/default.nix index 5c6c248..ad75900 100644 --- a/rofi/default.nix +++ b/rofi/default.nix @@ -3,5 +3,5 @@ { programs.rofi.enable = true; programs.rofi.font = "FiraCode Nerd Font 16"; - programs.rofi.theme = import ./theme.nix config; + programs.rofi.theme = import ./theme/default.nix config; } diff --git a/rofi/theme.nix b/rofi/theme.nix deleted file mode 100644 index dfac2c3..0000000 --- a/rofi/theme.nix +++ /dev/null @@ -1,89 +0,0 @@ -config: - -with config.lib.stylix.colors.withHashtag; -builtins.toFile "theme.rasi" -'' - configuration { - font: "${config.programs.rofi.font}"; - - drun { - display-name: " "; - } - - run { - display-name: " "; - } - - window { - display-name: " "; - } - - ssh { - display-name: " "; - } - - timeout { - delay: 10; - action: "kb-cancel"; - } - } - - * { - border: 1; - margin: 0; - padding: 0; - spacing: 0; - - bg: ${base00}; - bg-alt: ${base01}; - fg: ${base05}; - fg-alt: ${base04}; - - background-color: @bg; - text-color: @fg; - } - - window { - transparency: "real"; - } - - mainbox { - children: [inputbar, listview]; - } - - inputbar { - background-color: @bg-alt; - children: [prompt, entry]; - } - - entry { - background-color: inherit; - padding: 12px 3px; - } - - prompt { - background-color: inherit; - padding: 12px; - } - - listview { - lines: 8; - } - - element { - children: [element-text]; - } - - element-icon { - padding: 10px 10px; - } - - element-text { - padding: 10px 10px; - text-color: @fg-alt; - } - - element-text selected { - text-color: @fg; - } -'' diff --git a/rofi/theme/default.nix b/rofi/theme/default.nix new file mode 100644 index 0000000..9ae3bb5 --- /dev/null +++ b/rofi/theme/default.nix @@ -0,0 +1,21 @@ +config: + +with config.lib.stylix.colors.withHashtag; +builtins.toFile "theme.rasi" +'' +${builtins.readFile ./theme.rasi} +configuration { + font: "${config.programs.rofi.font}"; +} + +* { + bg: ${base00}; + bg-alt: ${base01}; + fg: ${base07}; + fg-alt: ${base03}; +} + +window { + border-color: ${base03}; +} +'' diff --git a/rofi/theme/theme.rasi b/rofi/theme/theme.rasi new file mode 100644 index 0000000..9d808b9 --- /dev/null +++ b/rofi/theme/theme.rasi @@ -0,0 +1,76 @@ +configuration { + drun { + display-name: " "; + } + + run { + display-name: " "; + } + + window { + display-name: " "; + } + + ssh { + display-name: " "; + } + + timeout { + delay: 10; + action: "kb-cancel"; + } +} + +* { + border: 1; + margin: 0; + padding: 0; + spacing: 0; + + background-color: @bg; + text-color: @fg; +} + +window { + transparency: "real"; +} + +mainbox { + children: [inputbar, listview]; +} + +inputbar { + background-color: @bg-alt; + children: [prompt, entry]; +} + +entry { + background-color: inherit; + padding: 12px 3px; +} + +prompt { + background-color: inherit; + padding: 12px; +} + +listview { + lines: 8; +} + +element { + children: [element-text]; +} + +element-icon { + padding: 10px 10px; +} + +element-text { + padding: 10px 10px; + text-color: @fg-alt; +} + +element-text selected { + text-color: @fg; +} diff --git a/stylix/default.nix b/stylix/default.nix index 99f3b39..cb04e66 100644 --- a/stylix/default.nix +++ b/stylix/default.nix @@ -2,6 +2,5 @@ { stylix.base16Scheme = "${pkgs.base16-schemes}/share/themes/ayu-dark.yaml"; - stylix.polarity = "dark"; } diff --git a/sxhkd/default.nix b/sxhkd/default.nix index 00621bf..762c6b0 100644 --- a/sxhkd/default.nix +++ b/sxhkd/default.nix @@ -3,16 +3,20 @@ { services.sxhkd.enable = true; + xdg.configFile."sxhkd/scripts/show-keybindings.sh" = { + source = ./scripts/show-keybindings.sh; + executable = true; + }; + services.sxhkd.keybindings = let modKey = "alt"; createKeybinding = keybinding: description: "# ${description}\n${modKey} + ${keybinding}"; in { - # TODO: Currently not working properly ${(createKeybinding - "i" + "s" "Show keybindings.")} - = ''awk '/^#/{desc=substr($0, 3)} /^[a-z]/ { cmd=$0; print cmd " : " desc }' ~/.config/sxhkd/sxhkdrc | rofi -dmenu -i -p "Keybindings"''; + = "$HOME/.config/sxhkd/scripts/show-keybindings.sh"; ${(createKeybinding "r" diff --git a/sxhkd/scripts/show-keybindings.sh b/sxhkd/scripts/show-keybindings.sh new file mode 100644 index 0000000..db7863d --- /dev/null +++ b/sxhkd/scripts/show-keybindings.sh @@ -0,0 +1,13 @@ +#!/bin/sh +SXHKD_CONFIG="$HOME/.config/sxhkd/sxhkdrc" + +awk ' + /^#/ { + desc = substr($0, 3) + } + /^[[:alnum:]]/ { + cmd = $0 + getline + print cmd " : " desc + } +' "$SXHKD_CONFIG" | rofi -dmenu -i -p "Keybindings" @@ -1,4 +1,19 @@ -PROMPT='%F{red}%B┌[%b%F{green}%m%F{red}%B@%b%F{cyan}%n %F{blue}%~%F{red}%B] -%F{red}└>%b%f ' +setopt PROMPT_SUBST 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:*+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} +╰─>%f ' |
