mirror of
https://git.disroot.org/FollieHiyuki/dotfiles.git
synced 2024-12-11 00:28:32 -05:00
x11: add monitors.sh
script
This commit is contained in:
parent
366867afe3
commit
5074dfe9fd
@ -9,7 +9,7 @@ $HOME/.config/polybar/run_polybar.sh &
|
|||||||
ibus-daemon -drx &
|
ibus-daemon -drx &
|
||||||
greenclip daemon &
|
greenclip daemon &
|
||||||
# emacs --daemon &
|
# emacs --daemon &
|
||||||
# xrandr --output eDP-1 --primary --auto --output DP-2 --left-of eDP-1 --auto --output HDMI-2 --right-of eDP-1 --auto &
|
# $HOME/.local/bin/X11/monitors.sh
|
||||||
# animatedwall --full ~/Pictures/Animated/fubuki.mp4 &
|
# animatedwall --full ~/Pictures/Animated/fubuki.mp4 &
|
||||||
feh --no-fehbg --bg-fill --randomize ~/Pictures/Wallpapers/* &
|
feh --no-fehbg --bg-fill --randomize ~/Pictures/Wallpapers/* &
|
||||||
mpDris2 &
|
mpDris2 &
|
||||||
|
@ -109,7 +109,7 @@
|
|||||||
(map! :map minibuffer-local-map
|
(map! :map minibuffer-local-map
|
||||||
"C-r" 'counsel-minibuffer-history)
|
"C-r" 'counsel-minibuffer-history)
|
||||||
(use-package! all-the-icons-ivy-rich
|
(use-package! all-the-icons-ivy-rich
|
||||||
:after counsel-projectile
|
:defer-incrementally counsel-projectile
|
||||||
:init (all-the-icons-ivy-rich-mode 1)
|
:init (all-the-icons-ivy-rich-mode 1)
|
||||||
:config
|
:config
|
||||||
(setq all-the-icons-ivy-rich-icon-size 1.0))
|
(setq all-the-icons-ivy-rich-icon-size 1.0))
|
||||||
|
@ -36,12 +36,10 @@
|
|||||||
(exwm-layout-hide-mode-line))))
|
(exwm-layout-hide-mode-line))))
|
||||||
|
|
||||||
(defun follie/update-displays ()
|
(defun follie/update-displays ()
|
||||||
(lambda ()
|
(follie/run-in-background "~/.local/bin/X11/monitors.sh")
|
||||||
(start-process-shell-command
|
|
||||||
"xrandr" nil "xrandr --output eDP-1 --mode 1920x1080 --pos 0x0 --rotate normal --output HDMI-1 --mode 1920x1080 --pos 1920x0 --rotate normal"))
|
|
||||||
(follie/set-wallpaper)
|
(follie/set-wallpaper)
|
||||||
(message "Updated displays: %s"
|
(message "Updated displays: %s"
|
||||||
(string-trim (shell-command-to-string "xrandr | grep \" connected\" | awk '{print $1}' | sed '$!N;s/\\n/ /'"))))
|
(string-trim (shell-command-to-string "xrandr | grep \" connected\" | awk '{print $1}' | sed 's/^/ /' | tr -d '\\n'"))))
|
||||||
|
|
||||||
(defun follie/exwm-rename-buffer ()
|
(defun follie/exwm-rename-buffer ()
|
||||||
(exwm-workspace-rename-buffer
|
(exwm-workspace-rename-buffer
|
||||||
|
@ -5,7 +5,7 @@ dunst &
|
|||||||
ibus-daemon -drx &
|
ibus-daemon -drx &
|
||||||
greenclip daemon &
|
greenclip daemon &
|
||||||
# emacs --daemon &
|
# emacs --daemon &
|
||||||
# xrandr --output eDP-1 --primary --auto --output DP-2 --left-of eDP-1 --auto --output HDMI-2 --right-of eDP-1 --auto &
|
# $HOME/.local/bin/X11/monitors.sh
|
||||||
# animatedwall --full ~/Pictures/Animated/fubuki.mp4 &
|
# animatedwall --full ~/Pictures/Animated/fubuki.mp4 &
|
||||||
feh --no-fehbg --bg-fill --randomize ~/Pictures/Wallpapers/* &
|
feh --no-fehbg --bg-fill --randomize ~/Pictures/Wallpapers/* &
|
||||||
mpDris2 &
|
mpDris2 &
|
||||||
|
18
home/.local/bin/X11/monitors.sh
Executable file
18
home/.local/bin/X11/monitors.sh
Executable file
@ -0,0 +1,18 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
status=$(xrandr | grep " connected")
|
||||||
|
|
||||||
|
# Built-int monitor
|
||||||
|
xrandr --output eDP-1 --primary --mode 1920x1080 --pos 0x0 --rotate normal
|
||||||
|
|
||||||
|
if echo "$status" | grep "HDMI-1"; then
|
||||||
|
xrandr --output HDMI-1 --mode 1920x1080 --pos 1920x0 --rotate normal
|
||||||
|
else
|
||||||
|
xrandr --output HDMI-1 --off
|
||||||
|
fi
|
||||||
|
|
||||||
|
if echo "$status" | grep "DP-2"; then
|
||||||
|
xrandr --output DP-2 --mode 1920x1080 --pos -1920x0 --rotate normal
|
||||||
|
else
|
||||||
|
xrandr --output DP-2 --off
|
||||||
|
fi
|
Loading…
Reference in New Issue
Block a user