Wlogout, waybar, rofi, cleanup

This commit is contained in:
foglar 2024-11-15 16:12:59 +01:00
parent 190c41587c
commit be7c364c30
6 changed files with 131 additions and 16 deletions

View File

@ -3,7 +3,7 @@
inputs = { inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable"; nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
#nix-stable.url = "github:nixos/nixpkgs/nixos-24.05"; nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-24.05";
hyprland = { hyprland = {
url = "github:hyprwm/Hyprland"; url = "github:hyprwm/Hyprland";
@ -37,6 +37,7 @@
outputs = { outputs = {
self, self,
nixpkgs, nixpkgs,
nixpkgs-stable,
... ...
} @ inputs: let } @ inputs: let
system = "x86_64-linux"; system = "x86_64-linux";
@ -47,10 +48,18 @@
allowUnfree = true; allowUnfree = true;
}; };
}; };
pkgs-stable = import nixpkgs-stable {
inherit system;
config = {
allowUnfree = true;
};
};
in { in {
nixosConfigurations = { nixosConfigurations = {
laptop = nixpkgs.lib.nixosSystem { laptop = nixpkgs.lib.nixosSystem {
specialArgs = {inherit inputs system;}; specialArgs = {inherit inputs system pkgs-stable;};
modules = [ modules = [
./nixos/configuration.nix ./nixos/configuration.nix

View File

@ -1,7 +1,7 @@
{ {
lib, lib,
config, config,
pkgs, pkgs-stable,
... ...
}: { }: {
options = { options = {
@ -25,7 +25,7 @@
services.dunst.enable = true; services.dunst.enable = true;
home.packages = [ home.packages = [
pkgs.toybox pkgs-stable.toybox
]; ];
stylix.targets = { stylix.targets = {
@ -216,7 +216,7 @@
"Alt, Return, fullscreen" "Alt, Return, fullscreen"
"$mod, Escape, exec, hyprlock" "$mod, Escape, exec, hyprlock"
#"$mod+Shift,F, exec, windowpin.sh" #"$mod+Shift,F, exec, windowpin.sh"
#"$mod, Backspace, exec, logoutlaunch.sh" "$mod, Backspace, exec, wlogout -b 2"
"$Ctrl+Alt, W, exec, killall waybar || waybar" # toggle waybar "$Ctrl+Alt, W, exec, killall waybar || waybar" # toggle waybar
"$mod, T, exec, $term" "$mod, T, exec, $term"

View File

@ -1,15 +1,13 @@
{pkgs, lib, ...}: { {pkgs, ...}: {
home.packages = with pkgs; [ home.packages = with pkgs; [
hyprlock hyprlock
hyprpicker hyprpicker
hypridle hypridle
rofi #swww
waybar playerctl
swww
kitty kitty
kitty-themes
kitty-img kitty-img
pavucontrol pavucontrol
@ -65,7 +63,12 @@
rm "$temp_screenshot" rm "$temp_screenshot"
'') '')
#(writeShellScriptBin "keyboardswitch") (writeShellScriptBin "keyboardswitch" ''
hyprctl switchxkblayout all next
layMain=$(hyprctl -j devices | jq '.keyboards' | jq '.[] | select (.main == true)' | awk -F '"' '{if ($2=="active_keymap") print $4}')
dunstify -a "t1" -r 91190 -t 800 "$layMain" -i ~/dotfiles/config/keyboard.svg
'')
#(writeShellScriptBin "windowpin") #(writeShellScriptBin "windowpin")
#(writeShellScriptBin "logoutlaunch") #(writeShellScriptBin "logoutlaunch")
#(writeShellScriptBin "sysmonlaunch") #(writeShellScriptBin "sysmonlaunch")

View File

@ -1,6 +1,7 @@
{ {
lib, lib,
config, config,
pkgs,
... ...
}: { }: {
options = { options = {
@ -8,6 +9,10 @@
}; };
config = lib.mkIf config.rofi.enable { config = lib.mkIf config.rofi.enable {
home.packages = [
pkgs.rofi
];
programs.rofi = { programs.rofi = {
enable = true; enable = true;
cycle = true; cycle = true;
@ -154,7 +159,7 @@
"element-icon" = { "element-icon" = {
size = mkLiteral "3em"; size = mkLiteral "3em";
cursor = "inherit"; cursor = "inherit";
background-color = mkLiteral "transparent"; #background-color = mkLiteral "transparent";
#text-color = mkLiteral "inherit"; #text-color = mkLiteral "inherit";
}; };
@ -163,7 +168,7 @@
vertical-align = mkLiteral "0.5"; vertical-align = mkLiteral "0.5";
horizontal-align = mkLiteral "0.0"; horizontal-align = mkLiteral "0.0";
cursor = "inherit"; cursor = "inherit";
background-color = mkLiteral "transparent"; #background-color = mkLiteral "transparent";
#text-color = mkLiteral "inherit"; #text-color = mkLiteral "inherit";
}; };

View File

@ -236,11 +236,11 @@
}; };
"custom/power" = { "custom/power" = {
format = "{}"; format = " {}";
rotate = 0; rotate = 0;
exec = "echo ; echo logout"; exec = "echo ; echo logout";
on-click = "wlogout"; on-click = "wlogout -b 2";
on-click-right = "wlogout"; on-click-right = "wlogout -b 2";
interval = 86400; # once every day interval = 86400; # once every day
tooltip = true; tooltip = true;
}; };

View File

@ -40,6 +40,104 @@
"keybind" = "r"; "keybind" = "r";
} }
]; ];
style =
let
fntSize = "40";
BtnCol = config.lib.stylix.colors.base01;
active_rad = "40";
y_hvr = "5";
x_hvr = "5";
button_rad = "20";
y_mgn = "5";
x_mgn = "5";
in ''
@define-color bar-bg rgba(0, 0, 0, 0);
@define-color main-bg #11111b;
@define-color main-fg #cdd6f4;
@define-color wb-act-bg #a6adc8;
@define-color wb-act-fg #313244;
@define-color wb-hvr-bg #f5c2e7;
@define-color wb-hvr-fg #313244;
* {
background-image: none;
font-size: ${fntSize}px;
}
window {
background-color: transparent;
}
button {
color: #${BtnCol};
background-color: @main-bg;
outline-style: none;
border: none;
border-width: 0px;
background-repeat: no-repeat;
background-position: center;
background-size: 10%;
border-radius: 0px;
box-shadow: none;
text-shadow: none;
animation: gradient_f 20s ease-in infinite;
}
button:focus {
background-color: @wb-act-bg;
background-size: 20%;
}
button:hover {
background-color: @wb-hvr-bg;
background-size: 25%;
border-radius: ${active_rad}px;
animation: gradient_f 20s ease-in infinite;
transition: all 0.3s cubic-bezier(.55,0.0,.28,1.682);
}
button:hover#lock {
border-radius: ${active_rad}px ${active_rad}px 0px ${active_rad}px;
margin : ${y_hvr}px 0px 0px ${x_hvr}px;
}
button:hover#logout {
border-radius: ${active_rad}px 0px ${active_rad}px ${active_rad}px;
margin : 0px 0px ${y_hvr}px ${x_hvr}px;
}
button:hover#shutdown {
border-radius: ${active_rad}px ${active_rad}px ${active_rad}px 0px;
margin : ${y_hvr}px ${x_hvr}px 0px 0px;
}
button:hover#reboot {
border-radius: 0px ${active_rad}px ${active_rad}px ${active_rad}px;
margin : 0px ${x_hvr}px ${y_hvr}px 0px;
}
#lock {
border-radius: ${button_rad}px 0px 0px 0px;
margin : ${y_mgn}px 0px 0px ${x_mgn}px;
}
#logout {
border-radius: 0px 0px 0px ${button_rad}px;
margin : 0px 0px ${y_mgn}px ${x_mgn}px;
}
#shutdown {
border-radius: 0px ${button_rad}px 0px 0px;
margin : ${y_mgn}px ${x_mgn}px 0px 0px;
}
#reboot {
border-radius: 0px 0px ${button_rad}px 0px;
margin : 0px ${x_mgn}px ${y_mgn}px 0px;
}
'';
}; };
home.packages = [ home.packages = [