summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Vertes <mvertes@free.fr>2022-02-03 14:43:32 +0100
committerMarc Vertes <mvertes@free.fr>2022-02-03 14:43:32 +0100
commita3a3a61742950d45f1573a45a928e9b04c115634 (patch)
tree07bfcd60a56f47a817cfae3f5efbcebfa58f5f29
parent053556962bb2d29ac76bcca51cabd1df238f80e3 (diff)
update
-rw-r--r--.config/i3/config4
-rw-r--r--.profile6
-rwxr-xr-x.xsession6
-rwxr-xr-xbin/hdmi10
-rwxr-xr-xbin/vm30
5 files changed, 44 insertions, 12 deletions
diff --git a/.config/i3/config b/.config/i3/config
index 182f119..5284bcc 100644
--- a/.config/i3/config
+++ b/.config/i3/config
@@ -59,6 +59,8 @@ bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOU
# enable floating mode
for_window [class="Arandr"] floating enable
for_window [class="Brave-browser"] floating enable
+for_window [class="Blueberry.py"] floating enable
+for_window [class="Blueman-manager"] floating enable
for_window [class="Chromium"] floating enable
for_window [title="Task Manager - Chromium"] floating enable
for_window [title="Gestionnaire de tâches – Chromium"] floating enable
@@ -68,7 +70,7 @@ for_window [class="Display"] floating enable
for_window [class="Feedreader"] floating enable
for_window [class="feh"] floating enable
for_window [class="firefox"] floating enable
-for_window [class="fluent-reader"] floating enable
+for_window [class="fluent-reader"] floating enable border normal
for_window [class="Geeqie"] floating enable
for_window [class="Gpicview"] floating enable
for_window [class="Ghb"] floating enable
diff --git a/.profile b/.profile
index cb09e87..acb8299 100644
--- a/.profile
+++ b/.profile
@@ -5,6 +5,6 @@ PATH=~/bin:$PATH:~/go/bin
[ "${SHELL##*/}" = bash ] && . ~/.bashrc
# Last action: auto start X11 when logged on first console
-case $HOSTNAME in
-([sS]wift|yoda) [ "$(tty)" != /dev/tty1 ] || exec startx ;;
-esac
+#case $HOSTNAME in
+#([sS]wift|yoda) [ "$(tty)" != /dev/tty1 ] || exec startx ;;
+#esac
diff --git a/.xsession b/.xsession
index 92f75e1..278c5fc 100755
--- a/.xsession
+++ b/.xsession
@@ -2,6 +2,8 @@
# start pulseaudio on crux only. Should be handled by systemd on arch
#pulseaudio --start --exit-idle-time=-1 --log-target=syslog &
+eval $(ssh-agent)
+
# enable tapping and natural scrolling on touchpad
# see xinput --list[-props] for ids
xinput --set-prop 'SYNA7DAB:00 06CB:CD40 Touchpad' 'libinput Tapping Enabled' 1
@@ -20,5 +22,5 @@ xsetroot -solid rgb:1/3/4
#slock
# Start window manager
-exec fvwm
-#exec i3
+#exec fvwm
+exec i3
diff --git a/bin/hdmi b/bin/hdmi
index e6e3094..0a81716 100755
--- a/bin/hdmi
+++ b/bin/hdmi
@@ -1,9 +1,9 @@
#!/bin/sh
# Toggle auxiliary HDMI screen on/off when connected/disconnected.
-opt="--auto --left-of eDP1"
-#opt="--auto --right-of eDP1"
-#opt="--auto --above eDP1"
+opt="--auto --left-of eDP-1"
+#opt="--auto --right-of eDP-1"
+#opt="--auto --above eDP-1"
# Also add the following rule to /etc/udev/rules.d/hdmi.rules
# KERNEL=="card0", SUBSYSTEM=="drm", ENV{DISPLAY}=":0", ENV{XAUTHORITY}="/home/marc/.Xauthority", RUN+="/home/marc/bin/hdmi"
@@ -11,5 +11,5 @@ opt="--auto --left-of eDP1"
# wait for the screen to settle
sleep 3
-xrandr | grep -q '^DP1 connected' || opt="--off"
-xrandr --output DP1 $opt
+xrandr | grep -q '^DP-1 connected' || opt="--off"
+xrandr --output DP-1 $opt
diff --git a/bin/vm b/bin/vm
index 8b4da42..35a107e 100755
--- a/bin/vm
+++ b/bin/vm
@@ -35,13 +35,41 @@ console() {
is_running "$1" && screen -r "vm!$1!"
}
+create_arch() {
+ usage 'create_arch [-s size] name' 'Create an archlinux disk image' && return
+ size=8g
+ while getopts :s: opt; do
+ case $opt in
+ s) size=$OPTARG ;;
+ *) Opth=2 create_arch; return ;;
+ esac
+ done
+ shift $((OPTIND - 1))
+ [ -d "$dir/$1" ] && die "create failed: $dir/$1 already exists"
+ mkdir "$dir/$1"
+ cd "$dir/$1" || die "create failed: invalid directory $dir/$1"
+ qemu-img create "$1.raw" "$size" || die "create failed"
+ mac=$(new_macaddr)
+ ip=$(new_ip)
+ hdd="$1.raw"
+ echo "hdd=$hdd
+mac=$mac
+ip=$ip" >> config
+
+ mkfs.ext4 "$1.raw"
+ mkdir -p mnt
+ sudo mount "$1.raw" mnt
+ sudo pacstrap mnt base base-devel
+ sudo umount mnt
+}
+
create() {
usage 'create [-s size] name' 'Create an alpinelinux disk image' && return
size=8g
while getopts :s: opt; do
case $opt in
s) size=$OPTARG ;;
- *) Opth=2 create_alpine_image; return ;;
+ *) Opth=2 create_arch; return ;;
esac
done
shift $((OPTIND - 1))