Skip to content

Commit

Permalink
feat: functional toggle fullscreen action
Browse files Browse the repository at this point in the history
  • Loading branch information
jasper-clarke committed Dec 12, 2024
1 parent db382f5 commit fb02bbe
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 1 deletion.
8 changes: 8 additions & 0 deletions actions.c
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,14 @@ void executeKeybinding(Keybinding *kb) {
toggleWindowFloating(&arg);
break;

case ACTION_TOGGLEFULLSCREEN:
if (!selectedMonitor->active) {
return;
}
setWindowFullscreen(selectedMonitor->active,
!selectedMonitor->active->isFullscreen);
break;

case ACTION_VIEWWORKSPACE:
// Convert workspace name to index
for (size_t i = 0; i < cfg.workspaceCount; i++) {
Expand Down
1 change: 1 addition & 0 deletions atlas.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ typedef enum {
ACTION_CYCLEFOCUS,
ACTION_KILLCLIENT,
ACTION_TOGGLEFLOATING,
ACTION_TOGGLEFULLSCREEN,
ACTION_FOCUSMONITOR,
ACTION_MOVETOMONITOR,
ACTION_VIEWWORKSPACE,
Expand Down
1 change: 1 addition & 0 deletions config.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ static const struct {
{"cyclefocus", ACTION_CYCLEFOCUS},
{"killclient", ACTION_KILLCLIENT},
{"togglefloating", ACTION_TOGGLEFLOATING},
{"togglefullscreen", ACTION_TOGGLEFULLSCREEN},
{"focusmonitor", ACTION_FOCUSMONITOR},
{"movetomonitor", ACTION_MOVETOMONITOR},
{"viewworkspace", ACTION_VIEWWORKSPACE},
Expand Down
1 change: 0 additions & 1 deletion config.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
#define _CONFIG_MANAGER_H_

#include "atlas.h"
#include "freetype2/freetype/config/ftstdlib.h"

// Configuration structure
typedef struct {
Expand Down

0 comments on commit fb02bbe

Please sign in to comment.