Skip to content

Commit

Permalink
small changes
Browse files Browse the repository at this point in the history
  • Loading branch information
kociumba committed Oct 11, 2024
1 parent 705c9b6 commit 353eb76
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .task/checksum/build
Original file line number Diff line number Diff line change
@@ -1 +1 @@
18f2d39cff8b43ed829b9b6dac85391e
a3106ea54a44aec1a02675c485dadac2
2 changes: 1 addition & 1 deletion FyneApp.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ Website = "https://github.com/kociumba/Kinjector"
Name = "Kinjector"
ID = "org.kociumba.kinjector"
Version = "1.0.0"
Build = 60
Build = 62
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ go 1.23
require (
fyne.io/fyne/v2 v2.5.0
github.com/charmbracelet/log v0.4.0
github.com/davecgh/go-spew v1.1.1
golang.org/x/sys v0.20.0
)

require (
fyne.io/systray v1.11.0 // indirect
github.com/BurntSushi/toml v1.4.0 // indirect
github.com/akavel/rsrc v0.10.2 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/dchest/jsmin v0.0.0-20220218165748-59f39799265f // indirect
github.com/fredbi/uri v1.1.0 // indirect
github.com/fsnotify/fsnotify v1.7.0 // indirect
Expand Down
12 changes: 12 additions & 0 deletions injector.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import (
"fyne.io/fyne/v2/widget"
xwidget "fyne.io/x/fyne/widget"
clog "github.com/charmbracelet/log"
"github.com/davecgh/go-spew/spew"
ps "github.com/mitchellh/go-ps"
"github.com/ncruces/zenity"
)
Expand Down Expand Up @@ -327,9 +328,11 @@ func main() {
}

injectShortcutText := canvas.NewText("inject: CTRL+SHIFT+J", color.RGBA{150, 150, 150, 255})
injectShortcutText.TextSize = 12
injectShortcutText.TextStyle.Italic = true
injectShortcutText.Alignment = fyne.TextAlignCenter
quitShortcutText := canvas.NewText("quit: CTRL+Q", color.RGBA{150, 150, 150, 255})
quitShortcutText.TextSize = 12
quitShortcutText.TextStyle.Italic = true
quitShortcutText.Alignment = fyne.TextAlignCenter

Expand Down Expand Up @@ -421,6 +424,15 @@ func main() {
}
})

w.Canvas().AddShortcut(
&desktop.CustomShortcut{
KeyName: fyne.KeyD,
Modifier: fyne.KeyModifierControl | fyne.KeyModifierShift,
},
func(shortcut fyne.Shortcut) {
spew.Dump(userSelection)
})

clog.Info("Running...")
w.ShowAndRun()
}
5 changes: 5 additions & 0 deletions settings.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
"fyne.io/fyne/v2/theme"
"fyne.io/fyne/v2/widget"
clog "github.com/charmbracelet/log"
"github.com/davecgh/go-spew/spew"
)

type SettingsSelection struct {
Expand Down Expand Up @@ -60,6 +61,10 @@ func initSettings() {

// Update checkbox states
updateCheckboxStates()

if *dbg {
spew.Dump(settingsSelection)
}
}

func (s *SettingsSelection) saveSettingsToFile() error {
Expand Down

0 comments on commit 353eb76

Please sign in to comment.