====== Linux Desktop ====== Some usage tips and fixes for Linux Desktop Environment(s) ===== JWM stuff ===== //dumped...// jwm mask modifier - mod key map can be checked using xmodmap -pm My last used config - requires xdgmenumaker (getslackbuild) st -g 110x35 rox geany_space firefox my1pmount-gtk exec: xdgmenumaker -n -i -f jwm jwm -reload loginctl reboot loginctl poweroff st root:3 showdesktop Sans-10:bold 4 21 3 #FFFFFF #555555 #000000 0.5 #FFFFFF #0077CC #000000 1.0 Sans-10 #333333 #FFFFFF #000000 0.75 Sans-10 #FFFFFF #555555 #FFFFFF #333333 #000000 #555555 #333333 #FFFFFF #0077CC #004488 Sans-10 #FFFFFF #333333 #000000 #FFFFFF #0077CC 0.85 Sans-10 #000000 #999999 /usr/share/icons/hicolor/16x16/apps /usr/share/icons/Tango/16x16/apps /usr/share/icons/Tango/16x16/actions /usr/share/icons/Tango/16x16/devices /usr/share/icons/Tango/16x16/categories /usr/share/icons/Tango/16x16/mimetypes /usr/share/icons/Adwaita/16x16/apps /usr/share/icons/Adwaita/16x16/actions /usr/share/icons/Adwaita/16x16/categories /usr/share/pixmaps /usr/share/jwm /usr/share/jwm/slackwall.png 400 2 click border opaque opaque up down right left left down up right select escape exec:dmenu_run -b nextstacked close desktop# root:3 window move resize maximize fullscreen rdesktop ldesktop udesktop ddesktop maxtop maxbottom maxright maxleft maxv maxh exec:xlock -mode matrix exec:my1pmount-gtk exec:volume + exec:volume - exec:st -g 110x35 nm-applet none ===== DWM stuff ===== //dumped...// Mod = Alt [Shift]+[Mod]+[Enter] - launch terminal. [Mod]+[b] - show/hide bar. [Mod]+[p] - dmenu [Mod]+[Enter] - swap master with top stack [Mod] + [j / k] - focus on next/previous window in current tag. [Mod] + [h / l] - increases / decreases master size. [Mod]+[2] - moves your focus to tag 2. [Shift]+[Mod]+[2] - move active window to the 2 tag. [Mod] + [i / d] - increases / decreases number of windows on master [Mod] + [, / .] - move focus between screens (multi monitor setup) [Shift]+[Mod]+[, / .] - move active window to different screen. [Mod]+[0] - view all windows on screen. [Shift]+[Mod]+[0] - make focused window appear on all tags. [Shift]+[Mod]+[c] - kill active window. [Shift]+[Mod]+[q] - quit dwm cleanly. [Mod]+[t] - tiling mode [Mod]+[f] - floating mode [Mod]+[m] - monocle mod [Mod]+[R M B] - to resize the floating window. [Mod]+[L M B] - to move the floating window around. [Mod]+[Space] - toggles to the previous layout mode. [Mod]+[Shift]+[Space] - to make an individual window float. [Mod]+[M M B] - to make an individual window un-float. [Shift]+[Mod]+[PageUp] - increase font size [Shift]+[Mod]+[PageDn] - decrease font size [Shift]+[Mod]+[Home] - reset font size ===== Generic Stuff ===== Applicable to most (if not all) DE/WM. ==== Geany on multiple workspaces ==== #!/bin/bash # from: https://unix.stackexchange.com/questions/246827/geany-open-a-new-instance-per-workspace-when-opening-a-file-in-that-workspace socket=$(xprop -root _NET_CURRENT_DESKTOP) socket=${socket##* } if [ "$socket" ] ; then if [ "$DISPLAY" ] ; then socket="${DISPLAY%.*}-$socket" socket=${socket#*:} else socket="NODISPLAY-$socket" fi exec geany --socket-file "/tmp/geany_socket_$socket" "$@" else exec geany "$@" fi [Desktop Entry] Type=Application Version=1.0 Name=Geany (Workspace) Comment=Geany wrapper to detect workspace Exec=geany_space %F Icon=geany Terminal=false Categories=Development;IDE; MimeType=text/plain;text/x-chdr;text/x-csrc;text/x-c++hdr;text/x-c++src;text/x-java;text/x-dsrc;text/x-pascal;text/x-perl;text/x-python;application/x-php;application/x-httpd-php3;application/x-httpd-php4;application/x-httpd-php5;application/xml;text/html;text/css;text/x-sql;text/x-diff; StartupNotify=true Keywords=Text;Editor; ==== Useful Desktop Files ==== The *.desktop files provide menu entry for applications. [Desktop Entry] Type=Application Version=1.0 Name=Arduino IDE (App-Image) Comment=Arduino IDE Exec=/home/share/appx/app-image/arduino-ide %F #Icon= Terminal=false Categories=Development;IDE; #MimeType=text/plain;text/x-chdr;text/x-csrc;text/x-c++hdr;text/x-c++src;text/x-java;text/x-dsrc;text/x-pascal;text/x-perl;text/x-python;application/x-php;application/x-httpd-php3;application/x-httpd-php4;application/x-httpd-php5;application/xml;text/html;text/css;text/x-sql;text/x-diff; StartupNotify=true #Keywords=Text;Editor; [Desktop Entry] Version=1.0 Type=Application Name=Android Studio Comment= Exec=env JAVA_HOME=/home/share/appx/android-studio/jbr /home/share/appx/android-studio/bin/studio.sh Icon=/home/share/appx/android-studio/bin/studio.png Path=/home/share/appx/android-studio/bin Categories=Development;IDE; Terminal=false StartupWMClass=jetbrains-studio StartupNotify=true [Desktop Entry] Encoding=UTF-8 Version=1.0 Type=Application NoDisplay=true Exec=/usr/bin/xfig -nowrite_bak %f Name=xfig -nowrite_bak Comment=Custom definition for xfig -nowrite_bak ==== Using xdg-mime ==== //Dumped// - get mime type of $ xdg-mime query filetype - get currently set default app for a $ xdg-mime query default - set a new default app for a $ xdg-mime default app.desktop ==== User Applications ==== Some specific use-cases (for my personal reference) * Video subtitle (*.srt) editor - gaupol (apt,slackbuilds) ===== XFCE: Slackware64-15.0 ===== Icons for extra/unused partitions on my hard disk are shown on XFCE desktop. I DO NOT want this! * Create a udev rule in ''udev/rules.d'' path KERNEL=="sda3", ENV{UDISKS_IGNORE}="1" KERNEL=="sda4", ENV{UDISKS_IGNORE}="1" * add more lines as required * Reload udev rules udevadm control --reload-rules && udevadm trigger ===== XFCE: Clock Panel ===== Custom Digital Clock settings on XFCE %Y%m%d%n%H:%M:%S %Y-%m-%d%n%T %Y%m%d %H:%M:%S ===== XFCE: Terminal Shortcut for Thunar ===== **Note20230501** No longer needed? Simply go ''Edit>Configure custom actions...'' and set it there. There is already a User Custom Action (UCA) defined to 'Open Terminal Here' - so we just need to add a shortcut. * Find that UCA id from ''~/.config/Thunar/uca.xml'' * Locate that id in ''~/.config/Thunar/accels.scm'' * uncomment and add shortcut key, e.g. F4 ===== XFCE: Quake-Style Terminal ===== XFCE4 terminal can actually run in a drop-down mode (Quake-style): xfce4-terminal --drop-down --hide-menubar Use keyboard settings (Settings->Keyboard): Create new entry in 'Application Shortcuts' tab with the previous command, with as trigger key. ===== XFCE: Remove Suspend/Hibernate Button ===== xfconf-query -c xfce4-session -np '/shutdown/ShowSuspend' -t 'bool' -s 'false' xfconf-query -c xfce4-session -np '/shutdown/ShowHibernate' -t 'bool' -s 'false' xfconf-query -c xfce4-session -np '/shutdown/ShowHybridSleep' -t 'bool' -s 'false' Sometimes this is also annoying? xfconf-query -c xfce4-session -np '/shutdown/ShowSwitchUser' -t 'bool' -s 'false' ===== XFCE: Multi-User ===== //**Note**: Latest version should be [[https://codeberg.org/azman/my1gists/src/branch/master/shell/clone-xfceconf|here]]// Copying XFCE settings for other users: #!/bin/bash DSTUSER=$1 [ -z "$DSTUSER" ] && echo "** Missing target username!" && exit 1 SRCUSER=$(pwd) SRCTEST=$(dirname $SRCUSER) while [ 1 ] ; do [ "$SRCTEST" == "/" ] && echo "** Cannot find /home in current path!" && exit 1 [ "$SRCTEST" == "/home" ] && break; SRCUSER=$(basename $SRCTEST) SRCTEST=$(dirname $SRCTEST) done echo "-- Using user '$SRCUSER' as source!" DSTHOME="/home/$DSTUSER" SRCHOME="/home/$SRCUSER" [ "$DSTUSER" == "$SRCUSER" ] && echo "** Target ($DSTUSER) same as source ($SRCUSER)?" && exit 1 [ ! -d "$DSTHOME" ] && echo "** Cannot find target user path '$DSTHOME'!" && exit 1 [ ! -d "$SRCHOME" ] && echo "** Cannot find source user path '$SRCHOME'!" && exit 1 DST_GRP=$(groups $DSTUSER | sed 's/.* : \([^[:space:]]*\).*$/\1/') echo "-- Target:{$DSTUSER:$DST_GRP}" [ $UID -ne 0 ] && echo -e "\n** Must run as root!\n" && exit 1 CHKCONF="Thunar geany xfce4" for conf in $CHKCONF ; do SRCCONF="$SRCHOME/.config/$conf" [ ! -d "$SRCCONF" ] && continue DSTCONF="$DSTHOME/.config/$conf" if [ -d "$DSTCONF" ] ; then echo -n "-- Deleting $DSTCONF... " rm -rf $DSTCONF [ $? -ne 0 ] && echo -n "**error0** " echo "done." fi echo -n "-- Copying $SRCCONF as $DSTCONF... " cp -a $SRCCONF $(dirname $DSTCONF) [ $? -ne 0 ] && echo -n "**error1** " chown -R $DSTUSER:$DST_GRP $DSTCONF [ $? -ne 0 ] && echo -n "**error2** " echo "done." done ===== Cinnamon: Terminal Shortcut for Nemo ===== Shortcut for nemo file manager * ''$HOME/.gnome2/accels/nemo'' (gtk_accel_path "/DirViewActions/OpenInTerminal" "F4") ===== Cinnamon: Shortcuts ===== //**Note**: Super key is the Windows key// Ctrl+A­lt+Down: Show the window selection screen Ctrl+A­lt+Up: Show the workspace selection screen Ctrl+A­lt+End: Shut down dialog Super+D: Show the desktop Alt+F2: Run dialog Alt+F8: Resize window Alt+F7: Move window Super+Left: Push tile left Super+­Right: Push tile right Super+Up: Push tile up Super+Down: Push tile down Ctrl+S­upe­r+Left: Push snap left + Ctrl+S­upe­r+Right: Push snap right Ctrl+S­upe­r+Down: Push snap down Shift+­Ctr­l+A­lt+Left: Move window to left workspace Shift+­Ctr­l+A­lt+­Right: Move window to right workspace Super+­Shi­ft+Left: Move window to left monitor Super+­Shi­ft+­Right: Move window to right monitor Super+­Shi­ft+Up: Move window to up monitor Super+­Shi­ft+Down: Move window to down monitor Alt+F5: Un-max­imize window Alt+F4: Minimize window Alt+Space: Activate window menu Alt+F10: Toggle maximi­zation state Super+P: Re-detect display devices ===== Cinnamon: Disable Recent Files ===== Option is in ''Menu > Preferences > Privacy''