Wednesday, September 13, 2023

QEMU command for MacOS

 To run Qemu on mac use this command:

- Install Qemu: brew install qemu

 

to run VM:

qemu-system-x86_64 \
-m 8G \
-smp 6 \
-cdrom os_you_want_to_install.iso \
-drive file=
your_virtual_disk_here.qcow2,if=virtio \
-vga virtio \
-display default,show-cursor=on \
-usb \
-device usb-tablet \
-cpu host \
-machine type=q35,accel=hvf \
 
 😎 

 

Thursday, September 7, 2023

A small script to toggle Mute for Dwm Freebsd 13

 this is my small script just to toggle mute in mixer.

I name the script "togglevol.sh"

$>chmod +x togglevol.sh
$>sudo cp togglevol.sh /usr/bin/


and bind it with any key you want in Dwm.


#!/bin/sh


FILEPATH=~/.togglevol
CURRVOL=`mixer vol | awk '{print $NF}'`

## DEBUG
#echo "mixer vol: $CURRVOL"

if [ $CURRVOL = "0:0" ]; then
  ## return the value from file
  FILEVOL=`cat $FILEPATH`

  mixer vol $FILEVOL

else
  ## save current value to file
    echo "$CURRVOL" > $FILEPATH

    mixer vol 0:0
fi