summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-09-19 18:22:05 +0200
committerJozanLeClerc <bousset.rudy@gmail.com>2020-09-19 18:22:05 +0200
commitb21f13b0064857a20515dfdc6d21de0ef450d477 (patch)
treeb3150a8d8e4ba0d3a18a21673f3a999a4fbd6e83
parentWallpaper script in progress (diff)
downloaddotfiles-bsd-b21f13b0064857a20515dfdc6d21de0ef450d477.tar.gz
dotfiles-bsd-b21f13b0064857a20515dfdc6d21de0ef450d477.tar.bz2
dotfiles-bsd-b21f13b0064857a20515dfdc6d21de0ef450d477.tar.xz
dotfiles-bsd-b21f13b0064857a20515dfdc6d21de0ef450d477.tar.zst
dotfiles-bsd-b21f13b0064857a20515dfdc6d21de0ef450d477.zip
Wait a sec fuck this all
-rwxr-xr-x.config/bspwm/bspwmrc19
-rwxr-xr-x.local/bin/setwp21
2 files changed, 16 insertions, 24 deletions
diff --git a/.config/bspwm/bspwmrc b/.config/bspwm/bspwmrc
index 0f3ce4b..dbea50f 100755
--- a/.config/bspwm/bspwmrc
+++ b/.config/bspwm/bspwmrc
@@ -16,7 +16,6 @@ use constant {
TRIPLESCREEN_PATH => '/usr/home/jozan/.local/bin/triplescreen',
BSPC_PATH => '/usr/local/bin/bspc',
COMPTON_PATH => '/usr/local/bin/compton',
- FEH_PATH => '/usr/local/bin/feh',
XSET_PATH => '/usr/local/bin/xset',
SETXKBMAP_PATH => '/usr/local/bin/setxkbmap',
DUNST_PATH => '/usr/local/bin/dunst',
@@ -32,7 +31,8 @@ use constant {
GOTOP_PATH => '/usr/local/bin/gotop',
VIFM_PATH => '/usr/local/bin/vifm',
GIT_PATH => '/usr/local/bin/git',
- QTOX_PATH => '/usr/local/bin/qtox'
+ QTOX_PATH => '/usr/local/bin/qtox',
+ SETWP_PATH => '/usr/home/jozan/.local/bin/setwp'
};
use constant {
BSP_BORDER_WIDTH => 1,
@@ -82,11 +82,11 @@ sub enable_screens
($stdout, undef, undef) = capture {
system(XRANDR_PATH);
};
- if ($stdout =~ m/HDMI1 connected/ && $stdout =~ m/VGA1 connected/ == 1) {
+ if ($stdout =~ m/HDMI-1 connected/ && $stdout =~ m/VGA-1 connected/ == 1) {
$screens = 3;
system(TRIPLESCREEN_PATH);
}
- elsif ($stdout =~ m/HDMI1 connected/) {
+ elsif ($stdout =~ m/HDMI-1 connected/) {
$screens = 2;
system(DUALSCREEN_PATH);
}
@@ -123,18 +123,11 @@ sub bspc_rules
sub run_bg_programs
{
- my ($screens) = @_;
-
run_if_dead(SXHKD_PATH);
run_if_dead(COMPTON_PATH);
run_if_dead(DUNST_PATH);
run_if_dead(LOWBAT_PATH);
- if ($screens > 1) {
- system(FEH_PATH, '--bg-fill', WALLPAPER_PATH, '--bg-fill', WALLPAPER_PATH);
- }
- else {
- system(FEH_PATH, '--bg-fill', WALLPAPER_PATH);
- }
+ system(SETWP_PATH);
system(XSET_PATH, 'r', 'rate', XSET_R_RATE_DELAY, XSET_R_RATE_RATE);
system(SETXKBMAP_PATH, '-layout', 'us,fr', '-option', 'grp:alt_shift_toggle');
return;
@@ -325,7 +318,7 @@ sub main
$screens = enable_screens();
bspc_configs();
bspc_rules();
- run_bg_programs($screens);
+ run_bg_programs();
run_fg_programs($screens);
run_network_programs();
return;
diff --git a/.local/bin/setwp b/.local/bin/setwp
index 3c3c36c..75f9203 100755
--- a/.local/bin/setwp
+++ b/.local/bin/setwp
@@ -38,23 +38,22 @@ sub choose_and_copy
sub set_wp
{
- my $screens = ($_[0]);
-
- if ($screens == 0) {
- # get them screens
- }
+ system(
+ FEH_PATH,
+ '--bg-fill',
+ WP_FILE,
+ '--bg-fill',
+ WP_FILE,
+ '--bg-fill',
+ WP_FILE
+ );
return;
}
sub main
{
choose_and_copy(get_pool_files());
- if ($#ARGV + 1 > 0) {
- set_wp($ARGV[0]);
- }
- else {
- set_wp(0);
- }
+ set_wp();
return;
}