Update the "Fair and square" theme

This commit is contained in:
Gabriel Arazas 2020-10-07 06:24:55 +08:00
parent 49592d7f01
commit 91ff5c8add
16 changed files with 71 additions and 64 deletions

View File

@ -4,16 +4,17 @@ A theme featuring fairly simple graphics with not much bells and whistles.
Thus, it focuses on snapiness and efficient use of keyboard shortcuts. Thus, it focuses on snapiness and efficient use of keyboard shortcuts.
Intended to be used for potatoes (READ: cheap low-end computers) like mine. Intended to be used for potatoes (READ: cheap low-end computers) like mine.
This theme is mainly composed of the following components: This theme is mainly composed of the following components that are already configured:
- bspwm as the window manager - bspwm as the window manager
- polybar for the bars - polybar for the bars
- rofi for the application laucher and the generic interface - rofi for the application laucher and the generic interface
- dunst (and libnotify) for desktop notifications - 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 - Arc is the chosen GTK theme
Other miscellaneous stuff: 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) - sxhkd (since you're using bspwm, anyways)
- feh (for setting the background)

View File

@ -1,8 +1,9 @@
#!/bin/sh #!/bin/sh
# Starting all of the required programs. # Open all of the programs needed.
pkill polybar || polybar "fds-bar" & pkill polybar || polybar "fds-bar" &
pkill feh || feh $HOME/.background-image pkill feh || feh --bg-fill $HOME/.background-image
pkill dunst || dunst &
# Removing all rules at startup to prevent duplicating rules. # Removing all rules at startup to prevent duplicating rules.
bspc rule -r "*" bspc rule -r "*"
@ -25,5 +26,5 @@ xsetroot -cursor_name left_ptr
# Rules # Rules
bspc rule -a code-oss desktop=^2 bspc rule -a code-oss desktop=^2
bspc rule -a firefox desktop=^1 bspc rule -a firefox desktop=^1
bspc rule -a Emacs state=tiled bspc rule -a emacs state=tiled

View File

@ -139,9 +139,9 @@
; We've formatted the time string to alter between the time and the date instead. ; We've formatted the time string to alter between the time and the date instead.
; Although, I feel it's a hacky workaround, it still is functional as a date module. ; Although, I feel it's a hacky workaround, it still is functional as a date module.
date = "%A, %F" date = "%A, %F"
date-alt = "%B %d, %Y" date-alt = "%B %d, %Y (%F)"
time = %T time = %T
time-alt = %F time-alt =
format-prefix = "" format-prefix = ""
label = %date% %time% label = %date% %time%

View File

@ -36,7 +36,7 @@ window {
background-color: transparent; background-color: transparent;
height: 65%; height: 65%;
width: 45%; width: 35%;
position: center; position: center;
location: center; location: center;
text-color: @foreground; text-color: @foreground;

View File

@ -11,23 +11,26 @@ with lib;
config = mkIf config.modules.themes."fair-and-square".enable { config = mkIf config.modules.themes."fair-and-square".enable {
# Pass the metadata of the theme. # Pass the metadata of the theme.
modules.themes = { modules.theme = {
name = "Fair and square"; name = "Fair and square";
version = "0.1.0"; version = "0.1.0";
path = ./.; path = ./.;
}; };
# Enable picom compositor.
services = { services = {
# Enable picom compositor.
picom = { picom = {
enable = true; enable = true;
fade = false; fade = false;
shadow = false; shadow = false;
}; };
# Enable certain Xorg-related services.
xserver = { xserver = {
displayManager = { displayManager = {
lightdm.enable = true; lightdm.enable = true;
lightdm.greeters.mini.enable = true;
lightdm.greeters.mini.user = config.my.username;
defaultSession = "none+bspwm"; defaultSession = "none+bspwm";
}; };
enable = true; enable = true;
@ -36,16 +39,16 @@ with lib;
}; };
}; };
# Enable QT configuration to style with the GTK theme.
qt5 = {
style = "gtk2";
platformTheme = "gtk2";
};
my.env.TERMINAL = "alacritty"; my.env.TERMINAL = "alacritty";
my.home = { my.home = {
# Enable GTK configuration.
gtk.enable = true;
# 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. # Install all of the configurations in the XDG config home.
xdg.configFile = mkMerge [ xdg.configFile = mkMerge [
(let recursiveXdgConfig = name: { (let recursiveXdgConfig = name: {
@ -64,7 +67,8 @@ with lib;
}; };
}) })
{ # Applying the theme for GTK.
({
"gtk-3.0/settings.ini".text = '' "gtk-3.0/settings.ini".text = ''
[Settings] [Settings]
gtk-theme-name=Arc gtk-theme-name=Arc
@ -75,20 +79,24 @@ with lib;
gtk-xft-hinting=1 gtk-xft-hinting=1
gtk-xft-hintstyle=hintfull gtk-xft-hintstyle=hintfull
gtk-xft-rgba=none gtk-xft-rgba=none
gtk-font-name=Sans 10
''; '';
}
];
# Except for the GTK2 config which still needs to be in `$HOME/.gtkrc-2.0`. "gtk-2.0/gtkrc".text = ''
home.file = {
".gtkrc-2.0".text = ''
gtk-theme-name="Arc" gtk-theme-name="Arc"
gtk-icon-theme-name="Arc" gtk-icon-theme-name="Arc"
gtk-font-name="Sans 10" gtk-font-name="Sans 10"
gtk-cursor-theme-name="Adwaita" gtk-cursor-theme-name="Adwaita"
''; '';
})
];
}; };
# Set the cursor theme.
xdg.dataFile = {
"icons/default/index.theme".text = ''
[icon theme]
Inherits=Adwaita
'';
}; };
my.packages = with pkgs; [ my.packages = with pkgs; [

View File

@ -4,16 +4,17 @@ A theme featuring fairly simple graphics with not much bells and whistles.
Thus, it focuses on snapiness and efficient use of keyboard shortcuts. Thus, it focuses on snapiness and efficient use of keyboard shortcuts.
Intended to be used for potatoes (READ: cheap low-end computers) like mine. Intended to be used for potatoes (READ: cheap low-end computers) like mine.
This theme is mainly composed of the following components: This theme is mainly composed of the following components that are already configured:
- bspwm as the window manager - bspwm as the window manager
- polybar for the bars - polybar for the bars
- rofi for the application laucher and the generic interface - rofi for the application laucher and the generic interface
- dunst (and libnotify) for desktop notifications - 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 - Arc is the chosen GTK theme
Other miscellaneous stuff: 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) - sxhkd (since you're using bspwm, anyways)
- feh (for setting the background)

View File

@ -1,8 +1,9 @@
#!/bin/sh #!/bin/sh
# Open all of the programs needed. # Open all of the programs needed.
pkill polybar || polybar "fds-bar" & pkill polybar; polybar "fds-bar" &
pkill feh || feh --bg-fill $HOME/.background-image pkill feh; feh --bg-fill $HOME/.background-image
pkill dunst; dunst &
# Removing all rules at startup to prevent duplicating rules. # Removing all rules at startup to prevent duplicating rules.
bspc rule -r "*" bspc rule -r "*"
@ -25,4 +26,5 @@ xsetroot -cursor_name left_ptr
# Rules # Rules
bspc rule -a code-oss desktop=^2 bspc rule -a code-oss desktop=^2
bspc rule -a firefox desktop=^1 bspc rule -a firefox desktop=^1
bspc rule -a emacs state=tiled

View File

@ -59,23 +59,7 @@
modules-left = bspwm modules-left = bspwm
modules-center = date modules-center = date
modules-right = pulseaudio eth memory home-fs root-fs modules-right = pulseaudio eth memory root-fs
[module/home-fs]
type = internal/fs
mount-0 = /home
format-margin = 0
format-padding = 0
label-margin = 0
label-padding = 0
format-mounted-prefix = ""
format-mounted-prefix-margin-right = 1
format-unmounted-prefix = ""
format-unmounted-prefix-margin-right = 1
label-mounted = %free%
label-unmounted = N/A
[module/root-fs] [module/root-fs]
@ -155,9 +139,9 @@
; We've formatted the time string to alter between the time and the date instead. ; We've formatted the time string to alter between the time and the date instead.
; Although, I feel it's a hacky workaround, it still is functional as a date module. ; Although, I feel it's a hacky workaround, it still is functional as a date module.
date = "%A, %F" date = "%A, %F"
date-alt = "%B %d, %Y" date-alt = "%B %d, %Y (%F)"
time = %T time = %T
time-alt = %F time-alt =
format-prefix = "" format-prefix = ""
label = %date% %time% label = %date% %time%

View File

@ -35,7 +35,7 @@ window {
background-color: transparent; background-color: transparent;
height: 65%; height: 65%;
width: 45%; width: 55%;
position: center; position: center;
location: center; location: center;
text-color: @foreground; text-color: @foreground;

View File

@ -17,14 +17,15 @@ with lib;
path = ./.; path = ./.;
}; };
# Enable picom compositor.
services = { services = {
# Enable picom compositor.
picom = { picom = {
enable = true; enable = true;
fade = false; fade = false;
shadow = false; shadow = false;
}; };
# Enable certain Xorg-related services.
xserver = { xserver = {
displayManager = { displayManager = {
lightdm.enable = true; lightdm.enable = true;
@ -44,7 +45,7 @@ with lib;
# Enable GTK configuration. # Enable GTK configuration.
gtk.enable = true; gtk.enable = true;
# Enable QT configuration. # Enable QT configuration and set it to the same GTK config.
qt.enable = true; qt.enable = true;
qt.platformTheme = "gtk"; qt.platformTheme = "gtk";
@ -66,7 +67,8 @@ with lib;
}; };
}) })
(mkIf config.services.xserver.enable { # Applying the theme for GTK.
({
"gtk-3.0/settings.ini".text = '' "gtk-3.0/settings.ini".text = ''
[Settings] [Settings]
gtk-theme-name=Arc gtk-theme-name=Arc
@ -89,6 +91,14 @@ with lib;
]; ];
}; };
# Set the cursor theme.
xdg.dataFile = {
"icons/default/index.theme".text = ''
[icon theme]
Inherits=Adwaita
'';
};
my.packages = with pkgs; [ my.packages = with pkgs; [
alacritty # Muh GPU-accelerated terminal emulator. alacritty # Muh GPU-accelerated terminal emulator.
dunst # Add more annoying pop-ups on your screen! dunst # Add more annoying pop-ups on your screen!