From 4828c9c6b98d4e93c236eec4fc0f008ee0f65b9d Mon Sep 17 00:00:00 2001 From: Yigit Sever Date: Mon, 18 Mar 2019 21:37:33 +0300 Subject: New script to add taskwarrior todo items --- .config/i3/config##desktop.Linux.Lowe | 4 +++- bin/td | 24 ++++++++++++++++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) create mode 100755 bin/td diff --git a/.config/i3/config##desktop.Linux.Lowe b/.config/i3/config##desktop.Linux.Lowe index 476f645..54e038c 100644 --- a/.config/i3/config##desktop.Linux.Lowe +++ b/.config/i3/config##desktop.Linux.Lowe @@ -26,6 +26,9 @@ bindsym $mod+o exec --no-startup-id xdotool mousemove 1920 1080 # bookmark from clipboard bindsym $mod+u exec --no-startup-id ~/bin/bukuadd_c +# add taskwarrior/gtd calendar item +bindsym $mod+Shift+t exec --no-startup-id ~/bin/td + # swap caps lock and escape, set keyboard layout, 35 is ]/ΓΌ (layout agnostic) bindcode $mod+35 exec --no-startup-id "setxkbmap -model pc105 -layout us,tr -option grp:alt_shift_toggle,caps:swapescape" @@ -43,7 +46,6 @@ bindsym XF86AudioNext exec mpc next # shortcuts for frequent programs bindsym $mod+Shift+z exec zotero bindsym $mod+Shift+f exec thunar -bindsym $mod+Shift+t exec thunderbird # start a terminal bindsym $mod+Return exec kitty diff --git a/bin/td b/bin/td new file mode 100755 index 0000000..9bbbec1 --- /dev/null +++ b/bin/td @@ -0,0 +1,24 @@ +#!/bin/bash + +task_date=$(zenity --calendar --date-format=%Y-%m-%d) + +if [[ $? -ne 0 ]]; then + notify-send "Cancelling..." "" --app-name="task todo" --icon="dialog error" + exit 0 +fi + +task_time=$(zenity --entry --text="enter time in xx:xx format" --entry-text="00:00") + +if [[ $? -ne 0 ]]; then + notify-send "Cancelling..." "" --app-name="task todo" --icon="dialog error" + exit 0 +fi + +task_description=$(zenity --entry --text="enter description") + +if [[ $? -ne 0 ]]; then + notify-send "Cancelling..." "" --app-name="task todo" --icon="dialog error" + exit 0 +fi + +task add due:"$task_date" + "T$task_time" "$task_description" -- cgit v1.2.3-70-g09d2 From 20a87a136c71df3df28f121a5df529a982ed5f0e Mon Sep 17 00:00:00 2001 From: Yigit Sever Date: Wed, 20 Mar 2019 22:16:07 +0300 Subject: Dunst actions properly forwarded to rofi --- .config/dunst/dunstrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/dunst/dunstrc b/.config/dunst/dunstrc index 138a1d7..e1d2052 100755 --- a/.config/dunst/dunstrc +++ b/.config/dunst/dunstrc @@ -26,7 +26,7 @@ icon_position = left max_icon_size = 64x64 icon_path = "/usr/share/icons/Papirus-Dark/16x16/status/:/usr/share/icons/Papirus-Dark/16x16/devices/:/usr/share/icons/Papirus-Dark/16x16/actions/:/usr/share/icons/Papirus-Dark/16x16/places/" sticky_history = yes -dmenu = "/usr/bin/rofi" +dmenu = "/usr/bin/rofi -dmenu" history_length = 20 browser = /usr/bin/firefox title = Dunst -- cgit v1.2.3-70-g09d2 From b1f5da829f7439aa2f27cbe8ac7de42b750654d2 Mon Sep 17 00:00:00 2001 From: Yigit Sever Date: Wed, 20 Mar 2019 22:17:13 +0300 Subject: Task todo adder displays success via dunst --- bin/td | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bin/td b/bin/td index 9bbbec1..29a594b 100755 --- a/bin/td +++ b/bin/td @@ -21,4 +21,6 @@ if [[ $? -ne 0 ]]; then exit 0 fi -task add due:"$task_date" + "T$task_time" "$task_description" +RESULT=$(task add due:${task_date}T$task_time "$task_description") + +notify-send "Success" "$RESULT" --app-name="taskwarrior" --icon="checkmark" -- cgit v1.2.3-70-g09d2 From bca2085eedfddda25f706f66f141a2b298051b53 Mon Sep 17 00:00:00 2001 From: Yigit Sever Date: Wed, 20 Mar 2019 22:22:00 +0300 Subject: i3 work with volnoti to show volume indicator --- .config/i3/config | 1 + .config/i3/config##desktop.Linux.Lowe | 9 ++++++--- .config/i3/config##desktop.Linux.Maus | 7 +++---- 3 files changed, 10 insertions(+), 7 deletions(-) create mode 120000 .config/i3/config diff --git a/.config/i3/config b/.config/i3/config new file mode 120000 index 0000000..10f87dd --- /dev/null +++ b/.config/i3/config @@ -0,0 +1 @@ +/home/yigit/.config/i3/config##desktop.Linux.Lowe \ No newline at end of file diff --git a/.config/i3/config##desktop.Linux.Lowe b/.config/i3/config##desktop.Linux.Lowe index 54e038c..0a940ab 100644 --- a/.config/i3/config##desktop.Linux.Lowe +++ b/.config/i3/config##desktop.Linux.Lowe @@ -36,9 +36,12 @@ bindcode $mod+35 exec --no-startup-id "setxkbmap -model pc105 -layout us,tr -opt bindsym Print exec flameshot gui # media keys -bindsym XF86AudioMute exec "pactl set-sink-mute @DEFAULT_SINK@ toggle" -bindsym XF86AudioRaiseVolume exec "pactl set-sink-volume @DEFAULT_SINK@ +5%" -bindsym XF86AudioLowerVolume exec "pactl set-sink-volume @DEFAULT_SINK@ -5%" +bindsym XF86AudioRaiseVolume exec --no-startup-id "amixer set Master 2%+ && volnoti-show $(amixer get Master | grep -Po '[0-9]+(?=%)' | head -1)" +bindsym XF86AudioLowerVolume exec --no-startup-id "amixer set Master 2%- && volnoti-show $(amixer get Master | grep -Po '[0-9]+(?=%)' | head -1)" +bindsym XF86AudioMute exec --no-startup-id "amixer set Master toggle && if amixer get Master | grep -Fq '[off]'; then volnoti-show -m; else volnoti-show $(amixer get Master | grep -Po '[0-9]+(?=%)' | head -1); fi" +#bindsym XF86AudioMute exec "pactl set-sink-mute @DEFAULT_SINK@ toggle" +#bindsym XF86AudioRaiseVolume exec "pactl set-sink-volume @DEFAULT_SINK@ +5%" +#bindsym XF86AudioLowerVolume exec "pactl set-sink-volume @DEFAULT_SINK@ -5%" bindsym XF86AudioPlay exec mpc toggle bindsym XF86AudioPrev exec /home/yigit/bin/mpcPrevSong.sh bindsym XF86AudioNext exec mpc next diff --git a/.config/i3/config##desktop.Linux.Maus b/.config/i3/config##desktop.Linux.Maus index 043eff8..8edaad2 100644 --- a/.config/i3/config##desktop.Linux.Maus +++ b/.config/i3/config##desktop.Linux.Maus @@ -57,11 +57,10 @@ bindsym $mod+p exec --no-startup-id "setxkbmap -model pc105 -layout us,tr -optio bindsym Print exec flameshot gui # media keys -bindsym $mod+m exec "pactl set-sink-mute @DEFAULT_SINK@ toggle" -bindsym $mod+Up exec "pactl set-sink-volume @DEFAULT_SINK@ +5%" -bindsym $mod+Down exec "pactl set-sink-volume @DEFAULT_SINK@ -5%" +bindsym $mod+Up exec --no-startup-id "amixer set Master 2%+ && volnoti-show $(amixer get Master | grep -Po '[0-9]+(?=%)' | head -1)" +bindsym $mod+Down exec --no-startup-id "amixer set Master 2%- && volnoti-show $(amixer get Master | grep -Po '[0-9]+(?=%)' | head -1)" +bindsym $mod+m exec --no-startup-id "amixer set Master toggle && if amixer get Master | grep -Fq '[off]'; then volnoti-show -m; else volnoti-show $(amixer get Master | grep -Po '[0-9]+(?=%)' | head -1); fi" bindsym $mod+q exec mpc toggle -#bindsym XF86AudioStop exec mpc stop bindsym $mod+Left exec /home/yigit/bin/mpvPrev bindsym $mod+Right exec mpc next -- cgit v1.2.3-70-g09d2