LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 787|回复: 7

请问Fvwm下怎么样实现BUTTON的“悬浮”?

[复制链接]
发表于 2004-7-26 09:04:25 | 显示全部楼层 |阅读模式
我想我桌面上的文件管理器始终是可见的并且是透明的,不影响后面工作窗口的工作,即我说的“悬浮”,请问该怎么弄?找了好多地方,找不到办法。谢谢!
发表于 2004-7-26 10:32:01 | 显示全部楼层
程序的透明不是靠fvwm实现的,必须程序自己支持,fvwm只是一个窗口管理器,不知道你用的是什么文件管理器?
发表于 2004-7-26 11:21:57 | 显示全部楼层
不好意思,我刚开始用FVWM,可能有些地方说得不太清楚或者不对。
我用FvwmButton在桌面上放了一个图标,点击这个图标激活rox文件管理器。
现在我相这个Button是透明的,并且始终是可视的(或者说“悬浮”在桌面上?不知道这样说对不对),也就是说我随时都能点这个图标。
发表于 2004-7-26 11:43:20 | 显示全部楼层
把你的FvwmButton设置的那段config贴出来看一下,也许你可以设置FvwmButton为透明来实现
发表于 2004-7-26 13:03:39 | 显示全部楼层
IgnoreModifiers L25
EdgeResistance 250 10
EdgeScroll 0 0
DeskTopSize 3x1


###============Style================###
Style "*" ClickToFocus
Style "FvwmButtons*" NeverFocus StaysOnTop
Style "TaskBar*" BorderWidth 0, HandleWidth 0
Style "TaskBar*" NoTitle, TitleAtBottom, NoHandles, \
        Sticky,WindowListSkip, CirculateSkip, StaysPut, \
        NeverFocus, FixedSize, FixedPosition
Style "DeskFileMan*" BorderWidth 1, HandleWidth 1
Style "DeskFileMan**" NoTitle, TitleAtBottom, NoHandles, \
        Sticky,WindowListSkip, CirculateSkip, StaysPut, \
        NeverFocus, FixedSize, FixedPosition
        ButtonStyle * ButtonColorset 0
......
......
###======== Function ============###

DestroyFunc StartFunction
AddToFunc StartFunction

+ I Module FvwmButtons DeskFileManager
......
......

###=================== DeskIcon ===============###
DestroyFunc DeskFileManager
AddToFunc DeskFileManager

*DeskFileManager: Fore white
*DeskFileManager: Back #0455c8

## Font 设置字体的大小
#*FvwmButtonsFont 5x8

##设置FvwmButtons的出现在屏幕的位置
*DeskFileManager: ButtonGeometry 50x60-50-50
#*DeskFileManager: Columns 1  
*DeskFileManager: Rows 1
*DeskFileManager: Frame 0

*DeskFileManager: (Title Rox, Icon /usr/share/pixmaps/gnome-suse.png, Action 'Exec rox &')
发表于 2004-7-26 13:52:30 | 显示全部楼层
要想始终可见并且透明我不知道解决方法,应该是暂时fvwm是实现不了的,因为透明还没见过能在覆盖在其他组件上(只能基于fvwm的组件透明).所以二者只能选其一.
始终可见容易解决,只要加

Style "DeskFileMan*" StaysOnTop

就可以了.

透明的话,你需要加下面的设置:

Colorset 50 Transparent, bg #0455c8, fg gray20

Style "FvwmButtons*" ParentalRelativity

*DeskFileManager: Colorset 50

而这两句就不需要了
*DeskFileManager: Fore white
*DeskFileManager: Back #0455c8
要改颜色直接改Colorset
发表于 2004-7-26 14:50:16 | 显示全部楼层
可以了,非常感谢!透明否到不是很要紧,只要能随时点到就心满意足了。呵呵
干脆在偷两个懒,再问两个问题。
1、怎么样使窗口最小化后只在“任务管理条”上出现,而不出现在桌面上?
2、怎么样在“任务管理条”上只点一次,就能使最小化的窗口还原(最大化)?

