xmonad-contrib-0.18.0.9: Community-maintained extensions for xmonad
Copyright2023 Ilya Portnov
LicenseBSD-style (see xmonad/LICENSE)
Maintainerportnov84@rambler.ru
Stabilityunstable
Portabilityunportable
Safe HaskellSafe-Inferred
LanguageHaskell2010

XMonad.Layout.DecorationEx.Widgets

Description

This module contains data types and utilities to deal with decoration widgets. A widget is anything that is displayed on window decoration, and, optionally, can react on clicks. Examples of widgets are usual window buttons (minimize, maximize, close), window icon and window title.

Synopsis

Data types

data StandardCommand Source #

Standard window commands.

One can extend this list by simply doing

data MyWindowCommand =
    Std StandardCommand
  | SomeFancyCommand
instance WindowCommand MyWindowCommand where ...
type MyWidget = GenericWidget MyWindowCommand

Constructors

FocusWindow

Focus the window

FocusUp

Move focus to previous window

FocusDown

Move focus to following window

MoveToNextGroup

Move the window to the next group (see XMonad.Layout.Groups)

MoveToPrevGroup

Move the window to the previous group

DwmPromote

Execute dwmpromote (see XMonad.Actions.DwmPromote)

ToggleSticky

Make window sticky or unstick it (see XMonad.Actions.CopyWindow)

ToggleMaximize

Maximize or restore window (see XMonad.Layout.Maximize)

Minimize

Minimize window (see XMonad.Actions.Minimize)

CloseWindow

Close the window

GridWindowMenu

Show window menu via XMonad.Actions.GridSelect (see XMonad.Actions.WindowMenu)

class DecorationWidget widget => TextWidget widget where Source #

Type class for widgets that can be displayed as text fragments by TextDecoration engine.

Methods

widgetString :: DrawData engine widget -> widget -> X String Source #

Instances

Instances details
TextWidget StandardWidget Source # 
Instance details

Defined in XMonad.Layout.DecorationEx.Widgets

Methods

widgetString :: forall (engine :: Type -> Type -> Type). DrawData engine StandardWidget -> StandardWidget -> X String Source #

data GenericWidget cmd Source #

Generic data type for decoration widgets.

Constructors

TitleWidget

Window title (just text label)

WindowIcon

Window icon with some associated command | Other widgets

Fields

GenericWidget 

Fields

Instances

Instances details
TextWidget StandardWidget Source # 
Instance details

Defined in XMonad.Layout.DecorationEx.Widgets

Methods

widgetString :: forall (engine :: Type -> Type -> Type). DrawData engine StandardWidget -> StandardWidget -> X String Source #

Read cmd => Read (GenericWidget cmd) Source # 
Instance details

Defined in XMonad.Layout.DecorationEx.Widgets

Show cmd => Show (GenericWidget cmd) Source # 
Instance details

Defined in XMonad.Layout.DecorationEx.Widgets

(Default cmd, Read cmd, Show cmd, WindowCommand cmd) => DecorationWidget (GenericWidget cmd) Source # 
Instance details

Defined in XMonad.Layout.DecorationEx.Widgets

Associated Types

type WidgetCommand (GenericWidget cmd) Source #

type WidgetCommand (GenericWidget cmd) Source # 
Instance details

Defined in XMonad.Layout.DecorationEx.Widgets

type WidgetCommand (GenericWidget cmd) = cmd

type StandardWidget = GenericWidget StandardCommand Source #

Generic widget type specialized for StandardCommand

Utility functions

isWidgetChecked :: DecorationWidget widget => widget -> Window -> X Bool Source #

Check if the widget should be displayed in checked state.

Presets for standard widgets

titleW :: StandardWidget Source #

Widget for window title

toggleStickyW :: StandardWidget Source #

Widget for ToggleSticky command.

minimizeW :: StandardWidget Source #

Widget for Minimize command

maximizeW :: StandardWidget Source #

Widget for ToggleMaximize command

closeW :: StandardWidget Source #

Widget for CloseWindow command