CentOS 7 隱藏任務欄和頂欄


我使用的是Gnome,對於使用慣了windows的我來說,這個界面確實有點丑,但是,也將就着用了,最近發現有一款軟件(Cairo-Dock)可以美化桌面,於是就安裝了,但是安裝之后發現了一個問題:原來的任務欄擋住了這個軟件的界面,於是就想辦法隱藏任務欄

1.隱藏任務欄

 刪除/usr/share/gnome-shell/extensions/window-list@gnome-shell-extensions.gcampax.github.com 目錄

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

cp window-list@gnome-shell-extensions.gcampax.github.com window-list@gnome-shell-extensions.gcampax.github.com.backup

刪除

rm -rf window-list@gnome-shell-extensions.gcampax.github.com

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

mv window-list@gnome-shell-extensions.gcampax.github.com cp window-list@gnome-shell-extensions.gcampax.github.com.backup

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": ["apps-menu@gnome-shell-extensions.gcampax.github.com","places-menu@gnome-shell-extensions.gcampax.github.com","alternate-tab@gnome-shell-extensions.gcampax.github.com","launch-new-instance@gnome-shell-extensions.gcampax.github.com","window-list@gnome-shell-extensions.gcampax.github.com"],
    "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;
}

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM