Compare commits

..

No commits in common. "4de2de5cf702617314b8e5cffcdb54d888ab0326" and "f683d77a39e8f0962f13d0569b98f64b80397fc9" have entirely different histories.

8 changed files with 31 additions and 56 deletions

View File

@ -1,3 +1,3 @@
swayidle -w \
timeout 6000 'systemctl hybrid-sleep' &
timeout 600 'systemctl hybrid-sleep' &

View File

@ -6,7 +6,7 @@ function die() {
START_DIR=$(pwd)
FILE_DIR="/opt/neovim"
FILE_NAME="nvim-linux-x86_64.appimage"
FILE_NAME="nvim.appimage"
FILE_URL="https://github.com/neovim/neovim/releases/download/nightly"
TMP_FILE=$(mktemp $FILE_DIR/nvim.XXXXXX.appimage)

View File

@ -11,12 +11,11 @@ unless (exists $ENV{'WAYLAND_DISPLAY'}) {
my $app = {};
$app->{'displays'} = {};
$app->{'setup'} = "";
get_display_info($app);
show_debug(Data::Dumper->Dump([$app]));
my $wlr_line = get_wlr_line($app);
notify($app);
print "${wlr_line}\n";
# -----------
@ -95,7 +94,6 @@ sub get_wlr_line {
my $num_disps = scalar(keys(%{$app->{'displays'}}));
if ($num_disps == 1) {
show_debug("Single display configuration");
$app->{'setup'} = "Single display configuration";
$wlr_line = "wlr-randr --output HDMI-A-1 --off --output eDP-1 --on --pos 0,0"
} elsif ($num_disps > 1) {
# Determine setup (Custom)
@ -106,7 +104,6 @@ sub get_wlr_line {
my ($h, $v) = get_display_current_dimensions($app, $matching_disps->[0]);
my $disp_name = $matching_disps->[0]->{'name'};
show_debug("Multiple display configuration: Den room");
$app->{'setup'} = "Multiple display configuration: Den room";
$wlr_line = "wlr-randr --output ${disp_name} --on --pos 0,0 --output eDP-1 --on --pos ${h},0";
}
@ -118,7 +115,6 @@ sub get_wlr_line {
my ($h, $v) = get_display_current_dimensions($app, $matching_disps->[0]);
my $disp_name = $matching_disps->[0]->{'name'};
show_debug("Multiple display configuration: Media room");
$app->{'setup'} = "Multiple display configuration: Media room";
$wlr_line = "wlr-randr --output ${disp_name} --on --pos 0,0 --output eDP-1 --on --pos 0,${v}";
}
@ -157,20 +153,9 @@ sub get_display_current_dimensions {
return ($disp->{'current_mode'}->{'horizontal'}, $disp->{'current_mode'}->{'vertical'});
}
# -----------
sub notify {
my ($app) = @_;
system("notify-send",
"--app-name=get_randr.pl",
"--icon=/usr/share/icons/Adwaita/scalable/devices/video-display.svg",
"--expire-time=5000",
"Display Configuration Changed", "Now set to - $app->{'setup'}");
}
# -----------
sub show_debug {
my ($str) = @_;
# UNCOMMENT TO DEBUG # print "[DEBUG] $str\n";
}

View File

@ -3,18 +3,15 @@
# Font
font-family = Iosevka Term
font-size = 15
font-size = 13
# Theme
# theme = MaterialOcean
theme = 0x96f
theme = MaterialOcean
# Cursor
cursor-color = #aa2222
cursor-opacity = 0.8
cursor-opacity = 0.6
cursor-style = block
cursor-style-blink = false
shell-integration-features = no-cursor
# Window
window-decoration = false

View File

@ -117,7 +117,7 @@ require('onedark').load()
-- See `:help vim.o`
if vim.g.neovide then
vim.o.guifont = "Iosevka Term:h15"
vim.o.guifont = "Iosevka Term:h13"
vim.g.neovide_scale_factor = 1.0
end

View File

@ -3,23 +3,14 @@
# --------------------------------
# Shell RC
# --------------------------------
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;41m\]$(hostnamectl hostname)\[\033[00m\]\[\033[01;34m\] \w\[\033[00m\] \$ '
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;41m\]$(hostname)\[\033[00m\]\[\033[01;34m\] \w\[\033[00m\] \$ '
#
# Variables
#
export EDITOR=n
export PATH=~/bin:$PATH
#
# Editor setup
#
export PATH=/opt/neovim:$PATH
export EDITOR=nvim
function n () {
/opt/neovim/nvim $* || nvim $*
}
#
# Aliases
#
@ -27,10 +18,20 @@ alias ls='ls -al --color'
alias q=exit
alias a=clear
alias h=history
alias e=$EDITOR
#
# Functions
#
function myvim () {
gvim $1 >& /dev/null &
disown %1
}
function n () {
/opt/neovim/nvim $* || nvim $*
}
function hgrep () {
history | grep $1
}
@ -41,10 +42,10 @@ function pgrep () {
function u2d () {
~mahesh/git/snips/get_neovim.sh
# ~mahesh/git/snips/get_wezterm.sh
~mahesh/git/snips/get_wezterm.sh
cd
if [ -e /etc/arch-release ]; then
pacman --sync --refresh --sysupgrade --noconfirm
pacman -Syu
elif [ -e /etc/debian_version ]; then
apt update && apt full-upgrade -y && apt autoremove -y
else

View File

@ -17,19 +17,9 @@ PS1='${debian_chroot:+($debian_chroot)}\[\033[01;92m\]$(hostnamectl hostname)\[\
#
# Variables
#
export PATH=~/bin:~/.local/bin:$PATH
export IGNOREEOF=50 # Ignore first 50 Ctrl-D on shell
export GPG_TTY=$(tty)
#
# Editor setup
#
export PATH=/opt/neovim:$PATH
#export EDITOR=vim
export EDITOR=nvim
function n () {
/opt/neovim/nvim $* || nvim $*
}
export PATH=~/bin:~/.local/bin:$PATH
#
# Aliases
@ -38,11 +28,18 @@ alias ls='ls -altrh --color'
alias q=exit
alias a=clear
alias h=history
alias e=$EDITOR
alias n=$EDITOR
alias gn='neovide --fork'
#
# Functions
#
function myvim () {
gvim $1 >& /dev/null &
disown %1
}
function pyedit () {
gedit $1 >& /dev/null &
disown %1
@ -59,7 +56,3 @@ function pgrep () {
function start_tmux () {
TERM=screen-256color tmux -u new -A -s DevEnv
}
function start_gitui() {
GPG_TTY=$(tty) gitui
}

View File

@ -49,7 +49,7 @@ ${if_existing /sys/class/net/enp3s0/operstate up}🌎 ${addr enp3s0}${else}\
${if_existing /sys/class/net/wlp4s0/operstate up}📶 ${addr wlp4s0}${else}\
${if_up eth0}🌎 ${addr eth0}${else}\
network down ${endif}${endif}${endif}${endif}${endif}${endif} \
${execi 600 curl 'wttr.in/~45.5202471,-122.6741948?u&format=%c%t'} \
${execi 600 curl 'wttr.in/~45.54,-122.83?u&format=%c%t'} \
🔊 ${execi 10 wpctl get-volume 53 | tail -1 | perl -ne 'm/([\d\.]+)/; print scalar (($1>1) ? 100 : ($1*100))'} \
${if_existing /sys/class/power_supply/ADP0/online 1}🔌${else}🔋${endif} ${battery_percent}% \
📅 ${time %Y %h %d} \
@ -58,7 +58,6 @@ ${if_existing /sys/class/power_supply/ADP0/online 1}🔌${else}🔋${endif} ${ba
--[[
Reference
${execi 600 curl 'wttr.in/~45.54,-122.83?u&format=%c%t'} \
🌡 ${execi 600 weather fips4105192520 | grep Tempera | awk '{print $2}'}°F | \
${execi 1 cat /tmp/dwl.tags.out} | \