Browse Source

Auto reload dwm

main
Yiğit Çolakoğlu 4 years ago
parent
commit
3fe7b84378
5 changed files with 30 additions and 3 deletions
  1. +1
    -1
      scripts/dmenu-logout
  2. +10
    -0
      scripts/tedportal
  3. +3
    -0
      suckless/dwm/keybind.h
  4. +1
    -1
      suckless/dwm/rules.h
  5. +15
    -1
      xorg/xinitrc

+ 1
- 1
scripts/dmenu-logout View File

@ -43,7 +43,7 @@ case $selection in
restart
;;
logout)
logout
kill -9 $(pidof dwm)
;;
hibernate)
sudo systemctl hibernate


+ 10
- 0
scripts/tedportal View File

@ -0,0 +1,10 @@
#!/bin/bash
selection=$(cat ~/.cache/tedportal | dmenu -i -l 8)
echo $selection
IFS="|"
read -ra url <<< "$selection"
xdg-open ${url[1]}

+ 3
- 0
suckless/dwm/keybind.h View File

@ -34,6 +34,8 @@ static const char *notification_on[] = {"/home/yigit/.scripts/dunst_toggle.sh",
static const char *screensaver_off[] = {"/home/yigit/.scripts/screensaver_toggle","-s",NULL};
static const char *screensaver_on[] = {"/home/yigit/.scripts/screensaver_toggle", "-e",NULL};
static const char *online_class[] = {"/home/yigit/.scripts/tedportal",NULL};
static const char *bwmenu[] = {"/home/yigit/.scripts/password_manager", NULL};
@ -121,6 +123,7 @@ static Key keys[] = {
{ MODKEY, XK_Print, spawn, {.v = windowshot } },
{ MODKEY, XK_u, spawn, {.v = url} },
{ MODKEY, XK_g, spawn, {.v = google} },
{ MODKEY|ShiftMask, XK_c, spawn, {.v = online_class} },
{ MODKEY, XK_y, spawn, {.v = youtube} },
{ MODKEY, XK_s, togglescratch, {.ui = 0 } },
{ MODKEY|ShiftMask, XK_s, togglescratch, {.ui = 1 } },


+ 1
- 1
suckless/dwm/rules.h View File

@ -29,6 +29,6 @@ static const Rule rules[] = {
RULE(.class = "ranger", 0, .isfloating = 1)
RULE(.class = "vim", 0, .isfloating = 1, .floatpos="50% 50% 800W 560H")
RULE(.class = "mpv", 0, .isfloating = 1, .floatpos="100% 1% 600W 350H")
RULE(.class = "Sxiv", 0, .isfloating = 1, .floatpos="100% 1% 600W 350H")
RULE(.instance = "sxiv", 0, .isfloating = 1, .floatpos="100% 1% 600W 350H")
RULE(.class = "neomutt-send", 0, .isfloating = 1, .floatpos="50% 50% 1000W 700H")
};

+ 15
- 1
xorg/xinitrc View File

@ -57,4 +57,18 @@ bitwarden-desktop &
#thunderbird &
dunst &
exec dwm > /tmp/dwm.log 2> /tmp/dwm.err
csum=""
new_csum=$(sha1sum $(which dwm))
while true
do
if [ "$csum" != "$new_csum" ]
then
csum=$new_csum
dwm > /tmp/dwm.log 2> /tmp/dwm.err
else
exit 0
fi
new_csum=$(sha1sum $(which dwm))
sleep 0.5
done

Loading…
Cancel
Save