Compare commits
45 Commits
b71231d96f
...
master
Author | SHA1 | Date | |
---|---|---|---|
d36941b3d1
|
|||
4de2de5cf7 | |||
8ef05d2a11
|
|||
257c6a0b38
|
|||
fd9de58b0f
|
|||
263aeed08f | |||
e986f0eabb | |||
267e505265 | |||
3f7e576869 | |||
f683d77a39 | |||
065f16607f | |||
a502df8e81 | |||
8bac906e77 | |||
9fef9181e1 | |||
430064c8de | |||
0aa36e8575 | |||
f5ab4aad25 | |||
5623991a73 | |||
2158f65d7a | |||
ff4ad34194 | |||
a018d06955 | |||
0ea7a9251f | |||
d9cca35b59 | |||
52e892a323 | |||
5e56166650 | |||
4225603852 | |||
6e4ee2efd2 | |||
52d9a2773d | |||
464d2a6a25 | |||
00c69cb17c | |||
70c89479ad | |||
1502bfe4b0 | |||
ab53be3749 | |||
c9e3e7ae53 | |||
4fd1cc8d31 | |||
aa98527ae6 | |||
8deae594e4 | |||
ccf2897cb8 | |||
7e3c5f1a73 | |||
48cce9e0c4 | |||
6739e1e280 | |||
c014c60534 | |||
09856a3d9f | |||
|
1b6e7bb311 | ||
|
b280ce46ba |
@@ -1,76 +1,39 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
echo "Entourage: $XDG_RUNTIME_DIR - $DWL_TAGS_FILE" >> $DWL_LOG_FILE
|
function log_this() {
|
||||||
|
TSTMP=$(date)
|
||||||
|
echo "$TSTMP : " $1 >> $DWL_LOG_FILE
|
||||||
|
}
|
||||||
|
|
||||||
NUM_DISPS=$(wlr-randr | egrep "^\w+" | wc -l)
|
log_this "Entourage: $XDG_RUNTIME_DIR"
|
||||||
echo "Entourage: Configuring ${NUM_DISPS} displays" >> $DWL_LOG_FILE
|
|
||||||
|
|
||||||
if [[ $NUM_DISPS > 1 ]]; then
|
|
||||||
# Dual screen
|
|
||||||
# wlr-randr --output HDMI-A-1 --on --pos 0,0 --output eDP-1 --on --pos 0,1050
|
|
||||||
# wlr-randr --output HDMI-A-1 --on --pos 0,0 --output eDP-1 --on --pos 2560,0
|
|
||||||
# With Dell 1920x1200 display
|
|
||||||
wlr-randr --output HDMI-A-1 --on --pos 0,0 --output eDP-1 --on --pos 0,1200
|
|
||||||
else
|
|
||||||
# Single laptop screen
|
|
||||||
wlr-randr --output HDMI-A-1 --off --output eDP-1 --on --pos 0,0
|
|
||||||
fi
|
|
||||||
|
|
||||||
# ----------------------------------------------------------
|
# ----------------------------------------------------------
|
||||||
# Let DWL start
|
# Let DWL start
|
||||||
# ----------------------------------------------------------
|
# ----------------------------------------------------------
|
||||||
while [ ! -e "$XDG_RUNTIME_DIR/wayland-0.lock" ]
|
while [ ! -e "$XDG_RUNTIME_DIR/wayland-0.lock" ]
|
||||||
do
|
do
|
||||||
echo "DWL getting ready..." >> $DWL_LOG_FILE
|
log_this "DWL getting ready..."
|
||||||
sleep 1
|
sleep 1
|
||||||
done
|
done
|
||||||
echo "DWL ready!" >> $DWL_LOG_FILE
|
log_this "DWL ready!"
|
||||||
echo "Entourage: " $DWL_TAGS_FILE >> $DWL_LOG_FILE
|
|
||||||
|
|
||||||
if [ -e /usr/local/bin/somebar ]; then
|
|
||||||
dbus-run-session /usr/local/bin/somebar > $XDG_RUNTIME_DIR/somebar.log &
|
|
||||||
(sleep 2 && conky -c ~/.conkyrc > $XDG_RUNTIME_DIR/somebar-0) &
|
|
||||||
echo "Entourage: Started somebar " >> $DWL_LOG_FILE
|
|
||||||
else
|
|
||||||
DISPLAYS=$(wlr-randr | perl -ne 'print "$1 " if /^([\w-]+)/')
|
|
||||||
DISP_NUM=$(expr 0)
|
|
||||||
for DISP in $DISPLAYS; do
|
|
||||||
DISP_NUM=$(expr $DISP_NUM + 1)
|
|
||||||
TF=${DWL_TAGS_FILE}.${DISP}
|
|
||||||
# ----------------------------------------------------------
|
|
||||||
# Top bar for displaying DWL tags
|
|
||||||
# ----------------------------------------------------------
|
|
||||||
# Dependency - needs inotify-tools package
|
|
||||||
echo "Entourage: Monitor - ${DISP_NUM} ${DISP}, new tags file " ${TF} >> $DWL_LOG_FILE
|
|
||||||
touch ${TF}
|
|
||||||
inotifywait -q -m -e close_write ${TF} |
|
|
||||||
(cat ${TF} ;
|
|
||||||
while read -r filename event; do
|
|
||||||
cat ${TF}
|
|
||||||
done) | dtao -z -z -xs ${DISP_NUM} -ta l -tw 100 -expand r -h 22 -fn 'Iosevka:style=Regular:size=12' &
|
|
||||||
# ----------------------------------------------------------
|
|
||||||
# Bottom bar for displaying context information
|
|
||||||
# ----------------------------------------------------------
|
|
||||||
(conky -c ~/.conkyrc) | dtao -xs ${DISP_NUM} -ta r -tw 100 -expand l -h 22 -fn 'Iosevka:style=Regular:size=12' &
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
|
|
||||||
# ----------------------------------------------------------
|
# ----------------------------------------------------------
|
||||||
# Background
|
# Background and support tasks
|
||||||
# ----------------------------------------------------------
|
# ----------------------------------------------------------
|
||||||
# TODO: Consuimng too much CPU - keeps fan spinning
|
# TODO: Consuimng too much CPU - keeps fan spinning
|
||||||
# swaybg --mode fill --image ~/.config/wallpaper.jpg &
|
# source ~/bin/dwl.wallpaper_setup
|
||||||
|
|
||||||
# ----------------------------------------------------------
|
log_this "Entourage: Starting screen locker with 10min idle time"
|
||||||
# Lock when idle
|
source ~/bin/dwl.idle_setup
|
||||||
# ----------------------------------------------------------
|
|
||||||
swayidle -w timeout 600 swaylock &
|
|
||||||
|
|
||||||
# ----------------------------------------------------------
|
log_this "Entourage: Configuring $(wlr-randr | grep -E "^\w+" | wc -l) displays"
|
||||||
# Redirect STDIN to STDOUT and pass along to tags script
|
source ~/bin/dwl.randr_setup
|
||||||
# ----------------------------------------------------------
|
|
||||||
(while read line
|
|
||||||
do
|
|
||||||
echo $line
|
|
||||||
done) | dwltags.pl --file $DWL_TAGS_FILE
|
|
||||||
|
|
||||||
|
log_this "Entourage: Setting up notification"
|
||||||
|
source ~/bin/dwl.notification_setup
|
||||||
|
|
||||||
|
log_this "Entourage: Setting up MPD support"
|
||||||
|
source ~/bin/dwl.mpd_support_setup
|
||||||
|
|
||||||
|
log_this "Entourage: Starting somebar using $SOMEBAR_FIFO"
|
||||||
|
source ~/bin/dwl.bar_setup
|
||||||
|
@@ -1,9 +1,12 @@
|
|||||||
# Systemd service to start DWL
|
# Systemd service to start DWL
|
||||||
# ----------------------------------------------------------
|
# ----------------------------------------------------------
|
||||||
#
|
#
|
||||||
# Put this file in following directory:
|
# Symlink this file in following directory as follows:
|
||||||
#
|
#
|
||||||
# ~/.config/systemd/user
|
# $ cd ~/.config/systemd/user
|
||||||
|
# $ ln -s <snips>/dwl.service dwl@.service
|
||||||
|
#
|
||||||
|
# Be sure to link it as a named service with (@.service)
|
||||||
#
|
#
|
||||||
# Start this service with something like this:
|
# Start this service with something like this:
|
||||||
#
|
#
|
||||||
@@ -36,6 +39,8 @@ Environment=XDG_RUNTIME_DIR=%I
|
|||||||
Environment=DWL_TAGS_FILE=%I/dwl.tags
|
Environment=DWL_TAGS_FILE=%I/dwl.tags
|
||||||
Environment=DWL_LOG_FILE=%I/dwl.log
|
Environment=DWL_LOG_FILE=%I/dwl.log
|
||||||
Environment=DWLTAGS_FMT=DZEN
|
Environment=DWLTAGS_FMT=DZEN
|
||||||
|
Environment=XDG_CURRENT_DESKTOP=DWL
|
||||||
|
Environment=PIPEWIRE_RUNTIME_DIR=/run/user/501
|
||||||
ExecStart=%h/bin/dwl.session
|
ExecStart=%h/bin/dwl.session
|
||||||
Restart=on-failure
|
Restart=on-failure
|
||||||
RestartSec=1
|
RestartSec=1
|
||||||
|
10
dwl.session
10
dwl.session
@@ -2,6 +2,14 @@
|
|||||||
|
|
||||||
echo $XDG_RUNTIME_DIR used for Wayland session
|
echo $XDG_RUNTIME_DIR used for Wayland session
|
||||||
export WLR_LIBINPUT_NO_DEVICES=1
|
export WLR_LIBINPUT_NO_DEVICES=1
|
||||||
|
|
||||||
|
export DWL_PATH=/usr/local/bin
|
||||||
|
# export DWL_PATH=/home/mahesh/git/furnish/heshapps_dwl
|
||||||
|
export DWL_BAR_PATH=/usr/local/bin
|
||||||
|
# export DWL_BAR_PATH=/home/mahesh/git/somebar_20240217/build
|
||||||
|
export DWL_BAR=$DWL_BAR_PATH/somebar
|
||||||
|
export SOMEBAR_FIFO=$XDG_RUNTIME_DIR/somebar.fifo
|
||||||
|
|
||||||
# export DWLTAGS_SHOW_MON=1
|
# export DWLTAGS_SHOW_MON=1
|
||||||
export PATH=~/bin:$PATH
|
export PATH=~/bin:$PATH
|
||||||
# export DWL_LOG_VERBOSE=1
|
# export DWL_LOG_VERBOSE=1
|
||||||
@@ -9,4 +17,4 @@ export PATH=~/bin:$PATH
|
|||||||
echo "Session: in $XDG_RUNTIME_DIR" >> $DWL_LOG_FILE
|
echo "Session: in $XDG_RUNTIME_DIR" >> $DWL_LOG_FILE
|
||||||
env
|
env
|
||||||
|
|
||||||
exec /usr/local/bin/dwl -s $HOME/bin/dwl.entourage
|
exec $DWL_PATH/dwl -s $HOME/bin/dwl.entourage
|
||||||
|
16
dwl.switch_context
Executable file
16
dwl.switch_context
Executable file
@@ -0,0 +1,16 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
function log_this() {
|
||||||
|
TSTMP=$(date)
|
||||||
|
echo "$TSTMP : " $1 >> $DWL_LOG_FILE
|
||||||
|
}
|
||||||
|
|
||||||
|
# ----------------------------------------------------------
|
||||||
|
# Let DWL start
|
||||||
|
# ----------------------------------------------------------
|
||||||
|
|
||||||
|
log_this "Switch Context: Configuring $(wlr-randr | grep -E "^\w+" | wc -l) displays"
|
||||||
|
source ~/bin/dwl.randr_setup
|
||||||
|
|
||||||
|
log_this "Switch Context: Starting somebar using $SOMEBAR_FIFO"
|
||||||
|
source ~/bin/dwl.bar_setup
|
89
dwl_act
Executable file
89
dwl_act
Executable file
@@ -0,0 +1,89 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
act=$1
|
||||||
|
timestamp=$(date)
|
||||||
|
|
||||||
|
echo "$0 - $timestamp - $act" >> ~/dwl_key_act.log
|
||||||
|
|
||||||
|
# In Wayland, use the following like X11's xev:
|
||||||
|
#
|
||||||
|
# % wev | grep "sym"
|
||||||
|
#
|
||||||
|
|
||||||
|
case $act in
|
||||||
|
# Without modifier
|
||||||
|
vol_mute) wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle;;
|
||||||
|
vol_lower) wpctl set-volume --limit 1.0 @DEFAULT_AUDIO_SINK@ 10%-;;
|
||||||
|
vol_raise) wpctl set-volume --limit 1.0 @DEFAULT_AUDIO_SINK@ 10%+;;
|
||||||
|
mic_mute) rofi -show sound -modes "sound:~/bin/rofi_sound.pl";;
|
||||||
|
bright_low) echo 20 >> /sys/class/backlight/intel_backlight/brightness;;
|
||||||
|
bright_high) echo 200 >> /sys/class/backlight/intel_backlight/brightness;;
|
||||||
|
media_toggle) mpc toggle;; # XF86AudioPlay
|
||||||
|
media_stop) mpc stop;; # XF86AudioStop
|
||||||
|
media_prev) mpc prev;; # XF86AudioPrev
|
||||||
|
media_next) mpc next;; # XF86AudioNext
|
||||||
|
disp) /home/mahesh/bin/switch_context.sh;;
|
||||||
|
# wlan) ;;
|
||||||
|
# tools) ;;
|
||||||
|
# search) ;;
|
||||||
|
launch) wldash;;
|
||||||
|
# explore) ;;
|
||||||
|
print) grim -c -g "$(slurp -o -r -c '#ff0000ff')" -t ppm - | satty --filename - --fullscreen --output-filename ~/Screenshots/satty-$(date '+%Y%m%d-%H:%M:%S').png ;;
|
||||||
|
|
||||||
|
# With CTRL modifier
|
||||||
|
# C_vol_mute) ;;
|
||||||
|
# C_vol_lower) ;;
|
||||||
|
# C_vol_raise) ;;
|
||||||
|
# C_mic_mute) ;;
|
||||||
|
# C_bright_low) ;;
|
||||||
|
# C_bright_high) ;;
|
||||||
|
# C_media_toggle) ;;
|
||||||
|
# C_media_stop) ;;
|
||||||
|
# C_media_prev) ;;
|
||||||
|
# C_media_next) ;;
|
||||||
|
# C_disp) ;;
|
||||||
|
# C_wlan) ;;
|
||||||
|
# C_tools) ;;
|
||||||
|
# C_search) ;;
|
||||||
|
# C_launch) ;;
|
||||||
|
# C_explore) ;;
|
||||||
|
C_print) grim -c -g "$(slurp -d -c '#0000ffff')" -t ppm - | satty --filename - --fullscreen --output-filename ~/Screenshots/satty-$(date '+%Y%m%d-%H:%M:%S').png ;;
|
||||||
|
|
||||||
|
# With SHIFT modifier
|
||||||
|
# S_vol_mute) ;;
|
||||||
|
# S_vol_lower) ;;
|
||||||
|
# S_vol_raise) ;;
|
||||||
|
# S_mic_mute) ;;
|
||||||
|
# S_bright_low) ;;
|
||||||
|
# S_bright_high) ;;
|
||||||
|
# S_media_toggle) ;;
|
||||||
|
# S_media_stop) ;;
|
||||||
|
# S_media_prev) ;;
|
||||||
|
# S_media_next) ;;
|
||||||
|
# S_disp) ;;
|
||||||
|
# S_wlan) ;;
|
||||||
|
# S_tools) ;;
|
||||||
|
# S_search) ;;
|
||||||
|
# S_launch) ;;
|
||||||
|
# S_explore) ;;
|
||||||
|
# S_print) ;;
|
||||||
|
|
||||||
|
# With SHIFT+CTRL modifiers
|
||||||
|
# SC_vol_mute) ;;
|
||||||
|
# SC_vol_lower) ;;
|
||||||
|
# SC_vol_raise) ;;
|
||||||
|
# SC_mic_mute) ;;
|
||||||
|
# SC_bright_low) ;;
|
||||||
|
# SC_bright_high) ;;
|
||||||
|
# SC_media_toggle) ;;
|
||||||
|
# SC_media_stop) ;;
|
||||||
|
# SC_media_prev) ;;
|
||||||
|
# SC_media_next) ;;
|
||||||
|
# SC_disp) ;;
|
||||||
|
# SC_wlan) ;;
|
||||||
|
# SC_tools) ;;
|
||||||
|
# SC_search) ;;
|
||||||
|
# SC_launch) ;;
|
||||||
|
|
||||||
|
*) echo "Unknown action '$act'";;
|
||||||
|
esac
|
9
dwl_entourage/dwl.bar_setup
Normal file
9
dwl_entourage/dwl.bar_setup
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
|
||||||
|
killall conky
|
||||||
|
killall somebar
|
||||||
|
|
||||||
|
mkfifo $SOMEBAR_FIFO -m666
|
||||||
|
conky -c ~/.conkyrc > $SOMEBAR_FIFO &
|
||||||
|
|
||||||
|
$DWL_BAR -s $SOMEBAR_FIFO > $XDG_RUNTIME_DIR/somebar.log 2>&1
|
||||||
|
|
3
dwl_entourage/dwl.idle_setup
Normal file
3
dwl_entourage/dwl.idle_setup
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
|
||||||
|
swayidle -w \
|
||||||
|
timeout 6000 'systemctl hybrid-sleep' &
|
2
dwl_entourage/dwl.mpd_support_setup
Normal file
2
dwl_entourage/dwl.mpd_support_setup
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
|
||||||
|
musnify-mpd -h localhost -p 6600 &
|
9
dwl_entourage/dwl.notification_setup
Normal file
9
dwl_entourage/dwl.notification_setup
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
|
||||||
|
# mako --font "Iosevka Term" \
|
||||||
|
# --background-color "#777777AA" \
|
||||||
|
# --text-color "#EEEEEE" \
|
||||||
|
# --border-color "#777777AA" \
|
||||||
|
# --border-radius 5 \
|
||||||
|
# --default-timeout 5000 &
|
||||||
|
|
||||||
|
swaync &
|
3
dwl_entourage/dwl.randr_setup
Normal file
3
dwl_entourage/dwl.randr_setup
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
|
||||||
|
cmd=$(get_randr.pl)
|
||||||
|
$cmd
|
3
dwl_entourage/dwl.wallpaper_setup
Normal file
3
dwl_entourage/dwl.wallpaper_setup
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
|
||||||
|
swaybg --mode fill --image ~/.config/wallpaper.jpg &
|
||||||
|
|
59
get_neovim.sh
Executable file
59
get_neovim.sh
Executable file
@@ -0,0 +1,59 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
function die() {
|
||||||
|
echo "ERROR! $1" && exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
START_DIR=$(pwd)
|
||||||
|
FILE_DIR="/opt/neovim"
|
||||||
|
FILE_NAME="nvim-linux-x86_64.appimage"
|
||||||
|
FILE_URL="https://github.com/neovim/neovim/releases/download/nightly"
|
||||||
|
TMP_FILE=$(mktemp $FILE_DIR/nvim.XXXXXX.appimage)
|
||||||
|
|
||||||
|
echo "Downloading latest nightly $FILE_NAME to $TMP_FILE"
|
||||||
|
# curl -L -o $TMP_FILE $FILE_URL/$FILE_NAME || die "Can't cURL $FILE_NAME"
|
||||||
|
wget -O $TMP_FILE $FILE_URL/$FILE_NAME > /dev/null 2>&1 || die "Can't cURL $FILE_NAME"
|
||||||
|
|
||||||
|
chmod +x $TMP_FILE || die "Can't chmod $TMP_FILE"
|
||||||
|
|
||||||
|
NEWVER=$($TMP_FILE --version | head -1)
|
||||||
|
EXTVER=$(test -e $FILE_DIR/.version && cat $FILE_DIR/.version || echo "")
|
||||||
|
echo "Version check - New version ($NEWVER) =?= current ($EXTVER)"
|
||||||
|
|
||||||
|
if [ "$NEWVER" == "$EXTVER" ]; then
|
||||||
|
echo "Not updating. New version ($NEWVER) same as current ($EXTVER)"
|
||||||
|
else
|
||||||
|
if [ -e $FILE_NAME ]; then
|
||||||
|
rm $FILE_NAME || die "Can't remove $FILE_NAME"
|
||||||
|
echo "Removed $FILE_NAME"
|
||||||
|
fi
|
||||||
|
cp $TMP_FILE $FILE_DIR/$FILE_NAME || die "Can't copy $TMP_FILE to $FILE_NAME"
|
||||||
|
|
||||||
|
echo "Making $FILE_DIR/$FILE_NAME executable"
|
||||||
|
chmod +x $FILE_DIR/$FILE_NAME || die "Can't chmod $FILE_DIR/$FILE_NAME"
|
||||||
|
|
||||||
|
echo $NEWVER > $FILE_DIR/.version || die "Can't write $FILE_DIR/.version"
|
||||||
|
|
||||||
|
# Extract nvim for other (non-root) users to run
|
||||||
|
if [ -d "$FILE_DIR/squashfs-root" ]; then
|
||||||
|
rm -rf $FILE_DIR/squashfs-root || die "Can't delete $FILE_DIR/squashfs-root"
|
||||||
|
fi
|
||||||
|
|
||||||
|
cd $FILE_DIR
|
||||||
|
|
||||||
|
echo "Extracting $NEWVER"
|
||||||
|
$TMP_FILE --appimage-extract > /dev/null 2>&1 || die "Can't extract appimage $FILE_NAME"
|
||||||
|
if [ -L "$FILE_DIR/nvim" ]; then
|
||||||
|
rm $FILE_DIR/nvim || die "Can't remove $FILE_DIR/nvim"
|
||||||
|
fi
|
||||||
|
if [ -x "$FILE_DIR/squashfs-root/AppRun" ]; then
|
||||||
|
ln -s $FILE_DIR/squashfs-root/AppRun nvim
|
||||||
|
else
|
||||||
|
die "$FILE_DIR/squash-root/AppRun not executable"
|
||||||
|
fi
|
||||||
|
cd $START_DIR
|
||||||
|
|
||||||
|
echo "Version $NEWVER ready!"
|
||||||
|
fi
|
||||||
|
rm $TMP_FILE || die "Can't delete $TMP_FILE"
|
||||||
|
echo "Done with Neovim"
|
176
get_randr.pl
Executable file
176
get_randr.pl
Executable file
@@ -0,0 +1,176 @@
|
|||||||
|
#!/usr/bin/env perl
|
||||||
|
|
||||||
|
use strict;
|
||||||
|
use warnings;
|
||||||
|
|
||||||
|
use Data::Dumper;
|
||||||
|
|
||||||
|
unless (exists $ENV{'WAYLAND_DISPLAY'}) {
|
||||||
|
die "Not running in WAYLAND";
|
||||||
|
}
|
||||||
|
|
||||||
|
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";
|
||||||
|
|
||||||
|
# -----------
|
||||||
|
# Subroutines
|
||||||
|
# -----------
|
||||||
|
sub get_display_info {
|
||||||
|
my ($app) = @_;
|
||||||
|
|
||||||
|
open (my $RANDRH, "wlr-randr |") or die "Couldn't run wlr-randr";
|
||||||
|
my @lines = map { chomp(); $_ } <$RANDRH>;
|
||||||
|
close ($RANDRH);
|
||||||
|
|
||||||
|
my $state = "IDLE";
|
||||||
|
my $curr_disp = "UNDEF";
|
||||||
|
my $disp_info = {};
|
||||||
|
|
||||||
|
foreach my $ln (@lines) {
|
||||||
|
if (my ($dn, $dd) = $ln =~ /^(\S+)\s+"([^"]+)"$/) {
|
||||||
|
$state = "IN_DISP";
|
||||||
|
|
||||||
|
unless (exists $disp_info->{$dn}) {
|
||||||
|
$disp_info->{$dn} = {};
|
||||||
|
$disp_info->{$dn}->{'name'} = $dn;
|
||||||
|
$curr_disp = $dn;
|
||||||
|
|
||||||
|
$disp_info->{$dn}->{'desc'} = $dd;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (($state eq "IN_DISP") || ($state eq "IN_MODES")) {
|
||||||
|
if (my ($k,$v) = $ln =~ /\s+(\w+)\s*:\s*(.*)?$/) {
|
||||||
|
if ($k eq "Modes") {
|
||||||
|
$state = "IN_MODES";
|
||||||
|
$disp_info->{$curr_disp}->{'modes'} = [];
|
||||||
|
} else {
|
||||||
|
$disp_info->{$curr_disp}->{$k} = $v;
|
||||||
|
$state = "IN_DISP"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ($state eq "IN_MODES") {
|
||||||
|
if (my ($mode_string) = $ln =~ /\s+(.+)$/) {
|
||||||
|
# 1920x1080 px, 60.000999 Hz (preferred, current)
|
||||||
|
my ($h, $v, $f, $a) = $mode_string =~ /(\d+)x(\d+)\s*px,\s*(\S+)\s*Hz\s*\((.*)\)$/;
|
||||||
|
my $mode_info = {};
|
||||||
|
$mode_info->{'horizontal'} = $h;
|
||||||
|
$mode_info->{'vertical'} = $v;
|
||||||
|
$mode_info->{'refresh_freq'} = $f;
|
||||||
|
if (defined $a) {
|
||||||
|
$mode_info->{'attributes'} = [split (/\s*,\s*/, $a)];
|
||||||
|
if ($a =~ /current/) {
|
||||||
|
$disp_info->{$curr_disp}->{'current_mode'} = $mode_info;
|
||||||
|
}
|
||||||
|
if ($a =~ /preferred/) {
|
||||||
|
$disp_info->{$curr_disp}->{'preferred_mode'} = $mode_info;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
push(@{$disp_info->{$curr_disp}->{'modes'}}, $mode_info);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
# show_debug("$state: $ln");
|
||||||
|
}
|
||||||
|
|
||||||
|
$app->{'displays'} = $disp_info;
|
||||||
|
}
|
||||||
|
|
||||||
|
# -----------
|
||||||
|
sub get_wlr_line {
|
||||||
|
my ($app) = @_;
|
||||||
|
my $matching_disps;
|
||||||
|
|
||||||
|
my $wlr_line = "UNKNOWN";
|
||||||
|
|
||||||
|
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)
|
||||||
|
#
|
||||||
|
# - Den room (DELL 27" monitor on the left of laptop display)
|
||||||
|
$matching_disps = has_display_with_name($app, "DELL U27");
|
||||||
|
if (scalar (@{$matching_disps}) == 1) {
|
||||||
|
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";
|
||||||
|
}
|
||||||
|
|
||||||
|
#
|
||||||
|
# - Media room (DELL 24" monitor above laptop display)
|
||||||
|
$matching_disps = has_display_with_name($app, "DELL U24");
|
||||||
|
if (scalar (@{$matching_disps}) == 1) {
|
||||||
|
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}";
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
show_debug("No displays?!");
|
||||||
|
}
|
||||||
|
|
||||||
|
# Adjust scale on Apple pane. Assumes that above lines always put eDP-1 as the last display
|
||||||
|
$matching_disps = has_display_with_name($app, "Apple Computer");
|
||||||
|
if (scalar (@{$matching_disps}) == 1) {
|
||||||
|
show_debug("Scaling Apple MacBook Pro display");
|
||||||
|
|
||||||
|
$wlr_line .= " --scale 1.5";
|
||||||
|
}
|
||||||
|
|
||||||
|
return $wlr_line;
|
||||||
|
}
|
||||||
|
|
||||||
|
# -----------
|
||||||
|
sub has_display_with_name {
|
||||||
|
my ($app, $name) = @_;
|
||||||
|
my $found = [];
|
||||||
|
|
||||||
|
foreach my $k (keys %{$app->{'displays'}}) {
|
||||||
|
if ($app->{'displays'}->{$k}->{'desc'} =~ /$name/) {
|
||||||
|
push(@{$found}, $app->{'displays'}->{$k});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $found;
|
||||||
|
}
|
||||||
|
|
||||||
|
# -----------
|
||||||
|
sub get_display_current_dimensions {
|
||||||
|
my ($app, $disp) = @_;
|
||||||
|
|
||||||
|
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";
|
||||||
|
}
|
||||||
|
|
59
get_wezterm.sh
Executable file
59
get_wezterm.sh
Executable file
@@ -0,0 +1,59 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
function die() {
|
||||||
|
echo "ERROR! $1" && exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
START_DIR=$(pwd)
|
||||||
|
FILE_DIR="/opt/wezterm"
|
||||||
|
FILE_NAME="WezTerm-nightly-Ubuntu20.04.AppImage"
|
||||||
|
FILE_URL="https://github.com/wez/wezterm/releases/download/nightly"
|
||||||
|
TMP_FILE=$(mktemp $FILE_DIR/wezterm.XXXXXX.appimage)
|
||||||
|
|
||||||
|
echo "Downloading latest nightly $FILE_NAME to $TMP_FILE"
|
||||||
|
# curl -L -o $TMP_FILE $FILE_URL/$FILE_NAME || die "Can't cURL $FILE_NAME"
|
||||||
|
wget -O $TMP_FILE $FILE_URL/$FILE_NAME > /dev/null 2>&1 || die "Can't cURL $FILE_NAME"
|
||||||
|
|
||||||
|
chmod +x $TMP_FILE || die "Can't chmod $TMP_FILE"
|
||||||
|
|
||||||
|
NEWVER=$($TMP_FILE --version | head -1)
|
||||||
|
EXTVER=$(test -e $FILE_DIR/.version && cat $FILE_DIR/.version || echo "")
|
||||||
|
echo "Version check - New version ($NEWVER) =?= current ($EXTVER)"
|
||||||
|
|
||||||
|
if [ "$NEWVER" == "$EXTVER" ]; then
|
||||||
|
echo "Not updating. New version ($NEWVER) same as current ($EXTVER)"
|
||||||
|
else
|
||||||
|
if [ -e $FILE_NAME ]; then
|
||||||
|
rm $FILE_NAME || die "Can't remove $FILE_NAME"
|
||||||
|
echo "Removed $FILE_NAME"
|
||||||
|
fi
|
||||||
|
cp $TMP_FILE $FILE_DIR/$FILE_NAME || die "Can't copy $TMP_FILE to $FILE_NAME"
|
||||||
|
|
||||||
|
echo "Making $FILE_DIR/$FILE_NAME executable"
|
||||||
|
chmod +x $FILE_DIR/$FILE_NAME || die "Can't chmod $FILE_DIR/$FILE_NAME"
|
||||||
|
|
||||||
|
echo $NEWVER > $FILE_DIR/.version || die "Can't write $FILE_DIR/.version"
|
||||||
|
|
||||||
|
# Extract wezterm for other (non-root) users to run
|
||||||
|
if [ -d "$FILE_DIR/squashfs-root" ]; then
|
||||||
|
rm -rf $FILE_DIR/squashfs-root || die "Can't delete $FILE_DIR/squashfs-root"
|
||||||
|
fi
|
||||||
|
|
||||||
|
cd $FILE_DIR
|
||||||
|
|
||||||
|
echo "Extracting $NEWVER"
|
||||||
|
$TMP_FILE --appimage-extract > /dev/null 2>&1 || die "Can't extract appimage $FILE_NAME"
|
||||||
|
if [ -L "$FILE_DIR/wezterm" ]; then
|
||||||
|
rm $FILE_DIR/wezterm || die "Can't remove $FILE_DIR/wezterm"
|
||||||
|
fi
|
||||||
|
if [ -x "$FILE_DIR/squashfs-root/AppRun" ]; then
|
||||||
|
ln -s $FILE_DIR/squashfs-root/AppRun wezterm
|
||||||
|
else
|
||||||
|
die "$FILE_DIR/squash-root/AppRun not executable"
|
||||||
|
fi
|
||||||
|
cd $START_DIR
|
||||||
|
|
||||||
|
echo "Version $NEWVER ready!"
|
||||||
|
fi
|
||||||
|
rm $TMP_FILE || die "Can't delete $TMP_FILE"
|
||||||
|
echo "Done with Wezterm"
|
23
ghostty.config
Normal file
23
ghostty.config
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
# Ghostty configuration
|
||||||
|
# ---------------------
|
||||||
|
|
||||||
|
# Font
|
||||||
|
font-family = Iosevka Term
|
||||||
|
font-size = 15
|
||||||
|
|
||||||
|
# Theme
|
||||||
|
# theme = MaterialOcean
|
||||||
|
theme = 0x96f
|
||||||
|
|
||||||
|
# Cursor
|
||||||
|
cursor-color = #aa2222
|
||||||
|
cursor-opacity = 0.8
|
||||||
|
cursor-style = block
|
||||||
|
cursor-style-blink = false
|
||||||
|
shell-integration-features = no-cursor
|
||||||
|
|
||||||
|
# Window
|
||||||
|
window-decoration = false
|
||||||
|
window-padding-x = 5
|
||||||
|
window-padding-y = 5
|
||||||
|
window-padding-balance = true
|
@@ -72,9 +72,9 @@
|
|||||||
"Plug 'Shougo/denite.nvim'
|
"Plug 'Shougo/denite.nvim'
|
||||||
Plug 'ctrlpvim/ctrlp.vim'
|
Plug 'ctrlpvim/ctrlp.vim'
|
||||||
Plug 'asolkar/vim-color-molokini'
|
Plug 'asolkar/vim-color-molokini'
|
||||||
Plug 'flrnprz/plastic.vim'
|
|
||||||
Plug 'nathanaelkane/vim-indent-guides'
|
Plug 'nathanaelkane/vim-indent-guides'
|
||||||
Plug 'luochen1990/rainbow'
|
Plug 'luochen1990/rainbow'
|
||||||
|
Plug 'https://gitlab.devtools.intel.com/masolkar/vim-iosf.git' " intel
|
||||||
Plug 'vhda/verilog_systemverilog.vim'
|
Plug 'vhda/verilog_systemverilog.vim'
|
||||||
Plug 'nanotech/jellybeans.vim'
|
Plug 'nanotech/jellybeans.vim'
|
||||||
|
|
||||||
@@ -94,9 +94,9 @@
|
|||||||
if has("nvim")
|
if has("nvim")
|
||||||
else
|
else
|
||||||
if has("mac")
|
if has("mac")
|
||||||
set guifont=Iosevka-Term:h16
|
set guifont=Iosevka-Term:h20
|
||||||
elseif has("win32")
|
elseif has("win32")
|
||||||
set guifont=Iosevka\ Term\ Regular\ 13
|
set guifont=Iosevka\ Term\ Regular\ 15
|
||||||
else
|
else
|
||||||
set guifont=Iosevka\ Term\ Regular\ 13.5
|
set guifont=Iosevka\ Term\ Regular\ 13.5
|
||||||
end
|
end
|
||||||
@@ -104,7 +104,7 @@
|
|||||||
|
|
||||||
set columns=120 lines=54
|
set columns=120 lines=54
|
||||||
|
|
||||||
" Hide/Show menu and tool bar
|
" Hide/Show menu and tool bar
|
||||||
function! ToggleGUICruft()
|
function! ToggleGUICruft()
|
||||||
if &guioptions=='iaA'
|
if &guioptions=='iaA'
|
||||||
exec('set guioptions=imTrLaA')
|
exec('set guioptions=imTrLaA')
|
||||||
@@ -132,9 +132,9 @@
|
|||||||
set colorcolumn=120
|
set colorcolumn=120
|
||||||
endif
|
endif
|
||||||
|
|
||||||
let g:molokini_gui_italic = 0
|
"let g:molokini_gui_italic = 0
|
||||||
colorscheme molokini
|
colorscheme molokini
|
||||||
"colorscheme deus
|
|
||||||
set norelativenumber
|
set norelativenumber
|
||||||
set number
|
set number
|
||||||
|
|
||||||
@@ -215,6 +215,10 @@
|
|||||||
|
|
||||||
let g:rainbow_active = 1 "0 if you want to enable it later via :RainbowToggle
|
let g:rainbow_active = 1 "0 if you want to enable it later via :RainbowToggle
|
||||||
|
|
||||||
|
let g:iosftrk_folddisable = 1 " intel
|
||||||
|
let g:iosfsbtrk_folddisable = 1 " intel
|
||||||
|
|
||||||
|
let g:fugitive_git_executable = '/usr/intel/bin/git' " intel
|
||||||
" }}}
|
" }}}
|
||||||
|
|
||||||
" Key bindings {{{
|
" Key bindings {{{
|
||||||
@@ -279,6 +283,8 @@
|
|||||||
"
|
"
|
||||||
" File associations {{{
|
" File associations {{{
|
||||||
|
|
||||||
|
au! BufRead,BufNewFile *_iosf*_trk.out set filetype=iosftrk " intel
|
||||||
|
au! BufRead,BufNewFile *_iosfsb*_trk.out set filetype=iosfsbtrk " intel
|
||||||
au! BufRead,BufNewFile * RainbowToggleOn
|
au! BufRead,BufNewFile * RainbowToggleOn
|
||||||
|
|
||||||
" }}}
|
" }}}
|
||||||
|
280
nvim.init.lazy.lua
Normal file
280
nvim.init.lazy.lua
Normal file
@@ -0,0 +1,280 @@
|
|||||||
|
-- Install Lazy package
|
||||||
|
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||||
|
if not vim.loop.fs_stat(lazypath) then
|
||||||
|
vim.fn.system({
|
||||||
|
"git",
|
||||||
|
"clone",
|
||||||
|
"--filter=blob:none",
|
||||||
|
"https://github.com/folke/lazy.nvim.git",
|
||||||
|
"--branch=stable", -- latest stable release
|
||||||
|
lazypath,
|
||||||
|
})
|
||||||
|
end
|
||||||
|
vim.opt.rtp:prepend(lazypath)
|
||||||
|
|
||||||
|
-- Lazy setup
|
||||||
|
require("lazy").setup({
|
||||||
|
-- Config
|
||||||
|
defaults = {
|
||||||
|
lazy = true
|
||||||
|
},
|
||||||
|
|
||||||
|
-- Packages
|
||||||
|
"asolkar/vim-color-molokini",
|
||||||
|
"navarasu/onedark.nvim",
|
||||||
|
"kyazdani42/nvim-web-devicons",
|
||||||
|
"nvim-lualine/lualine.nvim",
|
||||||
|
"preservim/nerdtree",
|
||||||
|
"tpope/vim-fugitive",
|
||||||
|
"mhinz/vim-signify",
|
||||||
|
"lewis6991/gitsigns.nvim",
|
||||||
|
"mg979/vim-visual-multi",
|
||||||
|
"jiangmiao/auto-pairs",
|
||||||
|
"luochen1990/rainbow",
|
||||||
|
"tpope/vim-surround",
|
||||||
|
"nathanaelkane/vim-indent-guides",
|
||||||
|
-- "https://github.com/intel-sandbox/vim-iosf.git", -- intel
|
||||||
|
-- "https://github.com/intel-sandbox/vim-pcietrk", -- intel
|
||||||
|
"vhda/verilog_systemverilog.vim",
|
||||||
|
{
|
||||||
|
'nvim-telescope/telescope.nvim', tag = '0.1.2',
|
||||||
|
dependencies = { 'nvim-lua/plenary.nvim' }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'nvim-telescope/telescope-fzf-native.nvim',
|
||||||
|
-- build = 'cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build --config Release && cmake --install build --prefix build'
|
||||||
|
build = 'make'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
-- LuaLine
|
||||||
|
require('lualine').setup {
|
||||||
|
options = {
|
||||||
|
icons_enabled = false,
|
||||||
|
theme = 'nightfly',
|
||||||
|
section_separators = { left = '', right = '' },
|
||||||
|
component_separators = { left = '', right = '' }
|
||||||
|
},
|
||||||
|
sections = {
|
||||||
|
lualine_c = {
|
||||||
|
{
|
||||||
|
'filename',
|
||||||
|
path = 2,
|
||||||
|
symbols = {
|
||||||
|
modified = ' ●', -- Text to show when the buffer is modified
|
||||||
|
alternate_file = ' ↻', -- Text to show to identify the alternate file
|
||||||
|
directory = ' ▶', -- Text to show when the buffer is a directory
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
tabline = {
|
||||||
|
lualine_a = {
|
||||||
|
{
|
||||||
|
'buffers',
|
||||||
|
show_filename_only = true, -- Shows shortened relative path when set to false.
|
||||||
|
hide_filename_extension = false, -- Hide filename extension when set to true.
|
||||||
|
show_modified_status = true, -- Shows indicator when the buffer is modified.
|
||||||
|
|
||||||
|
mode = 4, -- 0: Shows buffer name
|
||||||
|
-- 1: Shows buffer index
|
||||||
|
-- 2: Shows buffer name + buffer index
|
||||||
|
-- 3: Shows buffer number
|
||||||
|
-- 4: Shows buffer name + buffer number
|
||||||
|
|
||||||
|
max_length = vim.o.columns * 2 / 3, -- Maximum width of buffers component,
|
||||||
|
-- it can also be a function that returns
|
||||||
|
-- the value of `max_length` dynamically.
|
||||||
|
|
||||||
|
symbols = {
|
||||||
|
modified = ' ●', -- Text to show when the buffer is modified
|
||||||
|
alternate_file = ' ↻', -- Text to show to identify the alternate file
|
||||||
|
directory = ' ▶', -- Text to show when the buffer is a directory
|
||||||
|
},
|
||||||
|
}}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
-- -- Gitsigns
|
||||||
|
-- -- See `:help gitsigns.txt`
|
||||||
|
-- require('gitsigns').setup {
|
||||||
|
-- signs = {
|
||||||
|
-- add = { text = '+' },
|
||||||
|
-- change = { text = '~' },
|
||||||
|
-- delete = { text = '_' },
|
||||||
|
-- topdelete = { text = '‾' },
|
||||||
|
-- changedelete = { text = '~' },
|
||||||
|
-- },
|
||||||
|
-- }
|
||||||
|
|
||||||
|
-- Onedark theme
|
||||||
|
require('onedark').setup {
|
||||||
|
style = 'deep'
|
||||||
|
}
|
||||||
|
require('onedark').load()
|
||||||
|
|
||||||
|
-- [[ Setting options ]]
|
||||||
|
-- See `:help vim.o`
|
||||||
|
|
||||||
|
if vim.g.neovide then
|
||||||
|
vim.o.guifont = "Iosevka Term:h15"
|
||||||
|
vim.g.neovide_scale_factor = 1.0
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Set highlight on search
|
||||||
|
vim.o.hlsearch = true
|
||||||
|
|
||||||
|
-- Highlight problematic whitespace
|
||||||
|
vim.o.list = true
|
||||||
|
vim.opt.listchars = { tab = '▶ ', trail = '●', extends = '#', nbsp = '.' }
|
||||||
|
|
||||||
|
-- Whitespace/tab management
|
||||||
|
vim.opt.expandtab = true
|
||||||
|
vim.opt.tabstop = 4
|
||||||
|
vim.opt.softtabstop = 4
|
||||||
|
vim.opt.shiftwidth = 4
|
||||||
|
|
||||||
|
-- Make line numbers default
|
||||||
|
vim.wo.number = true
|
||||||
|
vim.opt.colorcolumn = '120'
|
||||||
|
vim.opt.cursorline = true
|
||||||
|
|
||||||
|
-- Enable mouse mode
|
||||||
|
vim.o.mouse = 'a'
|
||||||
|
|
||||||
|
-- Enable break indent
|
||||||
|
vim.o.breakindent = true
|
||||||
|
vim.o.wrap = false
|
||||||
|
|
||||||
|
-- Save undo history
|
||||||
|
vim.o.undofile = true
|
||||||
|
|
||||||
|
-- Case insensitive searching UNLESS /C or capital in search
|
||||||
|
vim.o.ignorecase = true
|
||||||
|
vim.o.smartcase = true
|
||||||
|
|
||||||
|
-- Decrease update time
|
||||||
|
vim.o.updatetime = 250
|
||||||
|
vim.wo.signcolumn = 'yes'
|
||||||
|
|
||||||
|
-- Set colorscheme
|
||||||
|
vim.o.termguicolors = true
|
||||||
|
-- vim.cmd [[colorscheme molokini]]
|
||||||
|
-- vim.cmd.colorscheme('molokini')
|
||||||
|
vim.cmd.colorscheme('onedark')
|
||||||
|
|
||||||
|
-- Set completeopt to have a better completion experience
|
||||||
|
vim.o.completeopt = 'menuone,noselect'
|
||||||
|
|
||||||
|
-- Do not auto read file when in focus
|
||||||
|
vim.o.autoread = false
|
||||||
|
|
||||||
|
-- [[ Basic Keymaps ]]
|
||||||
|
-- Set <space> as the leader key
|
||||||
|
-- See `:help mapleader`
|
||||||
|
-- NOTE: Must happen before plugins are required (otherwise wrong leader will be used)
|
||||||
|
vim.g.mapleader = ','
|
||||||
|
vim.g.maplocalleader = ','
|
||||||
|
|
||||||
|
-- Keymaps for better default experience
|
||||||
|
-- See `:help vim.keymap.set()`
|
||||||
|
vim.keymap.set({ 'n', 'v' }, '<Space>', '<Nop>', { silent = true })
|
||||||
|
|
||||||
|
-- Remap for dealing with word wrap
|
||||||
|
vim.keymap.set('n', 'k', "v:count == 0 ? 'gk' : 'k'", { expr = true, silent = true })
|
||||||
|
vim.keymap.set('n', 'j', "v:count == 0 ? 'gj' : 'j'", { expr = true, silent = true })
|
||||||
|
|
||||||
|
vim.api.nvim_set_keymap('n', '<c-z>', ':bn<CR>', { noremap = 1 })
|
||||||
|
vim.api.nvim_set_keymap('v', '<c-z>', ':bn<CR>', { noremap = 1 })
|
||||||
|
vim.api.nvim_set_keymap('n', '<c-x>', ':bp<CR>', { noremap = 1 })
|
||||||
|
vim.api.nvim_set_keymap('n', '<F5>', ':e<CR>', { noremap = 1 })
|
||||||
|
vim.api.nvim_set_keymap('n', '<F6>', '<C-W>w', { noremap = 1 })
|
||||||
|
vim.api.nvim_set_keymap('n', '<F18>', '<C-W>W', { noremap = 1 }) -- S-F6 (F18 defined in ST's config.h)
|
||||||
|
vim.api.nvim_set_keymap('n', '<F7>', '<C-W>o', { noremap = 1 })
|
||||||
|
vim.api.nvim_set_keymap('n', '<F8>', '<C-W>v', { noremap = 1 })
|
||||||
|
vim.api.nvim_set_keymap('n', '<F20>', '<C-W>s', { noremap = 1 }) -- S-F8 (F20 defined in ST's config.h)
|
||||||
|
vim.api.nvim_set_keymap('n', '<F35>', ':confirm bd<CR>', { noremap = 1 }) -- C-F11 (F35 defined in ST's config.h)
|
||||||
|
vim.api.nvim_set_keymap('v', '<LeftRelease>','"*ygv', { noremap = 1 }) -- Copy selection to clipboard
|
||||||
|
vim.api.nvim_set_keymap('v', '<2-LeftRelease>','"*ygv', { noremap = 1 }) -- Copy word selection to clipboard
|
||||||
|
vim.api.nvim_set_keymap('v', '<3-LeftRelease>','"*ygv', { noremap = 1 }) -- Copy line selection to clipboard
|
||||||
|
vim.api.nvim_set_keymap('v', '<4-LeftRelease>','"*ygv', { noremap = 1 }) -- Copy column selection to clipboard
|
||||||
|
vim.api.nvim_set_keymap('v', '<c-r>', '"hy/<C-r>h<cr>', { noremap = 1 }) -- Search selected text
|
||||||
|
vim.api.nvim_set_keymap('n', '<c-Space>', 'za', { noremap = 1 }) -- Toggle fold
|
||||||
|
vim.api.nvim_set_keymap('v', '<', '<gv', { noremap = 1 }) -- Preserve selection after left indent
|
||||||
|
vim.api.nvim_set_keymap('v', '>', '>gv', { noremap = 1 }) -- Preserve selection after right indent
|
||||||
|
vim.api.nvim_set_keymap('v', 'Q', 'gqa', { noremap = 1 }) -- Reflow visually highlighted lines with Q
|
||||||
|
vim.api.nvim_set_keymap('n', 'Q', 'gq', { noremap = 1 }) -- Reflow text
|
||||||
|
|
||||||
|
-- Insert time/date stamps
|
||||||
|
vim.api.nvim_set_keymap('n', '<leader>td', 'i<C-R>=strftime(\'%Y/%m/%d\')<CR><Esc>', { noremap = 1 }) -- 'Insert [T]imestamp - [d]ate'
|
||||||
|
vim.api.nvim_set_keymap('n', '<leader>tt', 'i<C-R>=strftime(\'%Y/%m/%d %H:%M:%S\')<CR><Esc>', { noremap = 1 }) -- 'Insert [T]imestamp - date[t]ime'
|
||||||
|
|
||||||
|
vim.g.rainbow_active = 1 -- 0 if you want to enable it later via :RainbowToggle
|
||||||
|
|
||||||
|
-- vim.g.iosftrk_folddisable = 1 -- intel
|
||||||
|
-- vim.g.iosfsbtrk_folddisable = 1 -- intel
|
||||||
|
-- vim.g.pcietrk_folddisable = 1 -- intel
|
||||||
|
|
||||||
|
-- [[ Highlight on yank ]]
|
||||||
|
-- See `:help vim.highlight.on_yank()`
|
||||||
|
local highlight_group = vim.api.nvim_create_augroup('YankHighlight', { clear = true })
|
||||||
|
vim.api.nvim_create_autocmd('TextYankPost', {
|
||||||
|
callback = function()
|
||||||
|
vim.highlight.on_yank()
|
||||||
|
end,
|
||||||
|
group = highlight_group,
|
||||||
|
pattern = '*',
|
||||||
|
})
|
||||||
|
|
||||||
|
-- NERDTree
|
||||||
|
vim.api.nvim_set_keymap('n', '<c-t>', ':NERDTreeToggle %<CR>', { noremap = 1 })
|
||||||
|
vim.g.NERDTreeShowBookmarks = 1
|
||||||
|
vim.g.NERDTreeIgnore = {'\\.py[cd]$', '\\~$', '\\.swo$', '\\.swp$',
|
||||||
|
'^\\.git$', '^\\.hg$', '^\\.svn$', '\\.bzr$'}
|
||||||
|
vim.g.NERDTreeChDirMode = 3
|
||||||
|
vim.g.NERDTreeQuitOnOpen = 1
|
||||||
|
vim.g.NERDTreeMouseMode = 2
|
||||||
|
vim.g.NERDTreeShowHidden = 1
|
||||||
|
vim.g.NERDTreeKeepTreeInNewTab = 1
|
||||||
|
vim.g.nerdtree_tabs_open_on_gui_startup = 0
|
||||||
|
|
||||||
|
-- Filetype assignments - TODO: Is there an automatic way for this?
|
||||||
|
vim.cmd("au! BufRead,BufNewFile *.sv,*.svh set filetype=verilog_systemverilog")
|
||||||
|
vim.cmd("au! BufRead,BufNewFile *iosfsb_trk.out set filetype=iosfsbtrk")
|
||||||
|
vim.cmd("au! BufRead,BufNewFile *iosf_trk.out set filetype=iosftrk")
|
||||||
|
|
||||||
|
-- [[ Configure Telescope ]]
|
||||||
|
-- See `:help telescope` and `:help telescope.setup()`
|
||||||
|
require('telescope').setup {
|
||||||
|
defaults = {
|
||||||
|
mappings = {
|
||||||
|
i = {
|
||||||
|
['<C-u>'] = false,
|
||||||
|
['<C-d>'] = false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
-- Enable telescope fzf native, if installed
|
||||||
|
pcall(require('telescope').load_extension, 'fzf')
|
||||||
|
|
||||||
|
-- See `:help telescope.builtin`
|
||||||
|
vim.keymap.set('n', '<ldeader>?', require('telescope.builtin').oldfiles, { desc = '[?] Find recently opened files' })
|
||||||
|
vim.keymap.set('n', '<leader><space>', require('telescope.builtin').buffers, { desc = '[ ] Find existing buffers' })
|
||||||
|
vim.keymap.set('n', '<leader>/', function()
|
||||||
|
-- You can pass additional configuration to telescope to change theme, layout, etc.
|
||||||
|
require('telescope.builtin').current_buffer_fuzzy_find(require('telescope.themes').get_dropdown {
|
||||||
|
winblend = 10,
|
||||||
|
previewer = false,
|
||||||
|
})
|
||||||
|
end, { desc = '[/] Fuzzily search in current buffer]' })
|
||||||
|
|
||||||
|
vim.keymap.set('n', '<leader>sf', require('telescope.builtin').find_files, { desc = '[S]earch [F]iles' })
|
||||||
|
vim.keymap.set('n', '<leader>sh', require('telescope.builtin').help_tags, { desc = '[S]earch [H]elp' })
|
||||||
|
vim.keymap.set('n', '<leader>sw', require('telescope.builtin').grep_string, { desc = '[S]earch current [W]ord' })
|
||||||
|
vim.keymap.set('n', '<leader>sg', require('telescope.builtin').live_grep, { desc = '[S]earch by [G]rep' })
|
||||||
|
vim.keymap.set('n', '<leader>sd', require('telescope.builtin').diagnostics, { desc = '[S]earch [D]iagnostics' })
|
||||||
|
|
||||||
|
-- The line beneath this is called `modeline`. See `:help modeline`
|
||||||
|
-- vim: ft=lua ts=4 sts=4 sw=4 et
|
@@ -3,6 +3,7 @@ local install_path = vim.fn.stdpath 'data' .. '/site/pack/packer/start/packer.nv
|
|||||||
local is_bootstrap = false
|
local is_bootstrap = false
|
||||||
if vim.fn.empty(vim.fn.glob(install_path)) > 0 then
|
if vim.fn.empty(vim.fn.glob(install_path)) > 0 then
|
||||||
is_bootstrap = true
|
is_bootstrap = true
|
||||||
|
vim.fn.system({'mkdir', '-p', install_path})
|
||||||
vim.fn.system({'git', 'clone', '--depth', '1', 'https://github.com/wbthomason/packer.nvim', install_path})
|
vim.fn.system({'git', 'clone', '--depth', '1', 'https://github.com/wbthomason/packer.nvim', install_path})
|
||||||
vim.cmd [[packadd packer.nvim]]
|
vim.cmd [[packadd packer.nvim]]
|
||||||
end
|
end
|
||||||
@@ -66,28 +67,6 @@ require('packer').startup(function(use)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
-- Personal keymapping
|
|
||||||
vim.api.nvim_set_keymap('n', '<c-z>', ':bn<CR>', { noremap = 1 })
|
|
||||||
vim.api.nvim_set_keymap('v', '<c-z>', ':bn<CR>', { noremap = 1 })
|
|
||||||
vim.api.nvim_set_keymap('n', '<c-x>', ':bp<CR>', { noremap = 1 })
|
|
||||||
vim.api.nvim_set_keymap('n', '<F5>', ':e<CR>', { noremap = 1 })
|
|
||||||
vim.api.nvim_set_keymap('n', '<F6>', '<C-W>w', { noremap = 1 })
|
|
||||||
vim.api.nvim_set_keymap('n', '<F18>', '<C-W>W', { noremap = 1 }) -- S-F6 (F18 defined in ST's config.h)
|
|
||||||
vim.api.nvim_set_keymap('n', '<F7>', '<C-W>o', { noremap = 1 })
|
|
||||||
vim.api.nvim_set_keymap('n', '<F8>', '<C-W>v', { noremap = 1 })
|
|
||||||
vim.api.nvim_set_keymap('n', '<F20>', '<C-W>s', { noremap = 1 }) -- S-F8 (F20 defined in ST's config.h)
|
|
||||||
vim.api.nvim_set_keymap('n', '<F35>', ':confirm bd<CR>', { noremap = 1 }) -- C-F11 (F35 defined in ST's config.h)
|
|
||||||
vim.api.nvim_set_keymap('v', '<LeftRelease>','"*ygv', { noremap = 1 }) -- Copy selection to clipboard
|
|
||||||
vim.api.nvim_set_keymap('v', '<2-LeftRelease>','"*ygv', { noremap = 1 }) -- Copy word selection to clipboard
|
|
||||||
vim.api.nvim_set_keymap('v', '<3-LeftRelease>','"*ygv', { noremap = 1 }) -- Copy line selection to clipboard
|
|
||||||
vim.api.nvim_set_keymap('v', '<4-LeftRelease>','"*ygv', { noremap = 1 }) -- Copy column selection to clipboard
|
|
||||||
vim.api.nvim_set_keymap('v', '<c-r>', '"hy/<C-r>h<cr>', { noremap = 1 }) -- Search selected text
|
|
||||||
vim.api.nvim_set_keymap('n', '<c-Space>', 'za', { noremap = 1 }) -- Toggle fold
|
|
||||||
vim.api.nvim_set_keymap('v', '<', '<gv', { noremap = 1 }) -- Preserve selection after left indent
|
|
||||||
vim.api.nvim_set_keymap('v', '>', '>gv', { noremap = 1 }) -- Preserve selection after right indent
|
|
||||||
vim.api.nvim_set_keymap('v', 'Q', 'gqap', { noremap = 1 }) -- Reflow visually highlighted lines with Q
|
|
||||||
vim.api.nvim_set_keymap('n', 'Q', 'gq', { noremap = 1 }) -- Reflow text
|
|
||||||
|
|
||||||
-- Nerd Tree (File navigation)
|
-- Nerd Tree (File navigation)
|
||||||
use 'preservim/nerdtree'
|
use 'preservim/nerdtree'
|
||||||
vim.api.nvim_set_keymap('n', '<c-t>', ':NERDTreeToggle %<CR>', { noremap = 1 })
|
vim.api.nvim_set_keymap('n', '<c-t>', ':NERDTreeToggle %<CR>', { noremap = 1 })
|
||||||
@@ -115,7 +94,15 @@ require('packer').startup(function(use)
|
|||||||
'williamboman/mason-lspconfig.nvim',
|
'williamboman/mason-lspconfig.nvim',
|
||||||
|
|
||||||
-- Useful status updates for LSP
|
-- Useful status updates for LSP
|
||||||
'j-hui/fidget.nvim',
|
use {
|
||||||
|
'j-hui/fidget.nvim',
|
||||||
|
tag = 'legacy',
|
||||||
|
config = function()
|
||||||
|
require("fidget").setup {
|
||||||
|
-- options
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -188,12 +175,18 @@ vim.api.nvim_create_autocmd('BufWritePost', {
|
|||||||
-- [[ Setting options ]]
|
-- [[ Setting options ]]
|
||||||
-- See `:help vim.o`
|
-- See `:help vim.o`
|
||||||
|
|
||||||
|
if vim.g.neovide then
|
||||||
|
vim.o.guifont = "Iosevka Term:h12"
|
||||||
|
vim.g.neovide_scale_factor = 1.0
|
||||||
|
end
|
||||||
|
|
||||||
-- Set highlight on search
|
-- Set highlight on search
|
||||||
vim.o.hlsearch = true
|
vim.o.hlsearch = true
|
||||||
|
|
||||||
-- Highlight problematic whitespace
|
-- Highlight problematic whitespace
|
||||||
vim.o.list = true
|
vim.o.list = true
|
||||||
vim.opt.listchars = { tab = '▶ ', trail = '●', extends = '#', nbsp = '.' }
|
vim.opt.listchars = { tab = '▶ ', trail = '●', extends = '#', nbsp = '.' }
|
||||||
|
vim.o.wrap = false
|
||||||
|
|
||||||
-- Make line numbers default
|
-- Make line numbers default
|
||||||
vim.wo.number = true
|
vim.wo.number = true
|
||||||
@@ -240,6 +233,31 @@ vim.keymap.set({ 'n', 'v' }, '<Space>', '<Nop>', { silent = true })
|
|||||||
vim.keymap.set('n', 'k', "v:count == 0 ? 'gk' : 'k'", { expr = true, silent = true })
|
vim.keymap.set('n', 'k', "v:count == 0 ? 'gk' : 'k'", { expr = true, silent = true })
|
||||||
vim.keymap.set('n', 'j', "v:count == 0 ? 'gj' : 'j'", { expr = true, silent = true })
|
vim.keymap.set('n', 'j', "v:count == 0 ? 'gj' : 'j'", { expr = true, silent = true })
|
||||||
|
|
||||||
|
-- Personal keymapping
|
||||||
|
vim.keymap.set('n', '<c-z>', ':bn<CR>', { silent = true })
|
||||||
|
vim.keymap.set('v', '<c-z>', ':bn<CR>', { silent = true })
|
||||||
|
vim.keymap.set('n', '<c-x>', ':bp<CR>', { silent = true })
|
||||||
|
vim.keymap.set('n', '<F5>', ':e<CR>', { silent = true })
|
||||||
|
vim.keymap.set('n', '<F6>', '<C-W>w', { silent = true })
|
||||||
|
vim.keymap.set('n', '<F18>', '<C-W>W', { silent = true }) -- S-F6 (F18 defined in ST's config.h)
|
||||||
|
vim.keymap.set('n', '<F7>', '<C-W>o', { silent = true })
|
||||||
|
vim.keymap.set('n', '<F8>', '<C-W>v', { silent = true })
|
||||||
|
vim.keymap.set('n', '<F20>', '<C-W>s', { silent = true }) -- S-F8 (F20 defined in ST's config.h)
|
||||||
|
vim.keymap.set('n', '<F35>', ':confirm bd<CR>', { silent = true }) -- C-F11 (F35 defined in ST's config.h)
|
||||||
|
vim.keymap.set('v', '<LeftRelease>','"*ygv', { silent = true }) -- Copy selection to clipboard
|
||||||
|
vim.keymap.set('v', '<2-LeftRelease>','"*ygv', { silent = true }) -- Copy word selection to clipboard
|
||||||
|
vim.keymap.set('v', '<3-LeftRelease>','"*ygv', { silent = true }) -- Copy line selection to clipboard
|
||||||
|
vim.keymap.set('v', '<4-LeftRelease>','"*ygv', { silent = true }) -- Copy column selection to clipboard
|
||||||
|
vim.keymap.set('v', '<c-r>', '"hy/<C-r>h<cr>', { silent = true }) -- Search selected text
|
||||||
|
vim.keymap.set('n', '<c-Space>', 'za', { silent = true }) -- Toggle fold
|
||||||
|
vim.keymap.set('v', '<', '<gv', { silent = true }) -- Preserve selection after left indent
|
||||||
|
vim.keymap.set('v', '>', '>gv', { silent = true }) -- Preserve selection after right indent
|
||||||
|
vim.keymap.set('v', 'Q', 'gqap', { silent = true }) -- Reflow visually highlighted lines with Q
|
||||||
|
vim.keymap.set('n', 'Q', 'gq', { silent = true }) -- Reflow text
|
||||||
|
|
||||||
|
vim.keymap.set('n', '<leader>td', 'a[<C-r>=strftime("%Y/%m/%d")<CR>] <Esc>', { silent = true }) -- Insert Date after cursor
|
||||||
|
vim.keymap.set('n', '<leader>tt', 'a[<C-r>=strftime("%Y/%m/%d %X")<CR>] <Esc>', { silent = true }) -- Insert Date and time after cursor
|
||||||
|
|
||||||
-- [[ Highlight on yank ]]
|
-- [[ Highlight on yank ]]
|
||||||
-- See `:help vim.highlight.on_yank()`
|
-- See `:help vim.highlight.on_yank()`
|
||||||
local highlight_group = vim.api.nvim_create_augroup('YankHighlight', { clear = true })
|
local highlight_group = vim.api.nvim_create_augroup('YankHighlight', { clear = true })
|
||||||
@@ -303,7 +321,7 @@ vim.keymap.set('n', '<leader>sd', require('telescope.builtin').diagnostics, { de
|
|||||||
-- See `:help nvim-treesitter`
|
-- See `:help nvim-treesitter`
|
||||||
require('nvim-treesitter.configs').setup {
|
require('nvim-treesitter.configs').setup {
|
||||||
-- Add languages to be installed here that you want installed for treesitter
|
-- Add languages to be installed here that you want installed for treesitter
|
||||||
ensure_installed = { 'c', 'cpp', 'go', 'lua', 'python', 'rust', 'typescript', 'help', 'perl', 'ruby', 'verilog' },
|
ensure_installed = { 'c', 'cpp', 'go', 'lua', 'python', 'rust', 'typescript', 'perl', 'ruby', 'verilog' },
|
||||||
|
|
||||||
highlight = { enable = true },
|
highlight = { enable = true },
|
||||||
indent = { enable = true },
|
indent = { enable = true },
|
||||||
|
114
rofi_sound.pl
Executable file
114
rofi_sound.pl
Executable file
@@ -0,0 +1,114 @@
|
|||||||
|
#!/usr/bin/env perl
|
||||||
|
|
||||||
|
use strict;
|
||||||
|
use warnings;
|
||||||
|
use Data::Dumper;
|
||||||
|
|
||||||
|
my $selection = $ARGV[0];
|
||||||
|
|
||||||
|
my $app = {};
|
||||||
|
|
||||||
|
if (defined $selection) {
|
||||||
|
select_sink($app, $selection);
|
||||||
|
} else {
|
||||||
|
show_sinks($app);
|
||||||
|
}
|
||||||
|
|
||||||
|
# -----------
|
||||||
|
# Subroutines
|
||||||
|
# -----------
|
||||||
|
sub show_sinks {
|
||||||
|
my ($app) = @_;
|
||||||
|
|
||||||
|
my @sinks = get_sinks($app);
|
||||||
|
print join("\n", @sinks);
|
||||||
|
}
|
||||||
|
|
||||||
|
# -----------
|
||||||
|
sub select_sink {
|
||||||
|
my ($app, $sink) = @_;
|
||||||
|
|
||||||
|
my $wp_h;
|
||||||
|
my ($id,$name) = $sink =~ /(\d+):(.*)/;
|
||||||
|
my $seld_sink = "NONE";
|
||||||
|
my $seld_id = "NONE";
|
||||||
|
|
||||||
|
open($wp_h, "pw-cli info $id |") or die "Could not run pw-cli command";
|
||||||
|
|
||||||
|
while (my $ln = <$wp_h>) {
|
||||||
|
if (my ($node_name) = $ln =~ /node.name\s*=\s*"(.*)"/) {
|
||||||
|
warn "Selected [$id] ($name) - $node_name\n";
|
||||||
|
$seld_sink = $node_name;
|
||||||
|
$seld_id = $id;
|
||||||
|
last;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
enable_sink($app, $seld_sink, $seld_id);
|
||||||
|
}
|
||||||
|
|
||||||
|
# -----------
|
||||||
|
sub enable_sink {
|
||||||
|
my ($app, $sink, $id) = @_;
|
||||||
|
|
||||||
|
`wpctl set-default $id`;
|
||||||
|
unmute_master($app);
|
||||||
|
}
|
||||||
|
|
||||||
|
# -----------
|
||||||
|
sub unmute_master {
|
||||||
|
my ($app) = @_;
|
||||||
|
|
||||||
|
`amixer -c 0 set Master unmute`;
|
||||||
|
}
|
||||||
|
|
||||||
|
# -----------
|
||||||
|
sub parse_wpctl {
|
||||||
|
my $wp_h;
|
||||||
|
|
||||||
|
open($wp_h, "wpctl status |") or die "Could not run wpctl command";
|
||||||
|
|
||||||
|
my @lines = <$wp_h>;
|
||||||
|
|
||||||
|
my $section = "None";
|
||||||
|
my $sub_section = "None";
|
||||||
|
my $wp_data = {};
|
||||||
|
|
||||||
|
foreach my $ln (@lines) {
|
||||||
|
# Section
|
||||||
|
if (my ($mat) = $ln =~ /(^(PipeWire)|^(\w+)$)/) {
|
||||||
|
$section = $mat;
|
||||||
|
$wp_data->{$section} = {} unless (exists $wp_data->{$section});
|
||||||
|
}
|
||||||
|
|
||||||
|
# Sub-section
|
||||||
|
if (my ($mat) = $ln =~ /\s+(\w+):$/) {
|
||||||
|
$sub_section = $mat;
|
||||||
|
$wp_data->{$section}->{$sub_section} = [] unless (exists $wp_data->{$section}->{$sub_section});
|
||||||
|
}
|
||||||
|
|
||||||
|
# Entries
|
||||||
|
if (($section ne "None") && ($sub_section ne "None")) {
|
||||||
|
if (my ($sel, $id, $name) = $ln =~ /\s+(\*)?\s+(\d+)\.\s+(.*?)(\[|$)/) {
|
||||||
|
my $seld = (defined $sel) ? 1 : 0;
|
||||||
|
$name =~ s/^\s*//; $name =~ s/\s*$//;
|
||||||
|
push(@{$wp_data->{$section}->{$sub_section}}, {
|
||||||
|
'sel' => $seld,
|
||||||
|
'id' => $id,
|
||||||
|
'name' => $name
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$app->{'wp_data'} = $wp_data;
|
||||||
|
}
|
||||||
|
|
||||||
|
# -----------
|
||||||
|
sub get_sinks {
|
||||||
|
my ($app) = @_;
|
||||||
|
|
||||||
|
parse_wpctl($app);
|
||||||
|
# warn Data::Dumper->Dump([$app->{'wp_data'}]);
|
||||||
|
|
||||||
|
return map { "$_->{'id'}:$_->{'name'}" } @{$app->{'wp_data'}->{'Audio'}->{'Sinks'}}
|
||||||
|
}
|
36
root.bashrc
36
root.bashrc
@@ -3,15 +3,23 @@
|
|||||||
# --------------------------------
|
# --------------------------------
|
||||||
# Shell RC
|
# Shell RC
|
||||||
# --------------------------------
|
# --------------------------------
|
||||||
#PS1='${debian_chroot:+($debian_chroot)}\[\033[01;41m\]$(hostname)\[\033[00m\]\[\033[01;34m\] \w\[\033[00m\] \$ '
|
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;41m\]$(hostnamectl hostname)\[\033[00m\]\[\033[01;34m\] \w\[\033[00m\] \$ '
|
||||||
PS1='${debian_chroot:+($debian_chroot)}\e[1;31m$(hostname) \e[0m\e[1;94m\w\e[0m\e[0;35m $(__git_ps1 " %s")\e[0m \e[1;31m \e[0m'
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Variables
|
# Variables
|
||||||
#
|
#
|
||||||
export EDITOR=vim
|
|
||||||
export PATH=~/bin:$PATH
|
export PATH=~/bin:$PATH
|
||||||
|
|
||||||
|
#
|
||||||
|
# Editor setup
|
||||||
|
#
|
||||||
|
export PATH=/opt/neovim:$PATH
|
||||||
|
export EDITOR=nvim
|
||||||
|
|
||||||
|
function n () {
|
||||||
|
/opt/neovim/nvim $* || nvim $*
|
||||||
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
# Aliases
|
# Aliases
|
||||||
#
|
#
|
||||||
@@ -19,24 +27,28 @@ alias ls='ls -al --color'
|
|||||||
alias q=exit
|
alias q=exit
|
||||||
alias a=clear
|
alias a=clear
|
||||||
alias h=history
|
alias h=history
|
||||||
alias e=$EDITOR
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Functions
|
# Functions
|
||||||
#
|
#
|
||||||
function myvim () {
|
|
||||||
gvim $1 >& /dev/null &
|
|
||||||
disown %1
|
|
||||||
}
|
|
||||||
|
|
||||||
function hgrep () {
|
function hgrep () {
|
||||||
history | grep $1
|
history | grep $1
|
||||||
}
|
}
|
||||||
|
|
||||||
function pgrep () {
|
function pgrep () {
|
||||||
ps aux | grep $1
|
ps aux | grep $1
|
||||||
}
|
}
|
||||||
|
|
||||||
function u2d () {
|
function u2d () {
|
||||||
apt update && apt full-upgrade -y && apt autoremove -y
|
~mahesh/git/snips/get_neovim.sh
|
||||||
|
# ~mahesh/git/snips/get_wezterm.sh
|
||||||
|
cd
|
||||||
|
if [ -e /etc/arch-release ]; then
|
||||||
|
pacman --sync --refresh --sysupgrade --noconfirm
|
||||||
|
elif [ -e /etc/debian_version ]; then
|
||||||
|
apt update && apt full-upgrade -y && apt autoremove -y
|
||||||
|
else
|
||||||
|
echo "Auto update not supported."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
94
root.init.lua
Normal file
94
root.init.lua
Normal file
@@ -0,0 +1,94 @@
|
|||||||
|
-- [[ Setting options ]]
|
||||||
|
-- See `:help vim.o`
|
||||||
|
|
||||||
|
-- Set highlight on search
|
||||||
|
vim.o.hlsearch = true
|
||||||
|
|
||||||
|
-- Highlight problematic whitespace
|
||||||
|
vim.o.list = true
|
||||||
|
vim.opt.listchars = { tab = '▶ ', trail = '●', extends = '#', nbsp = '.' }
|
||||||
|
|
||||||
|
-- Whitespace/tab management
|
||||||
|
vim.opt.expandtab = true
|
||||||
|
vim.opt.tabstop = 4
|
||||||
|
vim.opt.softtabstop = 4
|
||||||
|
vim.opt.shiftwidth = 4
|
||||||
|
|
||||||
|
-- Make line numbers default
|
||||||
|
vim.wo.number = true
|
||||||
|
vim.opt.colorcolumn = '120'
|
||||||
|
vim.opt.cursorline = true
|
||||||
|
|
||||||
|
-- Enable mouse mode
|
||||||
|
vim.o.mouse = 'a'
|
||||||
|
|
||||||
|
-- Enable break indent
|
||||||
|
vim.o.breakindent = true
|
||||||
|
vim.o.wrap = false
|
||||||
|
|
||||||
|
-- Save undo history
|
||||||
|
vim.o.undofile = true
|
||||||
|
|
||||||
|
-- Case insensitive searching UNLESS /C or capital in search
|
||||||
|
vim.o.ignorecase = true
|
||||||
|
vim.o.smartcase = true
|
||||||
|
|
||||||
|
-- Decrease update time
|
||||||
|
vim.o.updatetime = 250
|
||||||
|
vim.wo.signcolumn = 'yes'
|
||||||
|
|
||||||
|
-- Set colorscheme
|
||||||
|
vim.o.termguicolors = true
|
||||||
|
-- vim.cmd [[colorscheme molokini]]
|
||||||
|
-- vim.cmd.colorscheme('molokini')
|
||||||
|
vim.cmd.colorscheme('habamax')
|
||||||
|
|
||||||
|
-- Set completeopt to have a better completion experience
|
||||||
|
vim.o.completeopt = 'menuone,noselect'
|
||||||
|
|
||||||
|
-- Do not auto read file when in focus
|
||||||
|
vim.o.autoread = false
|
||||||
|
|
||||||
|
-- [[ Basic Keymaps ]]
|
||||||
|
-- Set <space> as the leader key
|
||||||
|
-- See `:help mapleader`
|
||||||
|
-- NOTE: Must happen before plugins are required (otherwise wrong leader will be used)
|
||||||
|
vim.g.mapleader = ','
|
||||||
|
vim.g.maplocalleader = ','
|
||||||
|
|
||||||
|
-- Keymaps for better default experience
|
||||||
|
-- See `:help vim.keymap.set()`
|
||||||
|
vim.keymap.set({ 'n', 'v' }, '<Space>', '<Nop>', { silent = true })
|
||||||
|
|
||||||
|
-- Remap for dealing with word wrap
|
||||||
|
vim.keymap.set('n', 'k', "v:count == 0 ? 'gk' : 'k'", { expr = true, silent = true })
|
||||||
|
vim.keymap.set('n', 'j', "v:count == 0 ? 'gj' : 'j'", { expr = true, silent = true })
|
||||||
|
|
||||||
|
vim.api.nvim_set_keymap('n', '<c-t>', ':Explore<CR>', { noremap = 1 })
|
||||||
|
vim.api.nvim_set_keymap('n', '<c-z>', ':bn<CR>', { noremap = 1 })
|
||||||
|
vim.api.nvim_set_keymap('v', '<c-z>', ':bn<CR>', { noremap = 1 })
|
||||||
|
vim.api.nvim_set_keymap('n', '<c-x>', ':bp<CR>', { noremap = 1 })
|
||||||
|
vim.api.nvim_set_keymap('n', '<F5>', ':e<CR>', { noremap = 1 })
|
||||||
|
vim.api.nvim_set_keymap('n', '<F6>', '<C-W>w', { noremap = 1 })
|
||||||
|
vim.api.nvim_set_keymap('n', '<F18>', '<C-W>W', { noremap = 1 }) -- S-F6 (F18 defined in ST's config.h)
|
||||||
|
vim.api.nvim_set_keymap('n', '<F7>', '<C-W>o', { noremap = 1 })
|
||||||
|
vim.api.nvim_set_keymap('n', '<F8>', '<C-W>v', { noremap = 1 })
|
||||||
|
vim.api.nvim_set_keymap('n', '<F20>', '<C-W>s', { noremap = 1 }) -- S-F8 (F20 defined in ST's config.h)
|
||||||
|
vim.api.nvim_set_keymap('n', '<F35>', ':confirm bd<CR>', { noremap = 1 }) -- C-F11 (F35 defined in ST's config.h)
|
||||||
|
vim.api.nvim_set_keymap('v', '<LeftRelease>','"*ygv', { noremap = 1 }) -- Copy selection to clipboard
|
||||||
|
vim.api.nvim_set_keymap('v', '<2-LeftRelease>','"*ygv', { noremap = 1 }) -- Copy word selection to clipboard
|
||||||
|
vim.api.nvim_set_keymap('v', '<3-LeftRelease>','"*ygv', { noremap = 1 }) -- Copy line selection to clipboard
|
||||||
|
vim.api.nvim_set_keymap('v', '<4-LeftRelease>','"*ygv', { noremap = 1 }) -- Copy column selection to clipboard
|
||||||
|
vim.api.nvim_set_keymap('v', '<c-r>', '"hy/<C-r>h<cr>', { noremap = 1 }) -- Search selected text
|
||||||
|
vim.api.nvim_set_keymap('n', '<c-Space>', 'za', { noremap = 1 }) -- Toggle fold
|
||||||
|
vim.api.nvim_set_keymap('v', '<', '<gv', { noremap = 1 }) -- Preserve selection after left indent
|
||||||
|
vim.api.nvim_set_keymap('v', '>', '>gv', { noremap = 1 }) -- Preserve selection after right indent
|
||||||
|
vim.api.nvim_set_keymap('v', 'Q', 'gqa', { noremap = 1 }) -- Reflow visually highlighted lines with Q
|
||||||
|
vim.api.nvim_set_keymap('n', 'Q', 'gq', { noremap = 1 }) -- Reflow text
|
||||||
|
|
||||||
|
-- Insert time/date stamps
|
||||||
|
vim.api.nvim_set_keymap('n', '<leader>td', 'a<C-R>=strftime(\'%Y/%m/%d\')<CR><Esc>', { noremap = 1 }) -- 'Insert [T]imestamp - [d]ate'
|
||||||
|
vim.api.nvim_set_keymap('n', '<leader>tt', 'a<C-R>=strftime(\'%Y/%m/%d %H:%M:%S\')<CR><Esc>', { noremap = 1 }) -- 'Insert [T]imestamp - date[t]ime'
|
||||||
|
|
||||||
|
-- The line beneath this is called `modeline`. See `:help modeline`
|
||||||
|
-- vim: ft=lua ts=4 sts=4 sw=4 et
|
@@ -8,18 +8,28 @@
|
|||||||
if [ -f /etc/bash_completion.d/git-prompt ]; then
|
if [ -f /etc/bash_completion.d/git-prompt ]; then
|
||||||
source /etc/bash_completion.d/git-prompt
|
source /etc/bash_completion.d/git-prompt
|
||||||
fi
|
fi
|
||||||
if [ -f ~/bin/git-prompt.sh ]; then
|
if [ -f /usr/share/git/git-prompt.sh ]; then
|
||||||
source ~/bin/git-prompt.sh
|
source /usr/share/git/git-prompt.sh
|
||||||
fi
|
fi
|
||||||
export GIT_PS1_SHOWDIRTYSTATE=1
|
export GIT_PS1_SHOWDIRTYSTATE=1
|
||||||
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;92m\]$(hostname)\[\033[01;34m\] \w\[\033[01;35m\]$(__git_ps1 " %s") \[\033[0m\]$ '
|
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;92m\]$(hostnamectl hostname)\[\033[01;34m\] \w\[\033[01;35m\]$(__git_ps1 " %s") \[\033[0m\]$ '
|
||||||
|
|
||||||
#
|
#
|
||||||
# Variables
|
# Variables
|
||||||
#
|
#
|
||||||
#export EDITOR=vim
|
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=nvim
|
export EDITOR=nvim
|
||||||
export PATH=~/bin:$PATH
|
|
||||||
|
function n () {
|
||||||
|
/opt/neovim/nvim $* || nvim $*
|
||||||
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
# Aliases
|
# Aliases
|
||||||
@@ -28,16 +38,11 @@ alias ls='ls -altrh --color'
|
|||||||
alias q=exit
|
alias q=exit
|
||||||
alias a=clear
|
alias a=clear
|
||||||
alias h=history
|
alias h=history
|
||||||
alias e=$EDITOR
|
alias gn='neovide --fork'
|
||||||
alias n=nvim
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Functions
|
# Functions
|
||||||
#
|
#
|
||||||
function myvim () {
|
|
||||||
gvim $1 >& /dev/null &
|
|
||||||
disown %1
|
|
||||||
}
|
|
||||||
function pyedit () {
|
function pyedit () {
|
||||||
gedit $1 >& /dev/null &
|
gedit $1 >& /dev/null &
|
||||||
disown %1
|
disown %1
|
||||||
@@ -50,3 +55,11 @@ function hgrep () {
|
|||||||
function pgrep () {
|
function pgrep () {
|
||||||
ps aux | grep $1
|
ps aux | grep $1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function start_tmux () {
|
||||||
|
TERM=screen-256color tmux -u new -A -s DevEnv
|
||||||
|
}
|
||||||
|
|
||||||
|
function start_gitui() {
|
||||||
|
GPG_TTY=$(tty) gitui
|
||||||
|
}
|
||||||
|
14
user.conkyrc
14
user.conkyrc
@@ -39,21 +39,26 @@ conky.config = {
|
|||||||
--[[ For Somebar ]]
|
--[[ For Somebar ]]
|
||||||
conky.text = [[
|
conky.text = [[
|
||||||
${if_existing /usr/local/bin/somebar}status${endif} \
|
${if_existing /usr/local/bin/somebar}status${endif} \
|
||||||
|
${if_mpd_playing}${if_match "${mpd_status}" == "Paused"}⏸${else}𝄞${endif} [${mpd_percent}] ${mpd_smart 50}${endif} \
|
||||||
💻 ${cpu}% \
|
💻 ${cpu}% \
|
||||||
💾 ${memperc}% \
|
💾 ${memperc}% \
|
||||||
|
${if_existing /sys/class/net/enp0s20f0u1u1u2/operstate up}🌎 ${addr enp0s20f0u1u1u2}${else}\
|
||||||
|
${if_existing /sys/class/net/enp0s20f0u1u1/operstate up}🌎 ${addr enp0s20f0u1u1}${else}\
|
||||||
|
${if_existing /sys/class/net/wlp0s20f3/operstate up}📶 ${addr wlp0s20f3}${else}\
|
||||||
${if_existing /sys/class/net/enp3s0/operstate up}🌎 ${addr enp3s0}${else}\
|
${if_existing /sys/class/net/enp3s0/operstate up}🌎 ${addr enp3s0}${else}\
|
||||||
${if_existing /sys/class/net/wlp4s0/operstate up}📶 ${addr wlp4s0}${else}\
|
${if_existing /sys/class/net/wlp4s0/operstate up}📶 ${addr wlp4s0}${else}\
|
||||||
${if_up eth0}🌎 ${addr eth0}${else}\
|
${if_up eth0}🌎 ${addr eth0}${else}\
|
||||||
network down ${endif}${endif}${endif} \
|
network down ${endif}${endif}${endif}${endif}${endif}${endif} \
|
||||||
${execi 600 curl 'wttr.in/~45.54,-122.83?u&format=%c%t'} \
|
${execi 600 curl 'wttr.in/~45.5202471,-122.6741948?u&format=%c%t'} \
|
||||||
🔊 ${execi 10 amixer get Master | tail -1 | sed 's/.*\[\([0-9]*%\)\].*/\1/'} \
|
🔊 ${execi 10 wpctl get-volume 53 | tail -1 | perl -ne 'm/([\d\.]+)/; print scalar (($1>1) ? 100 : ($1*100))'} \
|
||||||
🔋 ${battery_percent}% \
|
${if_existing /sys/class/power_supply/ADP0/online 1}🔌${else}🔋${endif} ${battery_percent}% \
|
||||||
📅 ${time %Y %h %d} \
|
📅 ${time %Y %h %d} \
|
||||||
🕑 ${time %I:%M%p %Z}
|
🕑 ${time %I:%M%p %Z}
|
||||||
]]
|
]]
|
||||||
--[[
|
--[[
|
||||||
Reference
|
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 600 weather fips4105192520 | grep Tempera | awk '{print $2}'}°F | \
|
||||||
${execi 1 cat /tmp/dwl.tags.out} | \
|
${execi 1 cat /tmp/dwl.tags.out} | \
|
||||||
@@ -80,3 +85,4 @@ ${color lightgrey} ${top name 2} ${top pid 2} ${top cpu 2} ${top mem 2}
|
|||||||
${color lightgrey} ${top name 3} ${top pid 3} ${top cpu 3} ${top mem 3}
|
${color lightgrey} ${top name 3} ${top pid 3} ${top cpu 3} ${top mem 3}
|
||||||
${color lightgrey} ${top name 4} ${top pid 4} ${top cpu 4} ${top mem 4}
|
${color lightgrey} ${top name 4} ${top pid 4} ${top cpu 4} ${top mem 4}
|
||||||
]]
|
]]
|
||||||
|
|
||||||
|
@@ -2,12 +2,17 @@
|
|||||||
# TMUX Configuration file
|
# TMUX Configuration file
|
||||||
#
|
#
|
||||||
# General settings {{{
|
# General settings {{{
|
||||||
set -g default-terminal "xterm-256color"
|
# set -g default-terminal "xterm-256color"
|
||||||
|
set -g default-terminal "screen-256color"
|
||||||
|
set -g default-command "$SHELL -l"
|
||||||
set -g prefix C-a
|
set -g prefix C-a
|
||||||
unbind-key C-b
|
unbind-key C-b
|
||||||
bind-key C-a send-prefix
|
bind-key C-a send-prefix
|
||||||
|
|
||||||
set -as terminal-overrides ',*:U8=a0'
|
# vi mode
|
||||||
|
set-window-option -g mode-keys vi
|
||||||
|
set -as terminal-overrides ",*:U8=a0"
|
||||||
|
# set-option -ga terminal-overrides ",screen-256color:Tc"
|
||||||
|
|
||||||
set -g mouse on
|
set -g mouse on
|
||||||
set -g status-position top
|
set -g status-position top
|
||||||
@@ -23,15 +28,18 @@
|
|||||||
# set -g @plugin 'git@github.com/user/plugin'
|
# set -g @plugin 'git@github.com/user/plugin'
|
||||||
# set -g @plugin 'git@bitbucket.com/user/plugin'
|
# set -g @plugin 'git@bitbucket.com/user/plugin'
|
||||||
|
|
||||||
|
set -g @themepack-status-right-area-left-format "#(~/bin/tmux_status) %H:%M"
|
||||||
|
|
||||||
set -g @plugin 'tmux-plugins/tmux-resurrect'
|
set -g @plugin 'tmux-plugins/tmux-resurrect'
|
||||||
set -g @plugin 'jimeh/tmux-themepack'
|
set -g @plugin 'jimeh/tmux-themepack'
|
||||||
set -g @themepack 'powerline/default/gray'
|
set -g @themepack 'powerline/default/gray'
|
||||||
|
|
||||||
set -g @themepack-status-right-area-left-format "#(~/bin/tmux_status) %H:%M"
|
|
||||||
# }}}
|
# }}}
|
||||||
# }}}
|
# }}}
|
||||||
|
|
||||||
# Keyboard shortcuts {{{
|
# Keyboard shortcuts {{{
|
||||||
|
# Reload tmux config
|
||||||
|
bind-key r source-file ~/.tmux.conf \; display-message "~/.tmux.conf reloaded"
|
||||||
|
|
||||||
# Navigation
|
# Navigation
|
||||||
bind -n M-h select-pane -L
|
bind -n M-h select-pane -L
|
||||||
bind -n M-j select-pane -D
|
bind -n M-j select-pane -D
|
||||||
@@ -42,16 +50,23 @@
|
|||||||
bind k select-pane -U
|
bind k select-pane -U
|
||||||
bind l select-pane -R
|
bind l select-pane -R
|
||||||
|
|
||||||
# Clipboard integration
|
bind-key R source-file ~/.tmux.conf \; display-message "tmux.conf reloaded."
|
||||||
# ctrl+c to send to clipboard
|
|
||||||
|
|
||||||
# Selection with mouse should copy to clipboard right away, in addition to the default action.
|
# # Clipboard integration
|
||||||
unbind -n -Tcopy-mode-vi MouseDragEnd1Pane
|
# # ctrl+c to send to clipboard
|
||||||
bind -Tcopy-mode-vi MouseDragEnd1Pane send -X copy-selection-and-cancel\; run "tmux save-buffer - | xclip -i -sel clipboard > /dev/null"
|
|
||||||
|
|
||||||
# Middle click to paste from the clipboard
|
# # Selection with mouse should copy to clipboard right away, in addition to the default action.
|
||||||
unbind-key MouseDown2Pane
|
# unbind -n -T copy-mode-vi MouseDragEnd1Pane
|
||||||
bind-key -n MouseDown2Pane run "tmux set-buffer \"$(xclip -o -sel clipboard)\"; tmux paste-buffer"
|
# bind -T copy-mode-vi MouseDragEnd1Pane send -X copy-selection-and-cancel\; run "tmux save-buffer - | xclip -i -sel clipboard > /dev/null"
|
||||||
|
|
||||||
|
# unbind -n -T copy-mode-vi 'v'
|
||||||
|
# bind -T copy-mode-vi 'v' send -X begin-selection
|
||||||
|
# unbind -n -T copy-mode-vi 'y'
|
||||||
|
# bind -T copy-mode-vi 'y' send -X copy-selection-and-cancel\; run "tmux save-buffer - | xclip -i -sel clipboard > /dev/null"
|
||||||
|
|
||||||
|
# # Middle click to paste from the clipboard
|
||||||
|
# unbind-key MouseDown2Pane
|
||||||
|
# bind-key -n MouseDown2Pane run "tmux set-buffer \"$(xclip -o -sel clipboard)\"; tmux paste-buffer"
|
||||||
# }}}
|
# }}}
|
||||||
|
|
||||||
# Footer {{{
|
# Footer {{{
|
||||||
|
@@ -7,7 +7,7 @@ return {
|
|||||||
-- MacBook Pro setting with proper DPI
|
-- MacBook Pro setting with proper DPI
|
||||||
font = wezterm.font("Iosevka Term"),
|
font = wezterm.font("Iosevka Term"),
|
||||||
font_size = 18,
|
font_size = 18,
|
||||||
font_antialias = "Subpixel",
|
-- font_antialias = "Subpixel",
|
||||||
dpi = 144.0,
|
dpi = 144.0,
|
||||||
|
|
||||||
-- Don't want tabbar by default
|
-- Don't want tabbar by default
|
||||||
@@ -16,6 +16,10 @@ return {
|
|||||||
-- Native fullscreen behavior on MacOS
|
-- Native fullscreen behavior on MacOS
|
||||||
native_macos_fullscreen_mode = true,
|
native_macos_fullscreen_mode = true,
|
||||||
|
|
||||||
|
-- -- Acceleration
|
||||||
|
-- front_end = "WebGpu",
|
||||||
|
-- webgpu_power_preference = "HighPerformance",
|
||||||
|
|
||||||
-- Keyboard bindings
|
-- Keyboard bindings
|
||||||
keys = {
|
keys = {
|
||||||
{ key = 'f', mods = 'CMD|CTRL', action = wezterm.action.ToggleFullScreen, },
|
{ key = 'f', mods = 'CMD|CTRL', action = wezterm.action.ToggleFullScreen, },
|
||||||
@@ -26,7 +30,7 @@ return {
|
|||||||
cursor_bg = "red",
|
cursor_bg = "red",
|
||||||
cursor_fg = "black",
|
cursor_fg = "black",
|
||||||
cursor_border = "grey",
|
cursor_border = "grey",
|
||||||
compose_curspr = "orange",
|
compose_cursor = "orange",
|
||||||
|
|
||||||
-- Color scheme
|
-- Color scheme
|
||||||
-- Molokini (https://github.com/asolkar/vim-color-molokini/blob/master/colors/molokini.vim)
|
-- Molokini (https://github.com/asolkar/vim-color-molokini/blob/master/colors/molokini.vim)
|
||||||
@@ -34,7 +38,7 @@ return {
|
|||||||
ansi = { "#000000", "#F92672", "#A6E22E", "#FFDF5F",
|
ansi = { "#000000", "#F92672", "#A6E22E", "#FFDF5F",
|
||||||
"#66D9EF", "#7070F0", "#A1FFA4", "#ffffff" },
|
"#66D9EF", "#7070F0", "#A1FFA4", "#ffffff" },
|
||||||
|
|
||||||
bright = { "#808080", "#f51d5a", "#9EC400", "#E7C547",
|
brights = { "#808080", "#f51d5a", "#9EC400", "#E7C547",
|
||||||
"#7AA6DA", "#B77EE0", "#54AE96", "#ffffff" },
|
"#7AA6DA", "#B77EE0", "#54AE96", "#ffffff" },
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user