mirror of
https://github.com/nmasur/dotfiles
synced 2024-11-10 05:12:56 +00:00
toggle polybar with keybinding
This commit is contained in:
parent
7baec572e3
commit
1a31d4d3e5
@ -6,6 +6,13 @@ let
|
|||||||
|
|
||||||
in {
|
in {
|
||||||
|
|
||||||
|
options = {
|
||||||
|
toggleBarCmd = lib.mkOption {
|
||||||
|
type = lib.types.str;
|
||||||
|
description = "Command to hide and show the status bar.";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
config = lib.mkIf config.services.xserver.enable {
|
config = lib.mkIf config.services.xserver.enable {
|
||||||
|
|
||||||
services.xserver.windowManager = {
|
services.xserver.windowManager = {
|
||||||
@ -125,6 +132,7 @@ in {
|
|||||||
|
|
||||||
# Window options
|
# Window options
|
||||||
"${modifier}+q" = "kill";
|
"${modifier}+q" = "kill";
|
||||||
|
"${modifier}+b" = "exec ${config.toggleBarCmd}";
|
||||||
"${modifier}+f" = "fullscreen toggle";
|
"${modifier}+f" = "fullscreen toggle";
|
||||||
"${modifier}+h" = "focus left";
|
"${modifier}+h" = "focus left";
|
||||||
"${modifier}+j" = "focus down";
|
"${modifier}+j" = "focus down";
|
||||||
|
@ -2,6 +2,8 @@
|
|||||||
|
|
||||||
config = lib.mkIf config.services.xserver.enable {
|
config = lib.mkIf config.services.xserver.enable {
|
||||||
|
|
||||||
|
toggleBarCmd = "polybar-msg cmd toggle";
|
||||||
|
|
||||||
home-manager.users.${config.user} = {
|
home-manager.users.${config.user} = {
|
||||||
|
|
||||||
services.polybar = {
|
services.polybar = {
|
||||||
|
Loading…
Reference in New Issue
Block a user