Skip to content

Instantly share code, notes, and snippets.

@panta82
Last active October 7, 2024 04:37
Show Gist options
  • Select an option

  • Save panta82/df28c33ca87de9264b52fd7a53e61601 to your computer and use it in GitHub Desktop.

Select an option

Save panta82/df28c33ca87de9264b52fd7a53e61601 to your computer and use it in GitHub Desktop.

Revisions

  1. Ivan Pantic revised this gist Jul 2, 2020. 2 changed files with 7 additions and 5 deletions.
    12 changes: 7 additions & 5 deletions README.md
    Original file line number Diff line number Diff line change
    @@ -8,12 +8,14 @@ https://mega.nz/file/HJhlEIIJ#PfjkrfPPu0TGzJ_ukgn2LX3fWRWsZK7o16beHAh4roY

    Unpack it under `/home/panta/.wine/drive_c/opt/`.

    **3.** Enable font smoothing. It can be done through `winetricks`, or using `wine-font-smoothing.sh`. Select 3rd option (rgb).
    **3.** Enable font smoothing. It can be done through `winetricks`, or using `wine-font-smoothing.sh`. Select 3rd option (rgb). This will make fonts not look like shit.

    **4.** Using winetricks, import `wine_breeze_colors.reg`.
    **4.** Run `winecfg` and switch Windows version to "Windows XP". That will make volume control work.

    **5.** Save `foobar.sh` under `/usr/local/bin/foobar2000`.
    **5.** Using winetricks, import `wine_breeze_colors.reg`. This will make UI look white and pretty instead of gray and old.

    **6.** Save `foobar2000.desktop` under `/usr/share/applications/foobar2000.desktop`
    **6.** Save `foobar.sh` under `/usr/local/bin/foobar2000`.

    **7.** Run `sudo update-desktop-database`.
    **7.** Save `foobar2000.desktop` under `/usr/share/applications/foobar2000.desktop`

    **8.** Run `sudo update-desktop-database`.
    Empty file modified foobar.sh
    100644 → 100755
    Empty file.
  2. panta82 revised this gist Jun 10, 2020. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion README.md
    Original file line number Diff line number Diff line change
    @@ -4,7 +4,7 @@ sudo apt install wine-stable winetricks
    ```

    **2.** Get foobar installation here:
    https://mega.nz/file/PU4DSAIC
    https://mega.nz/file/HJhlEIIJ#PfjkrfPPu0TGzJ_ukgn2LX3fWRWsZK7o16beHAh4roY

    Unpack it under `/home/panta/.wine/drive_c/opt/`.

  3. panta82 created this gist Jun 10, 2020.
    19 changes: 19 additions & 0 deletions README.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,19 @@
    **1.** Install wine:
    ```
    sudo apt install wine-stable winetricks
    ```

    **2.** Get foobar installation here:
    https://mega.nz/file/PU4DSAIC

    Unpack it under `/home/panta/.wine/drive_c/opt/`.

    **3.** Enable font smoothing. It can be done through `winetricks`, or using `wine-font-smoothing.sh`. Select 3rd option (rgb).

    **4.** Using winetricks, import `wine_breeze_colors.reg`.

    **5.** Save `foobar.sh` under `/usr/local/bin/foobar2000`.

    **6.** Save `foobar2000.desktop` under `/usr/share/applications/foobar2000.desktop`

    **7.** Run `sudo update-desktop-database`.
    8 changes: 8 additions & 0 deletions foobar.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,8 @@
    #!/bin/sh
    cd /home/panta/.wine/drive_c/opt/foobar2000
    if [ "$1" != "" ]; then
    filename=`echo z:$1 | sed 's/\\//\\\\/g'`
    wine foobar2000.exe "$filename" >/dev/null 2>&1 &
    else
    wine foobar2000.exe >/dev/null 2>&1 &
    fi
    11 changes: 11 additions & 0 deletions foobar2000.desktop
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,11 @@
    [Desktop Entry]
    Type=Application
    Name=foobar2000
    GenericName=Plays Music
    Version=1.0
    Encoding=UTF-8
    Terminal=false
    Exec=/usr/local/bin/foobar2000
    Comment=Plays Music
    Icon=/home/panta/.wine/drive_c/opt/foobar2000/foobar.png
    Categories=GNOME;GTK;AudioVideo;Audio;Player;
    81 changes: 81 additions & 0 deletions wine-font-smoothing.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,81 @@
    #!/bin/sh
    # Quick and dirty script for configuring wine font smoothing
    #
    # Author: Igor Tarasov <[email protected]>

    WINE=${WINE:-wine}
    WINEPREFIX=${WINEPREFIX:-$HOME/.wine}
    DIALOG=whiptail

    if [ ! -x "`which "$WINE"`" ]
    then
    echo "Wine was not found. Is it really installed? ($WINE)"
    exit 1
    fi

    if [ ! -x "`which "$DIALOG"`" ]
    then
    DIALOG=dialog
    fi

    TMPFILE=`mktemp` || exit 1

    $DIALOG --menu \
    "Please select font smoothing mode for wine programs:" 13 51\
    4\
    1 "Smoothing disabled"\
    2 "Grayscale smoothing"\
    3 "Subpixel smoothing (ClearType) RGB"\
    4 "Subpixel smoothing (ClearType) BGR" 2> $TMPFILE

    STATUS=$?
    ANSWER=`cat $TMPFILE`

    if [ $STATUS != 0 ]
    then
    rm -f $TMPFILE
    exit 1
    fi

    MODE=0 # 0 = disabled; 2 = enabled
    TYPE=0 # 1 = regular; 2 = subpixel
    ORIENTATION=1 # 0 = BGR; 1 = RGB

    case $ANSWER in
    1) # disable
    ;;
    2) # enable
    MODE=2
    TYPE=1
    ;;
    3) # enable cleartype rgb
    MODE=2
    TYPE=2
    ;;
    4) # enable cleartype bgr
    MODE=2
    TYPE=2
    ORIENTATION=0
    ;;
    *)
    rm -f $TMPFILE
    echo Unexpected option: $ANSWER
    exit 1
    ;;
    esac

    echo "REGEDIT4
    [HKEY_CURRENT_USER\Control Panel\Desktop]
    \"FontSmoothing\"=\"$MODE\"
    \"FontSmoothingOrientation\"=dword:0000000$ORIENTATION
    \"FontSmoothingType\"=dword:0000000$TYPE
    \"FontSmoothingGamma\"=dword:00000578" > $TMPFILE

    echo -n "Updating configuration... "

    $WINE regedit $TMPFILE 2> /dev/null

    rm -f $TMPFILE

    echo ok
    34 changes: 34 additions & 0 deletions wine_breeze_colors.reg
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,34 @@
    Windows Registry Editor Version 5.00

    [HKEY_CURRENT_USER\Control Panel\Colors]
    "ActiveBorder"="239 240 241"
    "ActiveTitle"="71 80 87"
    "AppWorkSpace"="239 240 241"
    "Background"="26 26 26"
    "ButtonAlternateFace"="179 180 181"
    "ButtonDkShadow"="248 249 249"
    "ButtonFace"="239 240 241"
    "ButtonHilight"="248 249 249"
    "ButtonLight"="179 180 181"
    "ButtonShadow"="179 180 181"
    "ButtonText"="0 0 0"
    "GradientActiveTitle"="71 80 87"
    "GradientInactiveTitle"="239 240 241"
    "GrayText"="100 101 102"
    "Hilight"="61 174 233"
    "HilightText"="255 255 255"
    "HotTrackingColor"="61 174 233"
    "InactiveBorder"="239 240 241"
    "InactiveTitle"="239 240 241"
    "InactiveTitleText"="189 195 195"
    "InfoText"="0 0 0"
    "InfoWindow"="255 255 225"
    "Menu"="248 249 249"
    "MenuBar"="239 240 241"
    "MenuHilight"="61 174 233"
    "MenuText"="0 0 0"
    "Scrollbar"="239 240 241"
    "TitleText"="255 255 255"
    "Window"="255 255 255"
    "WindowFrame"="179 180 181"
    "WindowText"="0 0 0"