انجمن‌های فارسی اوبونتو

لطفاً به انجمن‌ها وارد شده و یا جهت ورود ثبت‌نام نمائید

لطفاً جهت ورود نام کاربری و رمز عبورتان را وارد نمائید




نویسنده موضوع: آموزش راست به چپ نویسی در gnome terminal  (دفعات بازدید: 852 بار)

0 کاربر و 1 مهمان درحال مشاهده موضوع.

آفلاین علی ۵۰۰

  • Hero Member
  • *
  • ارسال: 775
  • جنسیت : پسر
آموزش راست به چپ نویسی در gnome terminal
« : 04 مهر 1400، 06:59 ب‌ظ »
بسم الله الرحمن الرحیم

سلام

آیا می‌دانستید که می‌توانید از نسخه 3.33.3 در ترمینال گنوم فارسی بنویسید؟
آیا می‌دانستید که می‌توانید حتی بندها (پاراگراف‌ها) را هم راست به چپ کنید؟

(حالا چرا ترمینال گنوم از راست به چپ نویسی تا حدودی پشتیبانی می‌کند؟ چون VTE 0.57.3 که جزء زیرساخت‌های ترمینال گنوم هست، تاحدودی از راست به چپ و الگوریتم دوجهته پشتیبانی می‌کند.

اول یک قلم مناسب برای گنوم‌ترمینال برگزینید. (فونت monospace خوب است)

سپس میان‌برهای زیر را برای راحتی بیشتر ایجاد کنید:



حالا با دستورِ میان‌برِ autodir، حالت جهت خودکار را فعال کنید:



می‌توانید با مطالعه توضیحات زیر، حالت دلخواهتان را فعال نمایید:

# BiDi support in VTE is implemented according to
# https://terminal-wg.pages.freedesktop.org/bidi/
#
# The following aliases allow you to quickly change the BiDi mode.
#
# These are not meant to be standardized command names. Customize them
# according to your liking, and don't rely on them being available for others.

# Bi-Directional Support Mode (BDSM):
# In implicit mode the terminal emulator performs BiDi.
# In explicit mode the terminal emulator lays out the characters in linear
# order, and the application running inside is expected to do BiDi.
alias implicit='printf "\e[8h"'
alias explicit='printf "\e[8l"'

# Select Character Path (SCP):
# Defines the paragraph direction for explicit mode, and for implicit mode
# without autodetection. Defines the fallback paragraph direction (in case
# autodetection fails) for implicit mode with autodetection.
alias ltr='printf "\e[1 k"'
alias rtl='printf "\e[2 k"'
# alias defaultdir='printf "\e[ k"' # currently the same as ltr

# Autodetection:
# Whether in implicit mode the paragraph direction is autodetected (possibly
# falling back to the value set by SCP), or taken strictly from SCP.
alias   autodir='printf "\e[?2501h"'
alias noautodir='printf "\e[?2501l"'

# Box mirroring:
# Whether box drawing characters are added to the set of mirrorable glyphs.
alias   boxmirror='printf "\e[?2500h"'
alias noboxmirror='printf "\e[?2500l"'

# Keyboard arrow swapping:
# Whether the left and right arrows of the keyboard are swapped whenever the
# cursor stands within an RTL paragraph.
alias   kbdswap='printf "\e[?1243h"'
alias nokbdswap='printf "\e[?1243l"'

منبع:
https://github.com/skirino/vte/blob/master/perf/bidi.sh
البته منبع دیگری هم بود که دیگر ننوشتم!
« آخرین ویرایش: 05 مهر 1400، 08:47 ق‌ظ توسط علی ۵۰۰ »

آفلاین دانیال بهزادی

  • ناظر انجمن
  • *
  • ارسال: 19699
  • جنسیت : پسر
  • Urahara Kiesuke
    • وبلاگ
پاسخ : آموزش راست به چپ نویسی در gnome terminal
« پاسخ #1 : 04 مهر 1400، 08:56 ب‌ظ »
ممنون. این باید ویکی بشه.
اگه این ارسال بهت کمک کرد، دنبال دکمهٔ تشکر نگرد. به جاش تو هم به جامعهٔ آزادت کمک کن

آفلاین Issac

  • Hero Member
  • *
  • ارسال: 890
  • جنسیت : پسر
    • Mastodon
پاسخ : آموزش راست به چپ نویسی در gnome terminal
« پاسخ #2 : 05 مهر 1400، 05:31 ب‌ظ »
ممنون از پستتون، خیلی به‌کار میاد.
امیدوارم که این ویژگی به حالت پایدار برسه و از آزمایشی بودن در بیاد.
این پست رو فرستادم که تعداد ارسال‌هام زیاد بشه.

آفلاین esmaeelE

  • ناظر انجمن
  • *
  • ارسال: 1258
  • جنسیت : پسر