Gnome-tweak-tool - energy - lid close
...there is no option to adjust anything anymore...right?
http://i43.tinypic.com/nqv961.png
Right. The option has been removed.
Last edited by Thorsten Reinbold (2013-11-29 16:03:17)
Similar Messages
-
Python 2 is trying to import pyhon3 modules, gnome-tweak-tool broken
I can't start gnome-tweak-tool it complains
Traceback (most recent call last):
File "/usr/bin/gnome-tweak-tool", line 22, in <module>
import gi
File "/usr/lib/python3.3/site-packages/gi/__init__.py", line 27, in <module>
from ._gi import _API, Repository
ImportError: /usr/lib/libpyglib-gi-2.0-python3.so.0: undefined symbol: _Py_FalseStruct
It would appear that python2 is trying to import python3 modules. I also get this error with
>python2
>import gi
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python3.3/site-packages/gi/__init__.py", line 27, in <module>
from ._gi import _API, Repository
ImportError: /usr/lib/libpyglib-gi-2.0-python3.so.0: undefined symbol: _Py_FalseStruct
Why is this happening!? I had a similar issue a while back with python2 trying to import a (different) python3 module when trying to install something from the AUR but that was
fixed by doing
export $PYTHONPATH=/usr/lib/python2.7/site-packages
as on login my PYTHONPATH is set as /usr/lib/python3.3/site-packages, however this did not fix the gnome-tweak-tool issue.
my python3 sys.path is
['', '/usr/lib/python3.3/site-packages', '/usr/lib/python33.zip', '/usr/lib/python3.3', '/usr/lib/python3.3/plat-linux', '/usr/lib/python3.3/lib-dynload', '/usr/lib/python3.3/site-packages/setuptools-0.6c11.egg-info', '/usr/lib/python3.3/site-packages/setuptools-0.6c11.egg-info']
and my python2 sys.path is
['', '/usr/lib/python3.3/site-packages', '/usr/lib/python3.3/site-packages/setuptools-0.6c11.egg-info', '/usr/lib/python27.zip', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-linux2', '/usr/lib/python2.7/lib-tk', '/usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload', '/usr/lib/python2.7/site-packages', '/usr/lib/python2.7/site-packages/gtk-2.0', '/usr/lib/python2.7/site-packages/setuptools-0.6c11.egg-info', '/usr/lib/python2.7/site-packages/wx-2.8-gtk2-unicode']
Whats going wrong!?
Last edited by tbdc (2013-05-16 19:28:28)@prateek13 Please do not Necro-bump or Power-post
https://wiki.archlinux.org/index.php/Fo … Bumping.22
https://wiki.archlinux.org/index.php/Fo … mpty_Posts
Closing. -
[Gnome 3] gnome-tweak-tool crashes after update
Todays update apparently adds config to edit the window borders as well as checking for 2 folders for themes / icons: ~/.themes and ~/.icons.
These folders were not available by default on my gnome 3 installation, shouldn't these directories be provided by metacity?
[stefan@pcsteef ~]$ gnome-tweak-tool
Traceback (most recent call last):
File "/usr/bin/gnome-tweak-tool", line 81, in <module>
MainWindow()
File "/usr/bin/gnome-tweak-tool", line 46, in __init__
model)
File "/usr/lib/python2.7/site-packages/gtweak/tweakview.py", line 38, in __init__
self._model.load_tweaks()
File "/usr/lib/python2.7/site-packages/gtweak/tweakmodel.py", line 97, in load_tweaks
mods = __import__("gtweak.tweaks", globals(), locals(), tweak_files, 0)
File "/usr/lib/python2.7/site-packages/gtweak/tweaks/tweak_windows.py", line 72, in <module>
WindowThemeSwitcher(size_group=sg),
File "/usr/lib/python2.7/site-packages/gtweak/tweaks/tweak_windows.py", line 43, in __init__
[(t, t) for t in self._get_valid_themes()],
File "/usr/lib/python2.7/site-packages/gtweak/tweaks/tweak_windows.py", line 53, in _get_valid_themes
for t in os.listdir(thdir):
OSError: [Errno 2] No such file or directory: '/home/stefan/.themes'
the related commit:
http://git.gnome.org/browse/gnome-tweak … e8b78b367e
*edit*
related bugreport is already open:
https://bugzilla.gnome.org/show_bug.cgi?id=648735
Last edited by stefanwilkens (2011-04-27 08:04:55)Probably should, but those two directories weren't there on my clean install. I just created .themes and .icons and restarted the application, and it worked. (Saw the bug report)
...and the fix has already been released per bugzilla.
Last edited by caseyjp1 (2011-04-27 11:08:39) -
No option to change Window Title Bar Font in gnome-tweak-tool
Hey there,
did a fresh install today on a Haswell-PC. But there's no option to change Window Title Bar Font in gnome-tweak-tool anymore? All the other options are there.
Is there a way to set the Window Title Bar Font elsewhere? Does someone know why this option was removed or is it due to my system somehow? I also don't see this option in the dconf-editor.
Gnome 3.8, all the latest updates, Intel Core i5 with Intel HD 4600 Graphics
Thanks,
oSIRus
Last edited by lohmeyer (2013-07-18 18:27:24)b4nk4i wrote:I thought that maybe this is gnome-tweak-tool obsolete. But if you say few days ago you solved the problem again, than the version of gnome-tweak-tool should work. strange...
Hi,
Didi you solve this issue? I have a similar problem.
Thanks, -
Gnome-tweak-tool logo fix[commited upstream] alternate logos too
Hi everyone,
EDIT: Gnome has commited this icon upstream, so this is fixed. however, if you would like to use another one of my logo's for gnome-tweak-tool, just follow the guide using the correct .png file
I was mildy troubled by the logo in gnome-tweak-tool. the icon clearly was created on a white background, rather than using layers and transparency. because of this, if you are using any bg_color, other than white for your theme you end up with nasty white edges (how 1992 web experience - ish...lol). It's funny, because you are not really supposed to design logos, icons, or anything do do with a desktop/applications this way. - Especially, with transparency being pretty much a standard, everywhere...odd, but easily fixed
this is what i mean:
http://imageshack.us/photo/my-images/23/beforelogo.png
See, how even there are "stray - white - pixels" just below the image. yuck! hehehehe.
As I am using the Atolm-gtk3 theme - i really wanted to fix this, as it is an eye-sore and looked very unprofessional and dirty. So, i spent a few minutes to do just that! My revision of the Welcome Logo should now look good regardless of your color scheme.
Here is the after shot;
http://img818.imageshack.us/img818/2612/afterlogo.png
EDIT: look below at the next reply, as i have several versions, the one in this example still has white in the face, however, i have totally transparent one's as well...
How to Install
1. download my fixed logo, and save it to your desktop;
http://img8.imageshack.us/img8/2076/welcomefixed.png
2. Replace the original which you can do like so;
a. open a terminal, and type the following;
sudo cp '/home/*your-user-name*/Desktop/welcomefixed.png' '/usr/share/gnome-tweak-tool/welcome.png'
i'll probably pass this on to gnome too.
cheerz and enjoy
jordan
Look below, for my custom color version of the logo.
Last edited by triplesquarednine (2011-05-11 04:26:43)triplesquarednine wrote:
Hi everyone,
I was mildy troubled by the logo in gnome-tweak-tool. the icon clearly was created on a white background, rather than using layers and transparency. because of this, if you are using any bg_color, other than white for your theme you end up with nasty white edges (how 1992 web experience - ish...lol). It's funny, because you are not really supposed to design logos, icons, or anything do do with a desktop/applications this way. - Especially, with transparency being pretty much a standard, everywhere...odd, but easily fixed
this is what i mean:
http://img23.imageshack.us/img23/8504/beforelogo.png
Uploaded with ImageShack.us
See, how even there are "stray - white - pixels" just below the image. yuck! hehehehe.
As I am using the Atolm-gtk3 theme - i really wanted to fix this, as it is an eye-sore and looked very unprofessional and dirty. So, i spent a few minutes to do just that! My revision of the Welcome Logo should now look good regardless of your color scheme.
Here is the after shot;
http://img818.imageshack.us/img818/2612/afterlogo.png
Uploaded with ImageShack.us
How to Install
1. download my fixed logo, and save it to your desktop;
http://img8.imageshack.us/img8/2076/welcomefixed.png
Uploaded with ImageShack.us
2. Replace the original which you can do like so;
a. open a terminal, and type the following;
sudo cp '/home/*your-user-name*/Desktop/welcomefixed.png' '/usr/share/gnome-tweak-tool/welcome.png'
i'll probably pass this on to gnome too.
cheerz and enjoy
jordan
Moderator: [ewaller] Please read the Forum Etiquette rules on posting pictures
If you want, go ahead and provide thumbnails inside your links rather than the entire image
will do, and sorry...
jordan -
Gnome-tweak-tool changes which file?
i can't change gnome3 window theme through ".config/gtk-3.0/settings.ini" and "/etc/gtk-3.0/settings.ini"
but gnome-tweak-tool could do it.
but which file had it changed ?The settings are stored in a database for faster and safer access. You can edit them with the gsettings program. For example, to display the current value of the theme settings:
gsettings get org.gnome.desktop.wm.preferences theme
To set a new value:
gsettings set org.gnome.desktop.wm.preferences theme 'Adwaita'
Last edited by thebluesgnr (2012-09-16 14:29:03) -
Upgrade Gnome-Tweak-Tool
Can't change Theme, because user theme extension is now "[email protected]"
and not "[email protected]"
It's fix in the file : gtweak/tweaks/tweak_shell.py whith
THEME_EXT_NAME = "[email protected]"
Thankstrusktr wrote:@alexcortes and @Unia, Is it just me or do things seem a little discombobulated now with both gconf-editor and dconf-editor in the mix? Why not just keep one *-editor? It seems like this and many other little "issues" would be easier to catch with just one *-editor. What's the point of two?
Well yea I agree, but atm it's not going to happen. Anyway, since GS won't work with Catalyst for now I resorted to DWM and try to avoid all the gconf/dconf stuff. Works quite well -
While I know how to use the gnome-tweak-tool. I am curious as how I can remove the installed themes? currenlty I have a user .themes folder, but it seems that when I use the automatic install of a theme it installs to a different folder somewhere in usr/share (possibly)? If you might have any idea where these installations are added, that would be great. Thanks, Jon.
What do you mean the 'automatic install of a theme'? Do you mean installing a theme via pacman? or from some other tool?
From our Gnome wiki
/usr/share/themes/Adwaita/
/home/$USER/.themes/Adwaita
Looks like some GTK themes are in /usr/share/themes
you could also list the files installed by a theme package for example, (to see where its put the themes)
soif you did install a theme from pacman:
from our pacman wiki:
'To retrieve a list of the files installed by a package:'
pacman -Ql package_name
Last edited by jrussell (2013-09-28 07:09:53) -
I installed gnome-tweak-tool and mesed around for a bit and it no longer works. When I run gnome-tweak-tool It gives the error
$ gnome-tweak-tool
Traceback (most recent call last):
File "/usr/local/bin/gnome-tweak-tool", line 22, in <module>
import gi
I tried installing a version from git, and I think that only messed it up even more. I have no python experience, so im completly in the dark here. Any help/hint would be very much appreciated.
If you need any logs/information just ask.is simple, very simple
you built that package manually, that's why is in /usr/local/bin/gnome-tweak-tool
get rid of it now and install that tool from our repos.
pacman -S gnome-tweak-tool
this is arch, not slackware. we do packages and install them with pacman to keep track of files.
Last edited by wonder (2011-07-17 16:11:13) -
Gnome-tweak-tool will not start
I got following error when gnome-tweak-tool starts
$ gnome-tweak-tool
INFO : Caching gsettings: <gtweak.gsettings._GSettingsSchema: org.gnome.desktop.interface>
INFO : Caching gconf: <gtweak.gconf.GConfSetting: /apps/metacity/general/titlebar_font> (--short-docs)
INFO : Caching gconf: <gtweak.gconf.GConfSetting: /apps/metacity/general/titlebar_font> (--long-docs)
INFO : Caching gconf: <gtweak.gconf.GConfSetting: /apps/metacity/general/titlebar_font> (--short-docs)
INFO : Caching gsettings: <gtweak.gsettings._GSettingsSchema: org.gnome.settings-daemon.plugins.xsettings>
INFO : Caching gsettings: <gtweak.gsettings._GSettingsSchema: org.gnome.desktop.background>
INFO : Caching gconf: <gtweak.gconf.GConfSetting: /desktop/gnome/shell/windows/theme> (--short-docs)
INFO : Caching gconf: <gtweak.gconf.GConfSetting: /desktop/gnome/shell/windows/theme> (--long-docs)
INFO : Caching gconf: <gtweak.gconf.GConfSetting: /apps/metacity/general/action_double_click_titlebar> (--short-docs)
INFO : Caching gconf: <gtweak.gconf.GConfSetting: /apps/metacity/general/action_double_click_titlebar> (--long-docs)
INFO : Caching gconf: <gtweak.gconf.GConfSetting: /apps/metacity/general/action_middle_click_titlebar> (--short-docs)
INFO : Caching gconf: <gtweak.gconf.GConfSetting: /apps/metacity/general/action_middle_click_titlebar> (--long-docs)
INFO : Caching gconf: <gtweak.gconf.GConfSetting: /apps/metacity/general/action_right_click_titlebar> (--short-docs)
INFO : Caching gconf: <gtweak.gconf.GConfSetting: /apps/metacity/general/action_right_click_titlebar> (--long-docs)
INFO : Caching gsettings: <gtweak.gsettings._GSettingsSchema: org.gnome.shell.clock>
INFO : Caching gsettings: <gtweak.gsettings._GSettingsSchema: org.gnome.shell.calendar>
INFO : Caching gconf: <gtweak.gconf.GConfSetting: /desktop/gnome/shell/windows/button_layout> (--short-docs)
INFO : Caching gconf: <gtweak.gconf.GConfSetting: /desktop/gnome/shell/windows/button_layout> (--long-docs)
INFO : Caching gsettings: <gtweak.gsettings._GSettingsSchema: org.gnome.settings-daemon.plugins.power>
(gnome-tweak-tool:4176): Pango-WARNING **: Invalid UTF-8 string passed to pango_layout_set_text()
(gnome-tweak-tool:4176): Pango-WARNING **: Invalid UTF-8 string passed to pango_layout_set_text()
(gnome-tweak-tool:4176): Pango-WARNING **: Invalid UTF-8 string passed to pango_layout_set_text()
(gnome-tweak-tool:4176): Pango-WARNING **: Invalid UTF-8 string passed to pango_layout_set_text()
process 4176: arguments to dbus_message_iter_append_basic() were incorrect, assertion "_dbus_check_is_valid_utf8 (*string_p)" failed in file dbus-message.c line 2526.
This is normally a bug in some application using the D-Bus library.
D-Bus not built with -rdynamic so unable to print a backtracewonder wrote:
you used pacman -Sf
reinstall python2-gobject
That worked! Thank you! -
I did a recent full system upgrade and install of gnome-shell. When I run gnome-tweak-tool, I get the following error:
Traceback (most recent call last):
File "/usr/bin/gnome-tweak-tool", line 23, in <module>
from gi.repository import Gtk
File "/usr/lib/python2.7/site-packages/gi/importer.py", line 76, in load_module
dynamic_module._load()
File "/usr/lib/python2.7/site-packages/gi/module.py", line 240, in _load
version)
File "/usr/lib/python2.7/site-packages/gi/module.py", line 85, in __init__
repository.require(namespace, version)
gi.RepositoryError: Typelib file for namespace 'GdkPixbuf', version '2.0' not found
Ouput of pacman -Qm:
aacplusenc 0.17.5-1
acroread 9.2-1
alacarte 0.13.1-1
amrenc 0.5.3-1
archlinux-themes-gdm 1.4-1
deskbar-applet 2.30.1-2
draftsight beta1-2
eggdbus 0.6-1
firefox-beta-bin 5.0-1
fontcacheproto 0.1.3-1
gdm-old 2.20.10-2
gentoo-bashrc 2008.0-2
gnome-audio 2.22.0-1
gnome-netstatus 2.28.1-1
gtkpacman 2.3.1-1
hamster-applet 2.30.2-1
intellij-idea-ultimate-edition 10.0.2-1
libgail-gnome 1.20.3-1
libjpeg7 7-1
libpng12 1.2.43-1
libtracker 0.6.95-1
libxfontcache 1.0.5-1
libxxf86misc 1.0.2-1
mintmenu 4.9.0-1
mp4tools 0.6.8-1
opera-devel 11.01_1160-2
opera-static 9.64-1
perl-xyne-arch 2010.07.17.1-1
perl-xyne-common 2010.04.01.2-3
picasa 3.0_5744.02-5
seahorse-plugins 2.30.1-1
teamviewer 6.0.9224-2
virtualbox-ext-oracle 4.0.8-1
virtualbox_bin 4.0.8-1
wxgtk-2.6 2.6.4-3
xampp 1.7.3a-1
xf86miscproto 0.9.3-1
xorg-res-utils 1.0.3-3That fixed the issue I hated to bug someone with this. Tried everthing I could think of. BTW this is the best documented distro I have ever used..Thanks. I was using an advanced copy of firefox for testing and just not removed it..Gone now though
-
Gnome-tweak-tool 3.12 not launching
output of journalctl is
[mxiia@snsvtop gtweak]$ journalctl -b _PID=1227
-- Logs begin at Tue 2013-11-05 22:30:07 EST, end at Wed 2014-04-16 13:35:29 EDT. --
Apr 16 12:29:05 snsvtop gnome-tweak-tool.desktop[1227]: Traceback (most recent call last):
Apr 16 12:29:05 snsvtop gnome-tweak-tool.desktop[1227]: File "/usr/lib/python2.7/site-packages/gtweak/app.py", line 39, in do_activate
Apr 16 12:29:05 snsvtop gnome-tweak-tool.desktop[1227]: self.win = Window(self, model)
Apr 16 12:29:05 snsvtop gnome-tweak-tool.desktop[1227]: File "/usr/lib/python2.7/site-packages/gtweak/tweakview.py", line 45, in __init__
Apr 16 12:29:05 snsvtop gnome-tweak-tool.desktop[1227]: titlebar = self.titlebar()
Apr 16 12:29:05 snsvtop gnome-tweak-tool.desktop[1227]: File "/usr/lib/python2.7/site-packages/gtweak/tweakview.py", line 77, in titlebar
Apr 16 12:29:05 snsvtop gnome-tweak-tool.desktop[1227]: right_header.props.decoration_layout = ":" + tokens[1]
Apr 16 12:29:05 snsvtop gnome-tweak-tool.desktop[1227]: IndexError: list index out of range
Apr 16 12:39:29 snsvtop gnome-tweak-tool.desktop[1227]: Traceback (most recent call last):
Apr 16 12:39:29 snsvtop gnome-tweak-tool.desktop[1227]: File "/usr/lib/python2.7/site-packages/gtweak/app.py", line 39, in do_activate
Apr 16 12:39:29 snsvtop gnome-tweak-tool.desktop[1227]: self.win = Window(self, model)
Apr 16 12:39:29 snsvtop gnome-tweak-tool.desktop[1227]: File "/usr/lib/python2.7/site-packages/gtweak/tweakview.py", line 45, in __init__
Apr 16 12:39:29 snsvtop gnome-tweak-tool.desktop[1227]: titlebar = self.titlebar()
Apr 16 12:39:29 snsvtop gnome-tweak-tool.desktop[1227]: File "/usr/lib/python2.7/site-packages/gtweak/tweakview.py", line 77, in titlebar
Apr 16 12:39:29 snsvtop gnome-tweak-tool.desktop[1227]: right_header.props.decoration_layout = ":" + tokens[1]
Apr 16 12:39:29 snsvtop gnome-tweak-tool.desktop[1227]: IndexError: list index out of range
Apr 16 12:40:40 snsvtop gnome-tweak-tool.desktop[1227]: Traceback (most recent call last):
Apr 16 12:40:40 snsvtop gnome-tweak-tool.desktop[1227]: File "/usr/lib/python2.7/site-packages/gtweak/app.py", line 39, in do_activate
Apr 16 12:40:40 snsvtop gnome-tweak-tool.desktop[1227]: self.win = Window(self, model)
Apr 16 12:40:40 snsvtop gnome-tweak-tool.desktop[1227]: File "/usr/lib/python2.7/site-packages/gtweak/tweakview.py", line 45, in __init__
Apr 16 12:40:40 snsvtop gnome-tweak-tool.desktop[1227]: titlebar = self.titlebar()
Apr 16 12:40:40 snsvtop gnome-tweak-tool.desktop[1227]: File "/usr/lib/python2.7/site-packages/gtweak/tweakview.py", line 77, in titlebar
Apr 16 12:40:40 snsvtop gnome-tweak-tool.desktop[1227]: right_header.props.decoration_layout = ":" + tokens[1]
Apr 16 12:40:40 snsvtop gnome-tweak-tool.desktop[1227]: IndexError: list index out of range
Apr 16 12:44:50 snsvtop gnome-tweak-tool.desktop[1227]: Traceback (most recent call last):
Apr 16 12:44:50 snsvtop gnome-tweak-tool.desktop[1227]: File "/usr/lib/python2.7/site-packages/gtweak/app.py", line 39, in do_activate
Apr 16 12:44:50 snsvtop gnome-tweak-tool.desktop[1227]: self.win = Window(self, model)
Apr 16 12:44:50 snsvtop gnome-tweak-tool.desktop[1227]: File "/usr/lib/python2.7/site-packages/gtweak/tweakview.py", line 45, in __init__
Apr 16 12:44:50 snsvtop gnome-tweak-tool.desktop[1227]: titlebar = self.titlebar()
Apr 16 12:44:50 snsvtop gnome-tweak-tool.desktop[1227]: File "/usr/lib/python2.7/site-packages/gtweak/tweakview.py", line 77, in titlebar
Apr 16 12:44:50 snsvtop gnome-tweak-tool.desktop[1227]: right_header.props.decoration_layout = ":" + tokens[1]
Apr 16 12:44:50 snsvtop gnome-tweak-tool.desktop[1227]: IndexError: list index out of range
tweakview.py looks like this
# This file is part of gnome-tweak-tool.
# Copyright (c) 2011 John Stowers
# gnome-tweak-tool is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# gnome-tweak-tool is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with gnome-tweak-tool. If not, see <http://www.gnu.org/licenses/>.
import os.path
import logging
import datetime
from gi.repository import Gtk, Gdk, GObject
import gtweak.tweakmodel
from gtweak.tweakmodel import TweakModel
from gtweak.widgets import Title
class Window(Gtk.ApplicationWindow):
def __init__(self, app, model):
Gtk.ApplicationWindow.__init__(self,
application=app)
self.set_size_request(950, 680)
self.set_position(Gtk.WindowPosition.CENTER)
self.set_icon_name("gnome-tweak-tool")
self.hsize_group = Gtk.SizeGroup(Gtk.SizeGroupMode.HORIZONTAL)
main_box = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL)
left_box = self.sidebar()
right_box = self.main_content()
separator = Gtk.Separator(orientation=Gtk.Orientation.VERTICAL)
titlebar = self.titlebar()
self.set_titlebar(titlebar)
main_box.pack_start(left_box, False, False, 0)
main_box.pack_start(separator, False, False, 0)
main_box.pack_start(right_box, True, True, 0)
self.load_css()
self._model = model
self._model.load_tweaks(self)
self.load_model_data()
self.connect("key-press-event", self._on_key_press)
self.add(main_box)
def titlebar(self):
header = Gtk.Box()
left_header = Gtk.HeaderBar()
left_header.props.show_close_button = True
right_header = Gtk.HeaderBar()
right_header.props.show_close_button = True
left_header.get_style_context().add_class("titlebar")
left_header.get_style_context().add_class("tweak-titlebar-left")
right_header.get_style_context().add_class("titlebar")
right_header.get_style_context().add_class("tweak-titlebar-right")
layout_desc = Gtk.Settings.get_default().props.gtk_decoration_layout;
tokens = layout_desc.split(":", 2)
if tokens != None:
right_header.props.decoration_layout = ":" + tokens[1]
left_header.props.decoration_layout = tokens[0]
self.title = Gtk.Label("")
self.title.get_style_context().add_class("title")
right_header.set_custom_title(self.title)
icon = Gtk.Image()
icon.set_from_icon_name("edit-find-symbolic",Gtk.IconSize.MENU)
self.button = Gtk.ToggleButton()
self.button.add(icon)
self.button.connect("toggled", self._on_find_toggled)
self.button.props.valign = Gtk.Align.CENTER
self.button.get_style_context().add_class("image-button")
left_header.pack_start(self.button)
lbl = Gtk.Label(_("Tweaks"))
lbl.get_style_context().add_class("title")
left_header.set_custom_title(lbl)
header.pack_start(left_header, False, False, 0)
header.pack_start(Gtk.Separator(orientation=Gtk.Orientation.VERTICAL), False, False, 0)
header.pack_start(right_header, True, True, 0)
self.hsize_group.add_widget(left_header)
return header
def sidebar(self):
left_box = Gtk.Box(orientation=Gtk.Orientation.VERTICAL)
self.entry = Gtk.SearchEntry(placeholder_text=_("Search Tweaks..."))
self.entry.connect("search-changed", self._on_search)
self.searchbar = Gtk.SearchBar()
self.searchbar.add(self.entry)
self.searchbar.props.hexpand = False
self.listbox = Gtk.ListBox()
self.listbox.get_style_context().add_class("tweak-categories")
self.listbox.set_size_request(200,-1)
self.listbox.connect("row-selected", self._on_select_row)
self.listbox.set_header_func(self._list_header_func, None)
scroll = Gtk.ScrolledWindow()
scroll.set_policy(Gtk.PolicyType.NEVER,
Gtk.PolicyType.AUTOMATIC)
scroll.add(self.listbox)
left_box.pack_start(self.searchbar, False, False, 0)
left_box.pack_start(scroll, True, True, 0)
self.hsize_group.add_widget(left_box)
return left_box
def main_content(self):
right_box = Gtk.Box(orientation=Gtk.Orientation.VERTICAL)
#GRR why can I not put margin in the CSS of a GtkStack
self.stack = Gtk.Stack()
self.stack.get_style_context().add_class("main-container")
self.stack.props.margin = 20
right_box.pack_start(self.stack, True, True, 0)
return right_box
def load_css(self):
css_provider = Gtk.CssProvider()
css_provider.load_from_path(
os.path.join(gtweak.PKG_DATA_DIR, 'shell.css'))
screen = Gdk.Screen.get_default()
context = Gtk.StyleContext()
context.add_provider_for_screen(screen, css_provider,
Gtk.STYLE_PROVIDER_PRIORITY_USER)
def load_model_data(self):
def _make_items_listbox(text):
lbl = Gtk.Label(text, xalign=0.0)
lbl.set_name('row')
row = Gtk.ListBoxRow()
row.get_style_context().add_class("tweak-category")
row.add(lbl)
return row
groups = self._model._tweak_group_names.keys()
groups = sorted(groups)
for g in groups:
row = _make_items_listbox(g)
self.listbox.add(row)
tweakgroup = self._model.get_value(
self._model.get_tweakgroup_iter(g),
self._model.COLUMN_TWEAK)
scroll = Gtk.ScrolledWindow()
scroll.add(tweakgroup)
self.stack.add_named(scroll, g)
widget = self.listbox.get_row_at_index(0)
self.listbox.select_row (widget)
def _list_filter_func(self, row, user_data):
lbl = row.get_child()
if lbl.get_text() in user_data:
return row
def _list_header_func(self, row, before, user_data):
if before and not row.get_header():
row.set_header (Gtk.Separator(orientation=Gtk.Orientation.HORIZONTAL))
def _on_key_press(self, widget, event):
keyname = Gdk.keyval_name(event.keyval)
if keyname == 'Escape':
self.button.set_active(False)
if event.state and Gdk.ModifierType.CONTROL_MASK:
if keyname == 'f':
self.button.set_active(True)
def _on_list_changed(self, group):
self.listbox.set_filter_func(self._list_filter_func, group)
selected = self.listbox.get_selected_row().get_child().get_text()
if group and not selected in group:
index = sorted(self._model._tweak_group_names.keys()).index(group[0])
row = self.listbox.get_row_at_index(index)
self.listbox.select_row(row)
def _on_search(self, entry):
txt = entry.get_text().decode("utf-8","ignore").lower()
tweaks, group = self._model.search_matches(txt)
self.show_only_tweaks(tweaks)
self._on_list_changed(group)
def _on_select_row(self, listbox, row):
if row:
group = row.get_child().get_text()
self.stack.set_visible_child_name(group)
self.title.set_text(group)
def _on_find_toggled(self, btn):
if self.searchbar.get_search_mode():
self.searchbar.set_search_mode(False)
self.entry.set_text("")
else:
self.searchbar.set_search_mode(True)
self.entry.grab_focus()
def show_only_tweaks(self, tweaks):
for t in self._model.tweaks:
if t in tweaks:
t.show_all()
else:
t.hide()
app.py
# This file is part of gnome-tweak-tool.
# Copyright (c) 2011 John Stowers
# gnome-tweak-tool is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# gnome-tweak-tool is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with gnome-tweak-tool. If not, see <http://www.gnu.org/licenses/>.
import os.path
from gi.repository import Gtk
from gi.repository import Gio
import gtweak
from gtweak.tweakmodel import TweakModel
from gtweak.tweakview import Window
from gtweak.utils import SchemaList
from gtweak.gshellwrapper import GnomeShellFactory
from gtweak.utils import DisableExtension
class GnomeTweakTool(Gtk.Application):
def __init__(self):
Gtk.Application.__init__(self,application_id="org.gnome.TweakTool")
self.win = None
def do_activate(self):
if not self.win:
model = TweakModel()
self.win = Window(self, model)
self.win.show_all()
self.win.present()
def do_startup(self):
Gtk.Application.do_startup(self)
self.builder = Gtk.Builder()
assert(os.path.exists(gtweak.PKG_DATA_DIR))
filename = os.path.join(gtweak.PKG_DATA_DIR, 'shell.ui')
self.builder.add_from_file(filename)
appmenu = self.builder.get_object('appmenu')
self.set_app_menu(appmenu)
reset_action = Gio.SimpleAction.new("reset", None)
reset_action.connect("activate", self.reset_cb)
self.add_action(reset_action)
disable_extension_action = Gio.SimpleAction.new("disable_extension", None)
disable_extension_action.connect("activate", self.disable_cb)
self.add_action(disable_extension_action)
help_action = Gio.SimpleAction.new("help", None)
help_action.connect("activate", self.help_cb)
self.add_action(help_action)
about_action = Gio.SimpleAction.new("about", None)
about_action.connect("activate", self.about_cb)
self.add_action(about_action)
quit_action = Gio.SimpleAction.new("quit", None)
quit_action.connect("activate", self.quit_cb)
self.add_action(quit_action)
def reset_cb(self, action, parameter):
dialog = Gtk.MessageDialog(self.win,0, Gtk.MessageType.QUESTION,
Gtk.ButtonsType.OK_CANCEL, _("Reset to Defaults"))
dialog.format_secondary_text(_("Reset all tweak settings to the original default state?"))
response = dialog.run()
if response == Gtk.ResponseType.OK:
s = SchemaList()
s.reset()
dialog.destroy()
def help_cb(self, action, parameter):
print "This does nothing. It is only a demonstration."
def disable_cb(self, action, parameter):
ds = DisableExtension()
ds.disable()
def about_cb(self, action, parameter):
aboutdialog = Gtk.AboutDialog()
aboutdialog.set_title(_("About GNOME Tweak Tool"))
aboutdialog.set_program_name(_("GNOME Tweak Tool"))
_shell = GnomeShellFactory().get_shell()
if _shell is not None:
aboutdialog.set_comments(_("GNOME Shell v%s (%s mode)") % (_shell.version, _shell.mode))
else:
aboutdialog.set_comments(_("GNOME Shell not running"))
aboutdialog.set_copyright("Copyright \xc2\xa9 2011 - 2013 John Stowers.")
aboutdialog.set_logo_icon_name("gnome-tweak-tool")
aboutdialog.set_website("http://live.gnome.org/GnomeTweakTool")
aboutdialog.set_website_label(_("Homepage"))
aboutdialog.set_license_type(Gtk.License.GPL_3_0)
AUTHORS = [
"John Stowers <[email protected]>"
aboutdialog.set_authors(AUTHORS)
aboutdialog.connect("response", lambda w, r: aboutdialog.destroy())
aboutdialog.show()
def quit_cb(self, action, parameter):
self.quit()
I've tried a pacman -Rn and reinstalling it.
Running gnome-tweak-tool from terminal shows no output.
Any suggestions?
Last edited by MXIIA (2014-04-16 17:41:20)Is GTK is up to date?
Have you tried commenting the offending line in tweakview.py?
Have you tried to make it print Gtk.Settings.get_default().props.gtk_decoration_layout right before the offending line, in order to check that it contains at least two elements? -
Gnome3: Cannot set laptop lid close action
I've checked the lid closing sensor with watch /proc/acpi/button/lid/LID/state and the status changes without problems, but i can't set the lid closing action in gnome-tweak-tool or under power options. The laptop suspends only when an external monitor is not connected, i want to change it so it always suspends when the lid is closed.
How can I fix this?
Screenshots
power options
gnome-tweak-tool
Last edited by klingt.net (2014-03-19 20:28:05)Seems to be a bug in gnome, gnome-tweak-tool outputs the following messages:
INFO : GSettings missing key org.gnome.settings-daemon.plugins.power (key lid-close-battery-action)
INFO : GSettings missing key org.gnome.settings-daemon.plugins.power (key lid-close-ac-action)
INFO : GSettings missing key org.gnome.settings-daemon.plugins.power (key lid-close-suspend-with-external-monitor)
I added the keys manually to the schema but gnome-tweak-tool show this error when i try to start it with the new keys:
GLib-GIO-ERROR **: Settings schema 'org.gnome.settings-daemon.plugins.power' does not contain a key named 'lid-close-battery-action'
There are more people having a similar problem.
Last edited by klingt.net (2014-03-23 10:12:03) -
[systemd] Toggle whether lid close makes laptop sleep
Before migrating to systemd, I had a nice setup using laptop-mode where I would use the laptop "Sleep key" as a toggle for whether closing the lid put the laptop into sleep mode or not. This was just a few lines reading/writing to a file ~/.lidsleep, which I hacked into the laptop-mode shell scripts. Having switched to systemd, and wanting to do the same the "systemd way", I've come up short.
What I have managed to do is temporarily disable the "lid -> sleep" action, with this command:
# systemd-inhibit --what=handle-lid-switch cat
where the function of the final `cat` is to be a program that does not return until I type ^C.
I basically have two questions:
1) How can I make systemd perform an arbitrary command when I press the "Sleep key"?
2) Short of something like running `pgrep systemd-inhibit && pkill systemd-inhibit || systemd-inhibit --what=handle-lid-switch cat`, what is the best way to setup a toggle like this?
Final bonus question, if these two are answered:
My previous setup also included restoring the toggle to its default state (lid -> sleep : yes) when resuming from hibernate (not suspend). How would I do this using systemd?As WonderWoofy suggests, why not just tell systemd to not handle lid close or the sleep key (not sure it does that but if it does) and continue to use your existing solution with laptop mode tools?
systemd is not, that I know of, supposed to handle stuff like key presses and it is deliberately designed so that you can have a more sophisticated system hand events such as lid closing and so on. Moreover, it doesn't replace the remaining functionality of laptop-mode tools so assuming you used that for other things too, you'll need it anyway. That is, I can't even see how this would let you uninstall laptop-mode tools if you've been using it without giving up a bunch of other stuff. Could you explain why you want to do it without laptop-mode tools etc.? -
[SOLVED] Power button and laptop lid close rules not followed (KDE)
I'm using KDE 4.9.1, and the rules I set for the power button and lid close events in the KDE power management settings are not followed.
Currently, I have the power button press event set to trigger hibernation, and the lid close event set to turn off the display. Instead, the power button causes the laptop to power down immediately, as if the 'poweroff' command was issued. Closing the lid causes the system to suspend to ram.
This problem seemed to have started when I installed 'laptop-mode-tools' and 'acpid'. The problem persisted even when I uninstalled the said packages from the system. Most solutions on the internet involve adjusting the contents of files in /etc/acpi/, but that directory does not exist on my system. I also tried deleting the power management configuration files in the ~/.kde4/share/config directory, but that didn't fix the problem either.
Hibernation works if I choose 'hibernate' from the KDE menu.
Thanks for any help.
Last edited by rb3 (2012-09-28 05:46:56)That's not a good solution.
Changes in systemd default behaviour are reasonable. It guarantees that if your graphical enviroment has no suspend support, it will still suspend when the lid is closed.
For example, closing the laptop lid at KDM login screen will now suspend the laptop. I remember a topic when someone nearly killed his notebook battery with overheat in that situation (the laptop did not suspend when the lid was closed at kdm screen).
This change also brings native (non-acpid) suspend support to lighweight desktop enviroments.
The source of the «double suspend» problem is in acynchronized update of systemd and KDE.
Updating KDE to 4.9.2 (which will be released in several days) will fix this without editing the config file.
Make sure you restore the original logind.conf after updating to KDE 4.9.2.
See:
http://lists.freedesktop.org/archives/s … 06604.html
https://bugs.kde.org/show_bug.cgi?id=307412
https://git.reviewboard.kde.org/r/106533/
Maybe you are looking for
-
Sharepoint Foundation 2013 On a SBS 2011 Domain??
I have an SBS 2011 domain with 2 servers(SBS2011 Premium) The SBS box acts as domain controller and the second server runs Server 2008R2 and has SQL 2008R2 on it for Dynamics GP and Dynamics CRM 2011 and hosts the Sharepoint Foundation 2010 Databases
-
Please help - Safari crashing every time I open it
Guys for months now I've been unable to open Safari. It loads then the I get the spinning beach ball and it crashes. Every time. I did an archive and re-install but it didn't help. Using Safari 3.0.4 with Macbook 10.4.11 Date/Time: 2008-02-02 14:47:2
-
How to send File with Same name to Receiver
HI Frnds, In my peoject i have one scenario, I have to access Orders is the name of file , available in FTP Server, i have to send same file to Receiver side with same name Orders Is it possible with same name dynamically?? Regards, Raj
-
Need to search all uploaded document in KM
Hi Expert, Can anybody please help me, is it possible to search any of the document (not depending on the doc status) from KM repository?? If possible how can we proceed?? Thanks Kanai
-
my ipod keeps deleting the songs that are on it after i update, when im updating it doesnt update the entire library anymore it only updates 3/4 of it then stops, also i get a message saying that the disk cannot be read or written on, and the battery