notification daemon & icewm - Linux

By Liam
at 2018-04-02T23:27
at 2018-04-02T23:27
Table of Contents
Hi~
剛寫了一個簡單的script
可以用來調整音量並顯示一個通知在桌面上
內容如下
============================================================
#! /bin/bash
# /usr/local/bin/AdjustVolume.sh
if [ ${1} == "Up" ]; then
amixer -q sset PCM 2dB+
elif [ ${1} == "Down" ]; then
amixer -q sset PCM 2dB-
else
amixer -q sset PCM toggle
fi
VOL=$(amixer | tail -1 | tr -s ' ' | cut -d ' ' -f 6,7,8)
notify-send "Volume: $VOL"
exit 0
============================================================
功能大致上沒什麼問題
但有個小困擾就是顯示在桌面上的通知都會持續近十秒才消失(或顯示下一則通知)
如果我連降三次音量的話那要在30秒後才看得到調整過後真正的的音量
這樣實在太久了
有試過notify-send加-t 1000參數
但目前用的notification daemon (notify-osd)不吃這個參數(notify-send manpage上寫的)
所以加了也沒用
想請教還有其它推薦的notification daemon嗎?
我系統裡有notification-daemon這個package
在裝notify-osd之前有試過
ps aux看得到它
所以確定daemon是有在run的
但不知為何就是沒反應
另外我的WM是icewm
我有設定一些快速鍵
這些快速鍵會利用上述的script來調整音量並顯示通知
鍵盤的開始鍵+數字區的加號 ==> 調大聲
鍵盤的開始鍵+數字區的減號 ==> 調小聲
鍵盤的開始鍵+數字區的零 ==> 靜音/取消靜音
內容如下
============================================================
# ~/.icewm/keys
key "Super+KP_Subtract" AdjustVolume.sh Down
key "Super+KP_Add" AdjustVolume.sh Up
key "Super+KP_Zero" AdjustVolume.sh Toggle
============================================================
調大小聲的部份沒問題
但靜音切換沒反應
我想問題應該是在KP_Zero這裡
有人知道要怎麼改才能正確作動嗎?
謝謝~~~
--
剛寫了一個簡單的script
可以用來調整音量並顯示一個通知在桌面上
內容如下
============================================================
#! /bin/bash
# /usr/local/bin/AdjustVolume.sh
if [ ${1} == "Up" ]; then
amixer -q sset PCM 2dB+
elif [ ${1} == "Down" ]; then
amixer -q sset PCM 2dB-
else
amixer -q sset PCM toggle
fi
VOL=$(amixer | tail -1 | tr -s ' ' | cut -d ' ' -f 6,7,8)
notify-send "Volume: $VOL"
exit 0
============================================================
功能大致上沒什麼問題
但有個小困擾就是顯示在桌面上的通知都會持續近十秒才消失(或顯示下一則通知)
如果我連降三次音量的話那要在30秒後才看得到調整過後真正的的音量
這樣實在太久了
有試過notify-send加-t 1000參數
但目前用的notification daemon (notify-osd)不吃這個參數(notify-send manpage上寫的)
所以加了也沒用
想請教還有其它推薦的notification daemon嗎?
我系統裡有notification-daemon這個package
在裝notify-osd之前有試過
ps aux看得到它
所以確定daemon是有在run的
但不知為何就是沒反應
另外我的WM是icewm
我有設定一些快速鍵
這些快速鍵會利用上述的script來調整音量並顯示通知
鍵盤的開始鍵+數字區的加號 ==> 調大聲
鍵盤的開始鍵+數字區的減號 ==> 調小聲
鍵盤的開始鍵+數字區的零 ==> 靜音/取消靜音
內容如下
============================================================
# ~/.icewm/keys
key "Super+KP_Subtract" AdjustVolume.sh Down
key "Super+KP_Add" AdjustVolume.sh Up
key "Super+KP_Zero" AdjustVolume.sh Toggle
============================================================
調大小聲的部份沒問題
但靜音切換沒反應
我想問題應該是在KP_Zero這裡
有人知道要怎麼改才能正確作動嗎?
謝謝~~~
--
Tags:
Linux
All Comments

By Franklin
at 2018-04-07T18:48
at 2018-04-07T18:48

By Ida
at 2018-04-11T04:25
at 2018-04-11T04:25

By Quintina
at 2018-04-12T19:48
at 2018-04-12T19:48

By Poppy
at 2018-04-17T00:29
at 2018-04-17T00:29

By Ophelia
at 2018-04-18T16:39
at 2018-04-18T16:39

By Irma
at 2018-04-21T04:48
at 2018-04-21T04:48

By Carolina Franco
at 2018-04-23T12:15
at 2018-04-23T12:15

By Lily
at 2018-04-25T07:01
at 2018-04-25T07:01

By Eden
at 2018-04-25T10:24
at 2018-04-25T10:24

By Yedda
at 2018-04-28T02:06
at 2018-04-28T02:06

By Faithe
at 2018-04-29T05:37
at 2018-04-29T05:37

By Edward Lewis
at 2018-05-04T02:57
at 2018-05-04T02:57
Related Posts
請問如何掛載區網NTFS硬碟?

By Eartha
at 2018-04-01T23:36
at 2018-04-01T23:36
red hat 開機問題

By Ursula
at 2018-04-01T20:11
at 2018-04-01T20:11
初學該怎麼學?

By Gary
at 2018-04-01T08:17
at 2018-04-01T08:17
linux help 如何解讀

By Madame
at 2018-03-31T18:27
at 2018-03-31T18:27
Arch桌面環境設定

By Quanna
at 2018-03-29T15:13
at 2018-03-29T15:13