1
0
Fork 0

dunst config

This commit is contained in:
Massaki Archambault 2018-10-31 13:11:04 -04:00
parent a5deb69788
commit 9f56a7c744
6 changed files with 131 additions and 23 deletions

View File

@ -78,7 +78,8 @@ rofi.font: F_SANS 12
i3wm*font: F_MONO
i3wm*bg: #3838383
i3wm*fg: C_FG
i3wm*border: #c7c7c7
i3wm*border: #3838383
!i3wm*border: #c7c7c7
i3wm*active: #f0544c
! lock

View File

@ -15,7 +15,7 @@
#
# If this option is set to mouse or keyboard, the monitor option
# will be ignored.
follow = mouse
follow = none
# The geometry of the window:
# [{width}]x{height}[+/-{x}+/-{y}]
@ -29,7 +29,7 @@
# the top and down respectively.
# The width can be negative. In this case the actual width is the
# screen width minus the width defined in within the geometry option.
geometry = "300x5-30+20"
geometry = "450x3-15+30"
# Show how many messages are currently hidden (because of geometry).
indicate_hidden = yes
@ -54,17 +54,17 @@
separator_height = 2
# Padding between text and separator.
padding = 8
padding = 10
# Horizontal padding.
horizontal_padding = 8
horizontal_padding = 10
# Defines width in pixels of frame around the notification window.
# Set to 0 to disable.
frame_width = 3
frame_width = 2
# Defines color of the frame around the notification window.
frame_color = "#aaaaaa"
frame_color = "#c7c7c7"
# Define a color for the separator.
# possible values are:
@ -85,7 +85,7 @@
### Text ###
font = Monospace 8
font = monospace 9
# The spacing between lines. If the height is smaller than the
# font height, it will get raised to the font height.
@ -125,7 +125,7 @@
# %n progress value if set without any extra characters
# %% Literal %
# Markup is allowed
format = "<b>%s</b>\n%b"
format = "<big>%a</big>\n<b>%s</b>\n%b"
# Alignment of message text.
# Possible values are "left", "center" and "right".
@ -159,13 +159,13 @@
### Icons ###
# Align icons left/right/off
icon_position = off
icon_position = left
# Scale larger icons down to this size, set to 0 to disable
max_icon_size = 32
# Paths to default icons.
icon_path = /usr/share/icons/Vibrancy-Vibrancy-Colors/status/16/:/usr/share/icons/Vibrancy-Colors/devices/16
icon_path = /usr/share/icons/Mint-Y/status/32:/usr/share/icons/Mint-Y/devices/32:/usr/share/icons/Faba-Mono/48x48/notifications/
### History ###
@ -245,23 +245,23 @@
[urgency_low]
# IMPORTANT: colors have to be defined in quotation marks.
# Otherwise the "#" and following would be interpreted as a comment.
background = "#222222"
foreground = "#888888"
background = "#383838"
foreground = "#b7bbb7"
timeout = 10
# Icon for notifications with low urgency, uncomment to enable
#icon = /path/to/icon
[urgency_normal]
background = "#285577"
background = "#383838"
foreground = "#ffffff"
timeout = 10
# Icon for notifications with normal urgency, uncomment to enable
#icon = /path/to/icon
[urgency_critical]
background = "#900000"
background = "#383838"
foreground = "#ffffff"
frame_color = "#ff0000"
frame_color = "#f0544c"
timeout = 0
# Icon for notifications with critical urgency, uncomment to enable
#icon = /path/to/icon
@ -285,6 +285,20 @@
# NOTE: It might be helpful to run dunst -print in a terminal in order
# to find fitting options for rules.
[dunstify-notifications]
appname = "dunstify"
icon = "notification-*"
format = "%s"
timeout = 2
[dustify]
appname = "dunstify"
format = "<b>%s</b>\n%b"
[notify-send]
appname = "notify-send"
format = "<b>%s</b>\n%b"
#[espeak]
# summary = "*"
# script = dunst_espeak.sh

View File

@ -57,8 +57,8 @@ set $ws9 "9: 9 "
set $ws10 "10: 10 "
# window title
for_window [class="^.*"] border pixel 1 title_format " %title"
for_window [floating] border pixel 2
for_window [class="^.*"] border pixel 2 title_format " %title"
for_window [floating] border pixel 1
smart_borders on
# GapS
@ -72,6 +72,7 @@ for_window [class="^Pulseeffects$"] floating enable
for_window [class="Remmina" title="Remmina Remote Desktop Client"] floating enable
for_window [class="feh" title="pinned screenshot"] floating enable sticky enable
for_window [class="TeamViewer"] floating enable
for_window [class="Thunar"] floating enable
# https://github.com/ValveSoftware/steam-for-linux/issues/1040
for_window [class="^Steam$" title="^Friends$"] floating enable
@ -94,6 +95,9 @@ floating_modifier $mod
# start a terminal
bindsym $mod+Return exec i3-sensible-terminal
# thunar
bindsym $mod+Mod1+Return exec thunar
# kill focused window
bindsym $mod+Shift+q kill

View File

@ -0,0 +1,36 @@
#!/usr/bin/env bash
# You can call this script like this:
# $ ./brightnessControl.sh up
# $ ./brightnessControl.sh down
# Script inspired by these wonderful people:
# https://github.com/dastorm/volume-notification-dunst/blob/master/volume.sh
# https://gist.github.com/sebastiencs/5d7227f388d93374cebdf72e783fbd6a
function get_brightness {
brightnessctl -m | grep -o '[0-9]\+%' | head -c-2
}
function send_notification {
icon="notification-display-brightness"
brightness=$(get_brightness)
# Make the bar with the special character ─ (it's not dash -)
# https://en.wikipedia.org/wiki/Box-drawing_character
bar=$(seq -s "━" 0 $((brightness / 2)) | sed 's/[0-9]//g')
# Send the notification
dunstify -i "$icon" -r 5555 -u normal " $bar"
}
case $1 in
up)
# increase the backlight by 5%
brightnessctl set +5%
send_notification
;;
down)
# decrease the backlight by 5%
brightnessctl set 5%-
send_notification
;;
esac

53
files/.local/bin/volume-control Executable file
View File

@ -0,0 +1,53 @@
#!/usr/bin/env bash
# You can call this script like this:
# $ ./volumeControl.sh up
# $ ./volumeControl.sh down
# $ ./volumeControl.sh mute
# Script modified from these wonderful people:
# https://github.com/dastorm/volume-notification-dunst/blob/master/volume.sh
# https://gist.github.com/sebastiencs/5d7227f388d93374cebdf72e783fbd6a
function get_volume {
amixer get Master | grep '%' | head -n 1 | cut -d '[' -f 2 | cut -d '%' -f 1
}
function is_mute {
amixer get Master | grep '%' | grep -oE '[^ ]+$' | grep off > /dev/null
}
function send_notification {
iconSound="notification-audio-volume-high"
iconMuted="notification-audio-volume-muted"
if is_mute ; then
dunstify -i $iconMuted -r 2593 -u normal ""
else
volume=$(get_volume)
# Make the bar with the special character ─ (it's not dash -)
# https://en.wikipedia.org/wiki/Box-drawing_character
bar=$(seq --separator="━" 0 "$((volume / 2))" | sed 's/[0-9]//g')
# Send the notification
dunstify -i $iconSound -r 2593 -u normal " $bar"
fi
}
case $1 in
up)
# set the volume on (if it was muted)
amixer -D pulse set Master on > /dev/null
# up the volume (+ 5%)
amixer -D pulse sset Master 5%+ > /dev/null
send_notification
;;
down)
amixer -D pulse set Master on > /dev/null
amixer -D pulse sset Master 5%- > /dev/null
send_notification
;;
mute)
# toggle mute
amixer -D pulse set Master 1+ toggle > /dev/null
send_notification
;;
esac

View File

@ -1,18 +1,18 @@
# backlight
"brightnessctl set +5%"
"brightness-control up"
XF86MonBrightnessUp
"brightnessctl set 5%-"
"brightness-control down"
XF86MonBrightnessDown
# volume
"amixer sset Master toggle"
"volume-control mute"
XF86AudioMute
"amixer sset Master unmute 5%+"
"volume-control up"
XF86AudioRaiseVolume
"amixer sset Master unmute 5%-"
"volume-control down"
XF86AudioLowerVolume
# printscreen