Commit b113877f authored by epsi sayidina's avatar epsi sayidina

herbstluftwm dual statusbar

parent cb0918c4
......@@ -2,6 +2,7 @@ module MyPipeHandler
( detachDzen2
, detachDzen2Conky
, detachTransset
, killZombie
) where
import System.Process
......@@ -150,3 +151,13 @@ detachTransset = forkProcess $ do
system "transset .8 -n dzentop >/dev/null"
system "transset .8 -n dzenbottom >/dev/null"
return ()
killZombie :: IO ()
killZombie = do
system "pkill dzen2"
system "pkill lemonbar"
system "pkill cat"
system "pkill conky"
system "pkill herbstclient"
return ()
......@@ -21,7 +21,7 @@ main = do
geometry <- getGeometry monitor
system "pkill dzen2"
killZombie
system $ "herbstclient pad " ++ show(monitor) ++ " "
++ show(panelHeight) ++ " 0 " ++ show(panelHeight) ++ " 0"
......
......@@ -13,7 +13,7 @@ local pipehandler = require('.pipehandler')
panel_height = 24
monitor = helper.get_monitor(arg)
os.execute('pkill dzen2')
pipehandler.kill_zombie()
os.execute('herbstclient pad ' .. monitor .. ' '
.. panel_height .. ' 0 ' .. panel_height .. ' 0')
......
......@@ -167,6 +167,14 @@ function _M.detach_transset()
end
end
function _M.kill_zombie()
os.execute('pkill dzen2')
os.execute('pkill lemonbar')
os.execute('pkill cat')
os.execute('pkill conky')
os.execute('pkill herbstclient')
end
-- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
-- return
......
......@@ -16,7 +16,7 @@ use pipehandler;
my $panel_height = 24;
my $monitor = helper::get_monitor(@ARGV);
system('pkill dzen2');
pipehandler::kill_zombie();
system("herbstclient pad $monitor $panel_height 0 $panel_height 0");
# run process in the background
......
......@@ -169,7 +169,6 @@ sub detach_dzen2_conky {
exit;
}
sub detach_transset {
my $pid_transset = fork;
return if $pid_transset; # in the parent process
......@@ -181,6 +180,14 @@ sub detach_transset {
exit;
}
sub kill_zombie() {
system('pkill dzen2');
system('pkill lemonbar');
system('pkill cat');
system('pkill conky');
system('pkill herbstclient');
}
# ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----
# end of perl module
......
......@@ -11,7 +11,7 @@ require_once(__DIR__.'/pipehandler.php');
$panel_height = 24;
$monitor = get_monitor($argv);
system('pkill dzen2');
kill_zombie();
system("herbstclient pad $monitor $panel_height 0 $panel_height 0");
// run process in the background
......
......@@ -186,3 +186,12 @@ function detach_transset()
system('transset .8 -n dzenbottom >/dev/null');
}
}
function kill_zombie()
{
system('pkill dzen2');
system('pkill lemonbar');
system('pkill cat');
system('pkill conky');
system('pkill herbstclient');
}
......@@ -66,7 +66,7 @@ def get_params_bottom(monitor, panel_height):
parameters = ' -x '+str(xpos)+' -y '+str(ypos) \
+ ' -w '+str(width)+' -h '+str(height) \
+ " -ta l -bg '"+bgcolor+"' -fg '"+fgcolor+"'" \
+ ' -title-name bottomtop' \
+ ' -title-name dzenbottom' \
+ " -fn '"+font+"'"
return parameters
......
......@@ -13,7 +13,7 @@ import pipehandler
panel_height = 24
monitor = helper.get_monitor(sys.argv)
os.system('pkill dzen2')
pipehandler.kill_zombie()
os.system('herbstclient pad ' + str(monitor) + ' '
+ str(panel_height) + ' 0 ' + str(panel_height) + ' 0')
......
......@@ -179,3 +179,10 @@ def detach_transset():
finally:
import signal
os.kill(pid_transset, signal.SIGTERM)
def kill_zombie():
os.system('pkill dzen2')
os.system('pkill lemonbar')
os.system('pkill cat')
os.system('pkill conky')
os.system('pkill herbstclient')
......@@ -10,7 +10,7 @@ require_relative 'pipehandler'
panel_height = 24
monitor = get_monitor(ARGV)
system('pkill dzen2')
kill_zombie()
system("herbstclient pad #{monitor} #{panel_height} 0 #{panel_height} 0")
# run process in the background
......
......@@ -138,3 +138,11 @@ def detach_transset()
Process.detach(pid_transset)
end
def kill_zombie()
system('pkill dzen2')
system('pkill lemonbar')
system('pkill cat')
system('pkill conky')
system('pkill herbstclient')
end
module MyPipeHandler
( detachLemon
, detachLemonConky
, killZombie
) where
import System.Process
......@@ -146,3 +147,13 @@ detachLemonConky parameters = do
{ std_in = UseHandle pipeout }
hClose pipeout
killZombie :: IO ()
killZombie = do
system "pkill dzen2"
system "pkill lemonbar"
system "pkill cat"
system "pkill conky"
system "pkill herbstclient"
return ()
......@@ -19,7 +19,7 @@ main = do
geometry <- getGeometry monitor
system "pkill lemonbar"
killZombie
system $ "herbstclient pad " ++ show(monitor) ++ " "
++ show(panelHeight) ++ " 0 " ++ show(panelHeight) ++ " 0"
......
......@@ -13,7 +13,7 @@ local pipehandler = require('.pipehandler')
local panel_height = 24
local monitor = helper.get_monitor(arg)
os.execute('pkill lemonbar')
pipehandler.kill_zombie()
os.execute('herbstclient pad ' .. monitor .. ' '
.. panel_height .. ' 0 ' .. panel_height .. ' 0')
......
......@@ -157,6 +157,14 @@ function _M.detach_lemon_conky(parameters)
end
end
function _M.kill_zombie()
os.execute('pkill dzen2')
os.execute('pkill lemonbar')
os.execute('pkill cat')
os.execute('pkill conky')
os.execute('pkill herbstclient')
end
-- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
-- return
......
......@@ -16,7 +16,7 @@ use pipehandler;
my $panel_height = 24;
my $monitor = helper::get_monitor(@ARGV);
system('pkill lemonbar');
pipehandler::kill_zombie();
system("herbstclient pad $monitor $panel_height 0 $panel_height 0");
# run process in the background
......
......@@ -188,6 +188,14 @@ sub detach_lemon_conky {
exit;
}
sub kill_zombie() {
system('pkill dzen2');
system('pkill lemonbar');
system('pkill cat');
system('pkill conky');
system('pkill herbstclient');
}
# ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----
# end of perl module
......
......@@ -11,7 +11,7 @@ require_once(__DIR__.'/pipehandler.php');
$panel_height = 24;
$monitor = get_monitor($argv);
system('pkill lemonbar');
kill_zombie();
system("herbstclient pad $monitor $panel_height 0 $panel_height 0");
// run process in the background
......
......@@ -196,3 +196,12 @@ function detach_lemon_conky($parameters)
return $pid_conky;
}
}
function kill_zombie()
{
system('pkill dzen2');
system('pkill lemonbar');
system('pkill cat');
system('pkill conky');
system('pkill herbstclient');
}
......@@ -13,7 +13,7 @@ import pipehandler
panel_height = 24
monitor = helper.get_monitor(sys.argv)
os.system('pkill lemonbar')
pipehandler.kill_zombie()
os.system('herbstclient pad ' + str(monitor) + ' '
+ str(panel_height) + ' 0 ' + str(panel_height) + ' 0')
......
......@@ -176,3 +176,10 @@ def detach_lemon_conky(parameters):
finally:
import signal
os.kill(pid_conky, signal.SIGTERM)
def kill_zombie():
os.system('pkill dzen2')
os.system('pkill lemonbar')
os.system('pkill cat')
os.system('pkill conky')
os.system('pkill herbstclient')
......@@ -10,7 +10,7 @@ require_relative 'pipehandler'
panel_height = 24
monitor = get_monitor(ARGV)
system('pkill lemonbar')
kill_zombie()
system("herbstclient pad #{monitor} #{panel_height} 0 #{panel_height} 0")
# run process in the background
......
......@@ -145,3 +145,11 @@ def detach_lemon_conky(parameters)
Process.detach(pid_conky)
end
def kill_zombie()
system('pkill dzen2')
system('pkill lemonbar')
system('pkill cat')
system('pkill conky')
system('pkill herbstclient')
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment