Rearrange waybar, use exa isntead of ls

This commit is contained in:
iFargle 2023-08-29 12:08:37 +09:00
parent c6b0522de0
commit 0400ec91cf
8 changed files with 132 additions and 361 deletions

View file

@ -10,10 +10,12 @@ nixos-rebuild switch --flake '/etc/nixos#<HOSTNAME>'
# To Do List
* [ ] emacs
* [ ] Add bracket auto-completion
* [ ] Find a way to have magit save login credentials
* [ ] Find a way to have magit save login credentials
* [ ] Hyprland
* [ ] Swayidle inhibit whnn watching a video
* [ ] Fix cursor size
* [ ] Add a button for wlogout to waybar
* [x] Swayidle inhibit whnn watching a video
* Waybar inhibit button
* [x] Fix cursor size
* [ ] Try the multi-GPU configs on the wiki
* [ ] set up pinentry on awesome-hyprland
* [x] Get swaylock to dim / turn off the screen, then enter suspend/hibernate
@ -80,6 +82,7 @@ nixos-rebuild switch --flake '/etc/nixos#<HOSTNAME>'
### Useful Links
* FlakeHub - [Link](https://flakehub.com)
* Track a Nixpkgs PR - [Link](https://nixpk.gs/pr-tracker.html)
* Awesome-Hyprland - [Link](https://github.com/hyprland-community/awesome-hyprland)
### Examples
* Tons of good examples here - [Link](https://github.com/Mic92/dotfiles/blob/main/nixos/modules/)
@ -93,32 +96,44 @@ nixos-rebuild switch --flake '/etc/nixos#<HOSTNAME>'
---
# Theming
* To change system-wide themes, you need to change the following:
## Desktops
### gnome
1. `desktops/gnome.nix` - Change the imports at the bottom.
2. `users/albert/gnome-conf.nix` - Change the variables at the top.
1. `nixos/common/desktops/gnome/default.nix` - Change the imports at the bottom.
2. `home-manager/hosts/$HOSTNAME/desktops/gnome-conf.nix` - Change the variables at the top.
### hyprland
1. `home-manager/hosts/$HOSTNAME/desktops/hyprland/$THEME/hyprland-conf.nix` - Change the `WALLPAPER_DIR` variable in `".config/hypr/start.sh".text`
2. `home-manager/hosts/$HOSTNAME/desktops/hyprland/$THEME/hyprland-conf.nix` - Change `col.active_border` and `col.inactive_border` in the `general` section.
3. `home-manager/bash.nix` - Update the `sessionVariable` variable `GTK_THEME`
## Software
### waybar
1. `home-manager/hosts/$HOSTNAME/desktops/hyprland/$THEME/waybar-conf.nix` - Update all relevant colors. Possibly make configs for colorschemes and import them.
### swaylock
1. `home-manager/hosts/$HOSTNAME/desktops/hyprland/$THEME/swaylock-conf.nix` - Update all relevant colors. Possibly make configs for colorschemes and import them.
### kitty
1. `home-manager/common/software/cli/kitty.nix` - Update the content of `home.file.".config/kitty/theme.conf".text`
### Firefox
1. `home-manager/common/software/gui/firefox.nix` - Change the entry under "# Theming"
### btop
1. `home-manager/common/software/cli/btop.nix` - Set `color_theme`
### bash / powerline
1. `home-manager/common/software/cli/bash.nix` - Set `theme` in `programs.powerline-go.settings`
### neofetch
1. `home-manager/common/software/cli/neofetch.nix` - Update the contents of `home.file.".config/neofetch/config.conf".text`
### wlogout
1. WIP
## Text Editors
### emacs
1. `home-manager/common/software/cli/doom-emacs.d/packages.el` - Include your theme here, if needed
2. `home-manager/common/software/cli/doom-emacs.d/config.el` - Set your theme here `(setq doom-theme '$THEME_NAME)`
### neovim
1. `home-manager/neovim.nix` - Change the following:
1. `home-manager/common/software/cli/neovim.nix` - Change the following:
* `plugins = with pkgs.vimPlugins` - Add your theme under "Themes"
* `extraConfig` - Change the `colorscheme` and `AirlineTheme` sections
### hyprland
1. `hosts/$HOSTNAME/home-manager/hyprland/hyprland-conf.nix` - Change the `WALLPAPER_DIR` variable in `".config/hypr/start.sh".text`
2. `hosts/$HOSTNAME/home-manager/hyprland/hyprland-conf.nix` - Change `col.active_border` and `col.inactive_border` in the `general` section.
3. `home-manager/bash.nix` - Update the `sessionVariable` variable `GTK_THEME`
### waybar
1. `hosts/$HOSTNAME/home-manager/hyprland/waybar-conf.nix` - Update all relevant colors. Possibly make configs for colorschemes and import them.
### swaylock
1. `hosts/$HOSTNAME/home-manager/hyprland/swaylock-conf.nix` - Update all relevant colors. Possibly make configs for colorschemes and import them.
### kitty
1. `home-manager/kitty.nix` - Update the content of `home.file.".config/kitty/theme.conf".text`
### Firefox
1. `home-manager/firefox.nix` - Change the entry under "# Theming"
### btop
1. `home-manager/btop.nix` - Set `color_theme`
### bash / powerline
1. `home-manager/bash.nix` - Set `theme` in `programs.powerline-go.settings`
### neofetch
1. `home-manager/neofetch.nix` - Update the contents of `home.file.".config/neofetch/config.conf".text`
---
# GPG Keys
1. Import the user private key: `gpg import gpg/users/albert/privkey.asc`
2. Mark it as trusted: `gpg --edit-key albert@sysctl.io`, then type `trust`, then `5`

View file

@ -68,8 +68,9 @@
de = "docker exec -it";
# bash / system
ls = "exa";
cp = "rsync -avr";
ll = "ls -lah";
ll = "exa -lah";
rm = "rm -i";
df = "duf";

View file

@ -4,7 +4,7 @@
./gruvbox/mako-conf.nix
./gruvbox/rofi-conf.nix
./gruvbox/swaylock-conf.nix
./gruvbox/waybar/waybar-conf2.nix
./gruvbox/waybar/waybar-conf.nix
./gruvbox/swayosd-conf.nix
];
}

View file

@ -56,6 +56,8 @@
}
misc {
disable_hyprland_logo = true
mouse_move_enables_dpms = true
key_press_enables_dpms = true
}
decoration {
rounding = 5
@ -262,8 +264,13 @@
swayidle -w \
timeout 120 'swaylock -f' \
timeout 180 'hyprctl dispatch dpms off' \
timeout 300 'systemctl suspend' \
resume 'hyprctl dispatch dpms on' \
before-sleep 'swaylock -f'
before-sleep 'swaylock -f' \
before-sleep 'playerctl pause'
# Automatic device mounting
udiskie &
# Notification listener
mako

View file

@ -4,6 +4,16 @@
home.file = {
# https://yewtu.be/watch?v=tWQB1NDDA9c
# https://github.com/DN-debug/waybar-examples
# Inspiration:
# https://github.com/Pipshag/dotfiles_gruvbox
# Font Search:
# https://www.nerdfonts.com/cheat-sheet
# Online CSS testing
# https://www.w3schools.com/css/tryit.asp?filename=trycss_border_round
# Waybar configuration
".config/waybar/config.jsonc" = {
enable = true;
@ -16,25 +26,43 @@
"wlr/workspaces",
],
"modules-center": [
"clock"
],
"modules-right": [
"mpris",
"idle_inhibitor",
"pulseaudio",
"custom/tailscale",
"network",
"backlight",
"battery",
"clock"
],
"custom/tailscale": {
"format": "{icon} {}",
"exec": "$HOME/.config/waybar/scripts/tailscale.sh",
"exec-if": "pgrep tailscaled",
"return-type": "json",
"interval": 5,
"format-icons": {
"Running": "󰌆",
"Stopped": "󰌊",
}
},
"idle_inhibitor": {
"format": "{icon}",
"format-icons": {
"activated": "",
"deactivated": ""
}
},
"mpris": {
"format": "{player_icon} {dynamic}",
"format-paused": "{status_icon} <i>{dynamic}</i>",
"player-icons": {
"default": "",
},
"status-icons": {
"paused": ""
},
"player-icons": { "default": "" },
"status-icons": { "paused": "" },
},
"wlr/workspaces": {
@ -59,7 +87,7 @@
}
},
"actions": {
"on-click-right": "kitty --class=calcurse -e calcurse",
"on-click-right": "kitty -e calcurse",
"on-click-middle": "mode",
"on-scroll-up": "shift_up",
"on-scroll-down": "shift_down"
@ -68,64 +96,34 @@
"pulseaudio": {
"scroll-step": 1,
"format": "{volume}% {icon} {format_source}",
"format-bluetooth": "{volume}% {icon} {format_source}",
"format-bluetooth-muted": "<span foreground='#f2594b'> {format_source}</span>",
"format-muted": "<span foreground='#f2594b'>󰝟</span> {format_source}",
"format-source": " ",
"format-source-muted": " <span foreground='#f2594b'></span>",
"format": "{icon} {format_source}",
"format-bluetooth": "<span foreground='#f2594b'>{volume}% {icon} {format_source}</span>",
"format-bluetooth-muted": " ",
"format-muted": "󰝟 {format_source}",
"format-source": " <span foreground='#f2594b'></span>",
"format-source-muted": " ",
"format-icons": {
"headphone": "",
"headset": "",
"default": ["󰕿", "󰖀", "󰕾"]
},
"tooltip": false,
"on-click": "pavucontrol --class=pavu",
"on-click": "kitty -e pulsemixer",
},
"network": {
"format-wifi": "󰤨",
"format-ethernet": "󰈀",
"format-linked": "",
"format-disconnected": "",
"tooltip-format": "{essid}\n{ipaddr}/{cidr}",
"tooltip": true,
"format": "{ifname}",
"format-wifi": " {essid}",
"format-ethernet": " {ipaddr}",
"format-disconnected": "", // An empty format will hide the module.
"tooltip-format": "{ifname} via {gwaddr} ",
"tooltip-format-wifi": "{essid} ({signalStrength}%) ",
"tooltip-format-ethernet": "{ifname} ",
"tooltip-format-disconnected": "Disconnected",
"max-length": 50,
"on-click": "kitty --class=nmtui -e nmtui"
},
"cpu": {
"format": "{usage}% ",
"states": {
"warning": 60,
"critical": 80
},
"tooltip": false,
"on-click": "kitty --class=btop -e btop"
},
"memory": {
"tooltip": true,
"format": "{}% 󰍛",
"states": {
"warning": 60,
"critical": 80
},
"tooltip-format": "RAM: {used}GB/{total}GB\nSwap: {swapUsed}GB/{swapAvail}GB"
},
"temperature": {
"tooltip": false,
"critical-threshold": 80,
"format": "{temperatureC}°{icon}",
"format-icons": ["", "", ""]
},
"backlight": {
"tooltip": false,
"format": "{percent}% {icon}",
"format-icons": [""]
},
"battery": {
"tooltip": true,
"tooltip-format": "{time}",
@ -133,16 +131,11 @@
"warning": 35,
"critical": 20
},
"format": "{capacity}% {icon}",
"format-charging": "{capacity}% 󰂄",
"format-plugged": "{capacity}% ",
"format": "{icon} {capacity}%",
"format-charging": "󰂄 {capacity}%",
"format-plugged": " {capacity}%",
"format-icons": ["", "", "", "", ""]
},
"tray": {
"tooltip": false,
"spacing": 5
}
}
'';
@ -155,7 +148,8 @@
* {
border: none;
border-radius: 0;
font-family: my-queue;
/*font-family: my-queue;*/
font-family: JetbrainsMono-Regular;
}
#waybar {
@ -163,9 +157,10 @@
padding: 5px;
}
#workspaces button.visible
#workspaces button {
color: #e2cca9;
font-size: 14px;
font-size: 16px;
}
#workspaces button:hover,
@ -184,9 +179,6 @@
background-color: #f2594b;
}
#workspaces button.visible {
}
/*
* General background
*/
@ -200,50 +192,45 @@
#battery,
#tray,
#submap,
#clock,
#idle_inhibitor,
#custom-tailscale,
#window {
color: #e2cca9;
font-size: 14px;
padding: 0 5 0 5;
font-size: 16px;
padding: 0px 10px;
margin: 5px;
/* new stuff */
border-radius: 5px;
color: rgba(50, 48, 47, 0.8);
background-color: #d5c4a1;
font-weight: bold;
}
/*
* Warning plugins state
*/
#memory.warning,
#cpu.warning,
#battery.warning {
color: #e9b143;
background-color: #e9b143;
}
/*
* Critical plugins state
*/
#cpu.critical,
#temperature.critical,
#memory.critical,
#idle_inhibitor.activated,
#battery.critical,
#custom-tailscale.Stopped,
#network.disconnected {
color: #f2594b;
background-color: #f2594b;
}
#clock {
color: #e2cca9;
font-size: 14px;
font-weight: bold;
}
#battery.charging {
color: #b0b846;
color: #98971a;
}
#battery.plugged {
color: #80aa9e;
color: #458588;
}
#pulseaudio.bluetooth {
color: #80aa9e;
color: #458588;
}
tooltip {
color: #e2cca9;
font-size: 14px;

View file

@ -1,241 +0,0 @@
{ hostname, ...}: {
imports = [ ./scripts/waybar-scripts.nix ];
home.file = {
# https://yewtu.be/watch?v=tWQB1NDDA9c
# https://github.com/DN-debug/waybar-examples
# Inspiration:
# https://github.com/Pipshag/dotfiles_gruvbox
# Font Search:
# https://www.nerdfonts.com/cheat-sheet
# Online CSS testing
# https://www.w3schools.com/css/tryit.asp?filename=trycss_border_round
# Waybar configuration
".config/waybar/config.jsonc" = {
enable = true;
executable = false;
text = ''
{
"layer": "top",
"position": "top",
"modules-left": [
"wlr/workspaces",
],
"modules-center": [
],
"modules-right": [
"mpris",
"idle_inhibitor",
"pulseaudio",
"custom/tailscale",
"network",
"battery",
"clock"
],
"custom/tailscale": {
"format": "{icon} {}",
"exec": "$HOME/.config/waybar/scripts/tailscale.sh",
"exec-if": "pgrep tailscaled",
"return-type": "json",
"interval": 5,
"format-icons": {
"Running": "󰌆",
"Stopped": "󰌊",
}
},
"idle_inhibitor": {
"format": "{icon}",
"format-icons": {
"activated": "",
"deactivated": ""
}
},
"mpris": {
"format": "{player_icon} {dynamic}",
"format-paused": "{status_icon} <i>{dynamic}</i>",
"player-icons": { "default": "" },
"status-icons": { "paused": "" },
},
"wlr/workspaces": {
"on-click": "activate"
},
"clock": {
"format": "󰥔 {:%H:%M}",
"format-alt": "󰃭 {:%A, %d %b, %Y}",
"tooltip-format": "<tt><small>{calendar}</small></tt>",
"calendar": {
"mode" : "month",
"mode-mon-col" : 3,
"weeks-pos" : "left",
"on-scroll" : 1,
"format": {
"months": "<span color='#e2cca9'><b>{}</b></span>",
"days": "<span color='#e2cca9'><b>{}</b></span>",
"weeks": "<span color='#b0b846'><b>W{}</b></span>",
"weekdays": "<span color='#e9b143'><b>{}</b></span>",
"today": "<span color='#f28534'><b><u>{}</u></b></span>"
}
},
"actions": {
"on-click-right": "kitty -e calcurse",
"on-click-middle": "mode",
"on-scroll-up": "shift_up",
"on-scroll-down": "shift_down"
}
},
"pulseaudio": {
"scroll-step": 1,
"format": "{icon} {format_source}",
"format-bluetooth": "<span foreground='#f2594b'>{volume}% {icon} {format_source}</span>",
"format-bluetooth-muted": " ",
"format-muted": "󰝟 {format_source}",
"format-source": " <span foreground='#f2594b'></span>",
"format-source-muted": " ",
"format-icons": {
"headphone": "",
"headset": "",
"default": ["󰕿", "󰖀", "󰕾"]
},
"tooltip": false,
"on-click": "kitty -e pulsemixer",
},
"network": {
"format": "{ifname}",
"format-wifi": " {essid}",
"format-ethernet": " {ipaddr}",
"format-disconnected": "", // An empty format will hide the module.
"tooltip-format": "{ifname} via {gwaddr} ",
"tooltip-format-wifi": "{essid} ({signalStrength}%) ",
"tooltip-format-ethernet": "{ifname} ",
"tooltip-format-disconnected": "Disconnected",
"max-length": 50,
"on-click": "kitty --class=nmtui -e nmtui"
},
"battery": {
"tooltip": true,
"tooltip-format": "{time}",
"states": {
"warning": 35,
"critical": 20
},
"format": "{icon} {capacity}%",
"format-charging": "󰂄 {capacity}%",
"format-plugged": " {capacity}%",
"format-icons": ["", "", "", "", ""]
},
}
'';
};
# Waybar theming
".config/waybar/style.css" = {
enable = true;
executable = false;
text = ''
* {
border: none;
border-radius: 0;
/*font-family: my-queue;*/
font-family: JetbrainsMono-Regular;
}
#waybar {
background-color: rgba(50, 48, 47, 0.8);
padding: 5px;
}
#workspaces button.visible
#workspaces button {
color: #e2cca9;
font-size: 16px;
}
#workspaces button:hover,
#workspaces button.focused:hover,
#workspaces button.visible:hover {
color: #32302f;
background-color: #e9b143;
}
#workspaces button.active {
box-shadow: inset 0 -3px #f28534;
}
#workspaces button.urgent {
color: #32302f;
background-color: #f2594b;
}
/*
* General background
*/
#network,
#mpris,
#memory,
#backlight,
#cpu,
#pulseaudio,
#temperature,
#battery,
#tray,
#submap,
#clock,
#idle_inhibitor,
#custom-tailscale,
#window {
font-size: 16px;
padding: 0px 10px;
margin: 5px;
/* new stuff */
border-radius: 5px;
color: rgba(50, 48, 47, 0.8);
background-color: #d5c4a1;
font-weight: bold;
}
/*
* Warning plugins state
*/
#battery.warning {
background-color: #e9b143;
}
/*
* Critical plugins state
*/
#idle_inhibitor.activated,
#battery.critical,
#custom-tailscale.Stopped,
#network.disconnected {
background-color: #f2594b;
}
#battery.charging {
color: #98971a;
}
#battery.plugged {
color: #458588;
}
#pulseaudio.bluetooth {
color: #458588;
}
tooltip {
color: #e2cca9;
font-size: 14px;
}
'';
};
};
}

