Rice laptop
This commit is contained in:
19
home/hyprland/hypridle.conf
Normal file
19
home/hyprland/hypridle.conf
Normal file
@@ -0,0 +1,19 @@
|
||||
general {
|
||||
lock_cmd = hyprlock # dbus/sysd lock command (loginctl lock-session)
|
||||
# unlock_cmd = notify-send "unlock!" # same as above, but unlock
|
||||
before_sleep_cmd = hyprlock # command ran before sleep
|
||||
# after_sleep_cmd = # command ran after sleep
|
||||
ignore_dbus_inhibit = false # whether to ignore dbus-sent idle-inhibit requests (used by e.g. firefox or steam)
|
||||
}
|
||||
|
||||
listener {
|
||||
timeout = 240 # in seconds
|
||||
on-timeout = hyprlock # command to run when timeout has passed
|
||||
# on-resume = notify-send "Welcome back!" # command to run when activity is detected after timeout has fired.
|
||||
}
|
||||
|
||||
listener {
|
||||
timeout = 900
|
||||
on-timeout = systemctl suspend # command to run when timeout has passed
|
||||
# on-resume = notify-send "Welcome back!" # command to run when activity is detected after timeout has fired.
|
||||
}
|
12
home/hyprland/hypridle.nix
Normal file
12
home/hyprland/hypridle.nix
Normal file
@@ -0,0 +1,12 @@
|
||||
{ config, pkgs, ... }: {
|
||||
|
||||
home.packages = with pkgs; [
|
||||
unstable.hypridle
|
||||
];
|
||||
xdg.configFile = {
|
||||
"hypr/hypridle.conf" = {
|
||||
source = config.lib.file.mkOutOfStoreSymlink ./. + "/hypridle.conf";
|
||||
target = "hypr/hypridle.conf";
|
||||
};
|
||||
};
|
||||
}
|
@@ -1,4 +1,8 @@
|
||||
{ inputs, pkgs, lib, config, ... }: {
|
||||
imports = [
|
||||
./hyprlock.nix
|
||||
./hypridle.nix
|
||||
];
|
||||
options.hyprland.enable = lib.mkEnableOption "Hyprland";
|
||||
config = {
|
||||
home.packages = with pkgs; [
|
||||
@@ -104,6 +108,9 @@
|
||||
"$mainMod,D,exec,rofi-launcher"
|
||||
"$mainMod,P,exec,rofi-rbw"
|
||||
|
||||
# hyprlock
|
||||
"$shiftMainMod,l,exec,hyprlock"
|
||||
|
||||
# hyprland
|
||||
"$mainMod,Q,killactive,"
|
||||
"CTRLALT,Delete,exit,"
|
||||
@@ -129,11 +136,11 @@
|
||||
# ",code:202,exec,mumble rpc starttalking"
|
||||
#",code:202,pass,^(info\.mumble\.Mumble)$"
|
||||
# ",code:202,exec,pamixer --default-source -u"
|
||||
",code:202,pass,^discord$"
|
||||
# ",code:202,pass,^discord$"
|
||||
|
||||
# worspace switching
|
||||
"$mainMod,1,workspace,name:main 1"
|
||||
"$mainMod,2,workspace,name:main 2"
|
||||
"$mainMod,1,workspace,1"
|
||||
"$mainMod,2,workspace,2"
|
||||
"$mainMod,3,workspace,3"
|
||||
"$mainMod,4,workspace,4"
|
||||
"$mainMod,5,workspace,5"
|
||||
@@ -143,7 +150,7 @@
|
||||
exec-once = [
|
||||
"waybar"
|
||||
"hyprpaper & sleep 2 && randomwp"
|
||||
"easyeffects --gapplication-service"
|
||||
"hypridle"
|
||||
# "dunst"
|
||||
];
|
||||
};
|
||||
|
78
home/hyprland/hyprlock.conf
Normal file
78
home/hyprland/hyprlock.conf
Normal file
@@ -0,0 +1,78 @@
|
||||
source = ~/.cache/wal/colors-hyprland.conf
|
||||
# BACKGROUND
|
||||
background {
|
||||
monitor =
|
||||
path = ~/wallpapers/current
|
||||
blur_passes = 3
|
||||
contrast = 0.8916
|
||||
brightness = 0.8172
|
||||
vibrancy = 0.1696
|
||||
vibrancy_darkness = 0.0
|
||||
}
|
||||
|
||||
# GENERAL
|
||||
general {
|
||||
no_fade_in = false
|
||||
grace = 0
|
||||
disable_loading_bar = true
|
||||
}
|
||||
|
||||
# INPUT FIELD
|
||||
input-field {
|
||||
monitor =
|
||||
size = 250, 60
|
||||
outline_thickness = 2
|
||||
dots_size = 0.2 # Scale of input-field height, 0.2 - 0.8
|
||||
dots_spacing = 0.2 # Scale of dots' absolute size, 0.0 - 1.0
|
||||
dots_center = true
|
||||
outer_color = rgba(0, 0, 0, 0)
|
||||
inner_color = rgba(0, 0, 0, 0.5)
|
||||
font_color = rgb(200, 200, 200)
|
||||
fade_on_empty = false
|
||||
font_family = JetBrains Mono Nerd Font Mono
|
||||
placeholder_text = <i><span foreground="##cdd6f4">Input Password...</span></i>
|
||||
hide_input = false
|
||||
position = 0, -120
|
||||
halign = center
|
||||
valign = center
|
||||
}
|
||||
|
||||
# TIME
|
||||
label {
|
||||
monitor =
|
||||
text = cmd[update:1000] echo "$(date +"%b %d %H:%M")"
|
||||
color = $foreground
|
||||
#color = rgba(255, 255, 255, 0.6)
|
||||
font_size = 120
|
||||
font_family = JetBrains Mono Nerd Font Mono ExtraBold
|
||||
position = 0, -300
|
||||
halign = center
|
||||
valign = top
|
||||
}
|
||||
|
||||
## USER
|
||||
#label {
|
||||
# monitor =
|
||||
# text = Hi there, $USER
|
||||
# color = $foreground
|
||||
# #color = rgba(255, 255, 255, 0.6)
|
||||
# font_size = 25
|
||||
# font_family = JetBrains Mono Nerd Font Mono
|
||||
# position = 0, -40
|
||||
# halign = center
|
||||
# valign = center
|
||||
#}
|
||||
|
||||
# Battery level
|
||||
label {
|
||||
monitor =
|
||||
text = cmd[update:1000] echo "$(batlvl)"
|
||||
color = $foreground
|
||||
#color = rgba(255, 255, 255, 0.6)
|
||||
font_size = 18
|
||||
# font_family = JetBrainsMono, Font Awesome 6 Free Solid
|
||||
font_family = JetBrains Mono Nerd Font Mono
|
||||
position = 0, -50
|
||||
halign = center
|
||||
valign = bottom
|
||||
}
|
12
home/hyprland/hyprlock.nix
Normal file
12
home/hyprland/hyprlock.nix
Normal file
@@ -0,0 +1,12 @@
|
||||
{ config, pkgs, ... }: {
|
||||
|
||||
home.packages = with pkgs; [
|
||||
unstable.hyprlock
|
||||
];
|
||||
xdg.configFile = {
|
||||
"hypr/hyprlock.conf" = {
|
||||
source = config.lib.file.mkOutOfStoreSymlink ./. + "/hyprlock.conf";
|
||||
target = "hypr/hyprlock.conf";
|
||||
};
|
||||
};
|
||||
}
|
@@ -1,4 +1,15 @@
|
||||
{ pkgs, lib, ... }: {
|
||||
{ pkgs, lib, ... }:
|
||||
let
|
||||
flakestat = pkgs.writeShellApplication {
|
||||
name = "flakestat";
|
||||
runtimeInputs = with pkgs; [
|
||||
git
|
||||
jq
|
||||
];
|
||||
text = builtins.readFile ./flakestat.sh;
|
||||
};
|
||||
in
|
||||
{
|
||||
xdg.configFile."waybar/macchiato.css" = {
|
||||
source = pkgs.fetchFromGitHub
|
||||
{
|
||||
@@ -96,6 +107,7 @@
|
||||
#network,
|
||||
#battery,
|
||||
#custom-powermenu,
|
||||
#custom-flakestat,
|
||||
#custom-cava-internal {
|
||||
padding-left: 10px;
|
||||
padding-right: 10px;
|
||||
@@ -143,7 +155,7 @@
|
||||
modules-left = [ "custom/launcher" "hyprland/workspaces" ];
|
||||
modules-center = [ "clock" ];
|
||||
modules-right =
|
||||
[ "pulseaudio" "pulseaudio#microphone" "memory" "cpu" "tray" ];
|
||||
[ "custom/flakestat" "pulseaudio" "pulseaudio#microphone" "memory" "cpu" "tray" "battery" ];
|
||||
"custom/launcher" = {
|
||||
"format" = " ";
|
||||
"on-click" = "pkill rofi || ~/.config/rofi/launcher.sh";
|
||||
@@ -190,6 +202,25 @@
|
||||
"icon-size" = 15;
|
||||
"spacing" = 6;
|
||||
};
|
||||
"battery" = {
|
||||
"interval" = 60;
|
||||
"states" = {
|
||||
"warning" = 20;
|
||||
"critical" = 5;
|
||||
};
|
||||
"format" = "{icon} {capacity}%";
|
||||
"format-icons" = [
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
];
|
||||
};
|
||||
"custom/flakestat" = {
|
||||
"exec" = "${flakestat}/bin/flakestat";
|
||||
"interval" = 600;
|
||||
};
|
||||
}];
|
||||
};
|
||||
}
|
||||
|
25
home/hyprland/waybar/flakestat.sh
Normal file
25
home/hyprland/waybar/flakestat.sh
Normal file
@@ -0,0 +1,25 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
FLAKE_DIR="/home/torjus/nixos"
|
||||
NIXPKGS_DIR="/home/torjus/git/nixpkgs"
|
||||
|
||||
flake_metadata=$(nix flake metadata --json "$FLAKE_DIR" 2>/dev/null)
|
||||
|
||||
stable_input=$(echo "$flake_metadata" | jq '.locks.nodes.root.inputs.nixpkgs')
|
||||
stable_rev=$(echo "$flake_metadata" | jq -r ".locks.nodes.$stable_input.locked.rev")
|
||||
stable_branch=$(echo "$flake_metadata" | jq -r ".locks.nodes.$stable_input.original.ref")
|
||||
|
||||
unstable_input=$(echo "$flake_metadata" | jq '.locks.nodes.root.inputs."nixpkgs-unstable"')
|
||||
unstable_rev=$(echo "$flake_metadata" | jq -r ".locks.nodes.$unstable_input.locked.rev")
|
||||
unstable_branch=$(echo "$flake_metadata" | jq -r ".locks.nodes.$unstable_input.original.ref")
|
||||
|
||||
cd "$NIXPKGS_DIR" || exit 1
|
||||
git fetch -q
|
||||
git switch -q "$stable_branch"
|
||||
git pull -q
|
||||
stable_commit_count=$(git rev-list "$stable_rev..HEAD"|wc -l)
|
||||
git switch -q "$unstable_branch"
|
||||
git pull -q
|
||||
unstable_commit_count=$(git rev-list "$unstable_rev..HEAD"|wc -l)
|
||||
|
||||
echo "$stable_commit_count|$unstable_commit_count"
|
@@ -1,4 +1,5 @@
|
||||
{ pkgs, ... }: {
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
programs.waybar = {
|
||||
enable = true;
|
||||
systemd = {
|
||||
@@ -133,7 +134,7 @@
|
||||
modules-left = [ "custom/launcher" "hyprland/workspaces" ];
|
||||
modules-center = [ "clock" ];
|
||||
modules-right =
|
||||
[ "pulseaudio" "pulseaudio#microphone" "memory" "cpu" "tray" ];
|
||||
[ "pulseaudio" "pulseaudio#microphone" "memory" "cpu" "tray" "battery" ];
|
||||
"custom/launcher" = {
|
||||
"format" = " ";
|
||||
"on-click" = "pkill rofi || ~/.config/rofi/launcher.sh";
|
||||
@@ -180,6 +181,21 @@
|
||||
"icon-size" = 15;
|
||||
"spacing" = 6;
|
||||
};
|
||||
"battery" = {
|
||||
"interval" = 60;
|
||||
"states" = {
|
||||
"warning" = 30;
|
||||
"critical" = 5;
|
||||
};
|
||||
"format" = "{icon} {capacity}%";
|
||||
"format-icons" = [
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
];
|
||||
};
|
||||
}];
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user