gnome3合上盖子自动休眠,可以改的
查看
$ gsettings list-keys org.gnome.settings-daemon.plugins.power
$ gsettings get org.gnome.settings-daemon.plugins.power lid-close-ac-action
$ gsettings get org.gnome.settings-daemon.plugins.power lid-close-battery-action
设置
$ gsettings set org.gnome.settings-daemon.plugins.power lid-close-ac-action '你希望的值'
$ gsettings set org.gnome.settings-daemon.plugins.power lid-close-battery-action '你希望的值'
或者
$ dconf-editor
org--gnome--settings-daemon--plugins--power
lid-close-ad-action与lid-close-battery-action的值
Showing posts with label gnome shell. Show all posts
Showing posts with label gnome shell. Show all posts
Tuesday, October 18, 2011
Tuesday, October 4, 2011
flash全屏的时候停止gnome屏幕保护disable screen saver when looking at flash videos(youtube, vimeo, youku,etc)
# gnome环境当开启flash全屏播放的时候禁用屏幕保护 #!/bin/bash # cleanup any bad state we left behind if the user exited while flash was running gconftool-2 -s /apps/gnome-screensaver/idle_activation_enabled --type bool true turn_it_off=0 sleepcomputer0=`gconftool-2 -g /apps/gnome-power-manager/timeout/sleep_computer_ac` sleepdisplay0=`gconftool-2 -g /apps/gnome-power-manager/timeout/sleep_display_ac` # run loop forever while true; do # interval between checks sleep 30 SS_off=0 # make id variable of window in focus current_window_id=`xprop -root | grep "_NET_ACTIVE_WINDOW(WINDOW)" | cut -d" " -f5` # make pid array of every command with libflashplayer in full(-f) command for pid in `pgrep -f libflashplayer` ; do # check if window in focus is our libflashplayer if [ $pid == `xprop -id $current_window_id | grep PID | cut -d" " -f3` ] then SS_off=1 fi done # check to see if xine is being used # if pgrep xine > /dev/null; then # SS_off=1 # fi # # check to see if current application is fullscreen # current_window_id=`xprop -root | grep "_NET_ACTIVE_WINDOW(WINDOW)" | cut -d" " -f5` # if xprop -id $current_window_id | grep "_NET_WM_STATE_FULLSCREEN" > /dev/null; then # SS_off=1 # fi # read current state of screensaver ss_on=`gconftool-2 -g /apps/gnome-screensaver/idle_activation_enabled` # change state of screensaver as necessary if [ "$SS_off" = "1" ] && [ "$ss_on" = "true" ]; then gconftool-2 -s /apps/gnome-screensaver/idle_activation_enabled --type bool false gconftool-2 -s /apps/gnome-power-manager/timeout/sleep_computer_ac --type int 0 gconftool-2 -s /apps/gnome-power-manager/timeout/sleep_display_ac --type int 0 turn_it_off=1 elif [ "$SS_off" = "0" ] && [ "$ss_on" = "false" ] && [ "$turn_it_off" = "1" ]; then gconftool-2 -s /apps/gnome-screensaver/idle_activation_enabled --type bool true gconftool-2 -s /apps/gnome-power-manager/timeout/sleep_computer_ac --type int $sleepcomputer0 gconftool-2 -s /apps/gnome-power-manager/timeout/sleep_display_ac --type int $sleepdisplay0 turn_it_off=0 fi done #Reference: http://ubuntuforums.org/showthread.php?p=10832670#post10832670
Labels:
arch,
flashplayer,
gnome,
gnome shell,
linux,
screensaver
Wednesday, September 28, 2011
ibus 1.4 can't input chinese
update the ibus to 1.4 ,so can't trigger the sunpinyin to input chinese
through the irc find this https://bbs.archlinux.org/viewtopic.php?pid=995934#p995934
bug report https://bugs.archlinux.org/task/26124
so rebuild the ibus-sunpinyin to fix this problem
https://wiki.archlinux.org/index.php/ABS
through the irc find this https://bbs.archlinux.org/viewtopic.php?pid=995934#p995934
bug report https://bugs.archlinux.org/task/26124
so rebuild the ibus-sunpinyin to fix this problem
https://wiki.archlinux.org/index.php/ABS
Thursday, September 15, 2011
gnome shell hijack to show ibus(顶栏显示ibus状态)
1 现在使用gnomeshell因为ibus状态栏在底部通知栏,使用vim,gvim还有firefox的pentadactly扩展 2 的时候老看不到输入法状态,导致很多快捷键无法运行,很是恼火。 3 4 5 近日看了看gnome-shell的通知区域的设计,发现gnomeshell本意是把ibus放在顶面板的,由于和ibus 6 输入法的沟通没有做好,导致通知区域的的ibus名称不正确,所以,我们的ibus也就毫无办法的到了 7 底部通知栏... 8 9 察看原码 10 11 statusIconDispatcher.js文件在/usr/share/gnome-shell/js/ui目录下 12 13 14 15 const STANDARD_TRAY_ICON_IMPLEMENTATIONS = { 16 'bluetooth-applet': 'bluetooth', 17 'gnome-volume-control-applet': 'volume', // renamed to gnome-sound-applet 18 // when moved to control center 19 'gnome-sound-applet': 'volume', 20 'nm-applet': 'network', 21 'gnome-power-manager': 'battery', 22 'keyboard': 'keyboard', 23 'a11y-keyboard': 'a11y', 24 'kbd-scrolllock': 'keyboard', 25 'kbd-numlock': 'keyboard', 26 'kbd-capslock': 'keyboard', 27 'ibus-ui-gtk': 'input-method'//看到没有ibus-ui-gtk多少年前的东西了.. 28 }; 29 30 一个简单的小hack只要把'ibus-ui-gtk'改为'main.py'就可以了 31 32 const STANDARD_TRAY_ICON_IMPLEMENTATIONS = { 33 'bluetooth-applet': 'bluetooth', 34 'gnome-volume-control-applet': 'volume', // renamed to gnome-sound-applet 35 // when moved to control center 36 'gnome-sound-applet': 'volume', 37 'nm-applet': 'network', 38 'gnome-power-manager': 'battery', 39 'keyboard': 'keyboard', 40 'a11y-keyboard': 'a11y', 41 'kbd-scrolllock': 'keyboard', 42 'kbd-numlock': 'keyboard', 43 'kbd-capslock': 'keyboard', 44 'main.py': 'input-method'//就是这里,改了就ok了.. 45 }; 46 47 写成脚本就是下面的了: 48 ibus extensions 49 50 1 StatusIconDispatcher = imports.ui.statusIconDispatcher; 51 2 52 3 function main() { 53 4 StatusIconDispatcher.STANDARD_TRAY_ICON_IMPLEMENTATIONS['main.py'] = 'ibus'; 54 5 }
gnomeshell 标题框显示 最小化 关闭按钮
1 gnomeshell使标题框显示放大缩小关闭的小技巧 2 3 gconftool-2 -s -t string /desktop/gnome/shell/windows/button_layout "minimize:close"
Wednesday, September 14, 2011
gnome shell恢复默认设置
2
3 今天我就遇到了,上irc,没有结果,只有自己动手了.
4
5 在 http://forums.fedoraforum.org/showthread.php?t=267061
6 上找到了解决的办法
7
8 -使用 ctrl+alt+F2 返回一个虚拟终端
9 -登陆进去,然后执行一下的命令
10
11 rm -rf ~/.config/
12 rm -rf ~/.gconf/
13 rm -rf ~/.gconfd/
14 -然后回到gdm的登陆界面(ctrl+alt+F7),登陆进去
15
16 这个将完全删除所有基于GNOME3/gtk3的程序的默认配置
Subscribe to:
Posts (Atom)