Add volume control shortcuts

This commit is contained in:
Pierre Martin
2015-09-25 08:06:12 +02:00
parent f2b5dd91c4
commit 758cb059d7
3 changed files with 25 additions and 3 deletions

15
bin/handle-volume-change Normal file
View File

@@ -0,0 +1,15 @@
#!/bin/bash
SINK=`pactl list short sinks | grep RUNNING | cut -f1`
case "$1" in
"up")
pactl set-sink-volume $SINK +10% && pactl set-sink-mute $SINK 0
;;
"down")
pactl set-sink-volume $SINK -10% && pactl set-sink-mute $SINK 0
;;
"mute")
pactl set-sink-mute $SINK toggle
;;
esac

View File

@@ -52,7 +52,6 @@
apt: name={{ item }} state=present apt: name={{ item }} state=present
tags: windowmanager tags: windowmanager
with_items: with_items:
- gnome-settings-daemon
- suckless-tools - suckless-tools
- pcmanfm - pcmanfm
- dunst - dunst
@@ -84,13 +83,15 @@
template: src=templates/gitconfig.j2 dest={{ansible_env.HOME}}/.gitconfig template: src=templates/gitconfig.j2 dest={{ansible_env.HOME}}/.gitconfig
- name: ensure fasd is installed and configured - name: ensure fasd is installed and configured
get_url: url=https://raw.githubusercontent.com/clvv/fasd/master/fasd dest={{BIN_DIR}}/fasd mode=0755 get_url: url=https://raw.githubusercontent.com/clvv/fasd/master/fasd dest={{BIN_DIR}}/fasd mode=0755
- name: ensure binaries are available in path
copy: src=bin/ dest={{BIN_DIR}}/ mode=0755
- name: ensure dotfiles are available - name: ensure dotfiles are available
copy: src=.zshrc dest={{ansible_env.HOME}}/.zshrc copy: src=.zshrc dest={{ansible_env.HOME}}/.zshrc
# TODO # TODO
# i3 bugfixes: # i3 bugfixes:
# http://blog.hugochinchilla.net/2013/03/using-gnome-3-with-i3-window-manager/ - usr/share/xsessions/gnome-i3.desktop
# ++ http://www.draconianoverlord.com/2014/05/26/from-xmonad-to-i3.html # ++ http://www.draconianoverlord.com/2014/05/26/from-xmonad-to-i3.html
# Fn keys (sound, brightness ...). Try https://wiki.archlinux.org/index.php/Fcitx ?
# #
# https://github.com/sgentle/caniuse-cmd # https://github.com/sgentle/caniuse-cmd
# #

View File

@@ -145,12 +145,18 @@ mode "resize" {
bindsym $mod+r mode "resize" bindsym $mod+r mode "resize"
bindsym XF86AudioRaiseVolume exec --no-startup-id handle-volume-change up
bindsym XF86AudioLowerVolume exec --no-startup-id handle-volume-change down
bindsym XF86AudioMute exec --no-startup-id handle-volume-change mute
# Start i3bar to display a workspace bar (plus the system information i3status # Start i3bar to display a workspace bar (plus the system information i3status
# finds out, if available) # finds out, if available)
bar { bar {
status_command i3status status_command i3status
} }
exec --no-startup-id gnome-session
exec --no-startup-id unity-settings-daemon
exec --no-startup-id setxkbmap -layout fr -variant oss # allow typing "ê" instead of "^e" exec --no-startup-id setxkbmap -layout fr -variant oss # allow typing "ê" instead of "^e"
exec --no-startup-id numlockx on # turn verr num on exec --no-startup-id numlockx on # turn verr num on
exec --no-startup-id nm-applet exec --no-startup-id nm-applet