Switch to using wlogout instead of rofi-power-menu
This commit is contained in:
parent
f0d6443f74
commit
10c541b59a
1
Makefile
1
Makefile
|
@ -2,6 +2,7 @@
|
|||
|
||||
test:
|
||||
sudo nixos-rebuild test --flake .
|
||||
-hyprctl reload
|
||||
|
||||
build:
|
||||
sudo nixos-rebuild build --flake .
|
||||
|
|
|
@ -102,7 +102,7 @@ in ''
|
|||
bind = SUPER SHIFT, M, fullscreen, 1
|
||||
bind = SUPER SHIFT, Q, killactive,
|
||||
bind = SUPER SHIFT, Space, togglefloating
|
||||
bind = SUPER SHIFT, P, exec, pkill rofi || rofi -show power-menu
|
||||
bind = SUPER SHIFT, P, exec, wlogout
|
||||
|
||||
# Common program shortcuts
|
||||
bind = SUPER, E, exec, emacsclient -c
|
||||
|
@ -155,6 +155,11 @@ in ''
|
|||
windowrule = center,(thunar)
|
||||
windowrule = nofullscreenrequest,(org.remmina.Remmina)
|
||||
windowrule = nomaximizerequest,(org.remmina.Remmina)
|
||||
windowrule = float,(wlogout)
|
||||
windowrule = size 80% 80%,(wlogout)
|
||||
windowrule = center,(wlogout)
|
||||
windowrule = nofullscreenrequest,(wlogout)
|
||||
windowrule = nomaximizerequest,(wlogout)
|
||||
windowrulev2 = float,title:(File|Picture-in-Picture),class:(firefox)
|
||||
windowrulev2 = pin,title:(File|Picture-in-Picture),class:(firefox)
|
||||
windowrulev2 = workspace special silent, title:^(Firefox — Sharing Indicator)$
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
{
|
||||
imports = [
|
||||
hyprland.homeManagerModules.default
|
||||
./wlogout/default.nix
|
||||
./waybar/default.nix
|
||||
./swaync/default.nix
|
||||
./rofi/default.nix
|
||||
|
|
|
@ -1,36 +1,18 @@
|
|||
{ pkgs, config, ... }:
|
||||
let
|
||||
icon-theme = config.gtk.iconTheme.name;
|
||||
power-menu = "power-menu:${pkgs.rofi-power-menu}/bin/rofi-power-menu";
|
||||
in {
|
||||
home.packages = with pkgs; [ rofi-power-menu libqalculate ];
|
||||
|
||||
{
|
||||
programs.rofi = {
|
||||
enable = true;
|
||||
location = "center";
|
||||
pass.enable = true;
|
||||
plugins = with pkgs; [ rofi-calc ];
|
||||
extraConfig = {
|
||||
modi = "window,run,drun,ssh,filebrowser,calc,${power-menu},combi";
|
||||
combi-modi = "window,drun,ssh,filebrowser";
|
||||
sort = true;
|
||||
sorting-method = "fzf";
|
||||
matching = "fuzzy";
|
||||
icon-theme = icon-theme;
|
||||
show-icons = true;
|
||||
application-fallback-icon = "";
|
||||
drun-display-format = "{icon} {name}";
|
||||
show-icons = false;
|
||||
disable-history = false;
|
||||
hide-scrollbar = true;
|
||||
display-window = " Move ";
|
||||
display-run = " Run ";
|
||||
display-drun = " Launch ";
|
||||
display-ssh = " SSH ";
|
||||
display-filebrowser = " Files ";
|
||||
display-calc = " Calculator ";
|
||||
display-combi = " Combi ";
|
||||
};
|
||||
theme = ./theme.rasi
|
||||
|
||||
;
|
||||
theme = ./theme.rasi;
|
||||
};
|
||||
}
|
||||
|
|
69
home/hyprland/wlogout/default.nix
Normal file
69
home/hyprland/wlogout/default.nix
Normal file
|
@ -0,0 +1,69 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
programs.wlogout = {
|
||||
enable = true;
|
||||
layout = [
|
||||
{
|
||||
label = "reboot";
|
||||
action = "systemctl reboot";
|
||||
text = "Reboot";
|
||||
keybind = "r";
|
||||
}
|
||||
{
|
||||
label = "shutdown";
|
||||
action = "systemctl poweroff";
|
||||
text = "Shutdown";
|
||||
keybind = "s";
|
||||
}
|
||||
{
|
||||
label = "logout";
|
||||
action = "hyprctl dispatch exit";
|
||||
text = "Logout";
|
||||
keybind = "l";
|
||||
}
|
||||
];
|
||||
style = let
|
||||
shutdownIcon = ./icons/shutdown.png;
|
||||
rebootIcon = ./icons/reboot.png;
|
||||
logoutIcon = ./icons/logout.png;
|
||||
in ''
|
||||
window {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
button {
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
background-size: 25%;
|
||||
border: none;
|
||||
background-color: rgba(36, 39, 58, .5);
|
||||
box-shadow: none;
|
||||
margin: 5px;
|
||||
font-size: 20px;
|
||||
color: #6e738d;
|
||||
}
|
||||
|
||||
button:hover {
|
||||
background-color: rgba(183, 189, 248, .05);
|
||||
}
|
||||
|
||||
button:focus {
|
||||
background-color: rgba(202, 211, 245, .1);
|
||||
color: #cad3f5;
|
||||
}
|
||||
|
||||
#shutdown {
|
||||
background-image: url("${shutdownIcon}");
|
||||
}
|
||||
|
||||
#reboot {
|
||||
background-image: url("${rebootIcon}");
|
||||
}
|
||||
|
||||
#logout {
|
||||
background-image: url("${logoutIcon}");
|
||||
}
|
||||
'';
|
||||
};
|
||||
}
|
BIN
home/hyprland/wlogout/icons/hibernate.png
Normal file
BIN
home/hyprland/wlogout/icons/hibernate.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 18 KiB |
BIN
home/hyprland/wlogout/icons/lock.png
Normal file
BIN
home/hyprland/wlogout/icons/lock.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 7.9 KiB |
BIN
home/hyprland/wlogout/icons/logout.png
Normal file
BIN
home/hyprland/wlogout/icons/logout.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 6.2 KiB |
BIN
home/hyprland/wlogout/icons/reboot.png
Normal file
BIN
home/hyprland/wlogout/icons/reboot.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 16 KiB |
BIN
home/hyprland/wlogout/icons/shutdown.png
Normal file
BIN
home/hyprland/wlogout/icons/shutdown.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 15 KiB |
BIN
home/hyprland/wlogout/icons/suspend.png
Normal file
BIN
home/hyprland/wlogout/icons/suspend.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 17 KiB |
Loading…
Reference in a new issue