View file

@ -40,7 +40,7 @@
};
environment.sessionVariables = {
# If your cursor becomes invisible
# If your cursor becomes invisible, set this to 1
WLR_NO_HARDWARE_CURSORS = "0";
# Hint electron apps to use wayland
NIXOS_OZONE_WL = "1";
@ -87,13 +87,14 @@
pkgs.greetd.tuigreet # Greeter
pkgs.swayidle # Idle management daemon - Automatic lock screen
pkgs.swayosd # used for on-screen notifications for things like adjusting backlight, volume, etc
pkgs.nwg-bar # Logout/shutdown/hibernate/lock screen modal UI
pkgs.wlogout # Logout/shutdown/hibernate/lock screen modal UI
pkgs.ranger # TUI file manager
pkgs.xdg-utils # Utilities for better X/Wayland integration
pkgs.bitwarden-cli # Bitwarden for rofi
pkgs.bitwarden-menu # Bitwarden for rofi
pkgs.pulsemixer # TUI Pipewire / volume management
pkgs.calcurse # TUI Calendar app
pkgs.udiskie # Automatic device mounting
# Themes
pkgs.gruvbox-gtk-theme # Gruvbox Theme

View file

@ -39,6 +39,7 @@
sops
gnupg
jq
exa
];
# Select internationalisation properties.