Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Toggle FullScreen Support #191

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ These are the basic keybinds. Read through the `xmonad/xmonad.hs` file for more
| `Win + K` | Navigate through windows |
| `Win + Space` | Switch through layouts |
| `Win + T` | Make a floating window tiled |
| `Win + F` | Toggle FullScreen (FullScreen on/off) |

Note: `Toggling` means to enable if inactive or to disable if active.

Expand Down
10 changes: 10 additions & 0 deletions xmonad/xmonad.hs
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,13 @@ maimcopy = spawn "maim -s | xclip -selection clipboard -t image/png && notify-se
maimsave = spawn "maim -s ~/Desktop/$(date +%Y-%m-%d_%H-%M-%S).png && notify-send \"Screenshot\" \"Saved to Desktop\" -i flameshot"
rofi_launcher = spawn "rofi -no-lazy-grab -show drun -modi run,drun,window -theme $HOME/.config/rofi/launcher/style -drun-icon-theme \"candy-icons\" "

-- FullScreen Support
toggleFull = withFocused (\windowId -> do
{ floats <- gets (W.floating . windowset);
if windowId `M.member` floats
then withFocused $ windows . W.sink
else withFocused $ windows . (flip W.float $ W.RationalRect 0 0 1 1) })


myKeys conf@(XConfig {XMonad.modMask = modm}) = M.fromList $

Expand All @@ -107,6 +114,9 @@ myKeys conf@(XConfig {XMonad.modMask = modm}) = M.fromList $
-- lock screen
, ((modm, xK_F1 ), spawn "betterlockscreen -l")

-- Full Screen
, ((modm, xK_f ), toggleFull)

-- launch rofi and dashboard
, ((modm, xK_o ), rofi_launcher)
, ((modm, xK_p ), centerlaunch)
Expand Down