Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Blur and border. #1404

Open
wants to merge 26 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
10e19e4
Add files via upload
fer-moreira Oct 9, 2020
5b5042d
Including margin on opposite direction
eibrunorodrigues Feb 24, 2021
658e05f
Add files via upload
fer-moreira Apr 16, 2021
745214b
Update README.md
fer-moreira Apr 16, 2021
93daf9d
Update README.md
fer-moreira Apr 18, 2021
b94aa59
Merge pull request #1 from eibrunorodrigues/feature/opposite-margin
fer-moreira Jun 4, 2021
5a7a835
Merge dash-to-dock into floating dock
fer-moreira Oct 10, 2021
0c754fd
fix border
fer-moreira Oct 10, 2021
b1db9b0
working in gnome 40
fer-moreira Oct 11, 2021
08e344f
fix opacity and custom color
fer-moreira Oct 11, 2021
5fa4649
fix metadata
fer-moreira Oct 11, 2021
f8d5ee0
Merge pull request #4 from fer-moreira/gnome40
fer-moreira Oct 11, 2021
fa04846
Update to gnome41
fer-moreira Nov 3, 2021
49601be
replace dashtodock to floating dock
fer-moreira Nov 3, 2021
2248ce5
Merge pull request #8 from fer-moreira/gnome41
fer-moreira Nov 3, 2021
6e4fb12
Update README.md
fer-moreira Nov 3, 2021
a3524b3
Update _stylesheet.scss
fer-moreira Nov 4, 2021
efa438b
Update _stylesheet.scss
fer-moreira Nov 4, 2021
cd14b78
new version
fer-moreira Nov 4, 2021
733ba36
Merge pull request #9 from fer-moreira/fix/square-corners
fer-moreira Nov 4, 2021
6e1a3b0
add preview
fer-moreira Nov 4, 2021
1ef8889
new previews
fer-moreira Nov 4, 2021
170e470
rename conflicts with dash to dock
airtonix Jan 4, 2022
2ca7902
Merge pull request #10 from airtonix/patch-1
fer-moreira Jan 7, 2022
f21cf38
Update metadata.json
MahendraSinghChelak Apr 7, 2022
7ce4732
Merge pull request #11 from MSCHELAK/patch-1
fer-moreira Apr 12, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Basic Makefile

UUID = dash-to-dock@micxgx.gmail.com
UUID = floating-dock@nandoferreira_prof@hotmail.com
BASE_MODULES = extension.js metadata.json COPYING README.md
EXTRA_MODULES = dash.js docking.js appIcons.js appIconIndicators.js fileManager1API.js launcherAPI.js locations.js windowPreview.js intellihide.js prefs.js theming.js utils.js dbusmenuUtils.js Settings.ui
EXTRA_MEDIA = logo.svg glossy.svg highlight_stacked_bg.svg highlight_stacked_bg_h.svg
Expand All @@ -14,7 +14,7 @@ else
SHARE_PREFIX = $(DESTDIR)/usr/share
INSTALLBASE = $(SHARE_PREFIX)/gnome-shell/extensions
endif
INSTALLNAME = dash-to-dock@micxgx.gmail.com
INSTALLNAME = floating-dock@nandoferreira_prof@hotmail.com

# The command line passed variable VERSION is used to set the version string
# in the metadata and in the generated zip-file. If no VERSION is passed, the
Expand Down Expand Up @@ -48,7 +48,7 @@ mergepo: potfile

./po/dashtodock.pot: $(TOLOCALIZE) Settings.ui
mkdir -p po
xgettext -k --keyword=__ --keyword=N__ --add-comments='Translators:' -o po/dashtodock.pot --package-name "Dash to Dock" --from-code=utf-8 $(TOLOCALIZE)
xgettext -k --keyword=__ --keyword=N__ --add-comments='Translators:' -o po/dashtodock.pot --package-name "Floating Dock" --from-code=utf-8 $(TOLOCALIZE)
intltool-extract --type=gettext/glade Settings.ui
xgettext -k --keyword=_ --keyword=N_ --join-existing -o po/dashtodock.pot Settings.ui.h

Expand Down
31 changes: 18 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,27 @@
# Dash to Dock
![screenshot](https://github.com/micheleg/dash-to-dock/raw/master/media/screenshot.jpg)
# Floating Dock

## A dock for the GNOME Shell
This extension enhances the dash moving it out of the overview and transforming it in a dock for an easier launching of applications and a faster switching between windows and desktops without having to leave the desktop view.
Floating dock is just a dash-to-dock fork, originaly made by Michele Gaio

[<img src="https://micheleg.github.io/dash-to-dock/media/get-it-on-ego.png" height="100">](https://extensions.gnome.org/extension/307/dash-to-dock)
now you can edit the margin and border-radius from the dock

For additional installation instructions and more information visit [https://micheleg.github.io/dash-to-dock/](https://micheleg.github.io/dash-to-dock/).
![Floating Dock Left](./media/dock_left.png)
<br></br>
![Floating Dock Bottom](./media/dock_bottom.png)

## Installation from source
# TODO

- add hook to Dash to Panel
- add abillity to use blur-provider
- option to disable notification bubble
- option to remove the application indicators
- More customization like, border-radius of app icon, zoom on hover icons

The extension can be installed directly from source, either for the convenience of using git or to test the latest development version. Clone the desired branch with git

### Build Dependencies

To compile the stylesheet you'll need an implementation of SASS. Dash to Dock supports `dart-sass` (`sass`), `sassc`, and `ruby-sass`. Every distro should have at least one of these implementations, we recommend using `dart-sass` (`sass`) or `sassc` over `ruby-sass` as `ruby-sass` is deprecated.
To compile the stylesheet you'll need an implementation of SASS. Floating Dock supports `dart-sass` (`sass`), `sassc`, and `ruby-sass`. Every distro should have at least one of these implementations, we recommend using `dart-sass` (`sass`) or `sassc` over `ruby-sass` as `ruby-sass` is deprecated.

By default, Dash to Dock will attempt to build with `dart-sass`. To change this behavior set the `SASS` environment variable to either `sassc` or `ruby`.
By default, Floating Dock will attempt to build with `dart-sass`. To change this behavior set the `SASS` environment variable to either `sassc` or `ruby`.

```bash
export SASS=sassc
Expand All @@ -31,15 +36,15 @@ Clone the repository or download the branch from github. A simple Makefile is in
Next use `make` to install the extension into your home directory. A Shell reload is required `Alt+F2 r Enter` under Xorg or under Wayland you may have to logout and login. The extension has to be enabled with *gnome-extensions-app* (GNOME Extensions) or with *dconf*.

```bash
git clone https://github.com/micheleg/dash-to-dock.git
git clone https://github.com/fer-moreira/floating-dock.git
make
make install
```

## Bug Reporting

Bugs should be reported to the Github bug tracker [https://github.com/micheleg/dash-to-dock/issues](https://github.com/micheleg/dash-to-dock/issues).
Bugs should be reported to the Github bug tracker [https://github.com/fer-moreira/floating-dock/issues](https://github.com/fer-moreira/floating-dock/issues).

## License
Dash to Dock Gnome Shell extension is distributed under the terms of the GNU General Public License,
Floating Dock Gnome Shell extension is distributed under the terms of the GNU General Public License,
version 2 or later. See the COPYING file for details.
99 changes: 98 additions & 1 deletion Settings.ui
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,19 @@
<property name="step-increment">0.01</property>
<property name="page-increment">0.10</property>
</object>

<object class="GtkAdjustment" id="custom_radius_adjustment">
<property name="upper">100</property>
<property name="step_increment">1</property>
<property name="page_increment">10</property>
</object>

<object class="GtkAdjustment" id="custom_margin_adjustment">
<property name="upper">20</property>
<property name="step_increment">1</property>
<property name="page_increment">10</property>
</object>

<object class="GtkAdjustment" id="dock_size_adjustment">
<property name="lower">0.33</property>
<property name="upper">1</property>
Expand Down Expand Up @@ -1996,6 +2009,90 @@
</property>
</object>
</child>

<child>
<object class="GtkListBoxRow" id="listboxrow_border_radius_lbr">
<property name="width_request">100</property>
<property name="height_request">80</property>
<property name="child">
<object class="GtkBox">
<property name="can_focus">0</property>
<property name="spacing">32</property>
<property name="margin_start">12</property>
<property name="margin_end">12</property>
<property name="margin_top">12</property>
<property name="margin_bottom">12</property>
<child>
<object class="GtkLabel" id="custom_border_lbl">
<property name="hexpand">0</property>
<property name="can_focus">0</property>
<property name="valign">center</property>
<property name="halign">start</property>
<property name="label" translatable="yes">Border radius</property>

</object>
</child>
<child>
<object class="GtkScale" id="custom_radius_scale">
<property name="hexpand">1</property>
<property name="draw-value">1</property>
<property name="adjustment">custom_radius_adjustment</property>

<property name="restrict_to_fill_level">0</property>
<property name="fill_level">0</property>
<property name="round_digits">0</property>
<property name="digits">0</property>
<property name="value_pos">right</property>
<!-- <signal name="format-value" handler="custom_radius_scale_format_value_cb" swapped="no" /> -->
<signal name="value-changed" handler="custom_radius_scale_value_changed_cb" swapped="no" />
</object>
</child>
</object>
</property>
</object>
</child>

<child>
<object class="GtkListBoxRow" id="listboxrow_custom_margin">
<property name="width_request">100</property>
<property name="height_request">80</property>
<property name="child">
<object class="GtkBox">
<property name="can_focus">0</property>
<property name="spacing">32</property>
<property name="margin_start">12</property>
<property name="margin_end">12</property>
<property name="margin_top">12</property>
<property name="margin_bottom">12</property>
<child>
<object class="GtkLabel" id="custom_margin_lbl">
<property name="hexpand">0</property>
<property name="can_focus">0</property>
<property name="valign">center</property>
<property name="halign">start</property>
<property name="label" translatable="yes">Margin</property>

</object>
</child>
<child>
<object class="GtkScale" id="custom_margin_scale">
<property name="hexpand">1</property>
<property name="draw-value">1</property>
<property name="adjustment">custom_margin_adjustment</property>

<property name="restrict_to_fill_level">0</property>
<property name="fill_level">0</property>
<property name="round_digits">0</property>
<property name="digits">0</property>
<property name="value_pos">right</property>
<!-- <signal name="format-value" handler="custom_margin_scale_format_value_cb" swapped="no"/> -->
<signal name="value-changed" handler="custom_margin_scale_value_changed_cb" swapped="no"/>
</object>
</child>
</object>
</property>
</object>
</child>
</object>
</property>
<child type="label_item">
Expand Down Expand Up @@ -2035,7 +2132,7 @@
<child>
<object class="GtkLabel" id="extension_name">
<property name="can_focus">0</property>
<property name="label">&lt;b&gt;Dash to Dock&lt;/b&gt;</property>
<property name="label">&lt;b&gt;Floating Dock&lt;/b&gt;</property>
<property name="use_markup">1</property>
</object>
</child>
Expand Down
14 changes: 14 additions & 0 deletions _stylesheet.scss
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ $osd_fg_color: #eeeeec;
padding: $dash_spacing;
padding-#{$side}: $dash_padding + $dock_side_margin;
padding-#{opposite($side)}: $dash_padding;

border-radius: 100px;
}
}
}
Expand Down Expand Up @@ -352,3 +354,15 @@ $osd_fg_color: #eeeeec;
background-size: contain;
}
}

.app-well-app {
border-radius: 13px;
}

.app-well-app * {
border-radius: 13px;
}

.show-apps * {
border-radius: 13px;
}
23 changes: 21 additions & 2 deletions appIcons.js
Original file line number Diff line number Diff line change
Expand Up @@ -184,13 +184,32 @@ var DockAbstractAppIcon = GObject.registerClass({
}
);
});

''
this._updateState();
this._numberOverlay();
this.updateIconGeometry();

this._previewMenuManager = null;
this._previewMenu = null;


let effector_keys = [
'border-radius',
];

this._signalsHandler.add(...effector_keys.map(key => [
Docking.DockManager.settings,
`changed::${key}`,
() => this.updateIconTheming(),
]));
}

updateIconTheming()
{
let settings = Docking.DockManager.settings;
this._border_radius = settings.get_int('border-radius');
let newStyle = 'border-radius: ' + this._border_radius + "px;";
this.get_children()[0].set_style(newStyle);
}

_onDestroy() {
Expand Down Expand Up @@ -1351,7 +1370,7 @@ class DockShowAppsIconMenu extends DockAppIconMenu {

/* Translators: %s is "Settings", which is automatically translated. You
can also translate the full message if this fits better your language. */
let name = __('Dash to Dock %s').format(_('Settings'))
let name = __('Floating Dock %s').format(_('Settings'))
let item = this._appendMenuItem(name);

item.connect('activate', function () {
Expand Down
Binary file added media/dock_bottom.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added media/dock_left.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added media/github_preview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading