waybar config is now in nix file
This commit is contained in:
@ -22,6 +22,7 @@ monitor=HDMI-A-1, 1920x1080@60, auto, auto
|
||||
exec-once = swaybg -i ~/.config/nitrogen/wallpaper.png&
|
||||
exec-once = (sleep 2;activate-linux -c 1-1-1-0.7 -V 50 -H 50 -d)&
|
||||
exec-once = waybar&
|
||||
exec-once = alacritty&
|
||||
|
||||
###################
|
||||
### MY PROGRAMS ###
|
||||
|
@ -1,103 +0,0 @@
|
||||
{
|
||||
"layer": "top",
|
||||
"position": "top",
|
||||
"height": 24,
|
||||
// "width": 1366,
|
||||
// Choose the order of the modules
|
||||
"margin-left":5,
|
||||
"margin-right":5,
|
||||
"modules-left": ["hyprland/workspaces", "custom/music"],
|
||||
"modules-center": ["hyprland/window"],
|
||||
"modules-right": ["custom/fans", "custom/dgpu", "disk", "pulseaudio", "network", "cpu", "temperature", "custom/pipe", "memory", "battery", "clock"],
|
||||
|
||||
"hyprland/workspaces": {
|
||||
"disable-scroll": true,
|
||||
"all-outputs": false,
|
||||
"format": "{id}"
|
||||
},
|
||||
|
||||
"clock": { "interval" : 1,
|
||||
"format-alt": " {:%Y-%m-%d}",
|
||||
"format" : " {:%H:%M:%S}"
|
||||
},
|
||||
|
||||
"cpu": {
|
||||
"format": " {usage}% |",
|
||||
"interval":5
|
||||
},
|
||||
|
||||
"memory": {
|
||||
"format": " {}% |",
|
||||
"interval":5
|
||||
},
|
||||
|
||||
"battery": {
|
||||
"bat": "BAT0",
|
||||
"states": {
|
||||
"good": 79,
|
||||
"warning": 30,
|
||||
"critical": 15
|
||||
},
|
||||
"format-time": " {H}:{m}",
|
||||
"format": " {icon} {capacity}%{time} |",
|
||||
// "format-good": "", // An empty format will hide the module
|
||||
// "format-full": "",
|
||||
"format-icons": [" ", " ", " ", " ", " "],
|
||||
"interval":10
|
||||
},
|
||||
"network": {
|
||||
// "interface": "wlp2s0", // (Optional) To force the use of this interface
|
||||
"format-wifi": " {icon} {essid} |",
|
||||
"format-ethernet": " {ifname}: {ipaddr}/{cidr} |",
|
||||
"format-disconnected": " ⚠ Disconnected |",
|
||||
"format-icons":[" ", " ", " ", " "]
|
||||
},
|
||||
"pulseaudio": {
|
||||
//"scroll-step": 1,
|
||||
"format": " {icon}{volume}% |",
|
||||
"format-bluetooth": " {icon} {volume}% |",
|
||||
"format-muted": "",
|
||||
"format-icons": {
|
||||
"headphones": " ",
|
||||
"handsfree": " ",
|
||||
"headset": " ",
|
||||
"phone": " ",
|
||||
"portable": " ",
|
||||
"car": " ",
|
||||
"default": [" ", " ", " "]
|
||||
},
|
||||
"on-click": "pavucontrol"
|
||||
},
|
||||
"temperature":{
|
||||
"thermal-zone":0,
|
||||
"critical-threshold":80,
|
||||
"interval":5,
|
||||
"format":" {icon} {temperatureC}°C ",
|
||||
"format-icons": ["", "", "", "", ""]
|
||||
},
|
||||
"disk":{
|
||||
"format":" {percentage_used}% |"
|
||||
},
|
||||
"custom/pipe":{
|
||||
"format":"|"
|
||||
},
|
||||
|
||||
"custom/music":{
|
||||
"exec-if" : "playerctl metadata 2>&1 >/dev/null",
|
||||
"exec" : "playerctl metadata --format ' {{ artist }} - {{title}}'",
|
||||
"interval" : 1,
|
||||
"interval-if" : 5
|
||||
},
|
||||
"custom/dgpu":{
|
||||
"exec-if" : "test \"$(supergfxctl -g)\" = \"Hybrid\"",
|
||||
"exec" : "echo \" on |\"",
|
||||
"interval-if" : 10,
|
||||
"interval":100
|
||||
},
|
||||
"custom/fans":{
|
||||
"exec-if" : "test \"$(cat /sys/class/hwmon/hwmon6/fan1_input)\" -gt 0 -o \"$(cat /sys/class/hwmon/hwmon6/fan2_input)\" -gt 0",
|
||||
"exec" : "echo \" \" \"$(cat /sys/class/hwmon/hwmon6/fan1_input).$(cat /sys/class/hwmon/hwmon6/fan2_input) |\"",
|
||||
"interval" : 1,
|
||||
"interval-if" : 1
|
||||
}
|
||||
}
|
@ -1,80 +0,0 @@
|
||||
* {
|
||||
border: none;
|
||||
border-radius: 0;
|
||||
font-family: "Iosevka Nerd Font";
|
||||
font-size: 15px;
|
||||
min-height: 0;
|
||||
}
|
||||
|
||||
window#waybar {
|
||||
background: transparent;
|
||||
color: white;
|
||||
}
|
||||
|
||||
#window {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
#workspaces button {
|
||||
padding: 0 5px;
|
||||
background: transparent;
|
||||
color: white;
|
||||
border-top: 2px solid transparent;
|
||||
}
|
||||
|
||||
#workspaces button.focused {
|
||||
color: #c9545d;
|
||||
border-top: 2px solid #c9545d;
|
||||
}
|
||||
|
||||
#mode {
|
||||
background: #64727D;
|
||||
border-bottom: 3px solid white;
|
||||
}
|
||||
|
||||
#clock {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
#battery {
|
||||
}
|
||||
|
||||
#battery icon {
|
||||
color: red;
|
||||
}
|
||||
|
||||
#battery.charging {
|
||||
}
|
||||
|
||||
@keyframes blink {
|
||||
to {
|
||||
background-color: #ffffff;
|
||||
color: black;
|
||||
}
|
||||
}
|
||||
|
||||
#battery.warning:not(.charging) {
|
||||
color: white;
|
||||
animation-name: blink;
|
||||
animation-duration: 0.5s;
|
||||
animation-timing-function: linear;
|
||||
animation-iteration-count: infinite;
|
||||
animation-direction: alternate;
|
||||
}
|
||||
|
||||
#cpu {
|
||||
}
|
||||
|
||||
#memory {
|
||||
}
|
||||
|
||||
#network {
|
||||
}
|
||||
#network.disconnected {
|
||||
color: #f53c3c;
|
||||
font-weight:bold;
|
||||
}
|
||||
|
||||
#temperature.critical {
|
||||
color: #ff2222;
|
||||
}
|
9
home.nix
9
home.nix
@ -6,7 +6,7 @@
|
||||
# By: tomoron <tomoron@student.42angouleme.fr> +#+ +:+ +#+ #
|
||||
# +#+#+#+#+#+ +#+ #
|
||||
# Created: 2024/10/17 18:15:38 by tomoron #+# #+# #
|
||||
# Updated: 2024/10/24 15:53:56 by tomoron ### ########.fr #
|
||||
# Updated: 2024/10/24 16:41:05 by tomoron ### ########.fr #
|
||||
# #
|
||||
# **************************************************************************** #
|
||||
|
||||
@ -19,6 +19,8 @@
|
||||
modules/alacritty.nix
|
||||
modules/vim.nix
|
||||
modules/firefox.nix
|
||||
modules/hyprland.nix
|
||||
modules/waybar.nix
|
||||
];
|
||||
|
||||
home.username = "${username}";
|
||||
@ -41,7 +43,6 @@
|
||||
discord
|
||||
google-chrome
|
||||
wofi
|
||||
waybar
|
||||
brightnessctl
|
||||
playerctl
|
||||
swaybg
|
||||
@ -52,8 +53,8 @@
|
||||
".config/bspwm/bspwmrc".source = dotfiles/config/bspwm/bspwmrc;
|
||||
".config/hypr/hyprland.conf".source = dotfiles/config/hypr/hyprland.conf;
|
||||
".config/hypr/hyprlock.conf".source = dotfiles/config/hypr/hyprlock.conf;
|
||||
".config/waybar/config".source = dotfiles/config/waybar/config;
|
||||
".config/waybar/style.css".source = dotfiles/config/waybar/style.css;
|
||||
# ".config/waybar/config".source = dotfiles/config/waybar/config;
|
||||
# ".config/waybar/style.css".source = dotfiles/config/waybar/style.css;
|
||||
".config/sxhkd".source = lib.mkDefault dotfiles/config/sxhkd;
|
||||
".config/polybar".source = dotfiles/config/polybar;
|
||||
".config/nitrogen/wallpaper.png".source = lib.mkDefault dotfiles/config/nitrogen/wallpaper.png;
|
||||
|
5
modules/hyprland.nix
Normal file
5
modules/hyprland.nix
Normal file
@ -0,0 +1,5 @@
|
||||
{ config, lib, pkgs, username,homeDir, ... }:
|
||||
|
||||
{
|
||||
|
||||
}
|
159
modules/waybar.nix
Normal file
159
modules/waybar.nix
Normal file
@ -0,0 +1,159 @@
|
||||
{ config, lib, pkgs, username,homeDir, ... }:
|
||||
|
||||
{
|
||||
programs.waybar.enable = true;
|
||||
programs.waybar.style = ''
|
||||
* {
|
||||
border: none;
|
||||
border-radius: 0;
|
||||
font-family: "Iosevka Nerd Font";
|
||||
font-size: 15px;
|
||||
min-height: 0;
|
||||
}
|
||||
|
||||
window#waybar {
|
||||
background: transparent;
|
||||
color: white;
|
||||
}
|
||||
|
||||
#window {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
#workspaces button {
|
||||
padding: 0 5px;
|
||||
background: transparent;
|
||||
color: white;
|
||||
border-top: 2px solid transparent;
|
||||
}
|
||||
|
||||
#workspaces button.focused {
|
||||
color: #c9545d;
|
||||
border-top: 2px solid #c9545d;
|
||||
}
|
||||
|
||||
#workspaces button.active {
|
||||
color : #88ff88;
|
||||
background-color : rgba(220,255, 220, 0.3)
|
||||
}
|
||||
|
||||
#mode {
|
||||
background: #64727D;
|
||||
border-bottom: 3px solid white;
|
||||
}
|
||||
|
||||
#network.disconnected {
|
||||
color: #f53c3c;
|
||||
font-weight:bold;
|
||||
}
|
||||
|
||||
#temperature.critical {
|
||||
color: #ff2222;
|
||||
}
|
||||
'';
|
||||
|
||||
programs.waybar.settings.mainBar = {
|
||||
layer = "top";
|
||||
position ="top";
|
||||
height = 24;
|
||||
margin-left = 5;
|
||||
margin-right = 5;
|
||||
modules-left = ["hyprland/workspaces" "custom/music"];
|
||||
modules-center = ["hyprland/window"];
|
||||
modules-right = ["custom/fans" "custom/dgpu" "disk" "pulseaudio" "network" "cpu" "temperature" "custom/pipe" "memory" "battery" "clock"];
|
||||
|
||||
"hyprland/workspaces" = {
|
||||
disable-scroll = true;
|
||||
all-outputs = false;
|
||||
format = "{id}";
|
||||
};
|
||||
|
||||
clock = {
|
||||
interval = 1;
|
||||
format-alt = " {:%Y-%m-%d}";
|
||||
format = " {:%H:%M:%S}";
|
||||
};
|
||||
|
||||
cpu = {
|
||||
format = " {usage}% |";
|
||||
interval = 5;
|
||||
};
|
||||
|
||||
memory = {
|
||||
format = " {}% |";
|
||||
interval = 5;
|
||||
};
|
||||
|
||||
battery = {
|
||||
bat = "BAT0";
|
||||
states = {
|
||||
good = 79;
|
||||
warning = 30;
|
||||
critical = 15;
|
||||
};
|
||||
format-time = " {H}:{m}";
|
||||
format = " {icon} {capacity}%{time} |";
|
||||
format-icons = [" " " " " " " " " "];
|
||||
interval = 10;
|
||||
};
|
||||
|
||||
network = {
|
||||
format-wifi = " {icon} {essid} |";
|
||||
format-ethernet = " {ifname}: {ipaddr}/{cidr} |";
|
||||
format-disconnected = " ⚠ Disconnected |";
|
||||
format-icons =[" " " " " " " "];
|
||||
};
|
||||
|
||||
pulseaudio = {
|
||||
format = " {icon}{volume}% |";
|
||||
format-bluetooth = " {icon} {volume}% |";
|
||||
format-muted = "";
|
||||
format-icons = {
|
||||
headphones = " ";
|
||||
handsfree = " ";
|
||||
headset = " ";
|
||||
phone = " ";
|
||||
portable = " ";
|
||||
car = " ";
|
||||
default = [" " " " " "];
|
||||
};
|
||||
on-click = "pavucontrol";
|
||||
};
|
||||
|
||||
temperature = {
|
||||
thermal-zone = 0;
|
||||
critical-threshold = 80;
|
||||
interval = 5;
|
||||
format =" {icon} {temperatureC}°C ";
|
||||
format-icons = ["" "" "" "" ""];
|
||||
};
|
||||
|
||||
disk = {
|
||||
format =" {percentage_used}% |";
|
||||
};
|
||||
"custom/pipe" = {
|
||||
format = "|";
|
||||
};
|
||||
|
||||
"custom/music" = {
|
||||
exec-if = "playerctl metadata 2>&1 >/dev/null";
|
||||
exec = "playerctl metadata --format ' {{ artist }} - {{title}}'";
|
||||
interval = 1;
|
||||
interval-if = 5;
|
||||
};
|
||||
|
||||
"custom/dgpu" = {
|
||||
exec-if = "test \"$(supergfxctl -g)\" = \"Hybrid\"";
|
||||
exec = "echo \" on |\"";
|
||||
interval-if = 10;
|
||||
interval =100;
|
||||
};
|
||||
|
||||
"custom/fans" = {
|
||||
exec-if = "test \"$(cat /sys/class/hwmon/hwmon6/fan1_input)\" -gt 0 -o \"$(cat /sys/class/hwmon/hwmon6/fan2_input)\" -gt 0";
|
||||
exec = "echo \" \" \"$(cat /sys/class/hwmon/hwmon6/fan1_input).$(cat /sys/class/hwmon/hwmon6/fan2_input) |\"";
|
||||
interval = 1;
|
||||
interval-if = 1;
|
||||
};
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user