1. 程式人生 > >使用cairo-dock隱藏centos 7 的工作列和頂欄

使用cairo-dock隱藏centos 7 的工作列和頂欄

我使用的是Gnome,對於使用慣了Windows的我來說,這個介面確實有點醜,但是,也將就著用了,最近發現有一款軟體(Cairo-Dock)可以美化桌面,於是就安裝了,但是安裝之後發現了一個問題:原來的工作列擋住了這個軟體的介面,於是就想辦法把CentOS 7隱藏工作列。

1.隱藏工作列

 刪除/usr/share/gnome-shell/extensions/[email protected]extensions.gcampax.github.com 目錄

 刪除之前先備份,需要管理員許可權,我直接備份到了所在目錄,下邊的操作是在/usr/share/gnome-shell/extensions/進行的

cp [email protected] [email protected]

刪除

rm -rf [email protected]

這兩步也可以直接一步解決

mv [email protected] cp [email protected]

2.隱藏頂欄

 需要修改三個檔案,分別是/usr/share/gnome-shell/modes/classic.json,/usr/share/gnome-shell/theme/gnome-classic.css  和/usr/share/gnome-shell/theme/gnome-shell.css

/usr/share/gnome-shell/modes/classic.json

還是先備份,進入/usr/share/gnome-shell/modes/目錄

cp classic.json classic.json.backup

修改內容,vi在命令模式下可以使用“/關鍵詞“進行查詢

vi classic.json

修改如下

 "panel":{ "left": [],
    "center": [],
     "right": []
   }

/usr/share/gnome-shell/theme/gnome-classic.css

再說一遍,先備份

修改如下

#panel {

    background-color: #e9e9e9;

    background-gradient-direction
: vertical; background-gradient-end: #d0d0d0; border-top-color: #666; /* we don't supportnon-uniform border-colors and use the top bordercolor for any border, so we need to set iteven if all we want is a bottom border */ border-bottom: 1px solid #666; app-icon-bottom-clip: 0px; color: transparent; /* hrm, still no multipoint gradients background-image: linear-gradient(left,rgba(255, 255, 255, 0),rgba(255, 255, 255, 1) 50%,rgba(255, 255, 255, 0)) !important;*/ }

/usr/share/gnome-shell/theme/gnome-shell.css修改兩處

最後一次強調,先備份

//第一處
#panel {
    background-color:transparent;
    font-weight: bold;
    height: 0px;
   }
//第二處
 .panel-logo-icon {
  padding-right: .4em;
  icon-size: 1px;
  }

原始程式碼

/usr/share/gnome-shell/modes/classic.json

{
    "parentMode": "user",
    "stylesheetName": "gnome-classic.css",
    "enabledExtensions": ["[email protected]","[email protected]","[email protected]","[email protected]","[email protected]"],
    "panel": { "left": ["activities", "appMenu"],
               "center": [],
               "right": ["a11y", "keyboard", "dateMenu", "aggregateMenu"]
             }
}

/usr/share/gnome-shell/theme/gnome-classic.css 

#panel {
    background-color: #e9e9e9;
    background-gradient-direction: vertical;
    background-gradient-end: #d0d0d0;
    border-top-color: #666; /* we don't support non-uniform border-colors and
                               use the top border color for any border, so we
                               need to set it even if all we want is a bottom
                               border */
    border-bottom: 1px solid #666;
    app-icon-bottom-clip: 0px;

/* hrm, still no multipoint gradients
    background-image: linear-gradient(left, rgba(255, 255, 255, 0), rgba(255, 255, 255, 1) 50%, rgba(255, 255, 255, 0)) !important;*/
}

/usr/share/gnome-shell/theme/gnome-shell.css

//這是我後來改的,原先的忘記備份了,可以正常顯示,和原來差不多
#panel {
    background-color: #fff;
    font-weight: bold;
    height: 1.8em;
}
.panel-logo-icon {
  padding-right: .4em;
  icon-size: .4em;
}