feat: adjust cursor's size and dpi scale for rofi/i3

This commit is contained in:
ryan4yin
2023-05-27 14:25:24 +08:00
parent 6707783d0a
commit ab11958597
7 changed files with 31 additions and 14 deletions

View File

@@ -38,11 +38,17 @@
"WLR_EGL_NO_MODIFIRES" = "1";
};
# set cursor size and dpi for 4k monitor
# this is for xwayland
# set dpi for 4k monitor
xresources.properties = {
"Xcursor.size" = 32;
"Xft.dpi" = 172;
"Xft.dpi" = 162;
};
# set Xcursor.theme & Xcursor.size in ~/.Xresources automatically
home.pointerCursor = {
name = "Qogir-dark";
package = pkgs.qogir-theme;
size = 64;
};
}

View File

@@ -3,7 +3,7 @@ gtk-theme-name=Arc-Dark
gtk-icon-theme-name=Qogir-dark
gtk-font-name=Noto Sans 10
gtk-cursor-theme-name=Qogir-dark
gtk-cursor-theme-size=0
gtk-cursor-theme-size=64
gtk-toolbar-style=GTK_TOOLBAR_BOTH_HORIZ
gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR
gtk-button-images=0

View File

@@ -6,7 +6,7 @@ gtk-theme-name="Arc-Dark"
gtk-icon-theme-name="Qogir-dark"
gtk-font-name="Noto Sans 10"
gtk-cursor-theme-name="Qogir-dark"
gtk-cursor-theme-size=0
gtk-cursor-theme-size=64
gtk-toolbar-style=GTK_TOOLBAR_BOTH_HORIZ
gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR
gtk-button-images=0

View File

@@ -517,7 +517,8 @@ strip_workspace_numbers yes
## rofi bindings fancy application menu ($mod+d /F9 optional disabled)
bindsym $mod+d exec rofi -modi drun -show drun \
-config ~/.config/rofi/rofidmenu.rasi
-config ~/.config/rofi/rofidmenu.rasi \
-dpi 162
#bindsym F9 exec rofi -modi drun -show drun \
# -config ~/.config/rofi/rofidmenu.rasi
@@ -525,7 +526,8 @@ bindsym $mod+d exec rofi -modi drun -show drun \
## rofi bindings for window menu ($mod+t /F10 optional disabled)
bindsym $mod+t exec rofi -show window \
-config ~/.config/rofi/rofidmenu.rasi
-config ~/.config/rofi/rofidmenu.rasi \
-dpi 162
#bindsym F10 exec rofi -show window \
# -config ~/.config/rofi/rofidmenu.rasi

View File

@@ -32,9 +32,18 @@
"__GLX_VENDOR_LIBRARY_NAME" = "nvidia";
};
# set cursor size and dpi for 4k monitor
# set dpi for 4k monitor
xresources.properties = {
"Xcursor.size" = 32;
"Xft.dpi" = 172;
# dpi for Xorg's font
"Xft.dpi" = 162;
# or set a generic dpi
"*.dpi" = 162;
};
# set Xcursor.theme & Xcursor.size in ~/.Xresources automatically
home.pointerCursor = {
name = "Qogir-dark";
package = pkgs.qogir-theme;
size = 64;
};
}

View File

@@ -141,11 +141,11 @@ function prepare_launcher() {
rofi_colors=(-bc "${BORDER_COLOR}" -bg "${BG_COLOR}" -fg "${FG_COLOR}" \
-hlfg "${HLFG_COLOR}" -hlbg "${HLBG_COLOR}")
launcher_exe="rofi"
launcher_options=(-dmenu -i -lines "${menu_nrows}" -p "${ROFI_TEXT}" \
launcher_options=(-dpi 128 -dmenu -i -lines "${menu_nrows}" -p "${ROFI_TEXT}" \
"${rofi_colors}" "${ROFI_OPTIONS[@]}")
elif [[ "$1" == "zenity" ]]; then
launcher_exe="zenity"
launcher_options=(--list --title="${ZENITY_TITLE}" --text="${ZENITY_TEXT}" \
launcher_options=(-dpi 128 --list --title="${ZENITY_TITLE}" --text="${ZENITY_TEXT}" \
"${ZENITY_OPTIONS[@]}")
fi
}

View File

@@ -137,11 +137,11 @@ function prepare_launcher() {
rofi_colors=(-bc "${BORDER_COLOR}" -bg "${BG_COLOR}" -fg "${FG_COLOR}" \
-hlfg "${HLFG_COLOR}" -hlbg "${HLBG_COLOR}")
launcher_exe="rofi"
launcher_options=(-dmenu -i -lines "${menu_nrows}" -p "${ROFI_TEXT}" \
launcher_options=(-dpi 128 -dmenu -i -lines "${menu_nrows}" -p "${ROFI_TEXT}" \
"${rofi_colors}" "${ROFI_OPTIONS[@]}")
elif [[ "$1" == "zenity" ]]; then
launcher_exe="zenity"
launcher_options=(--list --title="${ZENITY_TITLE}" --text="${ZENITY_TEXT}" \
launcher_options=(-dpi 128 --list --title="${ZENITY_TITLE}" --text="${ZENITY_TEXT}" \
"${ZENITY_OPTIONS[@]}")
fi
}