summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-08-15 14:46:08 +0200
committerJozanLeClerc <bousset.rudy@gmail.com>2020-08-15 14:46:08 +0200
commit142bae9b0bcd56e38d03fd397b4c708442c5c2fb (patch)
treec804e55cef4f9085e68d194093e8c8e2d48ae7a5
parentThreaded bspwm (diff)
downloaddotfiles-bsd-142bae9b0bcd56e38d03fd397b4c708442c5c2fb.tar.gz
dotfiles-bsd-142bae9b0bcd56e38d03fd397b4c708442c5c2fb.tar.bz2
dotfiles-bsd-142bae9b0bcd56e38d03fd397b4c708442c5c2fb.tar.xz
dotfiles-bsd-142bae9b0bcd56e38d03fd397b4c708442c5c2fb.tar.zst
dotfiles-bsd-142bae9b0bcd56e38d03fd397b4c708442c5c2fb.zip
good bsp timings
-rwxr-xr-x.config/bspwm/bspwmrc4
-rwxr-xr-x.config/bspwm/terms_thread.pl26
2 files changed, 14 insertions, 16 deletions
diff --git a/.config/bspwm/bspwmrc b/.config/bspwm/bspwmrc
index daa7647..cb7de0d 100755
--- a/.config/bspwm/bspwmrc
+++ b/.config/bspwm/bspwmrc
@@ -145,10 +145,8 @@ sub run_fg_programs
exec(TERMS_THREAD, $screens);
exit;
}
- sleep(8);
- system(BSPC_PATH, 'desktop', '-f', '01');
+ sleep(14);
run_if_dead(EMACS_PATH);
- sleep(8);
return;
}
diff --git a/.config/bspwm/terms_thread.pl b/.config/bspwm/terms_thread.pl
index 4d6e9ed..b42b606 100755
--- a/.config/bspwm/terms_thread.pl
+++ b/.config/bspwm/terms_thread.pl
@@ -2,7 +2,6 @@
use strict;
use warnings;
-use Time::HiRes;
use constant {
BSPC_PATH => '/usr/local/bin/bspc',
@@ -40,26 +39,26 @@ sub fg_on_three_screens
);
exit;
}
- Time::HiRes::sleep(2.5);
+ sleep(3);
$term_pid[1] = fork();
if (not $term_pid[1]) {
exec(ALACRITTY_PATH, '-e', HTOP_PATH);
exit;
}
- Time::HiRes::sleep(2.5);
+ sleep(3);
$term_pid[2] = fork();
if (not $term_pid[2]) {
exec(ALACRITTY_PATH, '-e', GOTOP_PATH);
exit;
}
- Time::HiRes::sleep(2.5);
+ sleep(3);
system(BSPC_PATH, 'node', '-f', 'west');
$term_pid[3] = fork();
if (not $term_pid[3]) {
exec(ALACRITTY_PATH, '-e', VIFM_PATH);
exit;
}
- Time::HiRes::sleep(2.5);
+ sleep(3);
system(BSPC_PATH, 'node', '-z', 'right', '180', '0');
system(BSPC_PATH, 'node', '-z', 'top', '0', '70');
system(BSPC_PATH, 'node', '-f', 'east');
@@ -82,26 +81,26 @@ sub fg_on_two_screens
);
exit;
}
- Time::HiRes::sleep(2.5);
+ sleep(3);
$term_pid[1] = fork();
if (not $term_pid[1]) {
exec(ALACRITTY_PATH, '-e', HTOP_PATH);
exit;
}
- Time::HiRes::sleep(2.5);
+ sleep(3);
$term_pid[2] = fork();
if (not $term_pid[2]) {
exec(ALACRITTY_PATH, '-e', GOTOP_PATH);
exit;
}
- Time::HiRes::sleep(2.5);
+ sleep(3);
system(BSPC_PATH, 'node', '-f', 'west');
$term_pid[3] = fork();
if (not $term_pid[3]) {
exec(ALACRITTY_PATH, '-e', VIFM_PATH);
exit;
}
- Time::HiRes::sleep(2.5);
+ sleep(3);
system(BSPC_PATH, 'node', '-z', 'right', '180', '0');
system(BSPC_PATH, 'node', '-z', 'top', '0', '70');
system(BSPC_PATH, 'node', '-f', 'east');
@@ -124,25 +123,25 @@ sub fg_on_one_screen
);
exit;
}
- Time::HiRes::sleep(2.5);
+ sleep(3);
system(BSPC_PATH, 'node', '-p', 'west');
$term_pid[1] = fork();
if (not $term_pid[1]) {
exec(ALACRITTY_PATH, '-e', HTOP_PATH);
exit;
}
- Time::HiRes::sleep(2.5);
+ sleep(3);
$term_pid[2] = fork();
if (not $term_pid[2]) {
exec(ALACRITTY_PATH, '-e', GOTOP_PATH);
}
- Time::HiRes::sleep(2.5);
+ sleep(3);
system(BSPC_PATH, 'node', '-f', 'east');
$term_pid[3] = fork();
if (not $term_pid[3]) {
exec(ALACRITTY_PATH, '-e', VIFM_PATH);
}
- Time::HiRes::sleep(2.5);
+ sleep(3);
system(BSPC_PATH, 'node', '-f', 'west');
system(BSPC_PATH, 'node', '-f', 'north');
system(BSPC_PATH, 'node', '-z', 'bottom', '0', '-200');
@@ -167,6 +166,7 @@ sub run_terms
else {
fg_on_one_screen();
}
+ system(BSPC_PATH, 'desktop', '-f', '01');
return;
}