Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c0eb0965a8 | ||
|
|
c940139fd9 | ||
|
|
10b1b2a1e6 | ||
|
|
b4b7d3486a | ||
|
|
61a5595d84 | ||
|
|
cb44c7215f | ||
|
|
e7fafebf55 | ||
|
|
702cbb1c5c | ||
|
|
7de2854041 |
14
README.md
14
README.md
@@ -172,7 +172,7 @@ Edit `~/.config/nwg-drawer/drawer.css` to your taste.
|
||||
When the search phrase is at least 3 characters long, your XDG user directories are being searched.
|
||||
|
||||
Use the **left mouse button** to open a file with the `xdg-open` command. As configuring file associations for it is
|
||||
PITA, you may override them, by creating the `~/.config/nwg-panel/preferred-apps.json` file with your own definitions.
|
||||
PITA, you may override them, by creating the `~/.config/nwg-drawer/preferred-apps.json` file with your own definitions.
|
||||
|
||||
### Sample `preferred-apps.json` file content
|
||||
|
||||
@@ -199,7 +199,7 @@ I've noy yet tried other file managers.
|
||||
### File search exclusions
|
||||
|
||||
You may want to exclude some paths inside your XDG user directories from searching. If so, define exclusions in the
|
||||
`~/.config/nwg-panel/excluded-dirs` file, e.g. like this:
|
||||
`~/.config/nwg-drawer/excluded-dirs` file, e.g. like this:
|
||||
|
||||
```text
|
||||
# exclude all paths containing 'node_modules'
|
||||
@@ -212,6 +212,16 @@ If the search box is not empty, and you press Enter, the search box content will
|
||||
If the result is not an error, it will be displayed in a small window, and copied to the clipboard with wl-copy.
|
||||
Press any key to close the window.
|
||||
|
||||
You may change the result label styling e.g. like this:
|
||||
|
||||
```css
|
||||
/* math operation result label */
|
||||
#math-label {
|
||||
font-weight: bold;
|
||||
font-size: 16px
|
||||
}
|
||||
```
|
||||
|
||||
## Credits
|
||||
|
||||
This program uses some great libraries:
|
||||
|
||||
@@ -32,3 +32,9 @@ button:hover {
|
||||
border: 1px dotted gray;
|
||||
border-radius: 15px
|
||||
}
|
||||
|
||||
/* math operation result label */
|
||||
#math-label {
|
||||
font-weight: bold;
|
||||
font-size: 16px
|
||||
}
|
||||
|
||||
2
go.mod
2
go.mod
@@ -16,5 +16,5 @@ require (
|
||||
github.com/joshuarubin/lifecycle v1.1.4 // indirect
|
||||
go.uber.org/multierr v1.11.0 // indirect
|
||||
golang.org/x/sync v0.8.0 // indirect
|
||||
golang.org/x/sys v0.25.0 // indirect
|
||||
golang.org/x/sys v0.26.0 // indirect
|
||||
)
|
||||
|
||||
2
go.sum
2
go.sum
@@ -39,6 +39,8 @@ golang.org/x/sys v0.21.0 h1:rF+pYz3DAGSQAxAu1CbC7catZg4ebC4UIeIhKxBZvws=
|
||||
golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||
golang.org/x/sys v0.25.0 h1:r+8e+loiHxRqhXVl6ML1nO3l1+oFoWbnlu2Ehimmi34=
|
||||
golang.org/x/sys v0.25.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||
golang.org/x/sys v0.26.0 h1:KHjCJyddX0LoSTb3J+vWpupP9p0oznkqVk/IfjymZbo=
|
||||
golang.org/x/sys v0.26.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
||||
|
||||
3
main.go
3
main.go
@@ -22,7 +22,7 @@ import (
|
||||
"github.com/gotk3/gotk3/gtk"
|
||||
)
|
||||
|
||||
const version = "0.5.1"
|
||||
const version = "0.5.2"
|
||||
|
||||
var (
|
||||
appDirs []string
|
||||
@@ -433,6 +433,7 @@ func main() {
|
||||
|
||||
if wayland() {
|
||||
layershell.InitForWindow(win)
|
||||
layershell.SetNamespace(win, "nwg-drawer")
|
||||
|
||||
var output2mon map[string]*gdk.Monitor
|
||||
if *targetOutput != "" {
|
||||
|
||||
@@ -617,10 +617,11 @@ func setUpOperationResultWindow(operation string, result string) {
|
||||
vBox, _ := gtk.BoxNew(gtk.ORIENTATION_HORIZONTAL, 5)
|
||||
outerVBox.PackStart(vBox, true, true, 6)
|
||||
lbl, _ := gtk.LabelNew(fmt.Sprintf("%s = %s", operation, result))
|
||||
lbl.SetProperty("name", "math-label")
|
||||
vBox.PackStart(lbl, true, true, 12)
|
||||
|
||||
mRefProvider, _ := gtk.CssProviderNew()
|
||||
css := "window { background-color: rgba (0, 0, 0, 255); color: #fff; font-weight: bold; border: solid 1px grey; border-radius: 5px}"
|
||||
css := "window { background-color: rgba (0, 0, 0, 255); color: #fff; border: solid 1px grey; border-radius: 5px}"
|
||||
err = mRefProvider.LoadFromData(css)
|
||||
if err != nil {
|
||||
log.Warn(err)
|
||||
|
||||
Reference in New Issue
Block a user