Compare commits

..

No commits in common. "ccd4c85027cd87ce35151038afcbe2749827f65b" and "be03e4d50ed323ebc8df0ca84368912fc3b82f49" have entirely different histories.

9 changed files with 50 additions and 51 deletions

View file

@ -1,15 +1,25 @@
#!/usr/bin/env sh #!/usr/bin/env sh
_autoinstall_base () { _autoinstall_base () {
_autoinstall_file "https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim" \ plug_path="$HOME/.config/vim/autoload/plug.vim"
"$HOME/.config/vim/autoload/plug.vim" \ if [ ! -f "$plug_path" ]
&& [ -x "$(command -v vim)" ] && yes | vim +'PlugInstall --sync' +qa --not-a-term then
_autoinstall_file "https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim" "$plug_path"
[ -x "$(command -v vim)" ] && yes | vim +'PlugInstall --sync' +qa --not-a-term
fi
_autoinstall_git "https://github.com/AstroNvim/AstroNvim" "$HOME/.config/nvim" \ nvim_dir="$HOME/.config/nvim"
&& [ -x "$(command -v nvim)" ] && nvim --headless -c 'autocmd User PackerComplete quitall' -c 'PackerSync' if [ ! -d "$nvim_dir" ]
then
_autoinstall_git "https://github.com/AstroNvim/AstroNvim" "$nvim_dir"
[ -x "$(command -v nvim)" ] && nvim --headless -c 'autocmd User PackerComplete quitall' -c 'PackerSync'
fi
[ ! -x "$(command -v starship)" ] \ if [ ! -x "$(command -v starship)" ]
&& curl -sS "https://starship.rs/install.sh" | BIN_DIR="$HOME/.local/bin" FORCE=1 sh then
mkdir -p "$HOME/.local/bin"
curl -sS "https://starship.rs/install.sh" | BIN_DIR="$HOME/.local/bin" FORCE=1 sh
fi
_autoinstall_env "$WAKATIME_HOME/.wakatime.cfg" _autoinstall_env "$WAKATIME_HOME/.wakatime.cfg"

View file

@ -13,42 +13,44 @@ bspc config presel_feedback_color "#6272a4"
host_name=$(cat /proc/sys/kernel/hostname) host_name=$(cat /proc/sys/kernel/hostname)
mode=$(cat /tmp/bspwm_mode) mode=$(cat /tmp/bspwm_mode)
primary="${MONITOR_PRIMARY:-primary}"
secondary="${MONITOR_SECONDARY:-secondary}"
if [ "$host_name" = "portalo" ]; then if [ "$host_name" = "portalo" ]; then
if [ "$mode" = "presenter" ]; then if [ "$mode" = "presenter" ]; then
xrandr --output "$primary" --mode 2560x1440 --refresh 144 xrandr --output "$MONITOR_PRIMARY" --mode 2560x1440 --refresh 144
xrandr --output "$secondary" --auto --left-of "$primary" xrandr --output "$MONITOR_SECONDARY" --auto --left-of "$MONITOR_PRIMARY"
pkill xcompmgr; pkill xcompmgr;
bspc monitor "$primary" -d web terminal 3 4 5 6 focus voip messenger presenter1 bspc monitor "$MONITOR_PRIMARY" -d web terminal 3 4 5 6 focus voip messenger presenter1
bspc monitor "$secondary" -d presenter2 bspc monitor "$MONITOR_SECONDARY" -d presenter2
elif [ "$mode" = "single" ]; then elif [ "$mode" = "single" ]; then
xrandr --output "$secondary" --off xrandr --output "$MONITOR_SECONDARY" --off
bspc monitor "$primary" -d web terminal 3 4 5 6 focus side-view voip messenger bspc monitor "$MONITOR_PRIMARY" -d web terminal 3 4 5 6 focus side-view voip messenger
else else
xrandr --output "$primary" --mode 2560x1440 --refresh 144 xrandr --output "$MONITOR_PRIMARY" --mode 2560x1440 --refresh 144
xrandr --output "$secondary" --auto --left-of "$primary" xrandr --output "$MONITOR_SECONDARY" --auto --left-of "$MONITOR_PRIMARY"
bspc monitor "$primary" -d web terminal 3 4 5 6 focus bspc monitor "$MONITOR_PRIMARY" -d web terminal 3 4 5 6 focus
bspc monitor "$secondary" -d side-view voip messenger bspc monitor "$MONITOR_SECONDARY" -d side-view voip messenger
fi fi
#elif echo "$host_name" | grep -Eq "laptop"; then bspc wm -O "$MONITOR_PRIMARY" "$MONITOR_SECONDARY"
sleep 1
bspc wm -O "$MONITOR_PRIMARY" "$MONITOR_SECONDARY"
elif echo "$host_name" | grep -Eq "laptop"; then
xrandr --output "$MONITOR_PRIMARY" --auto
xrandr --output "$MONITOR_SECONDARY" --left-of "$MONITOR_PRIMARY" --auto
bspc monitor "$MONITOR_PRIMARY" -d web terminal 3 4 5 6 focus messenger
bspc monitor "$MONITOR_SECONDARY" -d side-view 10
bspc wm -O "$MONITOR_PRIMARY" "$MONITOR_SECONDARY"
sleep 1
bspc wm -O "$MONITOR_PRIMARY" "$MONITOR_SECONDARY"
else else
xrandr --output "$primary" --auto bspc monitor primary -d web terminal 3 4 5 6 7 8 9 focus
xrandr --output "$secondary" --left-of "$primary" --auto
bspc monitor "$primary" -d web terminal 3 4 5 6 focus messenger
bspc monitor "$secondary" -d side-view 10
fi fi
bspc wm -O "$primary" "$secondary"
sleep 1
bspc wm -O "$primary" "$secondary"
bspc wm --adopt-orphans bspc wm --adopt-orphans
bspc desktop web --layout monocle bspc desktop web --layout monocle

1
.config/nixpkgs/home.nix Symbolic link
View file

@ -0,0 +1 @@
/home/tobias/.config/nixpkgs/portalo-tobias.nix

View file

@ -1 +0,0 @@
portalo-tobias.nix

View file

@ -1,11 +0,0 @@
{ config, pkgs, ... }:
{
home.username = "tobias";
home.homeDirectory = "/home/tobias";
imports = [
./common.nix
./graphical.nix
];
}

View file

@ -12,7 +12,7 @@
[module/check-arch-updates] [module/check-arch-updates]
type = custom/script type = custom/script
exec = wc -l $HOME/.cache/archlinux-updates.txt 2>/dev/null | sed 's/^0$//' exec = cat $HOME/.cache/archlinux-updates.txt | wc -l | sed 's/^0$//'
interval = 30 interval = 30
format-prefix = " " format-prefix = " "
@ -26,7 +26,7 @@
[module/bsp-layout] [module/bsp-layout]
type = custom/script type = custom/script
exec = bsp-layout get $(bspc query -D --names -d focused) | sed -E 's/^(-|tiled)$//m' exec = bsp-layout get $(bspc query -D --names -d focused)
interval = 0.1 interval = 0.1
format-prefix = " " format-prefix = " "
@ -40,11 +40,11 @@
[module/bsp-layout-primary] [module/bsp-layout-primary]
inherit = module/bsp-layout inherit = module/bsp-layout
exec = bsp-layout get $(bspc query -D --names -d ${MONITOR_PRIMARY}:focused) | sed -E 's/^(-|tiled)$//m' exec = bsp-layout get $(bspc query -D --names -d ${MONITOR_PRIMARY}:focused)
[module/bsp-layout-secondary] [module/bsp-layout-secondary]
inherit = module/bsp-layout inherit = module/bsp-layout
exec = bsp-layout get $(bspc query -D --names -d ${MONITOR_SECONDARY}:focused) | sed -E 's/^(-|tiled)$//m' exec = bsp-layout get $(bspc query -D --names -d ${MONITOR_SECONDARY}:focused)
[module/openweather] [module/openweather]
type = custom/script type = custom/script

View file

@ -16,7 +16,5 @@ elif [[ $host_name == *"laptop"* ]]; then
polybar laptop-primary & polybar laptop-primary &
polybar laptop-secondary & polybar laptop-secondary &
else else
#polybar base & polybar base &
polybar laptop-primary &
polybar laptop-secondary &
fi fi

View file

@ -1,6 +1,6 @@
#!/usr/bin/env sh #!/usr/bin/env sh
. "$HOME/.config/environment" . "$HOME/.config/environment.local"
get_icon() { get_icon() {
case $1 in case $1 in

View file