Xfce Wiki

Sub domains
 

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
tips [2011/08/13 05:22] – [Handle acpi event for power button, show Xfce logout options] mhtrinhtips [2019/07/25 09:15] (current) – [Gtkrc files] fixed broken links kevinbowen
Line 3: Line 3:
  
  
-===== Customize the font in clock panel plugin ===== 
- 
-You can use [[http://library.gnome.org/devel/pango/unstable/PangoMarkupFormat.html|Pango markup format]] to customize the font in clock panel plugin. Switch to custom format (only available with digital layout) and use tags inside the format string. 
- 
-For example: 
-  * ''<nowiki><span font_desc="URW Gothic L Book 18">%R</span></nowiki>'' 
-  * ''<nowiki><span font_desc="bold 12">%R</span></nowiki>'' 
  
 ===== Performance Tips ===== ===== Performance Tips =====
  
-Lets face it: one of the reasons for using Xfce is performance. It is lighter and more responsive than Gnome on almost all hardware, especially on machines with less memory and processor power.+One of the benefits of Xfce is performance. It is lighter and more responsive than other desktop environments such as GNOME on almost all hardware, especially on machines with less memory and processing power.
 ==== Fonts ==== ==== Fonts ====
  
Line 30: Line 23:
 Another option, that may work for some, is to check the options of the program that you are using to connect remotely, and if it has a "Remove Wallpaper" option or a "Do Not Display Wallpaper" option, then enable that option. I use TightVNCviewer and it does not have a Remove Wallpaper option, therefore changing the background color to white is the only solution for me. Another option, that may work for some, is to check the options of the program that you are using to connect remotely, and if it has a "Remove Wallpaper" option or a "Do Not Display Wallpaper" option, then enable that option. I use TightVNCviewer and it does not have a Remove Wallpaper option, therefore changing the background color to white is the only solution for me.
  
-===== How to use the alternative GNOME-menu ===== 
- 
-If you want to use the new menu from GNOME, with quick starters for favorites applications and such, you can use the [[http://goodies.xfce.org/projects/panel-plugins/xfce4-xfapplet-plugin|xfapplet panel plugin]] with the GNOME main menu applet.  The menu should be installed with your package system, look for **gnome-main-menu**.  [[http://wirelessimage4.pbwiki.com/f/Screenshot.png|Xfce screenshot]], [[http://www.novell.com/video/desktop/|video]]. 
- 
-Add a new xfapplet item inside your panel, and open its properties dialog to add the GNOME menu applet. 
- 
-If you don't like GNOME main menu, try Ubuntu System Panel, available in several distributions. 
- 
-See also: [[/howto/customize-menu|How to customize the Xfce 4.5+ menu]] 
  
 ===== Gtkrc files ===== ===== Gtkrc files =====
-  * A tutorial about the Gtkrc format can be found [[http://live.gnome.org/GnomeArt/Tutorials/GtkThemes|here]]. +  * A tutorial about the Gtkrc format can be found [[http://live.gnome.org/Attic/GnomeArt/Tutorials/GtkThemes|here]]. 
  
-  * Xfce has also a couple of custom gtkrc settings for some of the applications: [[http://svn.xfce.org/svn/xfce/xfdesktop/branches/xfce_4_4/README|xfdesktop]] and [[http://thunar.xfce.org/pwiki/documentation/advanced_settings|Thunar]] (see also [[http://thunar.xfce.org/pwiki/documentation/faq#how_do_i_assign_different_keyboard_shortcuts|editable shortcuts]]).+  * Xfce has also a couple of custom gtkrc settings for some of the applications: [[https://git.xfce.org/xfce/xfdesktop/tree/README?h=xfce-4.12|xfdesktop]] and [[https://docs.xfce.org/xfce/thunar/hidden-settings]] (see also [[https://docs.xfce.org/xfce/xfce4-settings/keyboard|editable shortcuts]]).
  
   * You can not define a custom background for Thunar icon/ list views due to a [[http://bugzilla.gnome.org/show_bug.cgi?id=71926|bug in Gtk+]] itself.   * You can not define a custom background for Thunar icon/ list views due to a [[http://bugzilla.gnome.org/show_bug.cgi?id=71926|bug in Gtk+]] itself.
Line 73: Line 57:
   class "*tray*" style "panel-color"   class "*tray*" style "panel-color"
  
 +   * See also those threads in the forum : http://forum.xfce.org/viewtopic.php?id=6169 and http://forum.xfce.org/viewtopic.php?id=6196
  
 ===== How to add or remove applications in the system menu ===== ===== How to add or remove applications in the system menu =====
Line 94: Line 79:
 You can read more about .desktop files [[http://standards.freedesktop.org/desktop-entry-spec/latest/|here]]. You can read more about .desktop files [[http://standards.freedesktop.org/desktop-entry-spec/latest/|here]].
  
-The libexo provides several utils amongst one to handle desktop entry files in a GUI fashion: **exo-desktop-item-edit**.  With it you can create a new .desktop file, by running the command ''<nowiki>exo-desktop-item-edit --create-new</nowiki>'' ;-)+The libexo provides several utils amongst one to handle desktop entry files in a GUI fashion: **exo-desktop-item-edit**.  With it you can create a new .desktop file, by running the command ''<nowiki>exo-desktop-item-edit --create-new</nowiki>''
  
 === Remove an application from the menu === === Remove an application from the menu ===
Line 129: Line 114:
  
 The margins are also useful if you have only one Xfce panel: the margin area leaves a clear space to pull up application or workspace menus. By default, right click on the desktop (the margin) to show the Xfce menu, or middle (left+right) click to show the workspace menu. The margins are also useful if you have only one Xfce panel: the margin area leaves a clear space to pull up application or workspace menus. By default, right click on the desktop (the margin) to show the Xfce menu, or middle (left+right) click to show the workspace menu.
 +
 +The size of the margins is in pixels, so, with a reasonably modern monitor, at a resolution of, say 1680 x 1050, a setting of '10' will give a margin of about 1/8 of an inch. Note that nothing will change on any open window until you minimize and re-maximize it again. Also note that these margins only apply to maximized windows -- you can manually resize any window right to the edge of the screen if you want to.
  
 ===== Handle acpi event for power button, show Xfce logout options ===== ===== Handle acpi event for power button, show Xfce logout options =====
Line 186: Line 173:
   </file>   </file>
  
 +   * Make those scripts executable :
 +<code>
 +chmod +x /usr/local/sbin/xfce4-user-session-shutdown.sh /usr/local/sbin/xfce4-shutdown-as-user.sh
 +</code>
 ==== Solution 2 ==== ==== Solution 2 ====
    * Open Settings Manager (or by command : xfce4-settings-manager )    * Open Settings Manager (or by command : xfce4-settings-manager )
Line 191: Line 182:
    * In General : set //When power button is pressed// to //Ask//    * In General : set //When power button is pressed// to //Ask//
    * Close Power Manager settings    * Close Power Manager settings
-   In the file **/etc/acpi/events/power_button** , change the //action// field to ///bin/true// :+   If you have ACPI scripts installed, deactivate or update the **power-button** script from **/etc/acpi/events/**, and change the //action// field to ///bin/true//:
 <file> <file>
 +# EXAMPLE
 event=button/power.* event=button/power.*
 #action=/usr/lib/acpid/power_button #action=/usr/lib/acpid/power_button
 action=/bin/true action=/bin/true
 </file> </file>
-===== Use mnemonics to create Thunar Custom Actions ===== 
  
-When you create a [[http://thunar.xfce.org/pwiki/documentation/custom_actions|Thunar Custom Action]] you can set the name with an underscore "_" before a letter to use it as mnemonic.  When you right click in a Thunar view, you can type the letter to access your custom action. +===== Accessing man pages through xfrun4 =====
- +
-===== accessing man pages through xfrun4 =====+
 Use '#' as a shortcut to open man pages using xfrun4. e.g. #man Use '#' as a shortcut to open man pages using xfrun4. e.g. #man
 +
 +===== Do maths with xfrun4/appfinder =====
 +  * What you get: input simple mathematical expression, like 5+5 or (5+5)/3 or .5*10, in xfrun4/appfinder, and get the result as notification.
 +  * Requirement: notify-send
 +  * Save this script as bcme.sh, in your home directory:
 +
 +  #!/bin/sh
 +  
 +  precision=2        # number of digit for floating value
 +  notify_time=20000  # number of milisecond the notification show
 +  
 +  res=`echo "scale=$precision;$@" | bc`  
 +  notify-send -t $notify_time "$res" "=$@"
 +
 +  *Add custom action to Application finder :
 +    * Type : Regular Expression
 +    * Pattern : ^([0-9]|\(|\.).*
 +    * Command : /bin/sh ~/bcme.sh \0
 +    *  (check) Save match in command history
 +
 +
 +====== Xfconf =====
 +
 +===== Toggle panel autohide =====
 +
 +Short Bash script to toggle the autohide property of a panel, so you can bind for example a keyboard shortcut to quickly show and hide a panel.
 +
 +<code bash>
 +#!/bin/sh
 +
 +test -z "$1" && echo missing panel id  && exit 1
 +test ! -z "`echo $1 | sed s/[0-9]*//g`" && echo bad panel id  && exit 1
 +
 +CHANNEL=xfce4-panel
 +PANELID=$1
 +PROP=/panels/panel-$PANELID/autohide
 +
 +if `xfconf-query -c $CHANNEL -p $PROP >/dev/null 2>&1`; then
 +    xfconf-query -c $CHANNEL -T -p $PROP
 +else
 +    xfconf-query -c $CHANNEL -n -p $PROP -t bool -s false
 +fi
 +</code>
 +
 +===== Control per-window transparency =====
 +
 +Xfce lets you control the transparency of any window by horizontal scrolling on the titlebar. Starting with 4.12 though, it has been disabled by default. To enable this, open **Settings Editor > xfwm4** and change ''horiz_scroll_opacity'' to true by clicking the checkbox.