Closed cjstock closed 4 years ago
wpgtk only runs one command, not a lista of commands, are you trying to run more than one? You could place all your commands in be script and run that instead
On Fri, Aug 9, 2019, 11:36 PM Corey Stock notifications@github.com wrote:
I created a script reset_gtk `#!/bin/zsh Resets GTK theme
gsettings set org.gnome.desktop.interface gtk-theme Adwaita-dark; gsettings set org.gnome.desktop.interface icon-theme Adwaita; gsettings set org.gnome.desktop.interface gtk-theme FlatColor; gsettings set org.gnome.desktop.interface icon-theme flattrcolor;`
I can run the script no problem from the command line, however, if I add it to the commands to execute after setting the wallpaper, it doesn't run.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/deviantfero/wpgtk/issues/161?email_source=notifications&email_token=ACVCGSIPI4GDEH6S4XWUSGTQDZHWVA5CNFSM4IKYUHLKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HEQPMRQ, or mute the thread https://github.com/notifications/unsubscribe-auth/ACVCGSMXD7EELA75HD2P6CLQDZHWVANCNFSM4IKYUHLA .
I have a script called reset_gtk with the following contents:
#!/bin/zsh xrdb -merge ~/.Xresources-regolith-1.2.15; i3-msg reload; i3-msg restart; gsettings set org.gnome.desktop.interface gtk-theme Adwaita-dark; gsettings set org.gnome.desktop.interface icon-theme Adwaita; gsettings set org.gnome.desktop.interface gtk-theme FlatColor; gsettings set org.gnome.desktop.interface icon-theme flattrcolor;
Here is the command I use to run the script in wpgtk:
source ~/myscripts/reset_gtk
When I set a new wallpaper, the gsettings commands don't seem to run, as all programs other than my terminal still use the old theme. If I run the script directly from the terminal, it works perfectly, and my gtk applications now use the new theme.
could you try: zsh -c /path/to/script
?
That doesn't seem to work either. The main purpose of the script is to apply the new colorscheme to my gtk applications. For some reason the "Reload GTK+" feature in the options of wpgtk doesn't work, so I'm trying to do it manually.
The "Reload GTK+" only works with the included theme, I'll keep this in mind for future releases, but could you post the log of applying a theme there? any errors should appear on the console, try to do a wpg -m
from the console
I see. Here is the ouput of wpg -m
[i] image Using image flower_2560x1440.jpg.
[i] theme Set theme to _home_corey__config_wpg_wallpapers_flower_2560x1440_jpg_dark_wal__1.1.0.json.
[i] colors Found cached colorscheme.
[i] sequences Set terminal colors.
[i] export Exported all files.
[i] export Exported all user files.
[i] color wrote: icon-step1
[i] color wrote: _etc_rofi.conf
[i] color wrote: corey_Xresources.d_color-wpg
[i] color wrote: gtk2
[i] color wrote: corey_Xresources.d_i3-wm
[i] color wrote: gtk3.0
[i] color wrote: gtk3.20
[i] color wrote: corey_Xresources.d_i3xrocks
[i] wallpaper Set the new wallpaper.
➜ ~ [{"success":true}]
➜ ~ ```
@deviantfero Hey! thanks for your help and building this amazing tool! I would like to contribute the following to this issue:
I have noticed that when I run a command to update the lockscreen with a script called betterlockscreen (takes a few seconds to run), something wierd happens:
bilaal@starshot ~/dev/computer-setup [13:05:22]
> $ wpg -s ~/Pictures/rain-drops-mac.jpg ⬡ 10.16.0 [±master ●●]
[i] image Using image rain-drops-mac.jpg.
[i] theme Set theme to _home_bilaal_Pictures_rain-drops-mac_jpg_dark_wal__1.1.0.json.
[i] colors Found cached colorscheme.
[i] sequences Set terminal colors.
[i] export Exported all files.
[i] export Exported all user files.
[i] color wrote: icon-step1
[i] color wrote: gtk3.0
[i] color wrote: gtk2
[i] color wrote: gtk3.20
[i] color wrote: tmux
[i] color wrote: i3
[i] color wrote: polybar
[i] color wrote: wal-color-theme.json
[i] wallpaper Set the new wallpaper.
Tmux reloaded!
bilaal@starshot ~/dev/computer-setup [13:05:31]
Got 2880x1800 /home/bilaal/.cache/i3lock/2880x1800
> $ Generating alternate images based on the image you specified,16.0 [±master ●●]
please wait this might take few seconds...
Converting provided image to match your resolution...
> $ ⬡ 10.16.0 [±master ●●]
Applying dim, blur, and pixelation effect to resized image
Caching images for faster screen locking
> $ ⬡ 10.16.0 [±master ●●]
All required changes have been applied
wpgtk creates the config files from their base files fine, then it goes on run the script and the first command is to reload the tmux.conf file, which works fine. Then the script executes the betterlockscreen script, but wait, the first line of my prompt returns... ??? then the script carries on and my prompt returns... ??? it seems my prompt is returning multiple times but the betterlockscreen script is still outputting to the terminal.
the command I am using in wpgtk is:
command = ~/dev/computer-setup/scripts/afterColorise.sh
where afterColorise is an executable script. the contents of the script are:
tmux source-file ~/.tmux.conf && echo "Tmux reloaded!" && betterlockscreen -u $(cat ~/.fehbg | awk 'NR==2 {print $3}' | tr -d \')
I have tried:
command = source ~/dev/computer-setup/scripts/afterColorise.sh
as well as using zsh -c.
Any help would be appreciated! :+1:
I stopped trying to call the script after wpg. Instead, in my 'afterColorise.sh' I first call a wpg command:
!/bin/bash
Sets randcom theme and handles fixes
wpg -m; xrdb -merge ~/.Xresources-regolith; i3-msg reload; i3-msg restart; gsettings set org.gnome.desktop.interface gtk-theme Adwaita-dark; gsettings set org.gnome.desktop.interface icon-theme Adwaita; gsettings set org.gnome.desktop.interface gtk-theme FlatColor; gsettings set org.gnome.desktop.interface icon-theme flattrcolor; spicetify update;
@cjstock did you try to run this script with bash, like this bash ~/afterColorise.sh
?
@bilaal-s you get this output, but does the command actually work?
@deviantfero Yes the command does work, to be honest, I have noticed this occurring with different programs so I don't think the problem I am having is a wpgtk issue. I only recently realized this ( I am new to linux, sorry). alas, it would be cool to know why this is happening.
I created a script reset_gtk
#!/bin/zsh gsettings set org.gnome.desktop.interface gtk-theme Adwaita-dark; gsettings set org.gnome.desktop.interface icon-theme Adwaita; gsettings set org.gnome.desktop.interface gtk-theme FlatColor; gsettings set org.gnome.desktop.interface icon-theme flattrcolor;
I can run the script no problem from the command line, however, if I add it to the commands to execute after setting the wallpaper, it doesn't run.