mirror of
https://github.com/alrayyes/dotfiles/
synced 2023-11-14 15:56:30 +00:00
feat: desktop no uses arch
This commit is contained in:
parent
1f23314919
commit
f8f40050c4
@ -2,14 +2,7 @@
|
||||
|
||||
###---Start app if not running already---###
|
||||
function start_if_not_running
|
||||
###---iceweasel/firefox is weird---###
|
||||
if [ $argv[1] = "iceweasel" ]
|
||||
set PROCESS_NAME "iceweasel|MainThread"
|
||||
else if [ $argv[1] = "element-desktop-nightly" ]
|
||||
set PROCESS_NAME "element-desktop"
|
||||
else
|
||||
set PROCESS_NAME $argv[1]
|
||||
end
|
||||
set PROCESS_NAME $argv[1]
|
||||
|
||||
|
||||
if [ (pgrep -u (id -u) -x "$PROCESS_NAME" | wc -l) -lt 1 ]
|
||||
@ -41,17 +34,13 @@ sxhkd &
|
||||
###---Keyboard---###
|
||||
setxkbmap -option caps:escape
|
||||
|
||||
if [ -x /usr/bin/numlockx ]
|
||||
/usr/bin/numlockx on
|
||||
end
|
||||
|
||||
###---Get monitor count---###
|
||||
set SCREENCOUNT (xrandr | grep -c "\*")
|
||||
|
||||
###---Monitors---###
|
||||
if [ "$SCREENCOUNT" -eq 2 ]
|
||||
bspc monitor DP-1 -d 2 3 4 5 6 7 8 9 0
|
||||
bspc monitor HDMI-2 -d 1
|
||||
bspc monitor DP-3 -d 2 3 4 5 6 7 8 9 0
|
||||
bspc monitor DP-2 -d 1
|
||||
if [ -f "$HOME/.local/bin/screen_desktop" ]
|
||||
screen_desktop
|
||||
end
|
||||
@ -97,12 +86,11 @@ bspc rule -a fullscreen state=fullscreen
|
||||
bspc rule -a Emacs state=tiled
|
||||
bspc rule -a Zathura state=tiled
|
||||
|
||||
bspc rule -a iceweasel desktop='^1'
|
||||
bspc rule -a firefox desktop='^1'
|
||||
bspc rule -a Brave-browser desktop='^1'
|
||||
bspc rule -a bashtop desktop='^2'
|
||||
bspc rule -a Slack='^3'
|
||||
bspc rule -a Element desktop='^3'
|
||||
bspc rule -a Element-Nightly desktop='^3'
|
||||
bspc rule -a weechat desktop='^3'
|
||||
bspc rule -a castero desktop='^4'
|
||||
bspc rule -a Spt desktop='^4'
|
||||
@ -123,7 +111,7 @@ start_if_not_running syncthing-gtk
|
||||
start_if_not_running caffeine
|
||||
|
||||
start_if_not_running brave
|
||||
start_if_not_running iceweasel
|
||||
start_if_not_running firefox
|
||||
start_if_not_running emacs
|
||||
start_if_not_running element-desktop
|
||||
start_if_not_running element-desktop-nightly
|
||||
|
149
bspwm/.config/bspwm/bspwmrc.sync-conflict-20210307-160903-X2RXDKD
Executable file
149
bspwm/.config/bspwm/bspwmrc.sync-conflict-20210307-160903-X2RXDKD
Executable file
@ -0,0 +1,149 @@
|
||||
#!/usr/bin/env fish
|
||||
|
||||
###---Start app if not running already---###
|
||||
function start_if_not_running
|
||||
###---iceweasel/firefox is weird---###
|
||||
if [ $argv[1] = "iceweasel" ]
|
||||
set PROCESS_NAME "iceweasel|MainThread"
|
||||
else if [ $argv[1] = "element-desktop-nightly" ]
|
||||
set PROCESS_NAME "element-desktop"
|
||||
else
|
||||
set PROCESS_NAME $argv[1]
|
||||
end
|
||||
|
||||
|
||||
if [ (pgrep -u (id -u) -x "$PROCESS_NAME" | wc -l) -lt 1 ]
|
||||
if type -q $argv[1]
|
||||
eval "$argv[1] &"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
###---Start app in alacritty if not running already---###
|
||||
function start_shell_if_not_running
|
||||
if [ (pgrep -u (id -u) -x $argv[1] | wc -l) -lt 1 ]
|
||||
if type -q $argv[1]
|
||||
eval "alacritty --class $argv[1],$argv[1] -e $argv[1] &"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
###---Load xresources---###
|
||||
xrdb -load ~/.config/X11/xresources
|
||||
|
||||
###---Flush rules---###
|
||||
bspc rule -r "*"
|
||||
|
||||
###---Sxhkd---###
|
||||
set -U SXHKD_SHELL sh
|
||||
sxhkd &
|
||||
|
||||
###---Keyboard---###
|
||||
setxkbmap -option caps:escape
|
||||
|
||||
if [ -x /usr/bin/numlockx ]
|
||||
/usr/bin/numlockx on
|
||||
end
|
||||
|
||||
###---Get monitor count---###
|
||||
set SCREENCOUNT (xrandr | grep -c "\*")
|
||||
|
||||
###---Monitors---###
|
||||
if [ "$SCREENCOUNT" -eq 2 ]
|
||||
bspc monitor DP-1 -d 2 3 4 5 6 7 8 9 0
|
||||
bspc monitor HDMI-2 -d 1
|
||||
if [ -f "$HOME/.local/bin/screen_desktop" ]
|
||||
screen_desktop
|
||||
end
|
||||
if [ -f "$HOME/.local/bin/polybar-desktop" ]
|
||||
polybar-desktop
|
||||
end
|
||||
else
|
||||
bspc monitor -d 1 2 3 4 5 6 7 8 9 0
|
||||
if [ -f "$HOME/.local/bin/screen" ]
|
||||
screen
|
||||
end
|
||||
if [ -f "$HOME/.local/bin/polybar-laptop" ]
|
||||
polybar-laptop
|
||||
end
|
||||
end
|
||||
|
||||
###---Wallpaper & opacity---###
|
||||
~/.local/bin/wallpaper
|
||||
wal -n -R
|
||||
picom -b
|
||||
|
||||
###---Global Settings---###
|
||||
. ~/.cache/wal/colors.fish
|
||||
bspc config normal_border_color "$color1"
|
||||
bspc config active_border_color "$color2"
|
||||
bspc config focused_border_color "$color15"
|
||||
bspc config presel_feedback_color "$color1"
|
||||
|
||||
bspc config automatic_scheme alternate
|
||||
bspc config initial_polarity second_child
|
||||
|
||||
###---Desktop Settings----###
|
||||
bspc config border_width 2
|
||||
bspc config window_gap 4
|
||||
|
||||
###---Rules---###
|
||||
bspc rule -a "Syncthing GTK" state=floating
|
||||
bspc rule -a Gimp state=floating follow=on
|
||||
|
||||
bspc rule -a float state=floating
|
||||
bspc rule -a fullscreen state=fullscreen
|
||||
|
||||
bspc rule -a Emacs state=tiled
|
||||
bspc rule -a Zathura state=tiled
|
||||
|
||||
bspc rule -a iceweasel desktop='^1'
|
||||
bspc rule -a Brave-browser desktop='^1'
|
||||
bspc rule -a bashtop desktop='^2'
|
||||
bspc rule -a Slack='^3'
|
||||
bspc rule -a Element desktop='^3'
|
||||
bspc rule -a Element-Nightly desktop='^3'
|
||||
bspc rule -a weechat desktop='^3'
|
||||
bspc rule -a castero desktop='^4'
|
||||
bspc rule -a Spt desktop='^4'
|
||||
bspc rule -a jetbrains-webstorm desktop='^8'
|
||||
bspc rule -a Emacs desktop='^9'
|
||||
|
||||
bspc rule -a scratchpad sticky=on state=floating
|
||||
bspc rule -a scratchmacs sticky=on state=floating
|
||||
|
||||
###---Autostart---###
|
||||
start_if_not_running dunst
|
||||
start_if_not_running unclutter
|
||||
start_if_not_running xbanish
|
||||
start_if_not_running nm-applet
|
||||
start_if_not_running pasystray
|
||||
start_if_not_running redshift-gtk
|
||||
start_if_not_running syncthing-gtk
|
||||
start_if_not_running caffeine
|
||||
|
||||
start_if_not_running brave
|
||||
start_if_not_running iceweasel
|
||||
start_if_not_running emacs
|
||||
start_if_not_running element-desktop
|
||||
start_if_not_running element-desktop-nightly
|
||||
start_if_not_running gpodder
|
||||
|
||||
if [ "$SCREENCOUNT" -eq 2 ]
|
||||
start_if_not_running slack
|
||||
end
|
||||
|
||||
pkill -f cleanfullscreen
|
||||
~/.local/bin/cleanfullscreen &
|
||||
|
||||
###---System lock---###
|
||||
pkill -f xss-lock
|
||||
xset s 300 5
|
||||
env XSECURELOCK_FONT="Hack Nerd Font" xss-lock -n /usr/lib/xsecurelock/dimmer -l -- xsecurelock &
|
||||
|
||||
###---Misc---###
|
||||
# Needed for Jetbrains products to work
|
||||
wmname LG3D &
|
||||
|
||||
# Enable bspswallow
|
||||
pidof bspswallow || bash bspswallow &
|
@ -1,6 +1,3 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
xrandr --newmode "2560x1440_40" 201.00 2560 2720 2984 3408 1440 1443 1448 1476 -hsync +vsync
|
||||
xrandr --addmode HDMI-2 2560x1440_40
|
||||
|
||||
xrandr --output VGA-1 --off --output DP-1 --primary --mode 3840x2160 --rotate normal --output HDMI-3 --off --output HDMI-2 --mode 2560x1440_40 --pos 0x0 --rotate left --output HDMI-1 --off
|
||||
xrandr --output DP-3 --primary --mode 3840x2160 --rotate normal --output DP-2 --mode 2560x1440 --pos 0x0 --rotate left
|
||||
|
6
bspwm/.local/bin/screen_desktop.sync-conflict-20210307-160903-X2RXDKD
Executable file
6
bspwm/.local/bin/screen_desktop.sync-conflict-20210307-160903-X2RXDKD
Executable file
@ -0,0 +1,6 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
xrandr --newmode "2560x1440_40" 201.00 2560 2720 2984 3408 1440 1443 1448 1476 -hsync +vsync
|
||||
xrandr --addmode HDMI-2 2560x1440_40
|
||||
|
||||
xrandr --output VGA-1 --off --output DP-1 --primary --mode 3840x2160 --rotate normal --output HDMI-3 --off --output HDMI-2 --mode 2560x1440_40 --pos 0x0 --rotate left --output HDMI-1 --off
|
@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
if [ -e ~/.cache/wall1.png ] && [ -e ~/.cache/wall2.png ]; then
|
||||
xwallpaper --output HDMI-2 --zoom ~/.cache/wall2.png --output DP-1 --zoom ~/.cache/wall1.png &
|
||||
xwallpaper --output DP-2 --zoom ~/.cache/wall2.png --output DP-3 --zoom ~/.cache/wall1.png &
|
||||
elif [ -e ~/.cache/wall1.png ]; then
|
||||
xwallpaper --output eDP1 --zoom ~/.cache/wall1.png &
|
||||
fi
|
||||
|
7
bspwm/.local/bin/wallpaper.sync-conflict-20210307-160903-X2RXDKD
Executable file
7
bspwm/.local/bin/wallpaper.sync-conflict-20210307-160903-X2RXDKD
Executable file
@ -0,0 +1,7 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
if [ -e ~/.cache/wall1.png ] && [ -e ~/.cache/wall2.png ]; then
|
||||
xwallpaper --output HDMI-2 --zoom ~/.cache/wall2.png --output DP-1 --zoom ~/.cache/wall1.png &
|
||||
elif [ -e ~/.cache/wall1.png ]; then
|
||||
xwallpaper --output eDP1 --zoom ~/.cache/wall1.png &
|
||||
fi
|
Loading…
Reference in New Issue
Block a user