From 7955ee9b3e2e5a1ab0b50ac03cd7dfecebb30581 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jesper=20Fussing=20M=C3=B8rk?= Date: Fri, 12 Oct 2018 13:38:29 +0200 Subject: [PATCH] Removing i3status-rs Working on docking and undocking scripts --- i3/.i3/config | 17 +++++----- i3/.i3/scripts/dock.sh | 31 +++++++++++------- i3/.i3/scripts/home-layout.sh | 1 + i3/.i3/scripts/laptop-layout.sh | 1 + i3/.i3/scripts/laptop-monitors.sh | 2 +- i3/.i3/scripts/undock.sh | 21 ++++++------ i3/.i3/scripts/work-layout.sh | 3 +- i3status-rs/.config/i3status-rs/config.toml | 36 --------------------- i3status-rs/.config/i3status-rs/gpmdp.sh | 21 ------------ 9 files changed, 46 insertions(+), 87 deletions(-) delete mode 100644 i3status-rs/.config/i3status-rs/config.toml delete mode 100755 i3status-rs/.config/i3status-rs/gpmdp.sh diff --git a/i3/.i3/config b/i3/.i3/config index a8950ab..ae312e7 100644 --- a/i3/.i3/config +++ b/i3/.i3/config @@ -8,8 +8,10 @@ set $mod Mod4 #workspace_layout stacking # Configure border style -new_window pixel 0 -new_float normal +new_window none +#new_window pixel 0 +#new_float normal +new_float none # Hide borders hide_edge_borders none @@ -155,10 +157,9 @@ bindsym $mod+Ctrl+0 exec --no-startup-id ~/.i3/workspaces/ws00.sh # Open specific applications in floating mode for_window [class="^.*"] border pixel 0 -for_window [class="Nitrogen"] floating enable sticky enable border normal -for_window [class="feh"] floating enable sticky enable border normal -for_window [class="mpv"] floating enable sticky enable border normal -for_window [class="vlc"] floating enable sticky enable border normal +for_window [class="Nitrogen"] floating enable sticky enable border none +for_window [class="feh"] floating enable sticky enable border none +for_window [class="mpv"] floating enable sticky enable border none for_window [class="^jetbrains-.+"][window_type=dialog] focus # reload the configuration file @@ -171,12 +172,12 @@ bindsym $mod+Shift+r restart bindsym $mod+l exec --no-startup-id light-locker-command -l # Autostart applications -exec --no-startup-id nitrogen --restore; sleep 1; compton -b +exec --no-startup-id compton --config /home/jfm/.config/compton/compton.conf +exec --no-startup-id nitrogen --restore exec --no-startup-id nm-applet exec --no-startup-id pasystray #exec --no-startup-id blueman-applet exec --no-startup-id light-locker -exec --no-startup-id compton --config /home/jfm/.config/compton/compton.conf # Color palette used for the terminal ( ~/.Xresources file ) # Colors are gathered based on the documentation: diff --git a/i3/.i3/scripts/dock.sh b/i3/.i3/scripts/dock.sh index 6e2d37f..00594d0 100755 --- a/i3/.i3/scripts/dock.sh +++ b/i3/.i3/scripts/dock.sh @@ -1,11 +1,14 @@ #!/bin/bash -if [[ $(iwgetid -r) = *adazio* ]]; +xrandr --output DP1-2 --auto +xrandr --output DP1-3 --auto + +if [[ $(iwgetid -r) = *adazio* ]]; then - ~/.i3/scripts/work-monitors.sh & + ~/.i3/scripts/work-monitors.sh & ~/.i3/scripts/work-layout.sh & fi -if [[ $(iwgetid -r) = *moerks.dk* ]]; +if [[ $(iwgetid -r) = *moerks.dk* ]]; then ~/.i3/scripts/home-monitors.sh & ~/.i3/scripts/home-layout.sh & @@ -14,13 +17,19 @@ fi sleep 1 . ~/.i3/env -i3-msg "workspace 1:Comms; move workspace to output $LAPTOP" -i3-msg "workspace 2:Web; move workspace to output $PRIMARY" -i3-msg "workspace 3:IDE; move workspace to output $PRIMARY" -i3-msg "workspace 4:Work; move workspace to output $PRIMARY" -i3-msg "workspace 5:OC; move workspace to output $PRIMARY" -i3-msg "workspace 6:Logs; move workspace to output $SECONDARY" -i3-msg "workspace 7:Term; move workspace to output $PRIMARY" -i3-msg "workspace 8:Media; move workspace to output $SECONDARY" +echo $PRIMARY +echo $SECONDARY +echo $LAPTOP + +i3-msg "workspace 1:; move workspace to output $LAPTOP" +i3-msg "workspace 2:; move workspace to output $PRIMARY" +i3-msg "workspace 3:; move workspace to output $PRIMARY" +i3-msg "workspace 4:; move workspace to output $PRIMARY" +i3-msg "workspace 5:; move workspace to output $PRIMARY" +i3-msg "workspace 6:; move workspace to output $PRIMARY" +i3-msg "workspace 7:; move workspace to output $PRIMARY" +i3-msg "workspace 8:; move workspace to output $SECONDARY" +i3-msg "workspace 9:; move workspace to output $SECONDARY" +i3-msg "workspace 0:; move workspace to output $SECONDARY" exit diff --git a/i3/.i3/scripts/home-layout.sh b/i3/.i3/scripts/home-layout.sh index f912d32..7957bc8 100755 --- a/i3/.i3/scripts/home-layout.sh +++ b/i3/.i3/scripts/home-layout.sh @@ -12,5 +12,6 @@ export HDPI_PROFILE="laptop" EOM . $ENV_FILE +killall polybar & polybar primary & polybar secondary & diff --git a/i3/.i3/scripts/laptop-layout.sh b/i3/.i3/scripts/laptop-layout.sh index c5de04d..8877b40 100755 --- a/i3/.i3/scripts/laptop-layout.sh +++ b/i3/.i3/scripts/laptop-layout.sh @@ -12,4 +12,5 @@ export HDPI_PROFILE="laptop" EOM . $ENV_FILE +killall polybar & polybar primary & diff --git a/i3/.i3/scripts/laptop-monitors.sh b/i3/.i3/scripts/laptop-monitors.sh index 68f005f..5ea9b0f 100755 --- a/i3/.i3/scripts/laptop-monitors.sh +++ b/i3/.i3/scripts/laptop-monitors.sh @@ -1,2 +1,2 @@ #!/bin/sh -xrandr --output HDMI2 --off --output HDMI1 --off --output DP1 --off --output eDP1 --primary --mode 2560x1440 --pos 0x0 --rotate normal --output DP2 --off +xrandr --output HDMI2 --off --output HDMI1 --off --output DP1 --off --output eDP1 --primary --mode 2560x1440 --pos 0x0 --rotate normal --output DP2 --off --output DP1-2 --off --output DP1-3 --off diff --git a/i3/.i3/scripts/undock.sh b/i3/.i3/scripts/undock.sh index b457c05..2ea9581 100755 --- a/i3/.i3/scripts/undock.sh +++ b/i3/.i3/scripts/undock.sh @@ -10,13 +10,16 @@ echo $PRIMARY echo $SECONDARY echo $LAPTOP -i3-msg "workspace 1:Comms; move workspace to output $LAPTOP" -i3-msg "workspace 2:Web; move workspace to output $LAPTOP" -i3-msg "workspace 3:IDE; move workspace to output $LAPTOP" -i3-msg "workspace 4:Work; move workspace to output $LAPTOP" -i3-msg "workspace 5:OC; move workspace to output $LAPTOP" -i3-msg "workspace 6:Logs; move workspace to output $LAPTOP" -i3-msg "workspace 7:Term; move workspace to output $LAPTOP" -i3-msg "workspace 8:Media; move workspace to output $LAPTOP" -exit \ No newline at end of file + +i3-msg "workspace 1:; move workspace to output $LAPTOP" +i3-msg "workspace 2:; move workspace to output $LAPTOP" +i3-msg "workspace 3:; move workspace to output $LAPTOP" +i3-msg "workspace 4:; move workspace to output $LAPTOP" +i3-msg "workspace 5:; move workspace to output $LAPTOP" +i3-msg "workspace 6:; move workspace to output $LAPTOP" +i3-msg "workspace 7:; move workspace to output $LAPTOP" +i3-msg "workspace 8:; move workspace to output $LAPTOP" +i3-msg "workspace 9:; move workspace to output $LAPTOP" +i3-msg "workspace 0:; move workspace to output $LAPTOP" +exit diff --git a/i3/.i3/scripts/work-layout.sh b/i3/.i3/scripts/work-layout.sh index 7a5cfe5..3dd4ecd 100755 --- a/i3/.i3/scripts/work-layout.sh +++ b/i3/.i3/scripts/work-layout.sh @@ -3,7 +3,7 @@ ENV_FILE="/home/jfm/.i3/env" /bin/cat <$ENV_FILE -export LAPTOP="eDP-1" +export LAPTOP="eDP1" export PRIMARY="DP1-2" export SECONDARY="DP1-3" @@ -12,6 +12,7 @@ export HDPI_PROFILE="laptop" EOM . $ENV_FILE +killall polybar & polybar primary & polybar secondary & polybar laptop & diff --git a/i3status-rs/.config/i3status-rs/config.toml b/i3status-rs/.config/i3status-rs/config.toml deleted file mode 100644 index 3c4233d..0000000 --- a/i3status-rs/.config/i3status-rs/config.toml +++ /dev/null @@ -1,36 +0,0 @@ -icons = "awesome" - -[theme] -name = "solarized-dark" -[theme.overrides] -idle_bg = "#93a1a1" -idle_fg = "#ffffff" - -[[block]] -block = "custom" -command = "~/.config/i3status-rs/gpmdp.sh" -interval = 5 - -[[block]] -block = "memory" -display_type = "memory" -format_mem = "{Mup}%" -format_swap = "{SUp}%" - -[[block]] -block = "cpu" -interval = 1 - -[[block]] -block = "pacman" -interval = 10 - -[[block]] -block = "battery" -interval = 10 -show = "percentage" - -[[block]] -block = "time" -interval = 60 -format = "%a %d/%m %R" diff --git a/i3status-rs/.config/i3status-rs/gpmdp.sh b/i3status-rs/.config/i3status-rs/gpmdp.sh deleted file mode 100755 index 3927c3e..0000000 --- a/i3status-rs/.config/i3status-rs/gpmdp.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/bash - -RUNNING_CMD=$(ps ax | grep gpmdp | wc -l) -STATUS_CMD=$(gpmdp-remote status) -CURRENT_CMD=$(gpmdp-remote current) -ICON_PLAYING='\uf001' -ICON_PAUSE='\uf04c' - -if [ $RUNNING_CMD -gt 3 ] -then - if [ $STATUS_CMD == "Playing" ] - then - echo -e $ICON_PLAYING $(gpmdp-remote current) - else - current=$CURRENT_CMD - if [ ${#current} -gt 3 ] - then - echo -e $ICON_PAUSE $(gpmdp-remote current) - fi - fi -fi