waybar
This commit is contained in:
3
home/lukas/blueman.nix
Normal file
3
home/lukas/blueman.nix
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
services.blueman.enable = true;
|
||||
}
|
||||
@@ -9,6 +9,8 @@
|
||||
|
||||
bat.enable = true; # <- installs Catppuccin-Mocha.tmTheme
|
||||
delta.enable = true; # <- colours delta with your mauve accent
|
||||
waybar.enable = false;
|
||||
rofi.enable = false;
|
||||
};
|
||||
|
||||
gtk = {
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
./tmux.nix
|
||||
./xgd.nix
|
||||
./hyprland.nix
|
||||
./waybar.nix
|
||||
./rofi.nix
|
||||
./libreoffice.nix
|
||||
];
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
let
|
||||
userPubKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAII1DsMfyMUK0snbTeVWMmdzLP9NIvPoQ4tjqyREUMHwZ mail@lukas.contact";
|
||||
in {
|
||||
@@ -15,6 +14,7 @@ in {
|
||||
user.signingkey = "~/.ssh/id_ed25519.pub";
|
||||
pull.rebase = false;
|
||||
init.defaultBranch = "master";
|
||||
core.sshCommand = "ssh -4";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -11,6 +11,14 @@
|
||||
"nm-applet"
|
||||
"blueman-applet"
|
||||
"swww-daemon"
|
||||
"swayidle -w \
|
||||
timeout 300 'hyprlock' \
|
||||
timeout 360 'hyprctl dispatch dpms off' \
|
||||
resume 'hyprctl dispatch dpms on' \
|
||||
before-sleep 'hyprlock'
|
||||
"
|
||||
"swww img $HOME/Bilder/Wallpapers/mountain.jpg"
|
||||
|
||||
];
|
||||
|
||||
env = [
|
||||
@@ -47,14 +55,13 @@
|
||||
"$mod, e, exec, emacs"
|
||||
|
||||
# Rofi launcher
|
||||
"$mod, SPACE, exec, rofi -show drun -theme ~/.config/rofi/theme.rasi"
|
||||
"$mod, SPACE, exec, rofi -show drun"
|
||||
|
||||
# Toggle fullscreen
|
||||
"$mod, M, fullscreen, 2"
|
||||
|
||||
# cycle windows
|
||||
"$mod, N, cyclenext"
|
||||
|
||||
# cycle workspaces
|
||||
"$mod, Tab, workspace, r+1"
|
||||
"$mod Shift, Tab, workspace, r-1"
|
||||
@@ -124,4 +131,6 @@
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
services.udiskie.enable = true;
|
||||
}
|
||||
|
||||
@@ -29,9 +29,18 @@
|
||||
|
||||
pkgs.nil
|
||||
|
||||
pkgs.zotero
|
||||
|
||||
(pkgs.aspellWithDicts
|
||||
(dicts: with dicts; [ de en en-computers ]))
|
||||
|
||||
# stuff for the waybar
|
||||
pkgs.nerd-fonts.jetbrains-mono
|
||||
pkgs.brightnessctl
|
||||
pkgs.bluez
|
||||
pkgs.bluetui
|
||||
pkgs.jq
|
||||
pkgs.lm_sensors
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
{config, ...}:
|
||||
|
||||
let
|
||||
fullTheme = ''
|
||||
* {
|
||||
@@ -109,7 +111,11 @@ let
|
||||
}
|
||||
'';
|
||||
in {
|
||||
programs.rofi.enable = true;
|
||||
|
||||
home.file.".config/rofi/theme.rasi".text = fullTheme;
|
||||
|
||||
|
||||
programs.rofi = {
|
||||
enable = true;
|
||||
theme = "${config.xdg.configHome}/rofi/theme.rasi";
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,44 +1,240 @@
|
||||
{ pkgs, ... }:
|
||||
let
|
||||
fullStyle = ''
|
||||
* {
|
||||
min-height: 0;
|
||||
min-width: 0;
|
||||
font-family: FiraCode;
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
window#waybar {
|
||||
transition-property: background-color;
|
||||
transition-duration: 0.5s;
|
||||
/* background-color: #1e1e2e; */
|
||||
/* background-color: #181825; */
|
||||
background-color: #11111b;
|
||||
/* background-color: rgba(24, 24, 37, 0.6); */
|
||||
}
|
||||
|
||||
#workspaces button {
|
||||
padding: 0.3rem 0.6rem;
|
||||
margin: 0.4rem 0.25rem;
|
||||
border-radius: 6px;
|
||||
/* background-color: #181825; */
|
||||
background-color: #1e1e2e;
|
||||
color: #cdd6f4;
|
||||
}
|
||||
|
||||
#workspaces button:hover {
|
||||
color: #1e1e2e;
|
||||
background-color: #cdd6f4;
|
||||
}
|
||||
|
||||
#workspaces button.active {
|
||||
background-color: #1e1e2e;
|
||||
color: #89b4fa;
|
||||
}
|
||||
|
||||
#workspaces button.urgent {
|
||||
background-color: #1e1e2e;
|
||||
color: #f38ba8;
|
||||
}
|
||||
|
||||
#clock,
|
||||
#pulseaudio,
|
||||
#custom-logo,
|
||||
#custom-power,
|
||||
#custom-spotify,
|
||||
#custom-notification,
|
||||
#cpu,
|
||||
#tray,
|
||||
#memory,
|
||||
#window,
|
||||
#mpris {
|
||||
padding: 0.3rem 0.6rem;
|
||||
margin: 0.4rem 0.25rem;
|
||||
border-radius: 6px;
|
||||
/* background-color: #181825; */
|
||||
background-color: #1e1e2e;
|
||||
}
|
||||
|
||||
#mpris.playing {
|
||||
color: #a6e3a1;
|
||||
}
|
||||
|
||||
#mpris.paused {
|
||||
color: #9399b2;
|
||||
}
|
||||
|
||||
#custom-sep {
|
||||
padding: 0px;
|
||||
color: #585b70;
|
||||
}
|
||||
|
||||
window#waybar.empty #window {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
#cpu {
|
||||
color: #94e2d5;
|
||||
}
|
||||
|
||||
#memory {
|
||||
color: #cba6f7;
|
||||
}
|
||||
|
||||
#clock {
|
||||
color: #74c7ec;
|
||||
}
|
||||
|
||||
#clock.simpleclock {
|
||||
color: #89b4fa;
|
||||
}
|
||||
|
||||
#window {
|
||||
color: #cdd6f4;
|
||||
}
|
||||
|
||||
#pulseaudio {
|
||||
color: #b4befe;
|
||||
}
|
||||
|
||||
#pulseaudio.muted {
|
||||
color: #a6adc8;
|
||||
}
|
||||
|
||||
#custom-logo {
|
||||
color: #89b4fa;
|
||||
}
|
||||
|
||||
#custom-power {
|
||||
color: #f38ba8;
|
||||
}
|
||||
|
||||
tooltip {
|
||||
background-color: #181825;
|
||||
border: 2px solid #89b4fa;
|
||||
}
|
||||
'';
|
||||
|
||||
fullConfig = ''
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
waybar networkmanagerapplet
|
||||
];
|
||||
programs.waybar = {
|
||||
catppuccin.enable = true;
|
||||
enable = true;
|
||||
systemd.enable = true; # auto-restart on crashes
|
||||
settings = {
|
||||
mainBar = {
|
||||
layer = "top";
|
||||
position = "top";
|
||||
height = 32;
|
||||
modules-left = [ "hyprland/workspaces" ];
|
||||
modules-center = [ "clock" ];
|
||||
modules-right = [
|
||||
"network"
|
||||
"pulseaudio"
|
||||
"battery"
|
||||
"tray"
|
||||
];
|
||||
|
||||
# `network` module shows SSID + signal; no need for nm-applet text
|
||||
"network" = {
|
||||
format-wifi = "{ssid} {signalStrength}%";
|
||||
format-disconnected = "";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# Start nm-applet once; Waybar's SNI tray picks it up.
|
||||
systemd.user.services."nm-applet" = {
|
||||
Unit.Description = "NetworkManager Applet";
|
||||
Service = {
|
||||
ExecStart = "${pkgs.networkmanagerapplet}/bin/nm-applet --indicator";
|
||||
Restart = "on-failure";
|
||||
};
|
||||
Install.WantedBy = [ "graphical-session.target" ];
|
||||
};
|
||||
"layer": "top",
|
||||
"position": "top",
|
||||
"height": 32,
|
||||
"spacing": 0,
|
||||
"modules-left": [
|
||||
"hyprland/workspaces",
|
||||
],
|
||||
"modules-right": [
|
||||
"pulseaudio",
|
||||
"backlight",
|
||||
"bluetooth",
|
||||
"network",
|
||||
"battery",
|
||||
"clock",
|
||||
"tray",
|
||||
"custom/reboot",
|
||||
"custom/power"
|
||||
],
|
||||
"hyprland/workspaces": {
|
||||
"disable-scroll": false,
|
||||
"all-outputs": true,
|
||||
"format": "{icon}",
|
||||
"on-click": "activate",
|
||||
"persistent-workspaces": {
|
||||
"*":[1,2,3,4]
|
||||
},
|
||||
"format-icons": {
|
||||
"1": "",
|
||||
"2": "",
|
||||
"3": "",
|
||||
"4": "",
|
||||
"default": ""
|
||||
}
|
||||
},
|
||||
"custom/reboot": {
|
||||
"format": "<span color='#FFD700'> </span>",
|
||||
"on-click": "systemctl reboot",
|
||||
"tooltip": true,
|
||||
},
|
||||
"custom/power": {
|
||||
"format": "<span color='#FF4040'> </span>",
|
||||
"on-click": "systemctl poweroff",
|
||||
"tooltip": true,
|
||||
},
|
||||
"network": {
|
||||
"format-wifi": "<span color='#00FFFF'> </span>{essid} ",
|
||||
"format-ethernet": "<span color='#7FFF00'> </span>Wired ",
|
||||
"tooltip-format": "<span color='#FF1493'> </span>{bandwidthUpBytes} <span color='#00BFFF'> </span>{bandwidthDownBytes}",
|
||||
"format-linked": "<span color='#FFA500'> </span>{ifname} (No IP) ",
|
||||
"format-disconnected": "<span color='#FF4040'> </span>Disconnected ",
|
||||
"format-alt": "<span color='#00FFFF'> </span>{signalStrength}% ",
|
||||
"interval": 1
|
||||
},
|
||||
"battery": {
|
||||
"states": {
|
||||
"warning": 30,
|
||||
"critical": 15
|
||||
},
|
||||
"format": "<span color='#28CD41'> {icon} </span>{capacity}% ",
|
||||
"format-charging": " {capacity}%",
|
||||
"interval": 1,
|
||||
"format-icons": ["", "", "", "", ""],
|
||||
"tooltip": true
|
||||
},
|
||||
"pulseaudio": {
|
||||
"format": "<span color='#00FF7F'>{icon}</span>{volume}% ",
|
||||
"format-muted": "<span color='#FF4040'> </span>0% ",
|
||||
"format-icons": {
|
||||
"headphone": "<span color='#BF00FF'> </span>",
|
||||
"hands-free": "<span color='#BF00FF'> </span>",
|
||||
"headset": "<span color='#BF00FF'> </span>",
|
||||
"phone": "<span color='#00FFFF'> </span>",
|
||||
"portable": "<span color='#00FFFF'> </span>",
|
||||
"car": "<span color='#FFA500'> </span>",
|
||||
"default": [
|
||||
"<span color='#808080'> </span>",
|
||||
"<span color='#FFFF66'> </span>",
|
||||
"<span color='#00FF7F'> </span>"
|
||||
]
|
||||
},
|
||||
"on-click-right": "pavucontrol -t 3",
|
||||
"on-click": "pactl -- set-sink-mute 0 toggle",
|
||||
},
|
||||
"clock": {
|
||||
"interval": 1,
|
||||
"timezone": "Europe/Berlin",
|
||||
"format": "<span color='#BF00FF'> </span>{:%H:%M} ",
|
||||
},
|
||||
"tray": {
|
||||
"icon-size": 17,
|
||||
"spacing": 6
|
||||
},
|
||||
"backlight": {
|
||||
"device": "intel_backlight",
|
||||
"format": "<span color='#FFD700'>{icon}</span>{percent}% ",
|
||||
"tooltip": true,
|
||||
"format-icons": [
|
||||
"<span color='#696969'> </span>",
|
||||
"<span color='#A9A9A9'> </span>",
|
||||
"<span color='#FFFF66'> </span>",
|
||||
"<span color='#FFD700'> </span>"
|
||||
]
|
||||
},
|
||||
"bluetooth": {
|
||||
"format": "<span color='#00BFFF'> </span>{status} ",
|
||||
"format-connected": "<span color='#00BFFF'> </span>{device_alias} ",
|
||||
"format-connected-battery": "<span color='#00BFFF'> </span>{device_alias}{device_battery_percentage}% ",
|
||||
"tooltip-format": "{controller_alias}\t{controller_address}\n\n{num_connections} connected",
|
||||
"tooltip-format-connected": "{controller_alias}\t{controller_address}\n\n{num_connections} connected\n\n{device_enumerate}",
|
||||
"tooltip-format-enumerate-connected": "{device_alias}\t{device_address}",
|
||||
"tooltip-format-enumerate-connected-battery": "{device_alias}\t{device_address}\t{device_battery_percentage}%"
|
||||
}
|
||||
}
|
||||
'';
|
||||
in {
|
||||
home.file.".config/waybar/style.css".text = fullStyle;
|
||||
home.file.".config/waybar/config.jsonc".text = fullConfig;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user