感谢,感谢。呵呵

以下是我的配置文件的全部。

# Set the directories to look in for Image files.
ImagePath +HOME/.fvwm/icons
ImagePath +HOME/.fvwm/icons/xpFvwm
ImagePath +:/usr/share/pixmaps/
ImagePath +:/usr/local/share/fvwm/icons

IgnoreModifiers L25
EdgeResistance 250 10
EdgeScroll 0 0
DeskTopSize 3x1

Menustyle * fvwm, Font -adobe-times-medium-r-*-*-16-*-*-*-*-*-*-*

###=========== Transparent===============###

Colorset 0 Transparent,fg white #Menu Transparent
MenuStyle * MenuColorset 0      #Menu Transparent
Colorset 50 Transparent,bg #0455c8,fg gray20 #Button Transparent

###=========== Mouse ============###

Mouse 1        1            A              Close
Mouse 1        2            A             Maximize 100 97
Mouse 1        4            A             Iconify

Mouse 1 I        A        Raise
#Mouse 3 A       Menu StartMenu Nop

#Mouse 1        F        A        Resize-or-Raise
#Mouse 1        TS        A        Move-or-Raise
#Mouse 1        I        A        Move-or-Iconify

###============Style================###
Style "*" ClickToFocus
Style "FvwmButtons*" NeverFocus StaysOnTop
#Style "FvwmButtons*" ParentalRelativety    #Button Transparent
Style "TaskBar*" BorderWidth 0, HandleWidth 0
Style "TaskBar*" NoTitle, TitleAtBottom, NoHandles, \
        Sticky,WindowListSkip, CirculateSkip, StaysPut, \
        NeverFocus, FixedSize, FixedPosition
Style "DeskF*" BorderWidth 0, HandleWidth 0
Style "DeskF*" NoTitle, TitleAtBottom, NoHandles, \
        Sticky,WindowListSkip, CirculateSkip, StaysPut, \
        NeverFocus, FixedSize, FixedPosition
        ButtonStyle * ButtonColorset 0
Style "DeskFileMan*" StaysOnTop


###======== Function ============###

DestroyFunc StartFunction
AddToFunc StartFunction
+ I Module FvwmButtons TaskBarStart
#+ I Module FvwmButtons TaskBarLaunch
#+ I Module FvwmButtons TaskBarDesk
+ I Module FvwmButtons TaskBarManager
#+ I Module FvwmButtons TaskBarTime
+ I Module FvwmButtons DeskFileManager

#+ I Module FvwmAnimate

+ I Exec exec fcitx

AddToFunc InitFunction
#+ I Test (f $[FVWM_WALLPAPER]) Exec exec fvwm-root --dither -r $[FVWM_WALLPAPER]
+ I Exec exec xscreensaver -no-splash

AddToFunc ExitFunction
+ I Exec sync
+ I All (fcitx) Close
+ I All (xscreensaver) Close
   
###============== Menus===============###

DestroyMenu StartMenu
AddToMenu StartMenu
+ "&Terminal"  Exec exec rxvt
+ "&Root-Terminal"  Exec exec gnome-terminal --use-factory --start-factory-server --window-with-profile=Root --title="Terminal-root" --command=su
+ "" Nop
#+ "&Debian Menu" Popup ProgramsMenu
+ "&Graphics" Popup Graphics
+ "&Text" Popup Text
+ "&Internet" Popup Internet
#+ "%32/platine.png%多媒体 MultiMedia" Popup MultiMedia
+ "&MultiMedia" Popup MultiMedia
+ "&System ops" Popup System
+ "&Other" Popup Other
+ "" Nop
+ "&Lock"         Exec exec xscreensaver-command -lock
+ "%32/warning.png%Exit Fvwm" Popup Quit-Verify

#DestroyMenu ProgramsMenu
#PipeRead 'cat /usr/share/fvwm/menu-system/ft-menu | sed -e "s/MenuFvwmMenuSystem/ProgramsMenu/"'

DestroyMenu Graphics
AddToMenu Graphics
+ "Gimp" Exec exec gimp
+ "Xfig" Exec exec xfig
+ "Acroread" Exec exec acroread
+ "GQview" Exec exec gqview

DestroyMenu Text
AddToMenu Text
+ "vi" Exec exec rxvt -e vi
+ "Gedit" Exec exec gedit
+ "GhostView" Exec exec gv
+ "Gnumeric" Exec exec gnumeric
+ "Calculator" Exec exec gnome-calculator
+ "openoffice" Exec exec oowriter
+ "" Nop
+ "Character map" Exec exec gnome-character-map

DestroyMenu Internet
AddToMenu Internet
+ "Sylpheed" Exec exec sylpheed
+ "mozilla" Exec exec firefox
+ "gftp" Exec exec gftp

DestroyMenu MultiMedia
AddToMenu MultiMedia
+ "grecord" Exec exec gnome-sound-recorder
+ "gmplayer" Exec exec gmplayer
+ "Xmms" Exec exec xmms
+ "Aumix" Exec exec rxvt -e aumix
#+ "Extace" Exec exec extace

DestroyMenu System
AddToMenu System
+ "System Monitor" Exec exec gnome-system-monitor
+ "format floppy" Exec exec gfloppy
+ "Screen saver" Exec exec xscreensaver-demo
+ "Edit menu" Popup Fvwm-Config
+ "View X11 errors" Exec exec gless .xsession-errors
+ "Gnome control center" Exec exec gnome-control-center
+ "" Nop
+ "Identify" Module FvwmIdent
+ "Window..." Popup Window-Ops
+ "Backgrouds" Popup Backgrounds
+ "Search" Exec exec gnome-search-tool

DestroyMenu Fvwm-Config
AddToMenu Fvwm-Config
+ "edge" Exec exec emacs ~/.fvwm/edge
+ "functions" Exec exec emacs ~/.fvwm/functions
+ "keybindings" Exec exec emacs ~/.fvwm/keybindings
+ "menu32" Exec exec emacs ~/.fvwm/menu32
+ "specificOptions" Exec exec emacs ~/.fvwm/specificOptions
+ "styles" Exec exec emacs ~/.fvwm/styles
+ "windecoration" Exec exec emacs ~/.fvwm/windecoration
+ "" Nop
+ "FvwmButtons" Exec exec emacs ~/.fvwm/FvwmButtons
+ "FvwmIconBox" Exec exec emacs ~/.fvwm/FvwmIconBox
+ "FvwmIconMan" Exec exec emacs ~/.fvwm/FvwmIconMan
+ "FvwmIdent" Exec exec emacs ~/.fvwm/FvwmIdent
+ "FvwmPager" Exec exec emacs ~/.fvwm/FvwmPager
+ "FvwmWinList" Exec exec emacs ~/.fvwm/FvwmWinList

DestroyMenu Other
AddToMenu Other
+ "Vmware" Exec exec vmware
+ "StarDict" Exec exec stardict

DestroyMenu Quit-Verify
AddToMenu Quit-Verify
+ "%32/winXP/button-flash.png%Restart Fvwm2"     Restart fvwm2
+ "" Nop
+ "%32/winXP/button-shutdown.png%Yes, Really Quit"  Quit

DestroyMenu Window-Ops
AddToMenu Window-Ops
+                       "Move"          Move
+                       "Resize"        Resize
+                       "Raise"         Raise
+                       "Lower"         Lower
+                       "(De)Iconify"   Iconify
+                       "(Un)Stick"     Stick
+                       "(Un)Maximize"  Maximize
+                       ""              Nop
+                       "Delete"        Delete
+                       "Close"         Close
+                       "Destroy"       Destroy
+                       ""              Nop
+                       "Refresh Window" RefreshWindow

DestroyMenu Window-Ops2
AddToMenu Window-Ops2
+                       "Delete"        Delete
+                       "Close"         Close
+                       "Destroy"       Destroy



###========== Bar=================###

DestroyFunc TaskBarStart
AddToFunc TaskBarStart

*TaskBarStart: Fore black
*TaskBarStart: Back #0455c8

*TaskBarStart: ButtonGeometry   115x30+0-0
*TaskBarStart: Rows 1
*TaskBarStart: Frame 0

*TaskBarStartLeft, Padding 0 0, Icon xpTaskbar/xp_start.png, \
                     Action 'menu StartMenu Rectangle +$left+$top 0 -100m')

DestroyFunc TaskBarManager
AddToFunc TaskBarManager

*TaskBarManager: Pixmap xpTaskbar/xp22-1.png
*TaskBarManager: Rows 1
*TaskBarManager: Frame 0
*TaskBarManager: Fore black
*TaskBarManager: Back #0455c8
*TaskBarManager: ButtonGeometry 600x30+246-0 #650x30+306-0
*TaskBarManager: (Swallow "FvwmIconMan"  "Module FvwmIconMan")

###=============== FvwmIconMan ===============###
*FvwmIconMan: managergeometry 10x1+140-0
*FvwmIconMan: ColorSet 21
*FvwmIconMan: iconColorSet 20
*FvwmIconMan: plainColorSet 21
*FvwmIconMan: selectColorSet 20
*FvwmIconMan: focusColorSet 22
*FvwmIconMan: focusandselectColorSet 21

*FvwmIconMan: DrawIcons Always
*FvwmIconMan: FocusAndSelectButton Flat
#*FvwmIconMan: FocusButton Flat
#*FvwmIconMan: SelectButton flat
#*FvwmIconMan: PlainButton flat
#*FvwmIconMan: IconButton flat
*FvwmIconMan: Action      Mouse   1 N sendcommand Focus, sendcommand "Iconify"
*FvwmIconMan: Action      Mouse   2 N sendcommand "FvwmIdent"
*FvwmIconMan: Action      Mouse   3 N sendcommand "opup Window-Ops2"
*FvwmIconMan: Action      Select sendcommand Focus
*FvwmIconMan: dontshow icon=Untitled title=Untitled
*FvwmIconMan: drawicons true
#*FvwmIconMan: title "Newer sit with your back to the door."
*FvwmIconMan: buttongeometry 78x30
#*FvwmIconMan: followfocus true
*FvwmIconMan: resolution desk
*FvwmIconMan: drawicons true
*FvwmIconMan: usewinlist true
*FvwmIconMan: format %i
*FvwmIconMan: shape true
*FvwmIconMan: Font \
        "StringEncoding=gbk-0:Shadow=0 0 SE:xft:simsun:size=11:encoding=iso10646-1"

###=================== DeskIcon ===============###
DestroyFunc DeskFileManager
AddToFunc DeskFileManager

#DeskFileManager: Colorset 50 #Transparent
*DeskFileManager: Fore white
*DeskFileManager: Back #0455c8

## Font 设置字体的大小
#*FvwmButtonsFont 5x8

##设置FvwmButtons的出现在屏幕的位置
*DeskFileManager: ButtonGeometry 50x60-0-0
#*DeskFileManager: Columns 1  #设置FvwmButtons为七列,一行
*DeskFileManager: Rows 1
*DeskFileManager: Frame 0

*DeskFileManager: (Title Rox, Icon /usr/share/pixmaps/gnome-suse.png, Action 'Exec rox &')
发表于 2004-7-26 16:27:36 | 显示全部楼层
1、怎么样使窗口最小化后只在“任务管理条”上出现,而不出现在桌面上?

Style "*" NoIcon

2、怎么样在“任务管理条”上只点一次,就能使最小化的窗口还原(最大化)?
Mouse 1 I A Raise
改成
Mouse 1 I A Iconify
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表