From 90cfb23a5e1acf3a1a419c91496e3ecce8821ef6 Mon Sep 17 00:00:00 2001 From: Gabriel Arazas Date: Tue, 29 Dec 2020 22:29:29 +0800 Subject: [PATCH] Update the theme --- templates/themes/fair-and-square/README.adoc | 20 +++ .../themes/fair-and-square/cookiecutter.json | 34 ++--- templates/themes/fair-and-square/default.nix | 116 ++++++++++++++++++ .../config/alacritty/alacritty.yml | 38 +++--- .../config/bspwm/bspwmrc | 6 +- .../config/dunst/dunstrc | 20 +-- .../config/polybar/config | 17 ++- .../config/rofi/themes/dmenu.rasi | 36 +++--- .../config/rofi/themes/fds-center-menu.rasi | 36 +++--- .../config/rofi/themes/fds-mini-sidebar.rasi | 36 +++--- .../{{ cookiecutter.slug }}/default.nix | 2 +- 11 files changed, 248 insertions(+), 113 deletions(-) create mode 100755 templates/themes/fair-and-square/README.adoc create mode 100755 templates/themes/fair-and-square/default.nix diff --git a/templates/themes/fair-and-square/README.adoc b/templates/themes/fair-and-square/README.adoc new file mode 100755 index 00000000..1d732afe --- /dev/null +++ b/templates/themes/fair-and-square/README.adoc @@ -0,0 +1,20 @@ += Fair and square + +A theme featuring fairly simple graphics with not much bells and whistles. +Thus, it focuses on snapiness and efficient use of keyboard shortcuts. +Intended to be used for potatoes (READ: cheap low-end computers) like mine. + +This theme is mainly composed of the following components that are already configured: + +- bspwm as the window manager +- polybar for the bars +- rofi for the application laucher and the generic interface +- dunst (and libnotify) for desktop notifications +- feh (for setting the background) with the wallpaper to be used at `./config/wallpaper`. +- Arc is the chosen GTK theme + +Here are the miscellaneous programs that are being used. +The theme provides no configuration so you have to make sure the configuration is in the already placed. + +- sxhkd (since you're using bspwm, anyways) + diff --git a/templates/themes/fair-and-square/cookiecutter.json b/templates/themes/fair-and-square/cookiecutter.json index 8747f218..b41f9327 100755 --- a/templates/themes/fair-and-square/cookiecutter.json +++ b/templates/themes/fair-and-square/cookiecutter.json @@ -2,25 +2,25 @@ "name": "Fair and square", "slug": "{{ cookiecutter.name | slugify }}", "version": "0.1.0", - "base00": "#3B4252", - "base01": "#BF616A", - "base02": "#A3BE8C", - "base03": "#EBCB8B", - "base04": "#81A1C1", - "base05": "#B48EAD", - "base06": "#88C0D0", - "base07": "#E5E9F0", - "base08": "#727B8A", - "base09": "#BF616A", - "base0A": "#A3BE8C", - "base0B": "#EBCB8B", - "base0C": "#81A1C1", - "base0D": "#B48EAD", - "base0E": "#8FBCBB", - "base0F": "#ECEFF4", + "base00": "3B4252", + "base01": "BF616A", + "base02": "A3BE8C", + "base03": "EBCB8B", + "base04": "81A1C1", + "base05": "B48EAD", + "base06": "88C0D0", + "base07": "E5E9F0", + "base08": "727B8A", + "base09": "BF616A", + "base0A": "A3BE8C", + "base0B": "EBCB8B", + "base0C": "81A1C1", + "base0D": "B48EAD", + "base0E": "8FBCBB", + "base0F": "ECEFF4", "font": { "mono": { - "name": "Iosevka", + "name": "Iosevka Nerd Font", "baseSize": 12 }, "sansSerif": { diff --git a/templates/themes/fair-and-square/default.nix b/templates/themes/fair-and-square/default.nix new file mode 100755 index 00000000..8925d949 --- /dev/null +++ b/templates/themes/fair-and-square/default.nix @@ -0,0 +1,116 @@ +{ config, options, lib, pkgs, ... }: + +with lib; { + options.modules.themes."fair-and-square" = { + enable = mkOption { + type = types.bool; + default = false; + }; + }; + + config = mkIf config.modules.themes."fair-and-square".enable { + services = { + # Enable picom compositor. + picom = { + enable = true; + fade = false; + shadow = false; + }; + + # Enable certain Xorg-related services. + xserver = { + displayManager = { + lightdm.enable = true; + defaultSession = "none+bspwm"; + }; + enable = true; + libinput.enable = true; + windowManager.bspwm.enable = true; + }; + }; + + my.env.TERMINAL = "alacritty"; + + my.home = { + # Enable GTK configuration. + gtk.enable = true; + + # Set the wallpaper. + home.file.".background-image".source = ./config/wallpaper; + + # Enable QT configuration and set it to the same GTK config. + qt.enable = true; + qt.platformTheme = "gtk"; + + # Install all of the configurations in the XDG config home. + xdg.configFile = mkMerge [ + (let + recursiveXdgConfig = name: { + source = ./config + "/${name}"; + recursive = true; + }; + in { + "alacritty" = recursiveXdgConfig "alacritty"; + "bspwm" = recursiveXdgConfig "bspwm"; + "dunst" = recursiveXdgConfig "dunst"; + "polybar" = recursiveXdgConfig "polybar"; + "rofi" = recursiveXdgConfig "rofi"; + + "sxhkd" = { + source = ; + recursive = true; + }; + }) + + # Applying the theme for GTK. + ({ + "gtk-3.0/settings.ini".text = '' + [Settings] + gtk-theme-name=Arc + gtk-icon-theme-name=Arc + gtk-fallback-icon-theme=gnome + gtk-application-prefer-dark-theme=true + gtk-cursor-theme-name=Adwaita + gtk-xft-hinting=1 + gtk-xft-hintstyle=hintfull + gtk-xft-rgba=none + ''; + + "gtk-2.0/gtkrc".text = '' + gtk-theme-name="Arc" + gtk-icon-theme-name="Arc" + gtk-font-name="Sans 10" + gtk-cursor-theme-name="Adwaita" + ''; + }) + ]; + + # Set the cursor theme. + xdg.dataFile = { + "icons/default/index.theme".text = '' + [icon theme] + Inherits=Adwaita + ''; + }; + }; + + my.packages = with pkgs; [ + alacritty # Muh GPU-accelerated terminal emulator. + dunst # Add more annoying pop-ups on your screen! + feh # Meh, it's a image viewer that can set desktop background, what gives? + gnome3.adwaita-icon-theme + libnotify # Library for yer notifications. + (polybar.override { + pulseSupport = true; + nlSupport = true; + }) # Add some bars to your magnum opus. + rofi # A ricer's best friend (one of them at least). + + # The Arc theme + arc-icon-theme + arc-theme + ]; + + fonts.fonts = with pkgs; [ nerdfonts iosevka font-awesome-ttf ]; + }; +} diff --git a/templates/themes/fair-and-square/{{ cookiecutter.slug }}/config/alacritty/alacritty.yml b/templates/themes/fair-and-square/{{ cookiecutter.slug }}/config/alacritty/alacritty.yml index 8037463a..3b30cb7f 100755 --- a/templates/themes/fair-and-square/{{ cookiecutter.slug }}/config/alacritty/alacritty.yml +++ b/templates/themes/fair-and-square/{{ cookiecutter.slug }}/config/alacritty/alacritty.yml @@ -56,28 +56,28 @@ window: colors: primary: - background: "{{ cookiecutter.base00 }}" - foreground: "{{ cookiecutter.base07 }}" + background: "#{{ cookiecutter.base00 }}" + foreground: "#{{ cookiecutter.base06 }}" normal: - black: "{{ cookiecutter.base00 }}" - red: "{{ cookiecutter.base01 }}" - green: "{{ cookiecutter.base02 }}" - yellow: "{{ cookiecutter.base03 }}" - blue: "{{ cookiecutter.base04 }}" - magenta: "{{ cookiecutter.base05 }}" - cyan: "{{ cookiecutter.base06 }}" - white: "{{ cookiecutter.base07 }}" + black: "#{{ cookiecutter.base00 }}" + red: "#{{ cookiecutter.base08 }}" + green: "#{{ cookiecutter.base0B }}" + yellow: "#{{ cookiecutter.base0A }}" + blue: "#{{ cookiecutter.base0D }}" + magenta: "#{{ cookiecutter.base0E }}" + cyan: "#{{ cookiecutter.base0C }}" + white: "#{{ cookiecutter.base05 }}" bright: - black: "{{ cookiecutter.base08 }}" - red: "{{ cookiecutter.base09 }}" - green: "{{ cookiecutter.base0A }}" - yellow: "{{ cookiecutter.base0B }}" - blue: "{{ cookiecutter.base0C }}" - magenta: "{{ cookiecutter.base0D }}" - cyan: "{{ cookiecutter.base0E }}" - white: "{{ cookiecutter.base0F }}" + black: "#{{ cookiecutter.base03 }}" + red: "#{{ cookiecutter.base08 }}" + green: "#{{ cookiecutter.base0B }}" + yellow: "#{{ cookiecutter.base0A }}" + blue: "#{{ cookiecutter.base0D }}" + magenta: "#{{ cookiecutter.base0E }}" + cyan: "#{{ cookiecutter.base0C }}" + white: "#{{ cookiecutter.base06 }}" scrolling: @@ -93,8 +93,8 @@ scrolling: # Font configuration (changes require restart) font: normal: - family: {{ cookiecutter.font.mono.name }} family: monospace + family: {{ cookiecutter.font.mono.name }} # Point size size: 13.0 diff --git a/templates/themes/fair-and-square/{{ cookiecutter.slug }}/config/bspwm/bspwmrc b/templates/themes/fair-and-square/{{ cookiecutter.slug }}/config/bspwm/bspwmrc index 61f8c42e..94ac9552 100755 --- a/templates/themes/fair-and-square/{{ cookiecutter.slug }}/config/bspwm/bspwmrc +++ b/templates/themes/fair-and-square/{{ cookiecutter.slug }}/config/bspwm/bspwmrc @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env sh # Open all of the programs needed. pkill polybar; polybar "fds-bar" & @@ -12,12 +12,12 @@ bspc rule -r "*" bspc monitor -d I II III IV V bspc config border_width 2 -bspc config window_gap 9 +bspc config window_gap 5 bspc config split_ratio 0.50 bspc config borderless_monocle true bspc config gapless_monocle true -bspc config focused_border_color "{{ cookiecutter.base05 }}" +bspc config focused_border_color "#{{ cookiecutter.base05 }}" bspc config focus_follows_pointer true # Set the default cursor to pointer diff --git a/templates/themes/fair-and-square/{{ cookiecutter.slug }}/config/dunst/dunstrc b/templates/themes/fair-and-square/{{ cookiecutter.slug }}/config/dunst/dunstrc index e66a3490..22fa9f6c 100755 --- a/templates/themes/fair-and-square/{{ cookiecutter.slug }}/config/dunst/dunstrc +++ b/templates/themes/fair-and-square/{{ cookiecutter.slug }}/config/dunst/dunstrc @@ -29,7 +29,7 @@ # the top and down respectively. # The width can be negative. In this case the actual width is the # screen width minus the width defined in within the geometry option. - geometry = "350x50-10-50" + geometry = "350x50-10-10" # Show how many messages are currently hidden (because of geometry). indicate_hidden = yes @@ -61,10 +61,10 @@ # Defines width in pixels of frame around the notification window. # Set to 0 to disable. - frame_width = 2 + frame_width = 1 # Defines color of the frame around the notification window. - frame_color = "{{ cookiecutter.base07 }}" + frame_color = "#{{ cookiecutter.base07 }}" # Define a color for the separator. # possible values are: @@ -283,8 +283,8 @@ [urgency_low] # IMPORTANT: colors have to be defined in quotation marks. # Otherwise the "#" and following would be interpreted as a comment. - background = "{{ cookiecutter.base01 }}" - foreground = "{{ cookiecutter.base07 }}" + background = "#{{ cookiecutter.base01 }}" + foreground = "#{{ cookiecutter.base07 }}" timeout = 10 # Icon for notifications with low urgency, uncomment to enable #icon = /path/to/icon @@ -292,8 +292,8 @@ [urgency_normal] - background = "{{ cookiecutter.base00 }}" - foreground = "{{ cookiecutter.base07 }}" + background = "#{{ cookiecutter.base00 }}" + foreground = "#{{ cookiecutter.base07 }}" timeout = 10 # Icon for notifications with normal urgency, uncomment to enable #icon = /path/to/icon @@ -301,9 +301,9 @@ [urgency_critical] - background = "{{ cookiecutter.base00 }}" - foreground = "{{ cookiecutter.base08 }}" - frame_color = "{{ cookiecutter.base08 }}" + background = "#{{ cookiecutter.base00 }}" + foreground = "#{{ cookiecutter.base08 }}" + frame_color = "#{{ cookiecutter.base08 }}" timeout = 0 # Icon for notifications with critical urgency, uncomment to enable #icon = /path/to/icon diff --git a/templates/themes/fair-and-square/{{ cookiecutter.slug }}/config/polybar/config b/templates/themes/fair-and-square/{{ cookiecutter.slug }}/config/polybar/config index 8191d1f3..87b368b6 100755 --- a/templates/themes/fair-and-square/{{ cookiecutter.slug }}/config/polybar/config +++ b/templates/themes/fair-and-square/{{ cookiecutter.slug }}/config/polybar/config @@ -2,11 +2,11 @@ ; However, formats in RGB is fine. ; This is where all of the colors should be placed for those who are lazy to scroll down (like me). [colors] - background = "{{ cookiecutter.base00 }}" - background-light = "{{ cookiecutter.base01 }}" - foreground = "{{ cookiecutter.base06 }}" - foreground-light = "{{ cookiecutter.base07 }}" - accent = "{{ cookiecutter.base08 }}" + background = "#{{ cookiecutter.base00 }}" + background-light = "#{{ cookiecutter.base01 }}" + foreground = "#{{ cookiecutter.base06 }}" + foreground-light = "#{{ cookiecutter.base07 }}" + accent = "#{{ cookiecutter.base08 }}" ; The common style between bars. @@ -24,14 +24,13 @@ module-margin = 1 module-padding = 1 - font-1 = "{{ cookiecutter.font.mono.name }};2" - font-2 = "Iosevka;2" - font-3 = "Fira Code;2" + font-0 = "{{ cookiecutter.font.mono.name }};2" + font-1 = "Iosevka;2" ; Our fallback fonts are mostly used as icon fonts. ; For future references, the version of Font Awesome used here is at v5.13.0. ; I also installed the font myself that I downloaded from the official website (https://fontawesome.com/). - font-4 = "Font Awesome 5 Free,Font Awesome 5 Free Solid:style=Solid;2" + font-2 = "Font Awesome 5 Free,Font Awesome 5 Free Solid:style=Solid;2" ; This creates the illusion as if the modules are in the center. __border-size = 5 diff --git a/templates/themes/fair-and-square/{{ cookiecutter.slug }}/config/rofi/themes/dmenu.rasi b/templates/themes/fair-and-square/{{ cookiecutter.slug }}/config/rofi/themes/dmenu.rasi index 9af44580..99b6ee77 100755 --- a/templates/themes/fair-and-square/{{ cookiecutter.slug }}/config/rofi/themes/dmenu.rasi +++ b/templates/themes/fair-and-square/{{ cookiecutter.slug }}/config/rofi/themes/dmenu.rasi @@ -8,24 +8,24 @@ * { /* The color swatch */ /* Useful for quick editing of the colors */ - background: {{ cookiecutter.base00 }}; - foreground: {{ cookiecutter.base07 }}; - color0: {{ cookiecutter.base00 }}; - color1: {{ cookiecutter.base01 }}; - color2: {{ cookiecutter.base02 }}; - color3: {{ cookiecutter.base03 }}; - color4: {{ cookiecutter.base04 }}; - color5: {{ cookiecutter.base05 }}; - color6: {{ cookiecutter.base06 }}; - color7: {{ cookiecutter.base07 }}; - color8: {{ cookiecutter.base08 }}; - color9: {{ cookiecutter.base09 }}; - color10: {{ cookiecutter.base0A }}; - color11: {{ cookiecutter.base0B }}; - color12: {{ cookiecutter.base0C }}; - color13: {{ cookiecutter.base0D }}; - color14: {{ cookiecutter.base0E }}; - color15: {{ cookiecutter.base0F }}; + background: #{{ cookiecutter.base00 }}; + foreground: #{{ cookiecutter.base07 }}; + color0: #{{ cookiecutter.base00 }}; + color1: #{{ cookiecutter.base01 }}; + color2: #{{ cookiecutter.base02 }}; + color3: #{{ cookiecutter.base03 }}; + color4: #{{ cookiecutter.base04 }}; + color5: #{{ cookiecutter.base05 }}; + color6: #{{ cookiecutter.base06 }}; + color7: #{{ cookiecutter.base07 }}; + color8: #{{ cookiecutter.base08 }}; + color9: #{{ cookiecutter.base09 }}; + color10: #{{ cookiecutter.base0A }}; + color11: #{{ cookiecutter.base0B }}; + color12: #{{ cookiecutter.base0C }}; + color13: #{{ cookiecutter.base0D }}; + color14: #{{ cookiecutter.base0E }}; + color15: #{{ cookiecutter.base0F }}; background-color: @background; border-color: @foreground; diff --git a/templates/themes/fair-and-square/{{ cookiecutter.slug }}/config/rofi/themes/fds-center-menu.rasi b/templates/themes/fair-and-square/{{ cookiecutter.slug }}/config/rofi/themes/fds-center-menu.rasi index 98bf448f..cea7e0c1 100755 --- a/templates/themes/fair-and-square/{{ cookiecutter.slug }}/config/rofi/themes/fds-center-menu.rasi +++ b/templates/themes/fair-and-square/{{ cookiecutter.slug }}/config/rofi/themes/fds-center-menu.rasi @@ -1,24 +1,24 @@ * { /* The color swatch */ /* Useful for quick editing of the colors */ - background: {{ cookiecutter.base00 }}; - foreground: {{ cookiecutter.base07 }}; - color0: {{ cookiecutter.base00 }}; - color1: {{ cookiecutter.base01 }}; - color2: {{ cookiecutter.base02 }}; - color3: {{ cookiecutter.base03 }}; - color4: {{ cookiecutter.base04 }}; - color5: {{ cookiecutter.base05 }}; - color6: {{ cookiecutter.base06 }}; - color7: {{ cookiecutter.base07 }}; - color8: {{ cookiecutter.base08 }}; - color9: {{ cookiecutter.base09 }}; - color10: {{ cookiecutter.base0A }}; - color11: {{ cookiecutter.base0B }}; - color12: {{ cookiecutter.base0C }}; - color13: {{ cookiecutter.base0D }}; - color14: {{ cookiecutter.base0E }}; - color15: {{ cookiecutter.base0F }}; + background: #{{ cookiecutter.base00 }}; + foreground: #{{ cookiecutter.base07 }}; + color0: #{{ cookiecutter.base00 }}; + color1: #{{ cookiecutter.base01 }}; + color2: #{{ cookiecutter.base02 }}; + color3: #{{ cookiecutter.base03 }}; + color4: #{{ cookiecutter.base04 }}; + color5: #{{ cookiecutter.base05 }}; + color6: #{{ cookiecutter.base06 }}; + color7: #{{ cookiecutter.base07 }}; + color8: #{{ cookiecutter.base08 }}; + color9: #{{ cookiecutter.base09 }}; + color10: #{{ cookiecutter.base0A }}; + color11: #{{ cookiecutter.base0B }}; + color12: #{{ cookiecutter.base0C }}; + color13: #{{ cookiecutter.base0D }}; + color14: #{{ cookiecutter.base0E }}; + color15: #{{ cookiecutter.base0F }}; /* Theme settings */ highlight: bold italic; diff --git a/templates/themes/fair-and-square/{{ cookiecutter.slug }}/config/rofi/themes/fds-mini-sidebar.rasi b/templates/themes/fair-and-square/{{ cookiecutter.slug }}/config/rofi/themes/fds-mini-sidebar.rasi index d3851569..23d7f847 100755 --- a/templates/themes/fair-and-square/{{ cookiecutter.slug }}/config/rofi/themes/fds-mini-sidebar.rasi +++ b/templates/themes/fair-and-square/{{ cookiecutter.slug }}/config/rofi/themes/fds-mini-sidebar.rasi @@ -1,24 +1,24 @@ * { /* The color swatch */ /* Useful for quick editing of the colors */ - background: {{ cookiecutter.base00 }}; - foreground: {{ cookiecutter.base07 }}; - color0: {{ cookiecutter.base00 }}; - color1: {{ cookiecutter.base01 }}; - color2: {{ cookiecutter.base02 }}; - color3: {{ cookiecutter.base03 }}; - color4: {{ cookiecutter.base04 }}; - color5: {{ cookiecutter.base05 }}; - color6: {{ cookiecutter.base06 }}; - color7: {{ cookiecutter.base07 }}; - color8: {{ cookiecutter.base08 }}; - color9: {{ cookiecutter.base09 }}; - color10: {{ cookiecutter.base0A }}; - color11: {{ cookiecutter.base0B }}; - color12: {{ cookiecutter.base0C }}; - color13: {{ cookiecutter.base0D }}; - color14: {{ cookiecutter.base0E }}; - color15: {{ cookiecutter.base0F }}; + background: #{{ cookiecutter.base00 }}; + foreground: #{{ cookiecutter.base07 }}; + color0: #{{ cookiecutter.base00 }}; + color1: #{{ cookiecutter.base01 }}; + color2: #{{ cookiecutter.base02 }}; + color3: #{{ cookiecutter.base03 }}; + color4: #{{ cookiecutter.base04 }}; + color5: #{{ cookiecutter.base05 }}; + color6: #{{ cookiecutter.base06 }}; + color7: #{{ cookiecutter.base07 }}; + color8: #{{ cookiecutter.base08 }}; + color9: #{{ cookiecutter.base09 }}; + color10: #{{ cookiecutter.base0A }}; + color11: #{{ cookiecutter.base0B }}; + color12: #{{ cookiecutter.base0C }}; + color13: #{{ cookiecutter.base0D }}; + color14: #{{ cookiecutter.base0E }}; + color15: #{{ cookiecutter.base0F }}; /* General theme settings */ highlight: bold italic; diff --git a/templates/themes/fair-and-square/{{ cookiecutter.slug }}/default.nix b/templates/themes/fair-and-square/{{ cookiecutter.slug }}/default.nix index 06cee4eb..85cb006d 100755 --- a/templates/themes/fair-and-square/{{ cookiecutter.slug }}/default.nix +++ b/templates/themes/fair-and-square/{{ cookiecutter.slug }}/default.nix @@ -111,6 +111,6 @@ with lib; { arc-theme ]; - fonts.fonts = with pkgs; [ iosevka font-awesome-ttf ]; + fonts.fonts = with pkgs; [ iosevka nerdfonts font-awesome-ttf ]; }; }