美文网首页Linux
安装 plank 及相关配置

安装 plank 及相关配置

作者: 南方老F | 来源:发表于2017-10-15 19:11 被阅读0次

    1.安装
    arch官方源中有plank包,可以直接安装:
    也可以去查看archwiki的说明文档。

    $ sudo pacman -S plank
    
    正在解决依赖关系...
    正在查找软件包冲突...
    
    软件包 (1) plank-0.11.4-1
    
    全部安装大小:  2.07 MiB
    净更新大小:  0.00 MiB
    
    :: 进行安装吗? [Y/n] y
    

    2.运行

    # 如果直接运行会默认创建 dock1 的主题
    ▶ plank 
    # 如果需要取名字则可以如下方式创建一个名为newplank的主题
    ▶ plank -n newdock
    

    3.配置
    这里设置plank的配置文件在 :/usr/share/plank/themes/

    ▶ cd /usr/share/plank/themes
    ▶ ls
    Default  Matte  Transparent
    # 这里有选用默认的主题配置Default
    ▶ cd Default                                                                                                         
    ▶ ls
    dock.theme   # 这是主题的配置文件
    

    配置文件每一行都有相应的注释说明,可以自己修改调试,也可以参考我的配置文件:

    ▶ cat dock.theme 
    #This file auto-generated by Plank.
    #2016-03-12T14:53:46+0000
    
    [PlankTheme]
    #The roundness of the top corners.
    TopRoundness=10
    #The roundness of the bottom corners.
    BottomRoundness=0
    #The thickness (in pixels) of lines drawn.
    LineWidth=0
    #The color (RGBA) of the outer stroke.
    OuterStrokeColor=41;;41;;41;;255
    #The starting color (RGBA) of the fill gradient.
    FillStartColor=41;;41;;41;;255
    #The ending color (RGBA) of the fill gradient.
    FillEndColor=80;;80;;80;;255
    #The color (RGBA) of the inner stroke.
    InnerStrokeColor=255;;255;;255;;255
    
    [PlankDockTheme]
    #The padding on the left/right dock edges, in tenths of a percent of IconSize.
    HorizPadding=-100
    #The padding on the top dock edge, in tenths of a percent of IconSize.
    TopPadding=5
    #The padding on the bottom dock edge, in tenths of a percent of IconSize.
    BottomPadding=30
    #The padding between items on the dock, in tenths of a percent of IconSize.
    ItemPadding=6
    #The size of item indicators, in tenths of a percent of IconSize.
    IndicatorSize=0
    #The size of the icon-shadow behind every item, in tenths of a percent of IconSize.
    IconShadowSize=10
    #The height (in percent of IconSize) to bounce an icon when the application sets urgent.
    UrgentBounceHeight=1.6666666666666667
    #The height (in percent of IconSize) to bounce an icon when launching an application.
    LaunchBounceHeight=0.625
    #The opacity value (0 to 1) to fade the dock to when hiding it.
    FadeOpacity=1
    #The amount of time (in ms) for click animations.
    ClickTime=300
    #The amount of time (in ms) to bounce an urgent icon.
    UrgentBounceTime=600
    #The amount of time (in ms) to bounce an icon when launching an application.
    LaunchBounceTime=600
    #The amount of time (in ms) for active window indicator animations.
    ActiveTime=300
    #The amount of time (in ms) to slide icons into/out of the dock.
    SlideTime=300
    #The time (in ms) to fade the dock in/out on a hide (if FadeOpacity is < 1).
    FadeTime=250
    #The time (in ms) to slide the dock in/out on a hide (if FadeOpacity is 1).
    HideTime=250
    #The size of the urgent glow (shown when dock is hidden), in tenths of a percent of IconSize.
    GlowSize=30
    #The total time (in ms) to show the hidden-dock urgent glow.
    GlowTime=10000
    #The time (in ms) of each pulse of the hidden-dock urgent glow.
    GlowPulseTime=2000
    #The hue-shift (-180 to 180) of the urgent indicator color.
    UrgentHueShift=150
    #The time (in ms) to move an item to its new position or its addition/removal to/from the dock.
    ItemMoveTime=450
    #Whether background and icons will unhide/hide with different speeds. The top-border of both will leave/hit the screen-edge at the same time.
    CascadeHide=flase
    

    4.添加底部应用程序
    配置文件在:/home/fqf/.config/plank

    ▶ cd ~/.config/plank 
    ▶ ls      # 查看创建的plank主题,这里选择默认的 dock1 来作为解释
    dock1
    ▶ cd ldock1/launchers 
    ▶ ls     # 添加应用程序的格式  name.dockitem
    electronic-wechat.dockitem  google-chrome.dockitem  org.kde.dragonplayer.dockitem
    firefox.dockitem            nohup.out               org.kde.konsole.dockitem
    ▶ cat firefox.dockitem      # name.dockitem内容如下:
    [PlankDockItemPreferences]
    Launcher=file:///usr/share/applications/firefox.desktop
    #------------------------------------------------------------------------
    # 所以我们只需要 cp 其中的一个name.dockitem
    # 在目录 /usr/share/applications/ 找到你需要添加的应用程序名字
    # Launcher=file:///usr/share/applications/firefox.desktop
    # 并在最后替换掉即可
    # Launcher=file:///usr/share/applications/google-chrome.desktop
    

    最后来一张效果图:

    plank配置效果图

    linux 小知识:

    一般在终端执行程序时,当你关掉终端之后,之前打开的程序也随着关掉了,那么可以使用:
    nohup 命令 &      #这句命令意思是当前执行的 程序/命令 不挂起并放置后台运行。
    eg:
    ▶ nohup plank &
    [1] 14524
    nohup: 忽略输入并把输出追加到'nohup.out' 
    

    相关文章

      网友评论

        本文标题:安装 plank 及相关配置

        本文链接:https://www.haomeiwen.com/subject/qgbcuxtx.html