polybar and related programms
This commit is contained in:
parent
c63a896abf
commit
d83931025b
5 changed files with 244 additions and 3 deletions
|
|
@ -17,7 +17,7 @@
|
|||
};
|
||||
};
|
||||
|
||||
boot.initrd.kernelModules = [ "amdgpu" ];
|
||||
boot.initrd.kernelModules = [ "amdgpu" "coretemp"];
|
||||
|
||||
services.hardware.bolt.enable = true;
|
||||
|
||||
|
|
@ -55,7 +55,7 @@
|
|||
|
||||
displayManager = {
|
||||
setupCommands = ''
|
||||
${pkgs.xorg.xrandr}/bin/xrandr --output eDP-1 --mode 3840x2160;
|
||||
${pkgs.xorg.xrandr}/bin/xrandr --output eDP-1 --dpi 240 --mode 3840x2160;
|
||||
'';
|
||||
};
|
||||
|
||||
|
|
@ -107,6 +107,14 @@
|
|||
# Allow unfree packages
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
nixpkgs.config = {
|
||||
packageOverrides = pkgs: rec {
|
||||
polybar = pkgs.polybar.override {
|
||||
i3Support = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# systemwide packages
|
||||
environment.systemPackages = with pkgs; [
|
||||
vim
|
||||
|
|
|
|||
6
home.nix
6
home.nix
|
|
@ -28,6 +28,8 @@ in
|
|||
./programm_configs/zsh.nix
|
||||
./programm_configs/gnome.nix
|
||||
./programm_configs/autorandr.nix
|
||||
./programm_configs/polybar/polybar.nix
|
||||
./programm_configs/redshift.nix
|
||||
];
|
||||
|
||||
# The home.packages option allows you to install Nix packages into your
|
||||
|
|
@ -44,12 +46,14 @@ in
|
|||
arandr
|
||||
thunderbird
|
||||
signal-desktop
|
||||
redshift
|
||||
nextcloud-client
|
||||
nixpkgs-fmt
|
||||
powerline-fonts
|
||||
font-manager
|
||||
];
|
||||
|
||||
fonts.fontconfig.enable = true;
|
||||
|
||||
# dotfiles
|
||||
home.file = {
|
||||
rofitheme = {
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ in
|
|||
xsession.windowManager.i3 = {
|
||||
enable = true;
|
||||
config = {
|
||||
bars = [ ];
|
||||
modifier = mod;
|
||||
fonts = {
|
||||
names = [ "DejaVu Sans Mono" "FontAwesome 6" ];
|
||||
|
|
@ -28,6 +29,25 @@ in
|
|||
# Terminal
|
||||
"${mod}+Return" = "exec alacritty";
|
||||
};
|
||||
|
||||
|
||||
startup = [
|
||||
{
|
||||
command = "systemctl --user restart polybar";
|
||||
always = true;
|
||||
notification = false;
|
||||
}
|
||||
{
|
||||
command = "nextcloud";
|
||||
always = true;
|
||||
notification = false;
|
||||
}
|
||||
{
|
||||
command = "systemcrl --user restart redshift";
|
||||
always = true;
|
||||
notification = false;
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
extraConfig = "floating_modifier ${mod}\n
|
||||
|
|
|
|||
199
programm_configs/polybar/polybar.nix
Normal file
199
programm_configs/polybar/polybar.nix
Normal file
|
|
@ -0,0 +1,199 @@
|
|||
{ pkgs, ... }:
|
||||
let
|
||||
colors = {
|
||||
background = "#222";
|
||||
background-alt = "#444";
|
||||
foreground = "#dfdfdf";
|
||||
foreground-alt = "#555";
|
||||
primary = "#ffb52a";
|
||||
secondary = "#e60053";
|
||||
alert = "#bd2c40";
|
||||
accent = "#ffbb00";
|
||||
};
|
||||
in
|
||||
{
|
||||
services.polybar = {
|
||||
|
||||
enable = true;
|
||||
script = "polybar main &";
|
||||
config = {
|
||||
"bar/main" = {
|
||||
dpi = 100;
|
||||
width = "100%";
|
||||
height = 30;
|
||||
offset-x = "1%";
|
||||
offset-y = "1%";
|
||||
radius = "10.0";
|
||||
fixed-center = false;
|
||||
background = colors.background;
|
||||
foreground = colors.foreground;
|
||||
underline-size = 3;
|
||||
underline-color = "#f00";
|
||||
border-size = 4;
|
||||
padding-left = 0;
|
||||
padding-right = 2;
|
||||
module-margin-left = 1;
|
||||
module-margin-right = 2;
|
||||
border-top-size = 4;
|
||||
|
||||
font-0 = "DejaVu Sans Mono:style=Book:size=10";
|
||||
font-1 = "Siji:style=Regular";
|
||||
|
||||
modules-left = "i3";
|
||||
modules-right = "filesystem pulseaudio memory cpu wlan eth battery temperature date tray";
|
||||
wm-restack = "i3";
|
||||
|
||||
cursor-click = "pointer";
|
||||
cursor-scroll = "ns-resize";
|
||||
|
||||
};
|
||||
|
||||
"module/cpu" = {
|
||||
type = "internal/cpu";
|
||||
interval = 2;
|
||||
format-prefix = "CPU ";
|
||||
format-prefix-foreground = colors.foreground-alt;
|
||||
format-underline = "#f90000";
|
||||
label = "%percentage:2%%";
|
||||
};
|
||||
|
||||
"module/filesystem" = {
|
||||
type = "internal/fs";
|
||||
interval = 25;
|
||||
|
||||
mount-0 = "/";
|
||||
|
||||
label-mounted = "%{F#0a81f5}%mountpoint%%{F-}: %percentage_used%%";
|
||||
label-unmounted = "%mountpoint% not mounted";
|
||||
format-mounted-background = colors.background;
|
||||
};
|
||||
|
||||
"module/eth" = {
|
||||
type = "internal/network";
|
||||
interface = "enp12s0";
|
||||
interval = "3.0";
|
||||
interface-type = "wired";
|
||||
|
||||
format-connected-underline = "#55aa55";
|
||||
format-connected-prefix-foreground = colors.foreground-alt;
|
||||
label-connected = "%local_ip%";
|
||||
|
||||
format-disconnected = "<label-disconnected>";
|
||||
label-disconnected = "%ifname% disconnected";
|
||||
format-disconnected-underline = "#2f5e2f";
|
||||
|
||||
};
|
||||
|
||||
"module/date" = {
|
||||
type = "internal/date";
|
||||
interval = "5";
|
||||
|
||||
date = "";
|
||||
date-alt = "%d.%m.%Y";
|
||||
|
||||
time = "%H:%M";
|
||||
time-alt = "%H:%M:%S";
|
||||
|
||||
format-prefix-foreground = colors.foreground-alt;
|
||||
format-underline = "#0a6cf5";
|
||||
|
||||
label = "%date% %time%";
|
||||
};
|
||||
|
||||
|
||||
"module/i3" = {
|
||||
type = "internal/i3";
|
||||
format = "<label-state> <label-mode>";
|
||||
index-sort = true;
|
||||
wrapping-scroll = false;
|
||||
|
||||
label-mode-padding = 2;
|
||||
label-mode-foreground = "#000";
|
||||
label-mode-background = colors.primary;
|
||||
|
||||
#focused = Active workspace on focused monitor
|
||||
label-focused = "%index%";
|
||||
label-focused-background = colors.background-alt;
|
||||
label-focused-underline = colors.primary;
|
||||
label-focused-padding = 2;
|
||||
|
||||
#unfocused = Inactive workspace on any monitor
|
||||
label-unfocused = "%index%";
|
||||
label-unfocused-padding = 2;
|
||||
|
||||
#visible = Active workspace on unfocused monitor
|
||||
label-visible = "%index%";
|
||||
label-visible-background = colors.background-alt;
|
||||
label-visible-underline = colors.primary;
|
||||
label-visible-padding = 2;
|
||||
|
||||
#urgent = Workspace with urgency hint set
|
||||
label-urgent = "%index%";
|
||||
label-urgent-background = colors.alert;
|
||||
label-urgent-padding = 2;
|
||||
};
|
||||
|
||||
"module/tray" = {
|
||||
type = "internal/tray";
|
||||
tray-spacing = 6;
|
||||
};
|
||||
"module/battery" = {
|
||||
type = "internal/battery";
|
||||
battery = "BAT0";
|
||||
adapter = "AC";
|
||||
full-at = 94;
|
||||
|
||||
format-charging = "<animation-charging> <label-charging>";
|
||||
format-charging-underline = "#ffb52a";
|
||||
|
||||
format-discharging = "<animation-discharging> <label-discharging>";
|
||||
format-discharging-underline = "#ffb52a";
|
||||
|
||||
|
||||
animation-charging-0 = "|– |";
|
||||
animation-charging-1 = "|–– |";
|
||||
animation-charging-2 = "|–––|";
|
||||
animation-charging-foreground = colors.foreground-alt;
|
||||
animation-charging-framerate = 750;
|
||||
|
||||
animation-discharging-0 = "|–––|";
|
||||
animation-discharging-1 = "|–– |";
|
||||
animation-discharging-2 = "|– |";
|
||||
animation-discharging-foreground = colors.foreground-alt;
|
||||
animation-discharging-framerate = 750;
|
||||
};
|
||||
|
||||
"module/temperature" = {
|
||||
type = "internal/temperature";
|
||||
thermal-zone = 0;
|
||||
warn-temperature = 70;
|
||||
|
||||
format = "<label>";
|
||||
format-underline = "#f50a4d";
|
||||
format-warn = "<label-warn>";
|
||||
format-warn-underline = "#f50a4d";
|
||||
|
||||
label = "%temperature-c%";
|
||||
label-warn = "%temperature-c%";
|
||||
label-warn-foreground = colors.secondary;
|
||||
ramp-foreground = colors.foreground-alt;
|
||||
|
||||
hwmon-path = "/sys/devices/platform/coretemp.0/hwmon/hwmon1/temp1_input";
|
||||
};
|
||||
"module/wlan" = {
|
||||
type = "internal/network";
|
||||
interface = "wlp82s0";
|
||||
interval = "3.0";
|
||||
|
||||
format-connected = "<label-connected>";
|
||||
format-connected-underline = "#9f78e1";
|
||||
label-connected = "%essid%";
|
||||
|
||||
format-disconnected = "<label-disconnected>";
|
||||
format-disconnected-underline = "#473666";
|
||||
label-disconnected = "%ifname% disconnected";
|
||||
label-disconnected-foreground = colors.foreground-alt;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
10
programm_configs/redshift.nix
Normal file
10
programm_configs/redshift.nix
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
services.redshift = {
|
||||
enable = true;
|
||||
tray = true;
|
||||
latitude = 49.01;
|
||||
longitude = 8.4;
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue