惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Know Your Adversary
Know Your Adversary
小众软件
小众软件
L
LangChain Blog
月光博客
月光博客
博客园 - Franky
Microsoft Azure Blog
Microsoft Azure Blog
Y
Y Combinator Blog
有赞技术团队
有赞技术团队
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
MongoDB | Blog
MongoDB | Blog
Recorded Future
Recorded Future
V
Visual Studio Blog
TaoSecurity Blog
TaoSecurity Blog
S
Schneier on Security
C
Cybersecurity and Infrastructure Security Agency CISA
P
Privacy & Cybersecurity Law Blog
T
Threat Research - Cisco Blogs
D
DataBreaches.Net
L
LINUX DO - 热门话题
C
Check Point Blog
F
Fortinet All Blogs
Hugging Face - Blog
Hugging Face - Blog
The Hacker News
The Hacker News
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Microsoft Security Blog
Microsoft Security Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
V
V2EX
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
The GitHub Blog
The GitHub Blog
P
Proofpoint News Feed
L
Lohrmann on Cybersecurity
博客园 - 司徒正美
T
Threatpost
P
Palo Alto Networks Blog
A
About on SuperTechFans
Spread Privacy
Spread Privacy
Engineering at Meta
Engineering at Meta
N
News | PayPal Newsroom
T
Tailwind CSS Blog
The Last Watchdog
The Last Watchdog
Blog — PlanetScale
Blog — PlanetScale
A
Arctic Wolf
量子位
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
博客园 - 聂微东
Google Online Security Blog
Google Online Security Blog
Google DeepMind News
Google DeepMind News
www.infosecurity-magazine.com
www.infosecurity-magazine.com
V
Vulnerabilities – Threatpost
H
Hacker News: Front Page

mephisto.cc

修复rime-ice无法弹出候选框的问题 开机滚动字体显示优化 个人网站安全防护 树莓派上部署Vaultwarden 使用goaccess实时分析Caddy日志 个人网站监控 Hugo全站AVIF记 Linux下尝试使用Godot开发小游戏 Arch linux dae 透明代理 Airflow接管galler-dl下载任务 如何使用gallery-dl批量下载图像 Arch核显下如何愉快玩Dota2和CS2 Arch/labwc 环境网络相关设置 Rime添加dota2词库 Arch 重装记录 Supertuxkart iOS版终于发布了 打造自己的流媒体音乐服务 剪切板管理工具clipcat推荐 MangoHud性能监控 微信小程序开发记 Rofi试用 解决Arch下VSCode无法输入中文的问题 独立窗口管理器下无法录屏问题处理 上海市二手房成交数据监控 OpenLDAP监控 Arch linux如何顺畅连接蓝牙设备 使用Git和Ansible管理配置文件 Arch Linux SSL VPN 客户端配置 简单获取celery任务实时结果 Arch linux下iNode客户端的安装和使用方法 券商费率调整记 迷你主机组装记 Labwc更换定制皮肤 树莓派跑分流代理 实用自动代理配置示例 九年老鼠标复活记 Openvpn示例 Mac下如何旋转webp图片 如何隐藏Vscode中Markdown PDF插件的头部内容 解决Linux下网络配置无法变更保存的问题 labwc环境启用wlogout Ubuntu下新官方微信尝鲜 简单检测用户是否开启广告屏蔽 Atuin ZFS下卡顿问题解决 Wine安装64位微信 Fish 和 Atuin使用记 Fastapi简单实现临时下载链接 Fastapi微信公众号开发简要 Hugo根据语种展示不同内容 如何修复Waybar微信图标错误 信封加密简要 Linux环境下维护公众号记录 快速隐藏和呼出终端 Wayland环境自动切换壁纸 SuperTuxKart 试玩 简单抓取雪球股票快讯 为什么你的kill命令不能列出信号表 Wine安装微信保姆教程 Hysteria科学上网简要 Ubuntu 23.10 钉钉无法启动解决方法 网站导航栏防止插入Adsense自动广告 Linux环境按键检测 Hugo文末添加最后修改时间 Wayland环境ksnip无法复制问题解决 我眼中的股票市场 Caddy简单图片防盗链 greetd和regreet使用教程 Wayland环境下截图加后期修改 Wayland 环境下gif录屏 Firefox的一些有趣功能 Ubuntu 切换系统语言 Firefox 标题栏高度调整 网站添加回到顶部功能 Hugo自定义字体 Labwc 便捷配置 Wofi使用教程 窗口管理器labwc使用记 文件共享软件Dufs推荐 Hugo静态站点接入Adsense广告 Fcitx5配置详解 Ubuntu安装chrome的方法总结 一种Xterm.js的全屏方案 Google网址收录api Python示例 手机听离线音乐 Snipe it资产导入 Snipe it资产管理系统安装使用 Ubuntu开机启动加速 Vue3 vite TypeScript跨域等相关设置 Ubuntu手动升级Libreoffice Ubuntu设置alacritty为默认终端 简体文章批量转换为繁体 使用Inkscape调整svg图片大小 实用命令 使用mitmproxy给手机app抓包 Python中rstrip方法细解 Github同主机多仓库部署deploy key问题处理 Linux安装最新版本Python KeePassXC使用教程 Ubuntu 22.10连接蓝牙耳机报错br-connection-profile-unavailable解决方法 Caddy日志配置轮转和格式化
应用启动器yofi使用配置
2023-03-20 · via mephisto.cc

应用程序启动器(application launcher), 通常是用来快速定位和启动计算机中的其它程序的。例如 Linux 中的 Albert Launcher、Synapse,macOS 中的 Alfred 等。Gnome 环境按 Super 快捷键后也是差不多的功能。

启动器一般有模糊搜索功能,本文介绍的是 yofi,一个用 rust 编写的适用于 wanyland 环境的轻量启动器,rust 编写好感度增加,作者还在积极维护,目前看起来使用的人不多,写这个文章的时候,Google 搜索不出中文相关资料,不小心填补了中文世界的空白,做了一点点微小工作,功德+1。

1. 下载编译安装

  • 下载源码
1 git clone https://github.com/l4l/yofi
  • 编译安装

rust 的应用,cargo 编译,省心省力,坐等生成可执行文件即可。生成的二进制在target/release/目录下,

1➜  cargo run --release
2➜  yofi git:(master) ls
3  Cargo.lock  Cargo.toml  CHANGELOG.md  flake.lock  flake.nix  LICENSE  README.md  rust-toolchain  src  target
4➜  yofi git:(master) ls -al target/release/yofi
5  -rwxrwxr-x 2 mephisto mephisto 11454816 Mar 17 14:54 target/release/yofi
6➜  yofi git:(master) file target/release/yofi
7  target/release/yofi: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=83e34f2d6952622f6767b088083ed045c53ca4df, for GNU/Linux 3.2.0, with debug_info, not stripped
  • 做个软链接

方便后续升级

1sudo ln -s /home/mephisto/github/yofi/target/release/yofi /usr/bin/yofi
  • 绑定个快捷键

如果你是 Gnome 环境: Settings/Keyboard/Coustom Shortcuts 根据喜好设置快捷键。

图示:

Gnome yofi settings

F8搜索启动对应的程序,使用频次高的会靠前展示。

Gnome yofi

如果你是 Sway 环境:

1➜  ~ grep yofi  ~/.config/sway/config
2    # yofi lancher
3    bindsym F8 exec yofi apps

意思是绑定F8快捷键,执行 yofi apps 命令

图示:

sway yofi

我主要用 Gnome 和 sway 两个环境,其它不做介绍。

可能有读者会有疑问,既然 Gnome 的Super键有类似效果,为什么还要费劲。先生此言差矣,不是人人都用 Gnome,比如用 sway 环境的时候,Gnome 不好定制,这个想怎么改就怎么改,还有黑名单等功能,详情参考yofi wiki

2. 个性化配置

主要定制 yofi 呼出后的样式,例如窗口大小、字体、圆角、颜色相关。

记得找个好看的图标集,绝对值得,颜值也很关键,我选的Papirus,理由是好看,图标多且全。

个人配置仅供参考:

  1➜  ~ cat ~/.config/yofi/yofi.config
  2# Width/height of the app in pixels
  3width = 800
  4height = 512
  5
  6# If set forces usage of basic window instead of Layer Shell wayland protocol
  7force_window = false
  8
  9# if unset, renders window centered
 10# window_offsets = [500, -50] # in format [top_offset_pixels, left_offset_pixels]
 11
 12# Similar to CSS border-radius for main window, for more details see corner_radius
 13# for [input_text]
 14corner_radius = "0"
 15
 16# font = "DejaVu Sans"
 17font = "Source Sans Pro"
 18# or you may use an absolute path, e.g:
 19# font = "/usr/share/fonts/TTF/DejaVuSans.ttf"
 20font_size = 24
 21
 22# Color of the app background
 23# Colors are specified in 0xRRGGBBAA format
 24bg_color = 0x272822ee
 25# Border around background
 26#bg_border_color = 0x131411ff
 27bg_border_color = 0xa6e22eff
 28# bg_border_width = 2.0
 29
 30# Color for the fonts
 31# font_color = 0xf8f8f2ff
 32
 33# HiDPI scaling factor; default is requested from compositor but
 34# fractional values are truncated, so one may want to set it explicitly.
 35# scale = 3
 36
 37# Terminal emulator to use for apps that require terminal.
 38# Certain apps like vim might not launch unless specified.
 39#term = "alacritty -e"
 40
 41# TOML sections are scope config values for a related blocks.
 42# This one for instance is for input field area.
 43[input_text]
 44# font = ...
 45font_color = 0xf8f8f2ff
 46bg_color = 0x75715eff
 47
 48# Margin/padding values are specified as in CSS but only in pixels.
 49# So it's either a single value for all directions
 50# or two values: the first for top/bottom and the second for left/right
 51# or finally four values: for top, right, bottom and left directions respectively.
 52margin = "5" # equivalent to "5 5 5 5"
 53padding = "1.7 -4" # equivalent to "1.7 -4 1.7 -4"
 54
 55# Corner radius is the arc radius for the surrounding input box.
 56# Similar to border-radius in CSS but only in pixels.
 57# So it's either a single value for all corners
 58# or two values: the first for top-left/bottom-right and the second for top-right/bottom-left
 59# or finally four values: for top-left, top-right, bottom-right and bottom-left respectively.
 60# By default the radius is a maximal possible value.
 61# corner_radius = "1 2 3 4"
 62
 63# Section for items in the search results area.
 64[list_items]
 65# font = ...
 66font_color = 0xf8f8f2ff
 67
 68# Font color for an item that currently selected
 69selected_font_color = 0xa6e22eff
 70
 71# if specified, search matches are emphasized with this color
 72match_color = 0xe69f66ff
 73
 74margin = "5 10"
 75
 76# If set to true hides the desktop actions
 77hide_actions = false
 78# Specify left margin for action line
 79action_left_margin = 60
 80
 81# Additional spacing between list items.
 82# By default there's a space around 10 pixels
 83# the value can be reduced by specifying a negative value
 84item_spacing = 2
 85
 86# Spacing between an icon and a text.
 87icon_spacing = 5
 88
 89# Sections for the icons. When this section presents, icons are displayed
 90[icon]
 91# For now app only supports fixed sized icons and there's no icon up/down-scaling yet.
 92# More info: https://github.com/l4l/yofi/issues/76#issuecomment-1023631399
 93size = 32
 94
 95# For the icon search path, by default "hicolor" is used which usually not what you want.
 96theme = "Papirus"
 97
 98# If no icon found for an entry, this one will be used instead
 99#fallback_icon_path = "/usr/share/icons/Adwaita/16x16/categories/applications-engineering-symbolic.symbolic.png"
100fallback_icon_path = "/usr/share/icons/Papirus/32x32/apps/rust.svg"