====== 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 110x35roxgeany_spacefirefoxmy1pmount-gtkexec: xdgmenumaker -n -i -f jwmjwm -reloadloginctl rebootloginctl poweroffstroot:3showdesktop
Sans-10:bold
4213#FFFFFF#555555#0000000.5#FFFFFF#0077CC#0000001.0
Sans-10
#333333#FFFFFF#0000000.75
Sans-10
#FFFFFF#555555#FFFFFF#333333#000000#555555#333333#FFFFFF#0077CC#004488
Sans-10
#FFFFFF#333333#000000#FFFFFF#0077CC0.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.png4002clickborderopaqueopaqueupdownrightleftleftdownuprightselectescapeexec:dmenu_run -bnextstackedclosedesktop#root:3windowmoveresizemaximizefullscreenrdesktopldesktopudesktopddesktopmaxtopmaxbottommaxrightmaxleftmaxvmaxhexec:xlock -mode matrixexec:my1pmount-gtkexec:volume +exec:volume -exec:st -g 110x35nm-appletnone
===== 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+Alt+Down: Show the window selection screen
Ctrl+Alt+Up: Show the workspace selection screen
Ctrl+Alt+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+Super+Left: Push snap left +
Ctrl+Super+Right: Push snap right
Ctrl+Super+Down: Push snap down
Shift+Ctrl+Alt+Left: Move window to left workspace
Shift+Ctrl+Alt+Right: Move window to right workspace
Super+Shift+Left: Move window to left monitor
Super+Shift+Right: Move window to right monitor
Super+Shift+Up: Move window to up monitor
Super+Shift+Down: Move window to down monitor
Alt+F5: Un-maximize window
Alt+F4: Minimize window
Alt+Space: Activate window menu
Alt+F10: Toggle maximization state
Super+P: Re-detect display devices
===== Cinnamon: Disable Recent Files =====
Option is in ''Menu > Preferences > Privacy''