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
zh-cn:tips [2015/03/10 04:29] – [解决方案 2] yjworkzh-cn:tips [2026/10/04 18:03] (current) – Add deprecation banner epetriglia
Line 1: Line 1:
 ====== 提示与技巧 ====== ====== 提示与技巧 ======
 +
 +<note warning>We are deprecating the localised wiki.xfce.org pages in favour of the official documentation, which is always kept up to date. This page will be deleted on 1 November 2026. A copy will be preserved on archive.org for historical purposes.</note>
  
 此页面包含了 Xfce 桌面环境的多种技巧。 此页面包含了 Xfce 桌面环境的多种技巧。
Line 210: Line 212:
  
 使用 '#' 作为在 xfrun4 中打开一个用户手册页的快捷方式。例如,#man 使用 '#' 作为在 xfrun4 中打开一个用户手册页的快捷方式。例如,#man
 +
 +===== 使用 xfrun4/应用程序查找器 做数学运算 =====
 +  * 能干嘛: 在xfrun4/应用程序查找器 中,输入简单的数学运算式子,比如  5+5 或 (5+5)/3 或 .5*10, 运算结果将显示在桌面通知中.
 +  * 需要有此命令: notify-send
 +  * 在您的家目录,保存此脚本为 bcme.sh :
 +
 +  #!/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" "=$@"
 +
 +  *在应用程序查找器添加自定义动作 :
 +    * 类型 : 正则表达式
 +    * 类型 : ^([0-9]|\(|\.).*
 +    * 命令 : /bin/sh ~/bcme.sh \0
 +    *  (勾选) 在命令历史中保存匹配的
 +
 +
 +====== 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>