Configure hyprlock, work on waybar
This commit is contained in:
parent
49cfa7c50d
commit
60dae66fd1
@ -80,11 +80,13 @@
|
|||||||
|
|
||||||
zotero
|
zotero
|
||||||
xfce.mousepad
|
xfce.mousepad
|
||||||
|
tor-browser
|
||||||
|
|
||||||
## My scripts
|
## My scripts
|
||||||
pkgs.frajul.deploy-to-pianopi
|
pkgs.frajul.deploy-to-pianopi
|
||||||
pkgs.frajul.edit-config
|
pkgs.frajul.edit-config
|
||||||
pkgs.frajul.open-messaging
|
pkgs.frajul.open-messaging
|
||||||
|
pkgs.frajul.pulseaudio-popup
|
||||||
]
|
]
|
||||||
++ lib.lists.concatMap (packages-list-file: import packages-list-file { inherit pkgs; }) [
|
++ lib.lists.concatMap (packages-list-file: import packages-list-file { inherit pkgs; }) [
|
||||||
./fonts.nix
|
./fonts.nix
|
||||||
|
@ -37,52 +37,86 @@ in
|
|||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
wofi
|
wofi
|
||||||
xfce.thunar
|
xfce.thunar
|
||||||
hyprlock
|
# hyprlock
|
||||||
hyprpicker
|
# hyprpicker
|
||||||
hyprcursor
|
hyprcursor
|
||||||
];
|
];
|
||||||
|
|
||||||
|
programs.hyprlock.enable = true;
|
||||||
|
programs.hyprlock.settings = {
|
||||||
|
general = {
|
||||||
|
disable_loading_bar = true;
|
||||||
|
hide_cursor = true;
|
||||||
|
ignore_empty_input = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
background = [
|
||||||
|
{
|
||||||
|
path = "screenshot";
|
||||||
|
blur_passes = 3;
|
||||||
|
blur_size = 8;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
input-field = [
|
||||||
|
{
|
||||||
|
size = "200, 50";
|
||||||
|
position = "0, -80";
|
||||||
|
monitor = "";
|
||||||
|
dots_center = true;
|
||||||
|
fade_on_empty = false;
|
||||||
|
font_color = "rgb(202, 211, 245)";
|
||||||
|
inner_color = "rgb(91, 96, 120)";
|
||||||
|
outer_color = "rgb(24, 25, 38)";
|
||||||
|
outline_thickness = 5;
|
||||||
|
placeholder_text = "Password...";
|
||||||
|
shadow_passes = 2;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
programs.waybar = {
|
programs.waybar = {
|
||||||
enable = true;
|
enable = true;
|
||||||
systemd.enable = true;
|
systemd.enable = true;
|
||||||
style = builtins.readFile ./style-dracula.css;
|
style = builtins.readFile ./style.css;
|
||||||
settings = {
|
settings.mainBar = builtins.fromJSON (builtins.readFile ./waybar-config.json);
|
||||||
mainBar = {
|
# settings = {
|
||||||
layer = "top";
|
# mainBar = {
|
||||||
position = "bottom";
|
# layer = "top";
|
||||||
height = 30;
|
# position = "bottom";
|
||||||
output = [
|
# height = 30;
|
||||||
"eDP-1"
|
# output = [
|
||||||
"HDMI-A-1"
|
# "eDP-1"
|
||||||
];
|
# "HDMI-A-1"
|
||||||
modules-left = [
|
# ];
|
||||||
"hyprland/workspaces"
|
# modules-left = [
|
||||||
"hyprland/submap"
|
# "hyprland/workspaces"
|
||||||
];
|
# "hyprland/submap"
|
||||||
modules-center = [ "hyprland/window" ];
|
# ];
|
||||||
modules-right = [
|
# modules-center = [ "hyprland/window" ];
|
||||||
# "mpd"
|
# modules-right = [
|
||||||
# "idle_inhibitor"
|
# # "mpd"
|
||||||
"pulseaudio"
|
# # "idle_inhibitor"
|
||||||
# "network"
|
# "pulseaudio"
|
||||||
"power-profiles-daemon"
|
# # "network"
|
||||||
"cpu"
|
# "power-profiles-daemon"
|
||||||
"memory"
|
# "cpu"
|
||||||
# "temperature"
|
# "memory"
|
||||||
# "backlight"
|
# # "temperature"
|
||||||
# "keyboard-state"
|
# # "backlight"
|
||||||
"battery"
|
# # "keyboard-state"
|
||||||
# "battery#bat2"
|
# "battery"
|
||||||
"clock"
|
# # "battery#bat2"
|
||||||
"tray"
|
# "clock"
|
||||||
];
|
# "tray"
|
||||||
|
# ];
|
||||||
|
|
||||||
# "sway/workspaces" = {
|
# # "sway/workspaces" = {
|
||||||
# disable-scroll = true;
|
# # disable-scroll = true;
|
||||||
# all-outputs = true;
|
# # all-outputs = true;
|
||||||
|
# # };
|
||||||
|
# };
|
||||||
# };
|
# };
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.wlogout.enable = true; # can be configured
|
programs.wlogout.enable = true; # can be configured
|
||||||
@ -120,8 +154,8 @@ in
|
|||||||
|
|
||||||
# Look and Feel
|
# Look and Feel
|
||||||
general = {
|
general = {
|
||||||
# gaps_in = 5
|
gaps_in = 5;
|
||||||
# gaps_out = 20
|
gaps_out = 5;
|
||||||
|
|
||||||
# border_size = 2
|
# border_size = 2
|
||||||
|
|
||||||
@ -215,7 +249,7 @@ in
|
|||||||
|
|
||||||
# other commands
|
# other commands
|
||||||
"$mod, Escape, exec, wlogout -p layer-shell"
|
"$mod, Escape, exec, wlogout -p layer-shell"
|
||||||
"$mod, TAB, exec, loginctl lock-session"
|
"$mod, TAB, exec, hyprlock"
|
||||||
"$mod SHIFT, R, exec, hyprctl reload"
|
"$mod SHIFT, R, exec, hyprctl reload"
|
||||||
", Print, exec, grimblast --notify copysave area"
|
", Print, exec, grimblast --notify copysave area"
|
||||||
|
|
||||||
|
189
modules/home/hyprland/style.css
Normal file
189
modules/home/hyprland/style.css
Normal file
@ -0,0 +1,189 @@
|
|||||||
|
* {
|
||||||
|
/* `otf-font-awesome` is required to be installed for icons */
|
||||||
|
font-family: "Noto Sans CJK KR Regular";
|
||||||
|
font-size: 16px;
|
||||||
|
min-height: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
window#waybar {
|
||||||
|
background: transparent;
|
||||||
|
/* background-color: rgba(43, 48, 59, 0.5); */
|
||||||
|
/* border-bottom: 3px solid rgba(100, 114, 125, 0.5); */
|
||||||
|
color: #ffffff;
|
||||||
|
transition-property: background-color;
|
||||||
|
transition-duration: .5s;
|
||||||
|
}
|
||||||
|
|
||||||
|
window#waybar.hidden {
|
||||||
|
opacity: 0.2;
|
||||||
|
}
|
||||||
|
|
||||||
|
#waybar.empty #window {
|
||||||
|
background-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces {
|
||||||
|
}
|
||||||
|
|
||||||
|
#window {
|
||||||
|
margin: 2;
|
||||||
|
padding-left: 8;
|
||||||
|
padding-right: 8;
|
||||||
|
background-color: rgba(0,0,0,0.6);
|
||||||
|
font-size:14px;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
button {
|
||||||
|
/* Use box-shadow instead of border so the text isn't offset */
|
||||||
|
box-shadow: inset 0 -3px transparent;
|
||||||
|
/* Avoid rounded borders under each button name */
|
||||||
|
border: none;
|
||||||
|
border-radius: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* https://github.com/Alexays/Waybar/wiki/FAQ#the-workspace-buttons-have-a-strange-hover-effect */
|
||||||
|
button:hover {
|
||||||
|
background: inherit;
|
||||||
|
border-top: 2px solid #c9545d;
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button {
|
||||||
|
padding: 0 4px;
|
||||||
|
/* background-color: rgba(0,0,0,0.6); */
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button:hover {
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button.focused {
|
||||||
|
background-color: #ecf0f1;
|
||||||
|
color: #2d3436;
|
||||||
|
/* box-shadow: inset 0 -2px #c9545d; */
|
||||||
|
border-top: 2px solid #c9545d;
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button.urgent {
|
||||||
|
background-color: #eb4d4b;
|
||||||
|
}
|
||||||
|
|
||||||
|
#mode {
|
||||||
|
background-color: #64727D;
|
||||||
|
border-bottom: 3px solid #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
#clock,
|
||||||
|
#battery,
|
||||||
|
#cpu,
|
||||||
|
#memory,
|
||||||
|
#disk,
|
||||||
|
#temperature,
|
||||||
|
#backlight,
|
||||||
|
#network,
|
||||||
|
#pulseaudio,
|
||||||
|
#wireplumber,
|
||||||
|
#custom-media,
|
||||||
|
#tray,
|
||||||
|
#mode,
|
||||||
|
#idle_inhibitor,
|
||||||
|
#scratchpad,
|
||||||
|
#mpd {
|
||||||
|
margin: 2px;
|
||||||
|
padding-left: 4px;
|
||||||
|
padding-right: 4px;
|
||||||
|
background-color: rgba(0,0,0,0.6);
|
||||||
|
color: #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* If workspaces is the leftmost module, omit left margin */
|
||||||
|
.modules-left > widget:first-child > #workspaces {
|
||||||
|
margin-left: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* If workspaces is the rightmost module, omit right margin */
|
||||||
|
.modules-right > widget:last-child > #workspaces {
|
||||||
|
margin-right: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#clock {
|
||||||
|
font-size:14px;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
#battery icon {
|
||||||
|
color: red;
|
||||||
|
}
|
||||||
|
|
||||||
|
#battery.charging, #battery.plugged {
|
||||||
|
color: #ffffff;
|
||||||
|
/* background-color: #26A65B; */
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes blink {
|
||||||
|
to {
|
||||||
|
background-color: #ffffff;
|
||||||
|
color: #000000;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#battery.warning:not(.charging) {
|
||||||
|
background-color: #f53c3c;
|
||||||
|
color: #ffffff;
|
||||||
|
animation-name: blink;
|
||||||
|
animation-duration: 0.5s;
|
||||||
|
animation-timing-function: linear;
|
||||||
|
animation-iteration-count: infinite;
|
||||||
|
animation-direction: alternate;
|
||||||
|
}
|
||||||
|
|
||||||
|
#battery.critical:not(.charging) {
|
||||||
|
background-color: #f53c3c;
|
||||||
|
color: #ffffff;
|
||||||
|
animation-name: blink;
|
||||||
|
animation-duration: 0.5s;
|
||||||
|
animation-timing-function: linear;
|
||||||
|
animation-iteration-count: infinite;
|
||||||
|
animation-direction: alternate;
|
||||||
|
}
|
||||||
|
|
||||||
|
label:focus {
|
||||||
|
background-color: #000000;
|
||||||
|
}
|
||||||
|
|
||||||
|
#network.disconnected {
|
||||||
|
background-color: #f53c3c;
|
||||||
|
}
|
||||||
|
|
||||||
|
#temperature.critical {
|
||||||
|
background-color: #eb4d4b;
|
||||||
|
}
|
||||||
|
|
||||||
|
#idle_inhibitor.activated {
|
||||||
|
background-color: #ecf0f1;
|
||||||
|
color: #2d3436;
|
||||||
|
}
|
||||||
|
|
||||||
|
#tray > .passive {
|
||||||
|
-gtk-icon-effect: dim;
|
||||||
|
}
|
||||||
|
|
||||||
|
#tray > .needs-attention {
|
||||||
|
-gtk-icon-effect: highlight;
|
||||||
|
background-color: #eb4d4b;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
|
||||||
|
window#waybar.solo {
|
||||||
|
background-color: #FFFFFF;
|
||||||
|
}
|
||||||
|
|
||||||
|
window#waybar.termite {
|
||||||
|
background-color: #3F3F3F;
|
||||||
|
}
|
||||||
|
|
||||||
|
window#waybar.chromium {
|
||||||
|
background-color: #000000;
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
*/
|
50
modules/home/hyprland/waybar-config.json
Normal file
50
modules/home/hyprland/waybar-config.json
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
{
|
||||||
|
"position": "bottom",
|
||||||
|
"height": 35,
|
||||||
|
|
||||||
|
"modules-left": ["hyprland/workspaces"],
|
||||||
|
"modules-right": ["idle_inhibitor", "cpu", "memory", "pulseaudio", "battery", "clock", "tray"],
|
||||||
|
"idle_inhibitor": {
|
||||||
|
"format": "{icon}",
|
||||||
|
"format-icons": {
|
||||||
|
"activated": "",
|
||||||
|
"deactivated": ""
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"tray": {
|
||||||
|
"spacing": 10
|
||||||
|
},
|
||||||
|
"clock": {
|
||||||
|
"tooltip-format": "{calendar}",
|
||||||
|
"format": "{:%a %d.%m %H:%M:%S}",
|
||||||
|
"interval": 1
|
||||||
|
},
|
||||||
|
"cpu": {
|
||||||
|
"format": " {usage}%"
|
||||||
|
},
|
||||||
|
"memory": {
|
||||||
|
"format": " {}%"
|
||||||
|
},
|
||||||
|
"battery": {
|
||||||
|
"states": {
|
||||||
|
"good": 95,
|
||||||
|
"warning": 30,
|
||||||
|
"critical": 15
|
||||||
|
},
|
||||||
|
"format": "{icon} {capacity}% ({time})",
|
||||||
|
"format-charging": " {capacity}% ({time})",
|
||||||
|
"format-plugged": " {capacity}% ({time})",
|
||||||
|
"format-full": "{icon}",
|
||||||
|
"format-icons": ["", "", "", "", ""]
|
||||||
|
},
|
||||||
|
"pulseaudio": {
|
||||||
|
"format": "{icon} {volume}%",
|
||||||
|
"format-muted": " {format_source}",
|
||||||
|
"format-icons": {
|
||||||
|
"headphone": "",
|
||||||
|
"default": ["", "", ""]
|
||||||
|
},
|
||||||
|
"scroll-step": 5.0,
|
||||||
|
"on-click": "pulseaudio-popup"
|
||||||
|
}
|
||||||
|
}
|
43
packages/pulseaudio-popup/default.nix
Normal file
43
packages/pulseaudio-popup/default.nix
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
{
|
||||||
|
# Snowfall Lib provides a customized `lib` instance with access to your flake's library
|
||||||
|
# as well as the libraries available from your flake's inputs.
|
||||||
|
lib,
|
||||||
|
# You also have access to your flake's inputs.
|
||||||
|
inputs,
|
||||||
|
|
||||||
|
# All other arguments come from NixPkgs. You can use `pkgs` to pull packages or helpers
|
||||||
|
# programmatically or you may add the named attributes as arguments here.
|
||||||
|
pkgs,
|
||||||
|
stdenv,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
|
pkgs.writeShellApplication {
|
||||||
|
name = "pulseaudio-popup";
|
||||||
|
|
||||||
|
runtimeInputs = with pkgs; [
|
||||||
|
pavucontrol
|
||||||
|
jgmenu
|
||||||
|
];
|
||||||
|
|
||||||
|
text = ''
|
||||||
|
HDMI_SINK="alsa_output.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__hw_sofhdadsp_3__sink"
|
||||||
|
LAPTOP_SINK="alsa_output.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__hw_sofhdadsp__sink"
|
||||||
|
|
||||||
|
HDMI_ICON=$(pactl info | grep -q $HDMI_SINK && echo "checkbox")
|
||||||
|
LAPTOP_ICON=$(pactl info | grep -q $LAPTOP_SINK && echo "checkbox")
|
||||||
|
|
||||||
|
HDMI_VOLUME=$(pactl get-sink-volume $HDMI_SINK | head -n 1 | awk '{print $5}')
|
||||||
|
LAPTOP_VOLUME=$(pactl get-sink-volume $LAPTOP_SINK | head -n 1 | awk '{print $5}')
|
||||||
|
|
||||||
|
read -r -d "" CONF <<EOF
|
||||||
|
Open Pavucontrol,pavucontrol,pavucontrol
|
||||||
|
|
||||||
|
^sep()
|
||||||
|
HDMI - $HDMI_VOLUME,pactl set-default-sink $HDMI_SINK,$HDMI_ICON
|
||||||
|
Laptop - $LAPTOP_VOLUME,pactl set-default-sink $LAPTOP_SINK,$LAPTOP_ICON
|
||||||
|
EOF
|
||||||
|
|
||||||
|
echo "$CONF" | jgmenu --simple
|
||||||
|
'';
|
||||||
|
}
|
@ -105,6 +105,7 @@
|
|||||||
# Enable the XFCE Desktop Environment.
|
# Enable the XFCE Desktop Environment.
|
||||||
services.xserver.displayManager.gdm.enable = true;
|
services.xserver.displayManager.gdm.enable = true;
|
||||||
security.pam.services.gdm.enableGnomeKeyring = true;
|
security.pam.services.gdm.enableGnomeKeyring = true;
|
||||||
|
|
||||||
# services.displayManager.sddm.wayland.enable = true;
|
# services.displayManager.sddm.wayland.enable = true;
|
||||||
# services.xserver.desktopManager = {
|
# services.xserver.desktopManager = {
|
||||||
# xterm.enable = false;
|
# xterm.enable = false;
|
||||||
@ -136,6 +137,22 @@
|
|||||||
hardware.pulseaudio.enable = false;
|
hardware.pulseaudio.enable = false;
|
||||||
security.polkit.enable = true;
|
security.polkit.enable = true;
|
||||||
|
|
||||||
|
systemd = {
|
||||||
|
user.services.polkit-gnome-authentication-agent-1 = {
|
||||||
|
description = "polkit-gnome-authentication-agent-1";
|
||||||
|
wantedBy = [ "graphical-session.target" ];
|
||||||
|
wants = [ "graphical-session.target" ];
|
||||||
|
after = [ "graphical-session.target" ];
|
||||||
|
serviceConfig = {
|
||||||
|
Type = "simple";
|
||||||
|
ExecStart = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1";
|
||||||
|
Restart = "on-failure";
|
||||||
|
RestartSec = 1;
|
||||||
|
TimeoutStopSec = 10;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
security.pam.services.hyprlock = { };
|
security.pam.services.hyprlock = { };
|
||||||
|
|
||||||
# Sound
|
# Sound
|
||||||
@ -248,6 +265,7 @@
|
|||||||
vim
|
vim
|
||||||
htop
|
htop
|
||||||
mc
|
mc
|
||||||
|
xorg.xhost
|
||||||
];
|
];
|
||||||
|
|
||||||
virtualisation.docker.enable = true;
|
virtualisation.docker.enable = true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user