Compare commits
5 Commits
a28fa89ba4
...
69d3cc0a54
Author | SHA1 | Date | |
---|---|---|---|
69d3cc0a54 | |||
5a87c6db29 | |||
c99f711fe0 | |||
5ca1cd6d24 | |||
39ec276c5d |
10
bin/altaria/1080p-beeg-game
Executable file
10
bin/altaria/1080p-beeg-game
Executable file
@ -0,0 +1,10 @@
|
||||
#!/bin/zsh
|
||||
source ${0:a:h}/xorg.zsh
|
||||
|
||||
XRANDR_SET \
|
||||
--compositing disable \
|
||||
--screen-blank disable \
|
||||
--background link-vs-gdizz.jpg \
|
||||
--sound-effect gamedock \
|
||||
${XRANDR_ARGS__livingroom__1080p[@]} --pos 0x0 --primary \
|
||||
;
|
10
bin/altaria/1080p-office-game
Executable file
10
bin/altaria/1080p-office-game
Executable file
@ -0,0 +1,10 @@
|
||||
#!/bin/zsh
|
||||
source ${0:a:h}/xorg.zsh
|
||||
|
||||
XRANDR_SET \
|
||||
--compositing disable \
|
||||
--screen-blank disable \
|
||||
--background altaria.jpg \
|
||||
--sound-effect gamedock \
|
||||
${XRANDR_ARGS__office__1080p[@]} --pos 0x0 --primary \
|
||||
;
|
10
bin/altaria/4k-beeg-game
Executable file
10
bin/altaria/4k-beeg-game
Executable file
@ -0,0 +1,10 @@
|
||||
#!/bin/zsh
|
||||
source ${0:a:h}/xorg.zsh
|
||||
|
||||
XRANDR_SET \
|
||||
--compositing disable \
|
||||
--screen-blank disable \
|
||||
--background vegeta.jpg \
|
||||
--sound-effect gamedock \
|
||||
${XRANDR_ARGS__livingroom__2k[@]} --pos 0x0 --primary \
|
||||
;
|
@ -1,22 +1,10 @@
|
||||
#!/bin/zsh
|
||||
source ${0:a:h}/xorg.zsh
|
||||
|
||||
OUTPUT=DP-2
|
||||
|
||||
: \
|
||||
&& scwrypts desktop/xrandr/disconnect-all \
|
||||
&& xrandr \
|
||||
--output $OUTPUT \
|
||||
--mode 2560x1440 --rate 119.88 \
|
||||
--rotate normal \
|
||||
--pos 0x0 \
|
||||
&& sleep 4 \
|
||||
&& xrandr --output $OUTPUT --primary \
|
||||
XRANDR_SET \
|
||||
--compositing disable \
|
||||
--screen-blank disable \
|
||||
--background roy-art.jpg \
|
||||
--sound-effect gamedock \
|
||||
${XRANDR_ARGS__livingroom__2k[@]} --pos 0x0 --primary \
|
||||
;
|
||||
|
||||
pkill compton
|
||||
scwrypts desktop/pulse-audio/set-default-sink -- hdmi --id 0 --profile output:hdmi-surround71-extra2
|
||||
|
||||
scwrypts desktop/screen-blank -- disable
|
||||
scwrypts desktop/i3/set-background -- roy-art.jpg
|
||||
scwrypts desktop/play-sound -- gamedock
|
||||
|
@ -1 +0,0 @@
|
||||
homedock
|
8
bin/altaria/default
Executable file
8
bin/altaria/default
Executable file
@ -0,0 +1,8 @@
|
||||
#!/bin/zsh
|
||||
source ${0:a:h}/xorg.zsh
|
||||
|
||||
XRANDR_SET \
|
||||
--screen-blank disable \
|
||||
${XRANDR_ARGS__office__4k[@]} --pos 0x0 --primary \
|
||||
${XRANDR_ARGS__livingroom__4k[@]} --pos 0x0 \
|
||||
;
|
@ -1,27 +0,0 @@
|
||||
#!/bin/zsh
|
||||
source ${0:a:h}/xorg.zsh
|
||||
|
||||
OUTPUT_PRIMARY=DP-2
|
||||
OUTPUT_SECONDARY=HDMI-0
|
||||
|
||||
: \
|
||||
&& scwrypts desktop/xrandr/disconnect-all \
|
||||
&& xrandr \
|
||||
--output $OUTPUT_PRIMARY \
|
||||
--mode 2560x1440 --rate 119.88 \
|
||||
--rotate normal \
|
||||
--pos 0x0 \
|
||||
--output $OUTPUT_SECONDARY \
|
||||
--mode 2560x1440 --rate 119.88 \
|
||||
--rotate normal \
|
||||
--pos 2560x1440\
|
||||
&& sleep 4 \
|
||||
&& xrandr --output $OUTPUT_PRIMARY --primary \
|
||||
;
|
||||
|
||||
pkill compton
|
||||
scwrypts desktop/pulse-audio/set-default-sink -- hdmi --id 0 --profile output:hdmi-surround71-extra2
|
||||
|
||||
scwrypts desktop/screen-blank -- disable
|
||||
scwrypts desktop/i3/set-background -- roy-art.jpg
|
||||
scwrypts desktop/play-sound -- gamedock
|
@ -1,30 +0,0 @@
|
||||
#!/bin/zsh
|
||||
source ${0:a:h}/xorg.zsh
|
||||
|
||||
: \
|
||||
&& scwrypts desktop/xrandr/disconnect-all \
|
||||
&& xrandr \
|
||||
--output DP-0 \
|
||||
--primary \
|
||||
--mode 3840x2160 \
|
||||
--rotate normal \
|
||||
--pos 0x0 \
|
||||
&& xrandr \
|
||||
--output HDMI-0 \
|
||||
--mode 3840x2160 \
|
||||
--rate 60.00 \
|
||||
--rotate normal \
|
||||
--pos 0x0 \
|
||||
--output DP-2 \
|
||||
--mode 3840x2160 \
|
||||
--rate 60.00 \
|
||||
--rotate normal \
|
||||
--pos 0x0 \
|
||||
;
|
||||
|
||||
(pkill compton; sleep 1; compton;) &
|
||||
scwrypts desktop/pulse-audio/set-default-sink -- Komplete
|
||||
|
||||
scwrypts desktop/screen-blank -- disable
|
||||
scwrypts desktop/i3/set-background -- purple.jpg
|
||||
scwrypts desktop/play-sound -- login
|
@ -1,22 +1,10 @@
|
||||
#!/bin/zsh
|
||||
source ${0:a:h}/xorg.zsh
|
||||
|
||||
OUTPUT=DP-0
|
||||
|
||||
: \
|
||||
&& scwrypts desktop/xrandr/disconnect-all \
|
||||
&& xrandr \
|
||||
--output $OUTPUT \
|
||||
--mode 3840x2160 \
|
||||
--rotate normal \
|
||||
--pos 0x0 \
|
||||
&& sleep 4 \
|
||||
&& xrandr --output $OUTPUT --primary \
|
||||
XRANDR_SET \
|
||||
--compositing disable \
|
||||
--screen-blank disable \
|
||||
--background captain-falcon.jpg \
|
||||
--sound-effect gamedock \
|
||||
${XRANDR_ARGS__office__4k[@]} --pos 0x0 --primary \
|
||||
;
|
||||
|
||||
pkill compton
|
||||
scwrypts desktop/pulse-audio/set-default-sink -- Komplete
|
||||
|
||||
scwrypts desktop/screen-blank -- disable
|
||||
scwrypts desktop/i3/set-background -- roy-art.jpg
|
||||
scwrypts desktop/play-sound -- gamedock
|
||||
|
@ -1,23 +0,0 @@
|
||||
#!/bin/zsh
|
||||
source ${0:a:h}/xorg.zsh
|
||||
|
||||
OUTPUT=HDMI-0
|
||||
|
||||
: \
|
||||
&& scwrypts desktop/xrandr/disconnect-all \
|
||||
&& xrandr \
|
||||
--output $OUTPUT \
|
||||
--mode 2560x1440 --rate 119.88 \
|
||||
--rotate normal \
|
||||
--pos 0x0 \
|
||||
&& sleep 4 \
|
||||
&& xrandr --output $OUTPUT --primary \
|
||||
;
|
||||
|
||||
pkill compton
|
||||
|
||||
scwrypts desktop/pulse-audio/set-default-sink -- hdmi --id 0 --profile output:hdmi-surround-extra1
|
||||
|
||||
scwrypts desktop/screen-blank -- disable
|
||||
scwrypts desktop/i3/set-background -- roy-art.jpg
|
||||
scwrypts desktop/play-sound -- gamedock
|
@ -1,3 +1,73 @@
|
||||
#!/bin/zsh
|
||||
source $HOME/.config/wryn/env.zsh
|
||||
|
||||
export DISPLAY=:0
|
||||
|
||||
#####################################################################
|
||||
|
||||
XRANDR_RESOLUTION__4k='3840x2160'
|
||||
XRANDR_RESOLUTION__2k='2560x1440'
|
||||
XRANDR_RESOLUTION__1080p='1920x1080'
|
||||
|
||||
XRANDR_OUTPUT__office='DP-0'
|
||||
XRANDR_OUTPUT__livingroom='HDMI-0'
|
||||
|
||||
XRANDR_ARGS__office__4k=(--output $XRANDR_OUTPUT__office --mode $XRANDR_RESOLUTION__4k)
|
||||
#XRANDR_ARGS__office__2k=() # not available on office monitor
|
||||
XRANDR_ARGS__office__1080p=(--output $XRANDR_OUTPUT__office --mode $XRANDR_RESOLUTION__1080p)
|
||||
|
||||
XRANDR_ARGS__livingroom__4k=(--output $XRANDR_OUTPUT__livingroom --mode $XRANDR_RESOLUTION__4k --rate 119.88)
|
||||
XRANDR_ARGS__livingroom__2k=(--output $XRANDR_OUTPUT__livingroom --mode $XRANDR_RESOLUTION__2k)
|
||||
XRANDR_ARGS__livingroom__1080p=(--output $XRANDR_OUTPUT__livingroom --mode $XRANDR_RESOLUTION__1080p)
|
||||
|
||||
#####################################################################
|
||||
|
||||
XRANDR_SET() {
|
||||
local ERRORS=0
|
||||
|
||||
local COMPOSITING=enable
|
||||
local SCREEN_BLANK=enable
|
||||
local BACKGROUND=purple.jpg
|
||||
local SOUND_EFFECT=login
|
||||
local XRANDR_ARGS=()
|
||||
|
||||
while [[ $# -gt 0 ]]
|
||||
do
|
||||
case $1 in
|
||||
--compositing ) COMPOSITING="$2" ; shift 1 ;;
|
||||
--screen-blank ) SCREEN_BLANK="$2" ; shift 1 ;;
|
||||
--background ) BACKGROUND="$2" ; shift 1 ;;
|
||||
--sound-effect ) SOUND_EFFECT="$2" ; shift 1 ;;
|
||||
|
||||
* ) XRANDR_ARGS+=($1) ;
|
||||
esac
|
||||
shift 1
|
||||
done
|
||||
|
||||
case $COMPOSITING in
|
||||
enable ) (pkill compton; sleep 1; compton;) & ;;
|
||||
disable ) pkill compton ;;
|
||||
* )
|
||||
echo "ERROR : invalid setting '$COMPOSITING' for compositing" >&2
|
||||
return 1
|
||||
esac
|
||||
|
||||
case $SCREEN_BLANK in
|
||||
enable | disable ) ;;
|
||||
* )
|
||||
echo "ERROR : invalid setting '$SCREEN_BLANK' for screen blank" >&2
|
||||
return 1
|
||||
esac
|
||||
|
||||
##########################################
|
||||
|
||||
scwrypts desktop/xrandr/disconnect-all
|
||||
|
||||
xrandr ${XRANDR_ARGS[@]}
|
||||
|
||||
sleep 1
|
||||
|
||||
scwrypts desktop/screen-blank -- $SCREEN_BLANK
|
||||
scwrypts desktop/i3/set-background -- $BACKGROUND
|
||||
scwrypts desktop/play-sound -- $SOUND_EFFECT
|
||||
}
|
||||
|
@ -1 +1 @@
|
||||
/home/w0ryn/.wryn/colorschemes/winter.conf
|
||||
/home/w0ryn/.wryn/colorschemes/main.conf
|
@ -1,26 +1,27 @@
|
||||
--- # yamllint disable rule:colons
|
||||
# do not edit; generated by scwrypts
|
||||
colors:
|
||||
primary:
|
||||
background: '0x000505'
|
||||
foreground: '0xE0F7FF'
|
||||
cursor:
|
||||
cursor: '0xAAD7E6'
|
||||
normal:
|
||||
black: '0x02140D'
|
||||
red: '0xD05023'
|
||||
green: '0x027B9B'
|
||||
yellow: '0x7B70AF'
|
||||
blue: '0x3D8890'
|
||||
magenta: '0x68D3F0'
|
||||
cyan: '0x50A3B5'
|
||||
white: '0xDEB88D'
|
||||
bright:
|
||||
black: '0x02DB88'
|
||||
red: '0xD38677'
|
||||
green: '0x618C98'
|
||||
yellow: '0x7D72FE'
|
||||
blue: '0x1ABCDD'
|
||||
magenta: '0xBBE3EE'
|
||||
cyan: '0x86ABB3'
|
||||
white: '0xFEE3CD'
|
||||
[colors.cursor]
|
||||
cursor = '0xE0D0FF'
|
||||
|
||||
[colors.primary]
|
||||
background = '0x000505'
|
||||
foreground = '0xCFC2E9'
|
||||
|
||||
[colors.normal]
|
||||
black = '0x000505'
|
||||
red = '0xC80064'
|
||||
green = '0x00C864'
|
||||
yellow = '0x6400C8'
|
||||
blue = '0x007D96'
|
||||
magenta = '0x9600FA'
|
||||
cyan = '0x00FAC8'
|
||||
white = '0x7E707E'
|
||||
|
||||
[colors.bright]
|
||||
black = '0x424253'
|
||||
red = '0x640032'
|
||||
green = '0x006432'
|
||||
yellow = '0x320064'
|
||||
blue = '0x00324B'
|
||||
magenta = '0x640096'
|
||||
cyan = '0x009664'
|
||||
white = '0xC0B0C0'
|
||||
|
26
colorschemes/active.main.alacritty.yml
Normal file
26
colorschemes/active.main.alacritty.yml
Normal file
@ -0,0 +1,26 @@
|
||||
--- # yamllint disable rule:colons
|
||||
# do not edit; generated by scwrypts
|
||||
colors:
|
||||
primary:
|
||||
background: '0x000505'
|
||||
foreground: '0xCFC2E9'
|
||||
cursor:
|
||||
cursor: '0xE0D0FF'
|
||||
normal:
|
||||
black: '0x000505'
|
||||
red: '0xC80064'
|
||||
green: '0x00C864'
|
||||
yellow: '0x6400C8'
|
||||
blue: '0x007D96'
|
||||
magenta: '0x9600FA'
|
||||
cyan: '0x00FAC8'
|
||||
white: '0x7E707E'
|
||||
bright:
|
||||
black: '0x424253'
|
||||
red: '0x640032'
|
||||
green: '0x006432'
|
||||
yellow: '0x320064'
|
||||
blue: '0x00324B'
|
||||
magenta: '0x640096'
|
||||
cyan: '0x009664'
|
||||
white: '0xC0B0C0'
|
@ -2,6 +2,6 @@
|
||||
# source this file to apply colorscheme to linux getty
|
||||
[[ "$TERM" =~ ^linux$ ]] || return 0
|
||||
|
||||
/bin/echo -e " ]P0000505 ]P1D05023 ]P2027B9B ]P37B70AF ]P43D8890 ]P568D3F0 ]P650A3B5 ]P7E0F7FF ]P8D38677 ]P9618C98 ]PA7D72FE ]PB1ABCDD ]PCBBE3EE ]PD86ABB3 ]PEDEB88D ]PFFEE3CD "
|
||||
/bin/echo -e " ]P0000505 ]P1C80064 ]P200C864 ]P36400C8 ]P4007D96 ]P59600FA ]P600FAC8 ]P7CFC2E9 ]P8640032 ]P9006432 ]PA320064 ]PB00324B ]PC640096 ]PD009664 ]PE7E707E ]PFC0B0C0 "
|
||||
[ ! $NO_CLEAR ] && clear
|
||||
return 0
|
||||
|
20
config/alacritty.toml
Normal file
20
config/alacritty.toml
Normal file
@ -0,0 +1,20 @@
|
||||
import = [
|
||||
"/home/w0ryn/.config/alacritty/theme.toml",
|
||||
"/home/w0ryn/.config/alacritty/local.toml",
|
||||
]
|
||||
|
||||
[font.bold]
|
||||
family = "Monaspace Argon"
|
||||
|
||||
[font.glyph_offset]
|
||||
x = 0
|
||||
y = 1
|
||||
|
||||
[font.italic]
|
||||
family = "Monaspace Radon"
|
||||
|
||||
[font.normal]
|
||||
family = "Monaspace Neon"
|
||||
|
||||
[window]
|
||||
opacity = 0.8
|
@ -1,11 +1,22 @@
|
||||
--- # yamllint disable rule:colons
|
||||
# DEPRECATED; please refer to alacritty.toml
|
||||
import:
|
||||
- ~/.config/alacritty/theme.yml
|
||||
- ~/.config/alacritty/local.yml
|
||||
|
||||
window:
|
||||
opacity: 0.7
|
||||
opacity: 0.8
|
||||
|
||||
font:
|
||||
glyph_offset:
|
||||
x: 0
|
||||
y: 1
|
||||
|
||||
normal:
|
||||
family: Monaspace Neon
|
||||
|
||||
bold:
|
||||
family: Monaspace Argon
|
||||
|
||||
italic:
|
||||
family: Monaspace Radon
|
||||
|
@ -8,5 +8,8 @@ SCWRYPTS_ENV_SHORTCUT='' # CTRL + /
|
||||
source "$HOME/.wryn/scwrypts/dotwryn/dotwryn.scwrypts.zsh"
|
||||
source "$HOME/.wryn/scwrypts/ssh/ssh.scwrypts.zsh"
|
||||
|
||||
[ -f "$HOME/Projects/yage/home/code/scwrypts/yagehome.scwrypts.zsh" ] \
|
||||
&& source "$HOME/Projects/yage/home/code/scwrypts/yagehome.scwrypts.zsh"
|
||||
|
||||
[ -f "$HOME/.config/scwrypts/config.local.zsh" ] \
|
||||
&& source "$HOME/.config/scwrypts/config.local.zsh"
|
||||
|
@ -10,34 +10,36 @@ SYMLINKS="
|
||||
# --------------------------------------------------------------------------
|
||||
# fully qualified path ~/.config/THE-REST
|
||||
# --------------------------------------------------------------------------
|
||||
$DOTWRYN/bin/i3-utils i3/utils
|
||||
$DOTWRYN/colorschemes/active.main kitty/theme.conf
|
||||
$DOTWRYN/colorschemes/active.main.alacritty alacritty/theme.yml
|
||||
$DOTWRYN/colorschemes/active.main.getty wryn/tty-colorscheme
|
||||
$DOTWRYN/config/alacritty.yaml alacritty/alacritty.yml
|
||||
$DOTWRYN/config/bat.conf bat/config
|
||||
$DOTWRYN/config/code-activator.conf code-activator-zsh/settings.zsh
|
||||
$DOTWRYN/config/compton.conf compton/compton.conf
|
||||
$DOTWRYN/config/git.conf git/config
|
||||
$DOTWRYN/config/htop.conf htop/htoprc
|
||||
$DOTWRYN/config/i3.conf i3/config
|
||||
$DOTWRYN/config/i3status.conf i3status/config
|
||||
$DOTWRYN/config/kitty.conf kitty/kitty.conf
|
||||
$DOTWRYN/config/mssqlcli.conf mssqlci/config
|
||||
$DOTWRYN/config/pgcli.conf pgcli/config
|
||||
$DOTWRYN/config/pylint.conf pylintrc
|
||||
$DOTWRYN/config/ripgrep.conf ripgrep/config
|
||||
$DOTWRYN/config/scwrypts/config.zsh scwrypts/config.zsh
|
||||
$DOTWRYN/config/scwrypts/dotfiles.zsh scwrypts/dotfiles.zsh
|
||||
$DOTWRYN/config/scwrypts/vundle.zsh scwrypts/vundle.zsh
|
||||
$DOTWRYN/config/tmux.conf tmux/tmux.conf
|
||||
$DOTWRYN/config/xcompose.conf X11/xcompose
|
||||
$DOTWRYN/config/xconfig.conf X11/xconfig
|
||||
$DOTWRYN/config/xinitrc.i3 X11/xinitrc
|
||||
$DOTWRYN/config/xinitrc.i3 ../.xinitrc
|
||||
$DOTWRYN/bin/scwrypts ../.local/bin/scwrypts
|
||||
$DOTWRYN/bin/vim ../.local/bin/vim
|
||||
$DOTWRYN/bin/$(hostnamectl --static) ../.$(hostnamectl --static)
|
||||
$DOTWRYN/bin/i3-utils i3/utils
|
||||
$DOTWRYN/colorschemes/active.main kitty/theme.conf
|
||||
$DOTWRYN/colorschemes/active.main.alacritty alacritty/theme.toml
|
||||
$DOTWRYN/colorschemes/active.main.alacritty.yml alacritty/theme.yml
|
||||
$DOTWRYN/colorschemes/active.main.getty wryn/tty-colorscheme
|
||||
$DOTWRYN/config/alacritty.toml alacritty/alacritty.toml
|
||||
$DOTWRYN/config/alacritty.yaml alacritty/alacritty.yml
|
||||
$DOTWRYN/config/bat.conf bat/config
|
||||
$DOTWRYN/config/code-activator.conf code-activator-zsh/settings.zsh
|
||||
$DOTWRYN/config/compton.conf compton/compton.conf
|
||||
$DOTWRYN/config/git.conf git/config
|
||||
$DOTWRYN/config/htop.conf htop/htoprc
|
||||
$DOTWRYN/config/i3.conf i3/config
|
||||
$DOTWRYN/config/i3status.conf i3status/config
|
||||
$DOTWRYN/config/kitty.conf kitty/kitty.conf
|
||||
$DOTWRYN/config/mssqlcli.conf mssqlci/config
|
||||
$DOTWRYN/config/pgcli.conf pgcli/config
|
||||
$DOTWRYN/config/pylint.conf pylintrc
|
||||
$DOTWRYN/config/ripgrep.conf ripgrep/config
|
||||
$DOTWRYN/config/scwrypts/config.zsh scwrypts/config.zsh
|
||||
$DOTWRYN/config/scwrypts/dotfiles.zsh scwrypts/dotfiles.zsh
|
||||
$DOTWRYN/config/scwrypts/vundle.zsh scwrypts/vundle.zsh
|
||||
$DOTWRYN/config/tmux.conf tmux/tmux.conf
|
||||
$DOTWRYN/config/xcompose.conf X11/xcompose
|
||||
$DOTWRYN/config/xconfig.conf X11/xconfig
|
||||
$DOTWRYN/config/xinitrc.i3 X11/xinitrc
|
||||
$DOTWRYN/config/xinitrc.i3 ../.xinitrc
|
||||
$DOTWRYN/bin/scwrypts ../.local/bin/scwrypts
|
||||
$DOTWRYN/bin/vim ../.local/bin/vim
|
||||
$DOTWRYN/bin/$(hostnamectl --static) ../.$(hostnamectl --static)
|
||||
|
||||
$DOTWRYN/config/scwrypts/environments/scwrypts/local scwrypts/environments/scwrypts/local
|
||||
$DOTWRYN/config/scwrypts/environments/scwrypts/local.altaria scwrypts/environments/scwrypts/local.altaria
|
||||
|
102
scwrypts/dotwryn/desktop/i3/create-local-font-override
Executable file
102
scwrypts/dotwryn/desktop/i3/create-local-font-override
Executable file
@ -0,0 +1,102 @@
|
||||
#!/bin/zsh
|
||||
DEPENDENCIES+=(
|
||||
diff
|
||||
)
|
||||
REQUIRED_ENV+=(
|
||||
I3__MODEL_CONFIG
|
||||
)
|
||||
|
||||
CHECK_ENVIRONMENT
|
||||
#####################################################################
|
||||
|
||||
REGEX_FONT='^\(font [^0-9]*\)\(.*\)'
|
||||
REGEX_DMENU="^\\(.*dmenu_run .*-fn '[^0-9]*\\)\\([0-9]*\\)'"
|
||||
REGEX_BORDER='^\(for_window.*border pixel \)\(.*\)'
|
||||
|
||||
INSTALL() {
|
||||
local USAGE="
|
||||
usage: [...options...]
|
||||
|
||||
options
|
||||
-f, --force force replacement of existing i3config
|
||||
-n, --no-link if output config and template are the same, don't create link
|
||||
|
||||
-h, --help print this message and exit
|
||||
|
||||
environment
|
||||
I3__MODEL_CONFIG fully-qualified path to sourced i3config
|
||||
I3__GLOBAL_FONT_SIZE global font size
|
||||
I3__DMENU_FONT_SIZE (optional) font size for 'dmenu' command
|
||||
I3__BORDER_PIXEL_SIZE (optional) pixel-width of window borders
|
||||
|
||||
I3 provides no way to include dynamic variables in your config.
|
||||
The main difference I want between my i3 configurations is font-size
|
||||
to match the current monitor. Since i3-msg provides no way to change
|
||||
font size, I run this command to update those variables on a local
|
||||
copy of my sourced config
|
||||
"
|
||||
local FORCE=0
|
||||
local AUTOLINK=1
|
||||
while [[ $# -gt 0 ]]
|
||||
do
|
||||
case $1 in
|
||||
-f | --force ) FORCE=1 ;;
|
||||
-n | --no-link ) AUTOLINK=0 ;;
|
||||
-h | --help ) USAGE; exit 0 ;;
|
||||
esac
|
||||
shift 1
|
||||
done
|
||||
|
||||
STATUS 'reading local i3config'
|
||||
[[ ^$I3__MODEL_CONFIG$ =~ ^$HOME/.config/i3/config$ ]] && {
|
||||
STATUS "model configuration is default configuration"
|
||||
I3__MODEL_CONFIG="$I3__MODEL_CONFIG.template"
|
||||
[ ! -f "$I3__MODEL_CONFIG" ] && {
|
||||
STATUS "creating template"
|
||||
cp "$HOME/.config/i3/config" "$I3__MODEL_CONFIG.template"
|
||||
}
|
||||
STATUS "referring to '$I3__MODEL_CONFIG'"
|
||||
}
|
||||
local CONFIG=$(cat "$I3__MODEL_CONFIG")
|
||||
[ ! $CONFIG ] && FAIL 1 "failed to read config at '$I3__MODEL_CONFIG'"
|
||||
|
||||
local CONFIG_FILE="$HOME/.config/i3/config"
|
||||
[ ! -d $(dirname "$CONFIG_FILE") ] && mkdir -p "$(dirname "$CONFIG_FILE")"
|
||||
|
||||
[ -f "$CONFIG_FILE" ] && mv "$CONFIG_FILE" "$CONFIG_FILE.bak"
|
||||
|
||||
[ $I3__GLOBAL_FONT_SIZE ] && {
|
||||
STATUS "setting global font size to '$I3__GLOBAL_FONT_SIZE'"
|
||||
CONFIG=$(echo $CONFIG | sed "s/$REGEX_FONT/\\1$I3__GLOBAL_FONT_SIZE/")
|
||||
}
|
||||
|
||||
[ $I3__DMENU_FONT_SIZE ] && {
|
||||
STATUS "setting dmenu font size to '$I3__DMENU_FONT_SIZE'"
|
||||
CONFIG=$(echo $CONFIG | sed "s/$REGEX_DMENU/\\1$I3__DMENU_FONT_SIZE'/")
|
||||
}
|
||||
|
||||
[ $I3__BORDER_PIXEL_SIZE ] && {
|
||||
STATUS "setting border pixel size to '$I3__BORDER_PIXEL_SIZE'"
|
||||
CONFIG=$(echo $CONFIG | sed "s/$REGEX_BORDER/\\1$I3__BORDER_PIXEL_SIZE/")
|
||||
}
|
||||
|
||||
echo $CONFIG > "$CONFIG_FILE"
|
||||
[ -f "$CONFIG_FILE.bak" ] \
|
||||
&& diff "$CONFIG_FILE" "$CONFIG_FILE.bak" -q >/dev/null \
|
||||
&& mv "$CONFIG_FILE.bak" "$CONFIG_FILE" \
|
||||
&& INFO "no changes were made" \
|
||||
;
|
||||
|
||||
[[ $AUTOLINK -eq 1 ]] \
|
||||
&& diff "$CONFIG_FILE" "$I3__MODEL_CONFIG" -q >/dev/null \
|
||||
&& rm "$CONFIG_FILE" \
|
||||
&& ln -s "$I3__MODEL_CONFIG" "$CONFIG_FILE" \
|
||||
&& INFO "output is the same as model, i3config has been linked to model" \
|
||||
;
|
||||
|
||||
[[ $FORCE -eq 1 ]] && rm "$CONFIG.bak" >/dev/null 2>&1
|
||||
return 0
|
||||
}
|
||||
|
||||
#####################################################################
|
||||
INSTALL $@
|
136
scwrypts/dotwryn/desktop/i3/launch-or-show
Executable file
136
scwrypts/dotwryn/desktop/i3/launch-or-show
Executable file
@ -0,0 +1,136 @@
|
||||
#!/bin/zsh
|
||||
DEPENDENCIES+=(
|
||||
i3-msg
|
||||
xdotool
|
||||
xrandr
|
||||
)
|
||||
REQUIRED_ENV+=()
|
||||
|
||||
use system/desktop/notify
|
||||
|
||||
CHECK_ENVIRONMENT
|
||||
#####################################################################
|
||||
|
||||
LAUNCH_OR_SHOW() {
|
||||
INFO $@
|
||||
local USAGE="
|
||||
usage: <path-executable> [client-class] [...options...]
|
||||
|
||||
options
|
||||
-c, --client <string> if different from the executable name, xprop CLIENT_CLASS
|
||||
|
||||
-s, --scale <value> (default: 0.8 or 0.5 if screen width >3000px)
|
||||
-x, --x-offset <value> (default: 0.0)
|
||||
-y, --y-offset <value> (default: 0.0)
|
||||
|
||||
-a, --always-launch invoke executable even if client-class exists
|
||||
-n, --no-resize don't resize the window (ignores -sxy flags)
|
||||
-l, --no-center leave the window wherever it was last positioned
|
||||
|
||||
--has-statusbar-icon (default: false) use if program has a statusbar icon
|
||||
|
||||
-h, --help print this message and exit
|
||||
|
||||
Makes it easy to bind appications to key shortcuts without having to
|
||||
spin up redundant instances or cycle through the scratchpad queue.
|
||||
|
||||
Performs a variety of tasks based on states:
|
||||
1) starts and application
|
||||
2) adds all instances of the specified application to the scratchpad
|
||||
3) (toggle) hides all visible instances
|
||||
4) (toggle) shows all scratchpad-hidden instances
|
||||
"
|
||||
local APPLICATION CLIENT_CLASS
|
||||
|
||||
local XFFSET=0.0
|
||||
local YFFSET=0.0
|
||||
local SCALE=0.8
|
||||
[[ $(xrandr | grep primary | awk '{print $4;}' | sed 's/x.*//') -gt 3000 ]] \
|
||||
&& SCALE=0.5
|
||||
|
||||
local ALWAYS_LAUNCH=0
|
||||
local RESIZE=1
|
||||
local MOVE=1
|
||||
local MIN_ACTIVE=1
|
||||
|
||||
while [[ $# -gt 0 ]]
|
||||
do
|
||||
case $1 in
|
||||
-c | --client ) CLIENT_CLASS="$2"; shift 1 ;;
|
||||
-x | --x-offset ) XFFSET=$2; shift 1 ;;
|
||||
-y | --y-offset ) YFFSET=$2; shift 1 ;;
|
||||
-s | --scale ) SCALE=$2; shift 1 ;;
|
||||
|
||||
-a | --always-launch ) ALWAYS_LAUNCH=1 ;;
|
||||
-n | --no-resize ) RESIZE=0 ;;
|
||||
-l | --no-center ) MOVE=0 ;;
|
||||
|
||||
--has-statusbar-icon ) MIN_ACTIVE=2 ;;
|
||||
|
||||
-h | --help ) USAGE; exit 0 ;;
|
||||
|
||||
* )
|
||||
[ ! $APPLICATION ] && APPLICATION="$1" \
|
||||
|| ERROR "extra positional argument '$1'"
|
||||
esac
|
||||
shift 1
|
||||
done
|
||||
|
||||
[ ! $APPLICATION ] && ERROR 'path-executable required'
|
||||
[ ! $CLIENT_CLASS ] && CLIENT_CLASS=$APPLICATION
|
||||
|
||||
[ $APPLICATION ] && {
|
||||
__CHECK_DEPENDENCY $APPLICATION || {
|
||||
ERROR "$APPLICATION is not installed"
|
||||
NOTIFY "ERROR: $APPLICATION not found"
|
||||
}
|
||||
}
|
||||
|
||||
CHECK_ERRORS
|
||||
|
||||
xrandr | grep primary | awk '{print $4;}' | grep -q '^[0-9x+]\+$' || {
|
||||
xrandr --output $(xrandr | grep ' connected' | awk '{print $1;}' | head -n1) --primary
|
||||
}
|
||||
|
||||
local CURRENTLY_ACTIVE=$(xdotool search --onlyvisible --classname $CLIENT_CLASS 2>/dev/null | wc -l)
|
||||
|
||||
local LAUNCH_APP=$ALWAYS_LAUNCH
|
||||
STATUS "looking for window process ids"
|
||||
xdotool search --class $CLIENT_CLASS || LAUNCH_APP=1
|
||||
|
||||
[[ $LAUNCH_APP -eq 1 ]] && {
|
||||
STATUS 'launching application'
|
||||
i3-msg "exec --no-startup-id $APPLICATION;"
|
||||
sleep .5
|
||||
}
|
||||
|
||||
STATUS 'getting target window size'
|
||||
WINDOW_SIZE=$(\
|
||||
xrandr \
|
||||
| grep 'connected primary' \
|
||||
| sed 's/.*connected primary \([^x]*\)x\([^+]*\).*/\1 \2/' \
|
||||
| awk -v f=$SCALE -v x=$XFFSET -v y=$YFFSET \
|
||||
'{print int($1*f+x)," ",int($2*f+y);}'\
|
||||
)
|
||||
INFO "window size: $WINDOW_SIZE"
|
||||
|
||||
STATUS 'moving window to scratchpad'
|
||||
i3-msg "[class=$CLIENT_CLASS] move scratchpad"
|
||||
|
||||
[[ $RESIZE -eq 1 ]] \
|
||||
&& STATUS 'resizing window' \
|
||||
&& i3-msg "[class=$CLIENT_CLASS] resize set $WINDOW_SIZE"
|
||||
|
||||
[[ $CURRENTLY_ACTIVE -lt $MIN_ACTIVE ]] && {
|
||||
STATUS 'pulling window from scratchpad to foreground'
|
||||
i3-msg "[class=$CLIENT_CLASS] scratchpad show"
|
||||
}
|
||||
|
||||
STATUS 'moving window to center of current screen'
|
||||
[[ $MOVE -eq 1 ]] && i3-msg "[class=$CLIENT_CLASS] move position center"
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
#####################################################################
|
||||
LAUNCH_OR_SHOW $@
|
@ -181,6 +181,36 @@ _LIST_THEMES() {
|
||||
|
||||
_GENERATE_THEME__alacritty() {
|
||||
STATUS "generating $ACTIVE_THEME_NAME.alacritty"
|
||||
echo "# do not edit; generated by scwrypts
|
||||
[colors.cursor]
|
||||
cursor = '0x$CURSOR'
|
||||
|
||||
[colors.primary]
|
||||
background = '0x$BACKGROUND'
|
||||
foreground = '0x$FOREGROUND'
|
||||
|
||||
[colors.normal]
|
||||
black = '0x$BLACK'
|
||||
red = '0x$RED'
|
||||
green = '0x$GREEN'
|
||||
yellow = '0x$YELLOW'
|
||||
blue = '0x$BLUE'
|
||||
magenta = '0x$MAGENTA'
|
||||
cyan = '0x$CYAN'
|
||||
white = '0x$WHITE'
|
||||
|
||||
[colors.bright]
|
||||
black = '0x$BRIGHT_BLACK'
|
||||
red = '0x$BRIGHT_RED'
|
||||
green = '0x$BRIGHT_GREEN'
|
||||
yellow = '0x$BRIGHT_YELLOW'
|
||||
blue = '0x$BRIGHT_BLUE'
|
||||
magenta = '0x$BRIGHT_MAGENTA'
|
||||
cyan = '0x$BRIGHT_CYAN'
|
||||
white = '0x$BRIGHT_WHITE'
|
||||
" | sed '$d' > "$ACTIVE_THEME.alacritty"
|
||||
|
||||
# backwards yaml compatibility
|
||||
echo "--- # yamllint disable rule:colons
|
||||
# do not edit; generated by scwrypts
|
||||
colors:
|
||||
@ -207,12 +237,12 @@ colors:
|
||||
magenta: '0x$BRIGHT_MAGENTA'
|
||||
cyan: '0x$BRIGHT_CYAN'
|
||||
white: '0x$BRIGHT_WHITE'
|
||||
" | sed '$d' > "$ACTIVE_THEME.alacritty"
|
||||
" | sed '$d' > "$ACTIVE_THEME.alacritty.yml"
|
||||
}
|
||||
|
||||
_SET_THEME__alacritty() {
|
||||
local LOCAL_THEME="$HOME/.config/alacritty/theme.yml"
|
||||
ln -sf "$ACTIVE_THEME.alacritty" "$LOCAL_THEME"
|
||||
ln -sf "$ACTIVE_THEME.alacritty" "$HOME/.config/alacritty/theme.toml"
|
||||
ln -sf "$ACTIVE_THEME.alacritty.yml" "$HOME/.config/alacritty/theme.yml" # backwards yaml compatibility
|
||||
}
|
||||
|
||||
#####################################################################
|
||||
|
@ -26,6 +26,8 @@ MEDIA__PLAY_SFX() {
|
||||
;;
|
||||
esac
|
||||
|
||||
[ ! -f $SFX_FILE ] && SFX_FILE="$DESKTOP__SFX_PATH/$SFX_FILE"
|
||||
|
||||
[ -f $SFX_FILE ] \
|
||||
&& STATUS "detected file '$SFX_FILE'" \
|
||||
|| NOTIFY_FAIL 1 "unable to locate sfx file '$1'" \
|
||||
|
@ -14,16 +14,16 @@ set -g status-right "omni host : #(hostnamectl --static) | #(cat
|
||||
# navigate between hosts with ALT+window-number
|
||||
set -g base-index 1
|
||||
|
||||
bind-key -n M-1 select-window -t 1
|
||||
bind-key -n M-2 select-window -t 2
|
||||
bind-key -n M-3 select-window -t 3
|
||||
bind-key -n M-4 select-window -t 4
|
||||
bind-key -n M-5 select-window -t 5
|
||||
bind-key -n M-6 select-window -t 6
|
||||
bind-key -n M-7 select-window -t 7
|
||||
bind-key -n M-8 select-window -t 8
|
||||
bind-key -n M-9 select-window -t 9
|
||||
bind-key -n M-0 select-window -t 10
|
||||
bind-key 2 select-window -t 1
|
||||
bind-key 2 select-window -t 2
|
||||
bind-key 3 select-window -t 3
|
||||
bind-key 4 select-window -t 4
|
||||
bind-key 5 select-window -t 5
|
||||
bind-key 6 select-window -t 6
|
||||
bind-key 7 select-window -t 7
|
||||
bind-key 8 select-window -t 8
|
||||
bind-key 9 select-window -t 9
|
||||
bind-key 0 select-window -t 10
|
||||
|
||||
# window / tile navigation settings from $DOTWRYN/config/tmux.conf
|
||||
# but default to nested session rather than host
|
||||
@ -61,8 +61,8 @@ bind-key -n M-Q kill-session
|
||||
|
||||
unbind-key C-b
|
||||
bind-key C-b send-prefix
|
||||
set-option -g prefix C-s
|
||||
bind-key C-s send-keys C-s
|
||||
set-option -g prefix M-s
|
||||
bind-key M-s send-keys M-s
|
||||
|
||||
# force reload now
|
||||
bind-key -n M-R send-keys -t omni-manager ENTER
|
||||
|
@ -1,4 +1,4 @@
|
||||
set t_Co=256 t_8f=[38:2:%lu:%lu:%lum t_8b=[48:2:%lu:%lu:%lum t_ZH=[3m t_ZR=[23m
|
||||
set t_Co=256 t_8f=[38:2:%lu:%lu:%lum t_8b=[48:2:%lu:%lu:%lum t_ZH=[3m t_ZR=[23m t_Cs=[4:3m t_Ce=[4:0m
|
||||
|
||||
colorscheme default
|
||||
silent! colorscheme dim
|
||||
@ -12,3 +12,9 @@ highlight SpellBad cterm=bold gui=bold ctermbg=NONE guibg=NO
|
||||
highlight TabLineFill cterm=bold gui=bold ctermbg=NONE guibg=NONE
|
||||
highlight TabLine cterm=NONE gui=NONE ctermbg=NONE guibg=NONE ctermfg=darkgray guifg=darkgray
|
||||
highlight TabLineSel cterm=bold gui=bold ctermbg=NONE guibg=NONE ctermfg=white guifg=white
|
||||
|
||||
highlight ALEVirtualTextError cterm=nocombine,italic,undercurl gui=nocombine,italic ctermbg=NONE ctermfg=yellow guibg=NONE guifg=yellow
|
||||
highlight ALEVirtualTextWarning cterm=nocombine,italic,undercurl gui=nocombine,italic ctermbg=NONE ctermfg=yellow guibg=NONE guifg=yellow
|
||||
highlight ALEVirtualTextInfo cterm=nocombine,italic,undercurl gui=nocombine,italic ctermbg=NONE ctermfg=yellow guibg=NONE guifg=yellow
|
||||
highlight ALEVirtualTextStyleError cterm=nocombine,italic,undercurl gui=nocombine,italic ctermbg=NONE ctermfg=yellow guibg=NONE guifg=yellow
|
||||
highlight ALEVirtualTextStyleWarning cterm=nocombine,italic,undercurl gui=nocombine,italic ctermbg=NONE ctermfg=yellow guibg=NONE guifg=yellow
|
||||
|
@ -75,6 +75,7 @@ let g:ale_lint_on_insert_leave = 0
|
||||
let g:ale_lint_on_save = 1
|
||||
let g:ale_sign_column_always = 1
|
||||
|
||||
nmap <Leader>at <Plug>(ale_toggle_buffer)
|
||||
nmap <Leader>ae <Plug>(ale_next)
|
||||
nmap <Leader>ar <Plug>(ale_previous)
|
||||
nmap <Leader>f <Plug>(ale_fix)
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 72e831da33bf93c4eb78f17b85817a9ba211af74
|
||||
Subproject commit a200c1eb223a33b0b317b9e4a67bd351421c814a
|
Loading…
Reference in New Issue
Block a user