Created
June 3, 2019 08:45
-
-
Save yorickvP/f6048bce8174ca1bfe3707ac2aad8bc6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| if swaymsg -t get_outputs | grep 36H03689019; then | |
| echo home dock | |
| swaymsg 'output "Unknown 0x00000000" enable position 0 0 mode 2560x1440@59.951Hz bg ~/wp/"001 - Aalborg.jpg" stretch, output "Unknown BenQ GW2765 36H03689019" enable position 2560 0 mode 2560x1440@59.951Hz bg ~/wp/"002 - Alkali.jpg" stretch, output eDP-1 disable' | |
| ~/dotfiles/bin/setdpi.sh 109 | |
| systemctl --user restart waybar | |
| elif swaymsg -t get_outputs | grep GH85D7CK1CXL; then | |
| echo work dock | |
| BG='bg /home/yorick/work/share/"01. General/06. Branding/Logo/New Logo & Stationary 2019/logo"/logo-01.png fit '#fdf6e3'' | |
| swaymsg 'output eDP-1 enable position 0 1440 scale 2, output DP-3 enable position 0 0 '$BG', output DP-4 enable position 2560 0 '$BG | |
| ~/dotfiles/bin/setdpi.sh 109 | |
| systemctl --user restart waybar | |
| else | |
| echo should undock | |
| systemd-inhibit --what=handle-lid-switch sleep 45s & disown | |
| swaymsg 'output * disable, output eDP-1 enable scale 2 position 0 0' | |
| ~/dotfiles/bin/setdpi.sh 192 | |
| systemctl --user restart waybar | |
| fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| systemd.user.services.waybar = { | |
| Unit = { | |
| Description = "waybar"; | |
| After = [ "graphical-session-pre.target" ]; | |
| PartOf = [ "graphical-session.target" ]; | |
| }; | |
| Install = { | |
| WantedBy = [ "graphical-session.target" ]; | |
| }; | |
| Service = { | |
| ExecStart = '' | |
| ${overlayed-pkgs.waybar}/bin/waybar | |
| ''; | |
| }; | |
| }; | |
| xdg.configFile."waybar" = { source = ./waybar; recursive = true; onChange = "systemctl --user restart waybar"; }; | |
| systemd.user.services.mako = { | |
| Unit = { | |
| Description = "mako"; | |
| After = [ "graphical-session-pre.target" ]; | |
| PartOf = [ "graphical-session.target" ]; | |
| }; | |
| Install = { | |
| WantedBy = [ "graphical-session.target" ]; | |
| }; | |
| Service = { | |
| ExecStart = '' | |
| ${overlayed-pkgs.mako}/bin/mako | |
| ''; | |
| }; | |
| }; | |
| xsession.windowManager.i3.keybings."--locked ${mod}+x" = "exec /home/yorick/dotfiles/bin/docked.sh"; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment