[SOLVED] Multimedia key keybindings i3 window manager

I have special key on my keyboard for stop (XF86AudioStop) play/pause (XF86AudioPlay) next (XF86AudioNext) and previous (XF86AudioPrev).
Is it possible to make keybindings for ncmpcpp or mpd for these keys?
Note: I would like not to have to install additional packages, though "no new package rule" is preferable it's also reconsiderable.
Last edited by bstaletic (2014-06-04 08:46:55)

here's my media keys section
# media keys
bindsym XF86AudioRaiseVolume exec $HOME/Launchers/volumeControl up
bindsym XF86AudioLowerVolume exec $HOME/Launchers/volumeControl down
bindsym XF86AudioMute exec $HOME/Launchers/volumeControl mute
bindsym XF86AudioPlay exec mpc toggle
bindsym XF86AudioStop exec mpc stop
bindsym XF86AudioPrev exec $HOME/Launchers/mpcPrevSong.sh
bindsym XF86AudioNext exec mpc next
my volumeControl script
my mpcPrevSong.sh script

Similar Messages

  • Multimedia Keys in Awesome Window Manager [SOLVED]

    Hey,
    I've googled, searched, grepped and scanned about this for weeks, and I think I can't get it working on my own, although I'm sure the right answer is just out there waiting to be found, and one of you brighter minds might just know it already. Right, here's what happens.
    I was using openbox, and the keybindings were working just fine. This should probably discard missing symbols or scancodes for the keys, IMHO. Then I switch over to Awesome, and fall in love. The awesome (pun intended) config files by anrxc made it even better, and these days I can't live without my awesome. But I also wanted my volume keys to work. Not like I mind opening a terminal and popping alsamixer... I got 15 of them open all the time anyway. But I still wanted to use the fancy buttons.
    The strange thing is, the keys seem to "disappear" as soon as I map them somewhere. I've tried binding them in rc.lua:
    awful.key({}, "#121", function () exec("pvol.py -m", false) end),
    awful.key({}, "#122", function () exec("pvol.py -c -2", false) end),
    awful.key({}, "#123", function () exec("pvol.py -c 2", false) end),
    pvol.py is a script (made by anrxc too) that does stuff to the volume and displays a cute gtk progress bar to indicate current volume level. Invoking it from the terminal works fine.
    I also tried using xbindkeys:
    "pvol.py -m"
    XF86AudioMute
    "pvol.py -c -2"
    XF86AudioLowerVolume
    "pvol.py -c 2"
    XF86AudioRaiseVolume
    But the result was the same. Here's the output of xev with the keys unbound:
    KeyPress event, serial 25, synthetic NO, window 0x1600001,
    root 0x15a, subw 0x0, time 4706773, (74,267), root:(796,288),
    state 0x10, keycode 123 (keysym 0x1008ff13, XF86AudioRaiseVolume), same_screen YES,
    XLookupString gives 0 bytes:
    XmbLookupString gives 0 bytes:
    XFilterEvent returns: False
    KeyRelease event, serial 28, synthetic NO, window 0x1600001,
    root 0x15a, subw 0x0, time 4706853, (74,267), root:(796,288),
    state 0x10, keycode 123 (keysym 0x1008ff13, XF86AudioRaiseVolume), same_screen YES,
    XLookupString gives 0 bytes:
    XFilterEvent returns: False
    KeyPress event, serial 28, synthetic NO, window 0x1600001,
    root 0x15a, subw 0x0, time 4712422, (74,267), root:(796,288),
    state 0x10, keycode 122 (keysym 0x1008ff11, XF86AudioLowerVolume), same_screen YES,
    XLookupString gives 0 bytes:
    XmbLookupString gives 0 bytes:
    XFilterEvent returns: False
    KeyRelease event, serial 28, synthetic NO, window 0x1600001,
    root 0x15a, subw 0x0, time 4712534, (74,267), root:(796,288),
    state 0x10, keycode 122 (keysym 0x1008ff11, XF86AudioLowerVolume), same_screen YES,
    XLookupString gives 0 bytes:
    XFilterEvent returns: False
    KeyPress event, serial 28, synthetic NO, window 0x1600001,
    root 0x15a, subw 0x0, time 4713862, (74,267), root:(796,288),
    state 0x10, keycode 121 (keysym 0x1008ff12, XF86AudioMute), same_screen YES,
    XLookupString gives 0 bytes:
    XmbLookupString gives 0 bytes:
    XFilterEvent returns: False
    KeyRelease event, serial 28, synthetic NO, window 0x1600001,
    root 0x15a, subw 0x0, time 4713878, (74,267), root:(796,288),
    state 0x10, keycode 121 (keysym 0x1008ff12, XF86AudioMute), same_screen YES,
    XLookupString gives 0 bytes:
    XFilterEvent returns: False
    As you can see, they respond to the key codes 121. 122, and 123. Going to a console and running showkey, however, gives me the key codes 113, 114, and 115. I've tried mapping both, and the X11 symbols, with the same result. Below, a sample of xev's output when I bind the keys somewhere (out put for a single key, all result in the same output):
    FocusOut event, serial 29, synthetic NO, window 0x1600001,
    mode NotifyGrab, detail NotifyAncestor
    FocusIn event, serial 29, synthetic NO, window 0x1600001,
    mode NotifyUngrab, detail NotifyAncestor
    KeymapNotify event, serial 29, synthetic NO, window 0x0,
    keys: 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
    0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
    And of course, nothing happens. The same happens whether I bind the keys in awesome or through xbindkeys. I have to admit, I'm pretty much out of ideas. Anyone seen this before?
    Last edited by mkaito (2010-06-16 15:06:06)

    d2ogch3n wrote:
    Here's what I have
        -- Multimedia keys
        awful.key({ }, "XF86AudioRaiseVolume",    function () awful.util.spawn("amixer set Master 2+") end),
        awful.key({ }, "XF86AudioLowerVolume",    function () awful.util.spawn("amixer set Master 2-") end)
    Just to clarify for anyone who comes across this, "%" is needed after the number. It should be:
    awful.key({ }, "XF86AudioRaiseVolume", function () awful.util.spawn("amixer set Master 2%+") end),
    awful.key({ }, "XF86AudioLowerVolume", function () awful.util.spawn("amixer set Master 2%-") end)
    You should also be able to add Mute functionality:
    awful.key({ }, "XF86AudioMute", function () awful.util.spawn("amixer set Master toggle") end)
    Also, to get rid of the loading cursor, pass false as a second argument to all three of these:
    awful.key({ }, "XF86AudioRaiseVolume", function () awful.util.spawn("amixer set Master 2%+", false) end),
    awful.key({ }, "XF86AudioLowerVolume", function () awful.util.spawn("amixer set Master 2%-", false) end)
    awful.key({ }, "XF86AudioMute", function () awful.util.spawn("amixer set Master toggle", false) end)
    The AWM wiki is the source for this:
    http://awesome.naquadah.org/wiki/Volume … nd_display

  • [SOLVED!] KDE 4.11 - Window Manager seems not to be running?

    Greetings,
    I still seem unable to fix the fact that systemsettings will run. However it will run if you do kdesu systemsettings.
    Doing so I started checking around in it and thought I'd look at the desktop effects, when I was greeted with this:
    So, I am guessing that the window borders and buttons are a figment of my imagination....
    This is after me pretty much starting over with KDE, removing the .kde and .kde4 folders.
    Help?
    Edit: That pic seems to not link right. Yay. Basically it says that effects can not be activated or whatever because a window manager seems not to be running. The irony of it is you can see the fact that there are window borders and buttons and such, evidence of a WM...
    I wonder if there is something here that is related to me not being able to run systemsettings... yet systemsettings will run fine in any other environment - including Gnome Shell.
    Another thing, KDE 4.11 ran great in testing and kde_unstable. Once it went to extra, things happened. I find that odd. Maybe something is missing on my end that most archers already have?
    Edit2: fixed image link
    Last edited by mythus (2013-08-25 20:49:38)

    No omeringen, Nvidia user.
    I can try again Thaodan since I've had some updates come through (and weeded out some dot files). Last time I tried I saw OpenGL 2 selected. Trying to change to 3 or anything else also got the screenshot in my OP.
    I'll log into KDE and see if it still does the same, after a brief check for last minute updates.
    EDIT: OK, so I can mark this as solved. I found an odd dot file, who's name excapes me but deals with kde sessions, just sitting around in the home folder. Once I deleted it and restarted, I found that not only System Settings finally ran again as a user, but I could also change and apply desktop effects. Peculiar. I thought that maybe it was a dot file that was causing the problem, that wasn't in the .kde or .kde4 folder. It just took finding it and removing it.
    I wish I knew more to tell, but this at least solves my issue, and the issue with the non-running-as-user system settings I had posted in another thread (thinking that they were separate events. Thanks again for all your help guys!
    Last edited by mythus (2013-08-25 20:49:05)

  • [solved] OpenGL apps in window do not obey window manager

    Hello,
    I have another X related problem, the first one resulted in downgrading my X
    (see http://bbs.archlinux.org/viewtopic.php?id=44460 )
    Now I am finally able to run both xv (video rendering) and dri (3d rendering), but
    I have a problem, that when I run an opengl app in window (for example glxgears, but also game emulators and games in Wine), it does not move or resize when the window manager tells it to, e.g. when I move or resize the window. This makes 3D in window nearly unusable.
    In my previous linux (suse) this worked normally; DRI was on and I was able to resize or move the 3D apps windows
    card:
    01:00.0 VGA compatible controller: Matrox Graphics, Inc. MGA G550 AGP (rev 01)
    X version:
    [danny@zdroj ~]$ X -version
    X Window System Version 7.2.0
    Release Date: 22 January 2007
    X Protocol Version 11, Revision 0, Release 7.2
    Build Operating System: UNKNOWN
    Current Operating System: Linux zdroj 2.6.24-ARCH #1 SMP PREEMPT Wed Feb 27 01:15:32 CET 2008 i686
    Build Date: 08 April 2007
    Before reporting problems, check http://wiki.x.org
    to make sure that you have the latest version.
    Module Loader present
    xorg.conf:
    Section "ServerLayout"
    Identifier "X.org Configured"
    Screen 0 "Screen0" 0 0
    InputDevice "Mouse0" "CorePointer"
    InputDevice "Keyboard0" "CoreKeyboard"
    EndSection
    Section "ServerFlags"
    Option "IgnoreABI" "True"
    Option "AIGLX" "False"
    EndSection
    Section "Extensions"
    Option "XVideo" "enable"
    EndSection
    Section "Files"
    RgbPath "/usr/share/X11/rgb"
    ModulePath "/usr/lib/xorg/modules"
    FontPath "/usr/share/fonts/misc"
    FontPath "/usr/share/fonts/local"
    FontPath "/usr/share/fonts/100dpi:unscaled"
    FontPath "/usr/share/fonts/75dpi:unscaled"
    FontPath "/usr/share/fonts/TTF"
    FontPath "/usr/share/fonts/Type1"
    FontPath "/usr/share/fonts/artwiz-fonts/"
    EndSection
    Section "Module"
    Load "xtrap"
    Load "dbe"
    Load "GLcore"
    Load "extmod"
    Load "record"
    Load "dri"
    Load "glx"
    Load "drm"
    #Load "xv"
    Load "freetype"
    #Load "type1"
    #Load "v4l"
    #Load "drm"
    #Load "type1"
    EndSection
    Section "InputDevice"
    Identifier "Keyboard0"
    Driver "kbd"
    Option "XkbLayout" "us,cz_qwerty"
    Option "XkbModel" "pc104"
    Option "XkbOptions" "grp:alt_shift_toggle,grp:switch,grp_led:scroll"
    EndSection
    Section "InputDevice"
    Identifier "Mouse0"
    Driver "mouse"
    Option "Protocol" "auto"
    Option "Device" "/dev/input/mice"
    Option "ZAxisMapping" "4 5"
    EndSection
    Section "Monitor"
    DisplaySize 380 300 # mm
    Identifier "Monitor0"
    VendorName "BNQ"
    ModelName "BenQ FP91G+"
    ### Comment all HorizSync and VertRefresh values to use DDC:
    HorizSync 30.0 - 83.0
    VertRefresh 43.0 - 76.0
    Option "DPMS"
    UseModes "Modes[0]"
    EndSection
    Section "Device"
    ### Available Driver options are:-
    ### Values: <i>: integer, <f>: float, <bool>: "True"/"False",
    ### <string>: "String", <freq>: "<f> Hz/kHz/MHz"
    ### [arg]: arg optional
    #Option "HWcursor" # [<bool>]
    #Option "PciRetry" # [<bool>]
    #Option "SyncOnGreen" # [<bool>]
    #Option "NoAccel" # [<bool>]
    #Option "Overlay" # [<str>]
    #Option "MGASDRAM" # [<bool>]
    #Option "ShadowFB" # [<bool>]
    #Option "UseFBDev" # [<bool>]
    #Option "ColorKey" # <i>
    #Option "SetMclk" # <freq>
    #Option "OverclockMem" # [<bool>]
    #Option "VideoKey" # <i>
    #Option "TexturedVideo" # [<bool>]
    #Option "Int10" # [<bool>]
    #Option "AGPMode" # <i>
    #Option "AGPSize" # <i>
    #Option "DRI" # [<bool>]
    #Option "OldDmaInit" # [<bool>]
    #Option "ForcePciDma" # [<bool>]
    #Option "AccelMethod" # [<str>]
    Identifier "Card0"
    Driver "mga"
    VendorName "Matrox Graphics, Inc."
    BoardName "MGA G550 AGP"
    BusID "PCI:1:0:0"
    Option "HwCursor" "off" #protoze jinak tam neni
    Option "DRI" "on"
    Option "AGPMode" "4"
    #Option "OldDmaInit" "true"
    #Option "ShadowFB" "on" # 1
    #Option "TexturedVideo" "on" # 2
    #Option "VideoOverlay" "on"
    #Option "AccelMethod" "EXA"
    #Option "Overlay" "24,8"
    #Option "NoAccel"
    EndSection
    Section "DRI"
    Group "video"
    Mode 0666
    EndSection
    Section "Modes"
    Identifier "Modes[0]"
    Modeline "640x480" 25.20 640 656 752 800 480 490 492 525 -hsync
    -vsync
    ModeLine "1280x1024" 108.00 1280 1328 1440 1688 1024 1025 1028 1066 +hsync +vsync
    EndSection
    Section "Screen"
    Identifier "Screen0"
    Device "Card0"
    Monitor "Monitor0"
    DefaultDepth 16
    SubSection "Display"
    Viewport 0 0
    Depth 1
    EndSubSection
    SubSection "Display"
    Viewport 0 0
    Depth 4
    EndSubSection
    SubSection "Display"
    Viewport 0 0
    Depth 8
    EndSubSection
    SubSection "Display"
    Viewport 0 0
    Depth 15
    EndSubSection
    SubSection "Display"
    Viewport 0 0
    Depth 16
    Modes "1280x1024" "1024x768" "800x600"
    EndSubSection
    SubSection "Display"
    Viewport 0 0
    Depth 24
    Modes "1280x1024" "1024x768" "800x600"
    EndSubSection
    EndSection
    glxinfo:
    name of display: :0.0
    display: :0 screen: 0
    direct rendering: Yes
    server glx vendor string: SGI
    server glx version string: 1.2
    server glx extensions:
    GLX_ARB_multisample, GLX_EXT_visual_info, GLX_EXT_visual_rating,
    GLX_EXT_import_context, GLX_EXT_texture_from_pixmap, GLX_OML_swap_method,
    GLX_SGI_make_current_read, GLX_SGIS_multisample, GLX_SGIX_hyperpipe,
    GLX_SGIX_swap_barrier, GLX_SGIX_fbconfig, GLX_MESA_copy_sub_buffer
    client glx vendor string: SGI
    client glx version string: 1.4
    client glx extensions:
    GLX_ARB_get_proc_address, GLX_ARB_multisample, GLX_EXT_import_context,
    GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_MESA_allocate_memory,
    GLX_MESA_copy_sub_buffer, GLX_MESA_swap_control,
    GLX_MESA_swap_frame_usage, GLX_OML_swap_method, GLX_OML_sync_control,
    GLX_SGI_make_current_read, GLX_SGI_swap_control, GLX_SGI_video_sync,
    GLX_SGIS_multisample, GLX_SGIX_fbconfig, GLX_SGIX_pbuffer,
    GLX_SGIX_visual_select_group, GLX_EXT_texture_from_pixmap
    GLX version: 1.2
    GLX extensions:
    GLX_ARB_get_proc_address, GLX_ARB_multisample, GLX_EXT_import_context,
    GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_MESA_swap_control,
    GLX_MESA_swap_frame_usage, GLX_OML_swap_method, GLX_SGI_make_current_read,
    GLX_SGI_video_sync, GLX_SGIS_multisample, GLX_SGIX_fbconfig
    OpenGL vendor string: VA Linux Systems Inc.
    OpenGL renderer string: Mesa DRI G400 20061030 AGP 4x x86/MMX/SSE2
    OpenGL version string: 1.2 Mesa 6.5.2
    OpenGL extensions:
    GL_ARB_multisample, GL_ARB_multitexture, GL_ARB_texture_compression,
    GL_ARB_texture_env_add, GL_ARB_texture_env_combine,
    GL_ARB_texture_env_crossbar, GL_ARB_texture_rectangle,
    GL_ARB_transpose_matrix, GL_ARB_vertex_program, GL_ARB_window_pos,
    GL_EXT_abgr, GL_EXT_bgra, GL_EXT_blend_logic_op, GL_EXT_clip_volume_hint,
    GL_EXT_compiled_vertex_array, GL_EXT_copy_texture,
    GL_EXT_draw_range_elements, GL_EXT_fog_coord, GL_EXT_multi_draw_arrays,
    GL_EXT_packed_pixels, GL_EXT_polygon_offset, GL_EXT_rescale_normal,
    GL_EXT_secondary_color, GL_EXT_separate_specular_color,
    GL_EXT_stencil_wrap, GL_EXT_subtexture, GL_EXT_texture, GL_EXT_texture3D,
    GL_EXT_texture_edge_clamp, GL_EXT_texture_env_add,
    GL_EXT_texture_env_combine, GL_EXT_texture_object,
    GL_EXT_texture_rectangle, GL_EXT_vertex_array, GL_APPLE_packed_pixels,
    GL_ATI_texture_env_combine3, GL_IBM_rasterpos_clip, GL_MESA_ycbcr_texture,
    GL_MESA_window_pos, GL_NV_light_max_exponent, GL_NV_texture_rectangle,
    GL_NV_texgen_reflection, GL_NV_vertex_program, GL_NV_vertex_program1_1,
    GL_OES_read_format, GL_SGIS_generate_mipmap, GL_SGIS_texture_edge_clamp,
    GL_SGIS_texture_lod, GL_SUN_multi_draw_arrays
    visual x bf lv rg d st colorbuffer ax dp st accumbuffer ms cav
    id dep cl sp sz l ci b ro r g b a bf th cl r g b a ns b eat
    0x23 16 tc 0 16 0 r y . 5 6 5 0 0 16 0 0 0 0 0 0 0 None
    0x24 16 tc 0 16 0 r . . 5 6 5 0 0 16 0 0 0 0 0 0 0 None
    0x25 16 tc 0 16 0 r y . 5 6 5 0 0 16 8 0 0 0 0 0 0 Slow
    0x26 16 tc 0 16 0 r . . 5 6 5 0 0 16 8 0 0 0 0 0 0 Slow
    0x27 16 tc 0 16 0 r y . 5 6 5 0 0 16 0 16 16 16 0 0 0 Slow
    0x28 16 tc 0 16 0 r . . 5 6 5 0 0 16 0 16 16 16 0 0 0 Slow
    0x29 16 tc 0 16 0 r y . 5 6 5 0 0 16 8 16 16 16 0 0 0 Slow
    0x2a 16 tc 0 16 0 r . . 5 6 5 0 0 16 8 16 16 16 0 0 0 Slow
    0x2b 16 dc 0 16 0 r y . 5 6 5 0 0 16 0 0 0 0 0 0 0 None
    0x2c 16 dc 0 16 0 r . . 5 6 5 0 0 16 0 0 0 0 0 0 0 None
    0x2d 16 dc 0 16 0 r y . 5 6 5 0 0 16 8 0 0 0 0 0 0 Slow
    0x2e 16 dc 0 16 0 r . . 5 6 5 0 0 16 8 0 0 0 0 0 0 Slow
    0x2f 16 dc 0 16 0 r y . 5 6 5 0 0 16 0 16 16 16 0 0 0 Slow
    0x30 16 dc 0 16 0 r . . 5 6 5 0 0 16 0 16 16 16 0 0 0 Slow
    0x31 16 dc 0 16 0 r y . 5 6 5 0 0 16 8 16 16 16 0 0 0 Slow
    0x32 16 dc 0 16 0 r . . 5 6 5 0 0 16 8 16 16 16 0 0 0 Slow
    can anyone please help me?
    Last edited by danielsoft (2008-03-04 16:22:32)

    solved with unofficial drivers http://forum.tuxx-home.at/viewtopic.php?t=153

  • [SOLVED] Odd window manager problem...

    I have installed Arch and a full Gnome DE. However when I start gnome, I get an odd window manager. I tried metacity and metacity --replace in a terminal, but I just get "Window manager warning: Screen 0 on display ":0.0" already has a window manager"
    Here is what it looks like:
    Any way I can get some metacity going?
    Edit: [SOLVED]
    I just put metacity as startup application and restarted. Still not sure what that window manager was, but I'll be okay I guess...
    Last edited by phohammer (2010-03-03 02:59:43)

    sand_man wrote:
    haha you had gnome running with twm as the window manager instead of metacity.
    You need to put 'exec gnome-session' in your .xinitrc file.
    twm huh? Well that's a new one for me!
    I tried to do that but the .xinitrc file didn't exist yet and I wasn't sure if I should make it...I think I tried ~/.xinitrc . Would it be in another directory?

  • Changevol - volume management (good for binding multimedia keys)

    I wrote this script to work with my laptop's multimedia keys. It requires python, pygtk, and alsa-utils. It is a non-interactive program that modifies the volume and then pops up a little gui notifier similar to programs like keytouch (but much simpler and less bloated). It was designed to work by binding multimedia keys (using programs like xbindkeys or any WM's/DE's keybinding apps) to the script and that is probably the only real convenient use.
    Here is what it looks like (pops up in the middle of the desktop on top of everything else). Don't worry about the color of the bar and such, it is programmed with gtk2, so it will inherit whatever your gtk theme looks like:
    Here is the script. To use: just dump into a text file called "changevol", chmod +x it, and put it in the PATH somewhere:
    #!/usr/bin/env python
    import pygtk
    import gtk
    import gobject
    import commands
    import sys
    import os
    import re
    import getopt
    def err(msg):
    print msg
    sys.exit(1)
    def usage():
    print '''
    Usage: changevol [options] [argument]
    Options:
    -i, --increase increase volume by `argument'
    -d, --decrease decrease volume by `argument'
    -c, --control specify the mixer control by `argument' (default Master)
    use only to modify a mixer other than Master
    -t, --toggle toggle mute on and off
    -s, --status display current volume status without modifying it
    -q, --quiet don't display the gtk progressbar, just change the volume
    -b, --backlight adjust the backlight using xbacklight
    -h, --help display this help message
    Note:
    Volume increases and decreases won't be exact due to amixer oddities.
    sys.exit(0)
    class GetVolInfo():
    def __init__(self, command):
    self.amixeroutput = commands.getoutput(command)
    if re.compile("off]$", re.M).search(self.amixeroutput, 1):
    self.realvol = "0"
    self.endlabel = "Mute"
    else:
    self.tempvolarray1 = self.amixeroutput.split("[")
    self.tempvolarray2 = self.tempvolarray1[1].split("%")
    self.realvol = self.tempvolarray2[0]
    self.endlabel = self.realvol + " %"
    self.percent = float(self.realvol)/100
    self.label = "Volume " + self.endlabel
    class ProgressBar:
    def timeout_callback(self):
    gtk.main_quit()
    return False
    def __init__(self, fraction, label):
    self.window = gtk.Window(gtk.WINDOW_POPUP)
    self.window.set_border_width(0)
    self.window.set_default_size(180, -1)
    self.window.set_position(gtk.WIN_POS_CENTER)
    timer = gobject.timeout_add(1000, self.timeout_callback)
    self.bar = gtk.ProgressBar()
    self.bar.set_fraction(fraction)
    self.bar.set_orientation(gtk.PROGRESS_LEFT_TO_RIGHT)
    self.bar.set_text(label)
    self.bar.show()
    self.window.add(self.bar)
    self.window.show()
    #Run through parameters, set variables and such
    CONTROL = "Master"
    AMIXEROPTION = "unset"
    QUIET = "NO"
    BACKLIGHT = "NO"
    if (len(sys.argv) < 2):
    usage()
    try:
    opts, args = getopt.getopt(sys.argv[1:], "bqhtsc:i:d:", ["backlight" "quiet", "help", "toggle", "status", "control=", "increase=", "decrease="])
    except getopt.GetoptError:
    err("Incorrect usage, see changevol --help.")
    if (len(opts) == 0):
    err("Incorrect usage, see --help.")
    for opt, arg in opts:
    if opt in ("-h", "--help"):
    usage()
    elif opt in ("-q", "--quiet"):
    QUIET = "YES"
    elif opt in ("-b", "--backlight"):
    BACKLIGHT = "YES"
    elif opt in ("-t", "--toggle"):
    AMIXEROPTION = "toggle"
    elif opt in ("-s", "--status"):
    INCREMENT = "0"
    AMIXEROPTION = INCREMENT + "%+"
    elif opt in ("-c", "--control"):
    CONTROL = arg
    elif opt in ("-i", "--increase"):
    INCREMENT = arg
    AMIXEROPTION = INCREMENT + "%+"
    elif opt in ("-d", "--decrease"):
    INCREMENT = arg
    AMIXEROPTION = INCREMENT + "%-"
    else:
    err("Incorrect usage, see --help")
    if (AMIXEROPTION == "unset"):
    err("No volume changing action has been dictated. See changevol --help.")
    command = "amixer set " + CONTROL + " " + AMIXEROPTION
    #Execution
    volume = GetVolInfo(command)
    if (QUIET == "NO"):
    ProgressBar(volume.percent, volume.label)
    gtk.main()
    if (BACKLIGHT == "YES"):
    os.execv('/usr/bin/xbacklight', ['placeholder', '-set', volume.realvol])
    Here is the usage synopsis (it can be accessed with changevol --help):
    Usage: changevol [options] [argument]
    Options:
      -i, --increase  increase volume by `argument'
      -d, --decrease  decrease volume by `argument'
      -c, --control   specify the mixer control by `argument' (default Master)
                      use only to modify a mixer other than Master
      -t, --toggle    toggle mute on and off
      -s, --status    display current volume status without modifying it
      -q, --quiet     don't display the gtk progressbar, just change the volume
      -b, --backlight adjust the backlight using xbacklight
      -h, --help      display this help message
    Note:
      Volume increases and decreases won't be exact due to amixer oddities.
    Edit: Changed mute handling a bit.
    Edit2: Added a -c, --control option for an amixer interface other than Master
    Edit3: Added a -s, --status option to just display the current volume status without modifying it
    Edit4: Added a -q, --quiet option to not show the progress bar and just change the volume
    Edit5: Added a -b, --backlight option to adjust the backlight along with the volume change (someone asked for it, so why the hell not right?)
    Last edited by bruenig (2008-02-03 06:43:07)

    ralvez wrote:I gave it a spin but every time I get the same answer: "No volume changing action has been dictated."
    Can you provide an example of issuing the command using xbindkeys? or even what I should be issuing on the command line? I must be doing something wrong ... and I do not feel like studying the code to figure it out since you can give me the answer just as fast
    The usage synopsis is in the first post or available by just doing "changevol" or changevol -h|--help.
    But to increase the volume by 5:
    changevol -i 5
    To decrease the volume by 5:
    changevol -d 5
    To toggle mute on and off:
    changevol -t
    If you need to specify a mixer other than "Master" which is the default mixer, you use the -c flag, so say you needed to use the mixer "Front" to increase by 5:
    changevol -c Front -i 5
    I see there is a problem in the code where it says No volume changing action has been dictated when I want it to say Incorrect usage, see changevol --help. I will try to fix that. Still learning python.
    Edit: I have changed it to see if getopts returns no options and then if so print back the Incorrect usage error message. That should do a lot to direct people to the right, direction. I have also, changed the No volume changing action one, to also direct to --help.
    Last edited by bruenig (2007-12-31 03:27:37)

  • [Solved]Cannot execute i3 window manager

    I installed i3 tiling window manager along with kde(kde could be executed),and follow the step written in i3's wiki:
    Edit ~/.xinitrc and add:
    exec i3
    exec i3 -V >>~/.i3/i3log >&1
    and cp /etc/i3/config ~/.i3/config,after these steps I still cannot execute i3 wm, could anyone tell me what I missed?
    appreciate your reply.
    Last edited by tomisacat (2012-07-20 05:14:29)

    hesse wrote:
    tomisacat wrote:
    I installed i3 tiling window manager along with kde(kde could be executed),and follow the step written in i3's wiki:
    Edit ~/.xinitrc and add:
    exec i3
    exec i3 -V >>~/.i3/i3log >&1
    You should add just one of the above exec statements by the way, and it should be on the last line in ~/.xinitrc. The second line is preferred if you want to log messages from i3 while it's running. To start a window manager manually from a console use
    xinit /full/path/to/i3
    Thank you,it seems worked.

  • [Solved] systemd/user : how to exit window manager & stop X?

    Solution: Jump to https://bbs.archlinux.org/viewtopic.php … 6#p1262166
    I have set up my system to user systemd units to start my environment (roughly following the wiki).
    My problem is that I cannot exit my window manager (using “io (exitWith ExitSuccess)” in Xmonad): the service file starting the WM (xmonad) stops/exits with success, but the xorg.service keeps
    running. I need to switch to TTY2, systemctl --user stop xorg.service by hand, then switch to TTY1, execute Ctrl-C, and then I finally get my login
    prompt back.
    This is a bit annoying, and I don't know how to fix it.
    Here are the relevant (I think) unit files:
    # xmonad.target
    [Unit]
    Description=XMonad
    Wants=xorg.target
    Wants=xinit.target
    Requires=dbus.socket
    AllowIsolate=true
    [Install]
    Alias=default.target
    # xmonad.service
    [Unit]
    Description=Starts Xmonad
    Before=xinitrc.target
    After=xorg.target
    Requires=xorg.target
    [Service]
    ExecStart=/usr/bin/xmonad
    Environment=DISPLAY=:0
    Restart=no
    [Install]
    WantedBy=xmonad.target
    RequiredBy=xorg.service
    As you can see, I have added the RequiredBy=xorg.service line at the bottom, hoping that if xmonad.service exits, so should xorg.service - but to
    no avail.
    What do I have to do in order to completely stop X and get my login prompt on TTY1 back?
    EDIT: I am of course using the user-session-units.
    Last edited by Stalafin (2013-04-22 13:54:45)

    I know it's an old thread (not really old) but I have the same problem. The question is your solution doesnt work with me. It just give me an error like this:
    Failed to issue method call: The name org.freedesktop.login1 was not provided by any .service files
    Failed to issue method call: Process /bin/false exited with status 1

  • [SOLVED] Mouse-friendly dwm window manager?

    Dear all,
    I use the dwm window manager (version 6.0). I think I remember that some time ago in the suckless website
    there was some part where they presented some configuration for extended mouse support. Not sure if I
    recall correctly but, in any case, I can't find something like this any more.
    Does anybody have any hints on that? Any links or advice regarding extended mouse support for dwm?
    Thanks in advance..
    Last edited by geo909 (2012-04-23 19:52:45)

    Unia wrote:
    What exactly is it you think is 'extended'? DWM supports the mouse as much as any other tiler, ie you can move windows with the mouse. There's also the tilemovemouse patch/extension that I think (never used it myself) lets you move tiled windows with the mouse. Find it here:
    https://github.com/ok100/dwm/blob/maste … ovemouse.c
    wolfcore wrote:Well for starters you can customize the button definitions in config.h...
    Thanks! The tilemovemouse patch will definitely help.. And I realize I wasn't clear enough
    when I was saying 'extended'.
    I eventually found many of the things that I was looking for here:
    http://dwm.suckless.org/customisation/customfuncs
    and that helped me understand better how the config.h works..
    I think some customization along with the tilemovemouse patch
    would be pretty complete for me..
    Last edited by geo909 (2012-04-23 19:52:32)

  • [SOLVED]Useless after set xfce4's Window Manager Tweaks

    My xfwm4's theme is 'B5',when I opened a new window,the window always will pop-ups at the left top of the screen and I just want it to pop-up at the center of the screen.
    Then I set the Window Manager Tweaks program, I chose the 'Placement' tag and click on whether 'At the center of the screen' or 'Under the mouse pointer' is useless.
    How to fix the set?
    Last edited by fool (2014-02-27 05:51:58)

    https://wiki.archlinux.org/index.php/Fo … way_Street

  • How can I stop iTunes from using my multimedia keys on my keyboard?

    I use the multimedia keys on my keyboard for WinAmp, which is my primary music player.  When iTunes is open it hijacks every one of them.  WinAmp has options to enable and disable the use of global hotkeys and multimedia keys.  iTunes does not seem to.  Is there really no way to get iTunes to stop taking control of my keys?  I am using Windows 7 Home Premium 64 bit, for the record.

    Yep.  Don't manually manage.

  • I am no longer able to use the volume control buttons ( /-/or mute) on my key board in Windows 7

    1. HP Pavilion dm4 XO132AV
    2. Windows 7 64-bit
    3. No error message
    4. No changes were made prior to when the issue occured
    5. Question: I am no longer able to use the volume control buttons ( /-/or mute) on my key board in Windows 7

    Hi,
    Try the following.
    Download the IDT Audio installer on the link below and save it to your Downloads folder.
    http://ftp.hp.com/pub/softpaq/sp50501-51000/sp50856.exe
    When done, open windows Control Panel, open Device Manager and open up Sound, Video and Game Controllers.  Right click the IDT device and select Uninstall - you should also get a prompt to remove the current driver, tick the box to allow this and then proceed with the uninstall.
    When complete, restart the notebook and let Windows fully load.  Open your Downloads folder, right click on the IDT installer and select 'Run as Administrator' to start the installation.  When this has completed, restart the notebook again.
    Regards,
    DP-K
    ****Click the White thumb to say thanks****
    ****Please mark Accept As Solution if it solves your problem****
    ****I don't work for HP****
    Microsoft MVP - Windows Experience

  • Themable Window Manager

    I have been switching window managers for a while now and have gotten to where I have a specific set of requirements and no contenders.  I was wondering if anyone could recommend some apps.
    I am looking for a window manager that is almost fully themable.  By this I mean full transparencies and the ability to create anything as a window border.  If is not important for me to have the window title on the sides, that aspect of theming is not too important.
    I currently am using openbox and I love every aspect of it except for the limitations on the themes.  I need the window manager to do the following things:
    keybindings (fully customizable).
    Modular.  I don't want to pull in (lots of) desktop specific libraries (IE Qt OK, KDE not-OK)
    Provide nothing but a window manager (unless it is easily turned off)
    Multiple desktops.
    I'm going to add a couple of thinks I would also like to see but shouldn't stop you from posting any,
    Not too fat
    Stacking
    Please post even if they don't fill all of the requirements and I would like to have a little explanation of why you like each window manager.  (Please no "fluxbox ftw!")

    I'm going to start off with my findings.  Many of my explanations are short and most of them are only highlighting the problems.  Please don't accuse me of hating any of the window managers as I respect each an every one.  Many just aren't for me.
    KWin really wants to find and start KDE.  Also can't bind modifier keys (Qt limitation).  KWin is also quite slow due to the effects.  If you turn them all off it speeds right up and takes a lot less memory.  Unfortunately it is still linked to the graphics libraries though so it takes a long time to start.
    Metacity has too few options.  (For example no desktop wrap around).  This is not a progress issue but a design philosophy.  Hence the logo "A WM for old people".  It does have great theming capabilities and does it's job very well.  I does not start up any gnome processes (as far as I noticed).
    Openbox and fluxbox have the theming problems.  They are great window managers though.  Openbox is simple and elegant.  The config file is awesome.  Openbox also has a strong user base if you don't want to write your own themes.  Fluxbox has a ton of extra features if you like them (I don't) such as grouping.
    xfwm wants some settings daemons. (not too bad)  I does have nice themes and is quite lightweight. It also has all of the common features.
    mutter won't start. (I'm looking into this)
    eggwm won't start (No errors or anything)  It will also probably have the same Qt problem as KWin.
    e16 is nice and themable (although it is a ton of work) but it puts too much stuff on my desktop.
    Last edited by youarefunny (2012-02-11 03:15:51)

  • Tastatur multimedia keys, only pause, play does'nt work

    Hi everybody,
    i hope u can help me. My apple tastatur works fine, but the multimedia keys pause, play, next title doenst work - the other keys are working. I reseted and reconnected the tastatur without reason.
    any idea for me?
    thx for help
    Tom

    Hi KalvinKlein,
    before I received your new Info about Fn+Insert , I had once more checked Fn-F7 : no effect in the BIOS.
    I have also tried all non-character keys plus the "Umlaute"-keys on the German keyboard with the following result:
    The key right of the "0" shifts boot device entries down in the list.
    On the German keyboard this key is labelled with " ß ? \ ".
    The next key on the right and left of the "Backward-Erase"-key, labelled with " ´ ` ",
    pressed together with the Shift-key, moves list entries up.
    Using these keys I have then set the Boot device sequence according to your suggestion :
    1: USB CDROM
    2: USB HDD
    3: HDD
    My USB-Memory stick (with BartPE installed) had been recognized as a USB HDD.
    After saving with F10 and <Return> the Netbook responded with a Beep and nothing further happened.
    I had to switch it off with a long press on the Power Button.
    Switched on again, <F2> pressed, BIOS checked,, o.k. <ESC>,
    loads Ramdisk image of BartPE from the USB-stick,
    starts BartPE with XPE.
    Checking available drives in the Windows Explorer resulted in :
    RAMDISK ( "B:" )                (used by BartPE for temporary storage)
    USB ("C:")                         (the USB-stick with the BartPE-iso file)
    "Wechseldatenträger / Removable storage device"           obviously refers to an unused USB-Port
    -volid ("X:") "CD-drive"    but actually another Ramdisk containing the expanded and running BartPE package
    The internal harddisk is not visible !
    I wonder whether this is a problem of the BIOS or whether I require special harddisk drivers (Intel Matrix Storage manager/driver or  possibly AHCP drivers) for Windows XP, because my present BartPE version is based on XP, while the Netbook came with Windows 7 Starter Edition.
    Further helpful hints would very much appreciated.
    Kind regards

  • [SOLVED]openbox key binding hell

    hello everyone I'm having 2 issue setting up new key bindings and I hope someone here can help me I want it to add W-f binding  to open my file manager of choice(pcmanfm) below I will list the two issue and post my rc.xml and all the out put from xev for the f key an the output of xmodmap -pm
    issue #1) when I add a key with obkey the bind I add works but all the others openbox key binds stop working here I'm at a lost after trying it a few times and getting the same result I decide to just edit the xml file here where the second issue begins
    issue #2) when edited the rc.xml to add the key bind I want it I did exactly as the wiki sead but it didn't work so I start looking around and and found out that I can pass the hex value for the key converting the keycode that I get form xev output below
    KeyRelease event, serial 41, synthetic NO, window 0x1a00001,
    root 0xac, subw 0x0, time 1106315, (109,-274), root:(897,143),
    state 0x0, keycode 41 (keysym 0x66, f), same_screen YES,
    XLookupString gives 1 bytes: (66) "f"
    XFilterEvent returns: False
    after doing that seeing that it didn't work ether I found out about the "default" bind the keyboard below is the output
    xmodmap: up to 4 keys per modifier, (keycodes in parentheses):
    shift Shift_L (0x32), Shift_R (0x3e)
    lock Caps_Lock (0x42)
    control Control_L (0x25), Control_R (0x69)
    mod1 Alt_L (0x40), Alt_R (0x6c), Meta_L (0xcd)
    mod2 Num_Lock (0x4d)
    mod3
    mod4 Super_L (0x85), Super_R (0x86), Super_L (0xce), Hyper_L (0xcf)
    mod5 ISO_Level3_Shift (0x5c), Mode_switch (0xcb)
    as I read in one of the forum post in the cruchbnag page the mod4 is the for the window key or super
    so I cahnge the W key on my binding for Super_L and that didn't work ether a this point i'm at a lost of what to do or how to fix it blow is the keyboard part of my rc.xml
    <keyboard>
    <chainQuitKey>C-g</chainQuitKey>
    <!-- Keybindings for desktop switching -->
    <keybind key="C-A-Left">
    <action name="GoToDesktop">
    <to>left</to>
    <wrap>no</wrap>
    </action>
    </keybind>
    <keybind key="C-A-Right">
    <action name="GoToDesktop">
    <to>right</to>
    <wrap>no</wrap>
    </action>
    </keybind>
    <keybind key="C-A-Up">
    <action name="GoToDesktop">
    <to>up</to>
    <wrap>no</wrap>
    </action>
    </keybind>
    <keybind key="C-A-Down">
    <action name="GoToDesktop">
    <to>down</to>
    <wrap>no</wrap>
    </action>
    </keybind>
    <keybind key="S-A-Left">
    <action name="SendToDesktop">
    <to>left</to>
    <wrap>no</wrap>
    </action>
    </keybind>
    <keybind key="S-A-Right">
    <action name="SendToDesktop">
    <to>right</to>
    <wrap>no</wrap>
    </action>
    </keybind>
    <keybind key="S-A-Up">
    <action name="SendToDesktop">
    <to>up</to>
    <wrap>no</wrap>
    </action>
    </keybind>
    <keybind key="S-A-Down">
    <action name="SendToDesktop">
    <to>down</to>
    <wrap>no</wrap>
    </action>
    </keybind>
    <keybind key="W-F1">
    <action name="GoToDesktop">
    <to>1</to>
    </action>
    </keybind>
    <keybind key="W-F2">
    <action name="GoToDesktop">
    <to>2</to>
    </action>
    </keybind>
    <keybind key="W-F3">
    <action name="GoToDesktop">
    <to>3</to>
    </action>
    </keybind>
    <keybind key="W-F4">
    <action name="GoToDesktop">
    <to>4</to>
    </action>
    </keybind>
    <keybind key="W-d">
    <action name="ToggleShowDesktop"/>
    </keybind>
    <!-- Keybindings for windows -->
    <keybind key="A-F4">
    <action name="Close"/>
    </keybind>
    <keybind key="A-Escape">
    <action name="Lower"/>
    <action name="FocusToBottom"/>
    <action name="Unfocus"/>
    </keybind>
    <keybind key="A-space">
    <action name="ShowMenu">
    <menu>client-menu</menu>
    </action>
    </keybind>
    <!-- Keybindings for window switching -->
    <keybind key="A-Tab">
    <action name="NextWindow">
    <finalactions>
    <action name="Focus"/>
    <action name="Raise"/>
    <action name="Unshade"/>
    </finalactions>
    </action>
    </keybind>
    <keybind key="A-S-Tab">
    <action name="PreviousWindow">
    <finalactions>
    <action name="Focus"/>
    <action name="Raise"/>
    <action name="Unshade"/>
    </finalactions>
    </action>
    </keybind>
    <keybind key="C-A-Tab">
    <action name="NextWindow">
    <panels>yes</panels>
    <desktop>yes</desktop>
    <finalactions>
    <action name="Focus"/>
    <action name="Raise"/>
    <action name="Unshade"/>
    </finalactions>
    </action>
    </keybind>
    <!-- Keybindings for window switching with the arrow keys -->
    <keybind key="W-S-Right">
    <action name="DirectionalCycleWindows">
    <direction>right</direction>
    </action>
    </keybind>
    <keybind key="W-S-Left">
    <action name="DirectionalCycleWindows">
    <direction>left</direction>
    </action>
    </keybind>
    <keybind key="W-S-Up">
    <action name="DirectionalCycleWindows">
    <direction>up</direction>
    </action>
    </keybind>
    <keybind key="W-S-Down">
    <action name="DirectionalCycleWindows">
    <direction>down</direction>
    </action>
    </keybind>
    <!-- Keybindings for running applications -->
    <keybind key="W-e">
    <action name="Execute">
    <startupnotify>
    <enabled>true</enabled>
    <name>Konqueror</name>
    </startupnotify>
    <command>kfmclient openProfile filemanagement</command>
    </action>
    </keybind>
    <keybind key="Super_L-0x29">
    <action name="Execute">
    <commnad>pcmanfm</commnad>
    </action>
    </keybind>
    </keyboard>
    the last is the is the one I add it I use both the Super_L and the hex valu of the f key to see if will work but it doesn't also as long I add them by hand all the defaults key bind keep working the second i use obkey they stop working as mention in issue 1
    Last edited by gozes (2012-01-01 06:27:00)

    You have a misspelling, twice on the same line: commnad should be command.
    If that doesn't fix it, try using a full path:
    <!-- pcmanfm -->
    <keybind key="W-F">
    <action name="Execute">
    <command>/usr/bin/pcmanfm</command>
    </action>
    </keybind>

Maybe you are looking for