Skip to content

Commit

Permalink
refactor: css, add i3-like theme
Browse files Browse the repository at this point in the history
  • Loading branch information
numeroflip committed Jan 24, 2022
1 parent 3b28e32 commit 41022b0
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 46 deletions.
8 changes: 4 additions & 4 deletions extension.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,8 @@ class WorkspacesBar extends PanelMenu.Button {
const BASE_CLASS = "desktop__label";
let classes = BASE_CLASS;

const has_windows =
global.workspace_manager.get_workspace_by_index(ws_index)
.n_windows > 0;
const has_windows = global.workspace_manager.get_workspace_by_index(ws_index)
.n_windows > 0;
const is_active = ws_index == this.active_ws_index;

if (is_active) classes += ` ${BASE_CLASS}--active`;
Expand All @@ -109,8 +108,9 @@ class WorkspacesBar extends PanelMenu.Button {
this.ws_box.label = new St.Label({y_align: Clutter.ActorAlign.CENTER});
this.ws_box.label.style_class = this._get_ws_box_class(ws_index);

const ws_name = String(this.workspaces_names[ws_index] || ws_index + 1)
const ws_name = String(this.workspaces_names[ws_index] || ws_index + 1);

this.ws_box.label.set_text(ws_name);
this.ws_box.set_child(this.ws_box.label);
this.ws_box.connect('button-release-event', () => this._toggle_ws(ws_index) );
this.ws_bar.add_actor(this.ws_box);
Expand Down
83 changes: 41 additions & 42 deletions stylesheet.css
Original file line number Diff line number Diff line change
@@ -1,67 +1,66 @@
/* framed version */
/* :::::::::::::::::::::::: */
/* :::: Framed version :::: */
/* :::::::::::::::::::::::: */

/*.desktop-label-nonempty-active {
/* empty inactive state
.desktop__label {
margin-left: 0px;
margin-right: 8px;
background-color: rgba(128, 128, 128, 0.7);
color: rgba(207, 207, 207, 1);
border: 1px solid rgba(207, 207, 207, 0.7);
border-radius: 4px;
}
.desktop-label-nonempty-inactive {
margin-left: 0px;
margin-right: 8px;
padding: 0 4px;
background-color: rgba(76, 76, 76, 0.7);
color: rgba(207, 207, 207, 0.7);
border: 1px solid rgba(207, 207, 207, 0.7);
border: 1px solid rgba(207, 207, 207, 0);
border-radius: 4px;
}
.desktop-label-empty-active {
margin-left: 0px;
margin-right: 8px;
background-color: rgba(128, 128, 128, 0.7);
color: rgba(207, 207, 207, 1);
border: 1px solid rgba(207, 207, 207, 0);
border-radius: 4px;
.desktop__label.desktop__label--occupied {
background-color: rgba(96, 96, 96, 0.7);
border: 1px solid rgba(207, 207, 207, 0.7);
}
.desktop-label-empty-inactive {
margin-left: 0px;
margin-right: 8px;
background-color: rgba(76, 76, 76, 0.7);
color: rgba(207, 207, 207, 0.7);
border: 1px solid rgba(207, 207, 207, 0);
border-radius: 4px;
}*/
.desktop__label.desktop__label--active {
color: rgba(207, 207, 207, 1);
background-color: rgba(128, 128, 128, 0.7);
} */

/* non-framed version */
/* :::::::::::::::::::::::: */
/* :: Non-framed version :: */
/* :::::::::::::::::::::::: */

.desktop-label-nonempty-active {
.desktop__label {
margin-left: 0px;
margin-right: 8px;
background-color: rgba(154, 154, 154, 0.7);

padding: 0 4px;

background-color: rgba(0, 0, 0, 0);
border-radius: 4px;
}

.desktop-label-nonempty-inactive {
margin-left: 0px;
margin-right: 8px;
.desktop__label.desktop__label--occupied {
background-color: rgba(96, 96, 96, 0.7);
border-radius: 4px;
}

.desktop-label-empty-active {
margin-left: 0px;
margin-right: 8px;
.desktop__label.desktop__label--active {
background-color: rgba(154, 154, 154, 0.7);
border-radius: 4px;
}

.desktop-label-empty-inactive {
margin-left: 0px;
margin-right: 8px;
background-color: rgba(0, 0, 0, 0.0);
border-radius: 4px;
/* :::::::::::::::::::::::: */
/* ::::: i3 - version ::::: */
/* :::::::::::::::::::::::: */

/* .desktop__label {
padding: 8px 6px;
background-color: transparent;
color: rgba(255, 255, 255, 0.6);
}
.desktop__label.desktop__label--occupied {
color: white;
}
.desktop__label.desktop__label--active {
background-color: rgba(255, 255, 255, 0.2);
} */

0 comments on commit 41022b0

Please sign in to comment.