From e45816b047a071a296cb4c73142db7225e4489bc Mon Sep 17 00:00:00 2001 From: Elena ``of Valhalla'' Grandi Date: Mon, 12 Aug 2024 09:33:41 +0200 Subject: Migrate article from the old website --- source/desktop/desktop_environment/index.rst | 66 ++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 source/desktop/desktop_environment/index.rst (limited to 'source/desktop/desktop_environment') diff --git a/source/desktop/desktop_environment/index.rst b/source/desktop/desktop_environment/index.rst new file mode 100644 index 0000000..a200f5c --- /dev/null +++ b/source/desktop/desktop_environment/index.rst @@ -0,0 +1,66 @@ +********************* + Desktop Environment +********************* + +Some useful text commands to work on graphical interfaces. + +.. only:: html + + .. contents:: + +Xorg +==== + +Resizing windows +---------------- + +Resize all of the windows from ``$PROGRAM`` to 800x600:: + + xdotool search --name $PROGRAM windowsize %@ 800 600 + +Resize the active window to 800x600:: + + xdotool getactivewindow windowsize 800 600 + + +Clipboard +--------- + +Get the contents of the X selection on stdout:: + + xclip -o + +Copy clipboard contents (e.g. from ctrl-C in a graphical program) to the +primary (which can be basted with a middle mouse click):: + + xclip -o -selection clipboard | xclip -i + + +XDG +=== + +Set MIME associations and default apps +-------------------------------------- + +``xdg-settings`` is used to set some deskoppish properties and +expecially the default web browser:: + + xdg-settings set default-web-browser xombrero.desktop + +other associations can be set using ``xdg-mime``:: + + xdg-mime default apvlv.desktop application/pdf + +of course the ``.desktop`` can be any available file for any app, placed +in one of the standard directories, either system-wide or per-user. + +Both write to ``~/.local/share/applications/mimeapps.list``. + +See Also +======== + +* `The old version of this article on my old website + `_ + +.. + vim: set filetype=rst: -- cgit v1.2.3