From 945833f54b5d1dd739431f396be7f3a72954c651 Mon Sep 17 00:00:00 2001
From: JozanLeClerc <bousset.rudy@gmail.com>
Date: Sat, 15 Aug 2020 14:30:33 +0200
Subject: diff

---
 .config/bspwm/bspwmrc   | 180 +++++-------------------------------------------
 .emacs                  |   2 +-
 .emacs.d/org/config.org |   4 +-
 .local/bin/triplescreen |   2 +-
 4 files changed, 20 insertions(+), 168 deletions(-)

diff --git a/.config/bspwm/bspwmrc b/.config/bspwm/bspwmrc
index 09bb9d4..daa7647 100755
--- a/.config/bspwm/bspwmrc
+++ b/.config/bspwm/bspwmrc
@@ -3,7 +3,6 @@
 use strict;
 use warnings;
 use Capture::Tiny qw(capture);
-use WWW::Curl::Easy;
 
 use constant {
 	SXHKD_PATH			=> '/usr/local/bin/sxhkd',
@@ -22,15 +21,8 @@ use constant {
 	LOWBAT_PATH			=> '/usr/local/bin/lowbat',
 	EMACS_PATH			=> '/usr/local/bin/emacs',
 	ALACRITTY_PATH		=> '/usr/local/bin/alacritty',
-	SH_PATH				=> '/bin/sh',
-	ZSH_PATH			=> '/usr/local/bin/zsh',
-	COWSAY_PATH			=> '/usr/local/bin/cowsay',
-	ESPEAK_PATH			=> '/usr/local/bin/espeak',
-	HTOP_PATH			=> '/usr/local/bin/htop',
-	GOTOP_PATH			=> '/usr/local/bin/gotop',
-	VIFM_PATH			=> '/usr/local/bin/vifm',
-	GIT_PATH			=> '/usr/local/bin/git',
-	QTOX_PATH			=> '/usr/local/bin/qtox'
+	TERMS_THREAD		=> '/usr/home/jozan/.config/bspwm/terms_thread.pl',
+	NETWORK_THREAD		=> '/usr/home/jozan/.config/bspwm/network_thread.pl'
 };
 use constant {
 	BSP_BORDER_WIDTH		=> 1,
@@ -43,9 +35,7 @@ use constant {
 	XSET_R_RATE_DELAY		=> 200,
 	XSET_R_RATE_RATE		=> 100,
 };
-use constant WALLPAPER_PATH		=> '/usr/home/jozan/Pictures/wallpaper.jpg';
-use constant COWSAY_WELCOME		=> 'Welcome back, partner! And remember to try glest!';
-use constant NETWORK_TEST_URL	=> 'https://freebsd.org/';
+use constant WALLPAPER_PATH	=> '/usr/home/jozan/Pictures/wallpaper.jpg';
 
 sub run_if_dead
 {
@@ -145,169 +135,31 @@ sub run_bg_programs
 	return;
 }
 
-sub fg_on_three_screens
-{
-	my @term_pid;
-
-	$term_pid[0] = fork();
-	if (not $term_pid[0]) {
-		exec(
-			ALACRITTY_PATH, '-e', SH_PATH, '-c',
-			COWSAY_PATH . ' "' . COWSAY_WELCOME . '"; ' . ZSH_PATH
-			);
-		exit;
-	}
-	sleep(1);
-	$term_pid[1] = fork();
-	if (not $term_pid[1]) {
-		exec(ALACRITTY_PATH, '-e', HTOP_PATH);
-		exit;
-	}
-	sleep(1);
-	$term_pid[2] = fork();
-	if (not $term_pid[2]) {
-		exec(ALACRITTY_PATH, '-e', GOTOP_PATH);
-		exit;
-	}
-	sleep(1);
-	system(BSPC_PATH, 'node', '-f', 'west');
-	$term_pid[3] = fork();
-	if (not $term_pid[3]) {
-		exec(ALACRITTY_PATH, '-e', VIFM_PATH);
-		exit;
-	}
-	sleep(1);
-	system(BSPC_PATH, 'node', '-z', 'right', '180', '0');
-	system(BSPC_PATH, 'node', '-z', 'top', '0', '70');
-	system(BSPC_PATH, 'node', '-f', 'east');
-	system(BSPC_PATH, 'node', '-f', 'north');
-	system(BSPC_PATH, 'node', '-z', 'bottom', '0', '-280');
-	system(BSPC_PATH, 'node', '-f', 'north');
-	system(BSPC_PATH, 'node', '-f', 'west');
-	return;
-}
-
-sub fg_on_two_screens
-{
-	my @term_pid;
-
-	$term_pid[0] = fork();
-	if (not $term_pid[0]) {
-		exec(
-			ALACRITTY_PATH, '-e', SH_PATH, '-c',
-			COWSAY_PATH . ' "' . COWSAY_WELCOME . '"; ' . ZSH_PATH
-			);
-		exit;
-	}
-	sleep(1);
-	$term_pid[1] = fork();
-	if (not $term_pid[1]) {
-		exec(ALACRITTY_PATH, '-e', HTOP_PATH);
-		exit;
-	}
-	sleep(1);
-	$term_pid[2] = fork();
-	if (not $term_pid[2]) {
-		exec(ALACRITTY_PATH, '-e', GOTOP_PATH);
-		exit;
-	}
-	sleep(1);
-	system(BSPC_PATH, 'node', '-f', 'west');
-	$term_pid[3] = fork();
-	if (not $term_pid[3]) {
-		exec(ALACRITTY_PATH, '-e', VIFM_PATH);
-		exit;
-	}
-	sleep(1);
-	system(BSPC_PATH, 'node', '-z', 'right', '180', '0');
-	system(BSPC_PATH, 'node', '-z', 'top', '0', '70');
-	system(BSPC_PATH, 'node', '-f', 'east');
-	system(BSPC_PATH, 'node', '-f', 'north');
-	system(BSPC_PATH, 'node', '-z', 'bottom', '0', '-280');
-	system(BSPC_PATH, 'node', '-f', 'north');
-	system(BSPC_PATH, 'node', '-f', 'west');
-	return;
-}
-
-sub fg_on_one_screen
-{
-	my @term_pid;
-
-	$term_pid[0] = fork();
-	if (not $term_pid[0]) {
-		exec(
-			ALACRITTY_PATH, '-e', SH_PATH, '-c',
-			COWSAY_PATH . ' "' . COWSAY_WELCOME . '"; ' . ZSH_PATH
-			);
-		exit;
-	}
-	sleep(1);
-	system(BSPC_PATH, 'node', '-p', 'west');
-	$term_pid[1] = fork();
-	if (not $term_pid[1]) {
-		exec(ALACRITTY_PATH, '-e', HTOP_PATH);
-		exit;
-	}
-	sleep(1);
-	$term_pid[2] = fork();
-	if (not $term_pid[2]) {
-		exec(ALACRITTY_PATH, '-e', GOTOP_PATH);
-	}
-	sleep(1);
-	system(BSPC_PATH, 'node', '-f', 'east');
-	$term_pid[3] = fork();
-	if (not $term_pid[3]) {
-		exec(ALACRITTY_PATH, '-e', VIFM_PATH);
-	}
-	sleep(1);
-	system(BSPC_PATH, 'node', '-f', 'west');
-	system(BSPC_PATH, 'node', '-f', 'north');
-	system(BSPC_PATH, 'node', '-z', 'bottom', '0', '-200');
-	system(BSPC_PATH, 'node', '-z', 'right', '-220', '0');
-	system(BSPC_PATH, 'node', '-f', 'east');
-	system(BSPC_PATH, 'node', '-z', 'bottom', '0', '70');
-	system(BSPC_PATH, 'node', '-f', 'north');
-	return;
-}
-
 sub run_fg_programs
 {
 	my ($screens) = @_;
-	my $espeak_pid;
+	my $pid;
 
+	$pid = fork();
+	if (not $pid) {
+		exec(TERMS_THREAD, $screens);
+		exit;
+	}
+	sleep(8);
 	system(BSPC_PATH, 'desktop', '-f', '01');
 	run_if_dead(EMACS_PATH);
-	sleep(12);
-	system(BSPC_PATH, 'desktop', '-f', '09');
-	$espeak_pid = fork();
-	if (not $espeak_pid) {
-		exec(ESPEAK_PATH, COWSAY_WELCOME);
-	}
-	if ($screens == 3) {
-		fg_on_three_screens();
-	}
-	elsif ($screens == 2) {
-		fg_on_two_screens();
-	}
-	else {
-		fg_on_one_screen();
-	}
+	sleep(8);
 	return;
 }
 
 sub run_network_programs
 {
-	my $curl;
-	my $response_body;
-	my $retval;
+	my $pid;
 
-	$curl = WWW::Curl::Easy->new;
-	$curl->setopt(CURLOPT_URL, NETWORK_TEST_URL);
-	$curl->setopt(CURLOPT_WRITEDATA, \$response_body);
-	$retval = $curl->perform;
-	if ($retval == 0) {
-		system(GIT_PATH, '-C', '/usr/home/jozan/.elfeed', 'pull', 'origin', 'master');
-		run_if_dead(QTOX_PATH);
+	$pid = fork();
+	if (not $pid) {
+		exec(NETWORK_THREAD);
+		exit;
 	}
 	return;
 }
diff --git a/.emacs b/.emacs
index baac5ab..60baa59 100644
--- a/.emacs
+++ b/.emacs
@@ -36,7 +36,7 @@
  '(jdee-db-spec-breakpoint-face-colors (cons "#1c1f2b" "#676E95"))
  '(objed-cursor-color "#ff5370")
  '(package-selected-packages
-   '(crontab-mode vterm symon toc-org evil-org org-bullets yaml-mode twittering-mode helm-slime helm-w3m helm-mu htmlize babel org-pdftools shell-pop which-key golden-ratio elfeed-org elfeed dmenu mingus lua-mode dionysos helm-c-yasnippet helm-emms emms font-lock-cl restart-emacs w3m string-utils go-mode major-mode-icons dired-icon mode-icons evil-collection sed-mode zones kaolin-themes gruvbox-theme helm-themes yasnippet-classic-snippets yasnippet-snippets auto-yasnippet php-auto-yasnippets el-autoyas yasnippet cargo evil-ediff windresize helm-make spacemacs-theme centaur-tabs evil-mu4e evil-magit dashboard slime ssh sudo-ext dockerfile-mode docker frame-local ov dash-functional helm-addressbook org-mime flyspell-correct pdf-tools websocket request emojify-logos emojify oauth2 circe mu4e-alert web-mode doom-themes doom-modeline all-the-icons-dired all-the-icons-gnus all-the-icons html5-schema phps-mode org-babel-eval-in-repl rust-mode smart-mode-line-powerline-theme eshell-prompt-extras eshell-fixed-prompt pyenv-mode s realgud-lldb neotree ranger ## color-theme-modern auto-complete-c-headers command-log-mode auto-complete magit smart-tabs-mode airline-themes paredit autopair tabbar-ruler tabbar use-package-el-get color-theme-approximate diminish rainbow-delimiters color-identifiers-mode use-package helm evil-visual-mark-mode))
+   '(cl-format crontab-mode vterm symon toc-org evil-org org-bullets yaml-mode twittering-mode helm-slime helm-w3m helm-mu htmlize babel org-pdftools shell-pop which-key golden-ratio elfeed-org elfeed dmenu mingus lua-mode dionysos helm-c-yasnippet helm-emms emms font-lock-cl restart-emacs w3m string-utils go-mode major-mode-icons dired-icon mode-icons evil-collection sed-mode zones kaolin-themes gruvbox-theme helm-themes yasnippet-classic-snippets yasnippet-snippets auto-yasnippet php-auto-yasnippets el-autoyas yasnippet cargo evil-ediff windresize helm-make spacemacs-theme centaur-tabs evil-mu4e evil-magit dashboard slime ssh sudo-ext dockerfile-mode docker frame-local ov dash-functional helm-addressbook org-mime flyspell-correct pdf-tools websocket request emojify-logos emojify oauth2 circe mu4e-alert web-mode doom-themes doom-modeline all-the-icons-dired all-the-icons-gnus all-the-icons html5-schema phps-mode org-babel-eval-in-repl rust-mode smart-mode-line-powerline-theme eshell-prompt-extras eshell-fixed-prompt pyenv-mode s realgud-lldb neotree ranger ## color-theme-modern auto-complete-c-headers command-log-mode auto-complete magit smart-tabs-mode airline-themes paredit autopair tabbar-ruler tabbar use-package-el-get color-theme-approximate diminish rainbow-delimiters color-identifiers-mode use-package helm evil-visual-mark-mode))
  '(pdf-view-midnight-colors (cons "#EEFFFF" "#292D3E"))
  '(pos-tip-background-color "#2E2A29")
  '(pos-tip-foreground-color "#d4d4d6")
diff --git a/.emacs.d/org/config.org b/.emacs.d/org/config.org
index 3557161..e45aec3 100644
--- a/.emacs.d/org/config.org
+++ b/.emacs.d/org/config.org
@@ -9,7 +9,7 @@
 (scroll-bar-mode -1)
 (blink-cursor-mode 0)
 
-(set-frame-font "mononoki Nerd Font:pixelsize=15" nil t)
+(set-frame-font "mononoki Nerd Font:pixelsize=16" nil t)
 (add-hook 'prog-mode-hook 'display-line-numbers-mode)
 (add-hook 'text-mode-hook 'display-line-numbers-mode)
 
@@ -176,7 +176,7 @@
 	  centaur-tabs-height				1
 	  centaur-tabs-style				"bar"
 	  centaur-tabs-set-bar				'left
-	  centaur-tabs-change-fonts			"mononoki Nerd Font")
+	  centaur-tabs-change-fonts			"DejaVu Sans Mono Nerd Font")
 
 (defun centaur-tabs-hide-tab (x)
 	(let ((name (format "%s" x)))
diff --git a/.local/bin/triplescreen b/.local/bin/triplescreen
index 94a95a7..5595f91 100755
--- a/.local/bin/triplescreen
+++ b/.local/bin/triplescreen
@@ -3,7 +3,7 @@
 xrandr --output LVDS1 --off
 xrandr --output HDMI1 --primary --mode 1920x1080 --pos 0x0 --rotate normal
 xrandr --output DP1 --off
-xrandr --output VGA1 --mode 1440x900 --pos 1920x20 --rotate normal
+xrandr --output VGA1 --mode 1440x900 --pos 1920x90 --rotate normal
 xrandr --output HDMI2 --off
 xrandr --output HDMI3 --off
 xrandr --output DP2 --off
-- 
cgit v1.2.3