mirror of
https://github.com/Dichgrem/dotfiles.git
synced 2025-08-02 01:39:32 -04:00
Compare commits
16 Commits
1a4c06e08c
...
main
Author | SHA1 | Date | |
---|---|---|---|
52749d8ac3 | |||
c84fd8f412 | |||
dbdf37dbed | |||
80c7581493 | |||
846704dc0c | |||
4e266843db | |||
8aeb0c38b9 | |||
c1725285b8 | |||
6a1e94e6b6 | |||
23d4a1f2db | |||
0a11fb7257 | |||
9333bb40ae | |||
366660a0f0 | |||
251fda4d51 | |||
f92ab6ccba | |||
93e5822d72 |
@ -161,7 +161,7 @@ live_config_reload = true
|
|||||||
working_directory = "None"
|
working_directory = "None"
|
||||||
|
|
||||||
[terminal.shell]
|
[terminal.shell]
|
||||||
program = "/usr/bin/sh"
|
program = "/usr/bin/fish"
|
||||||
args = ["-c", "fastfetch && exec nu"]
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -107,7 +107,7 @@
|
|||||||
"key": "│ ╠ Shell │",
|
"key": "│ ╠ Shell │",
|
||||||
"keyColor": "blue",
|
"keyColor": "blue",
|
||||||
"outputColor": "blue",
|
"outputColor": "blue",
|
||||||
"format": "nushell",
|
"format": "{1}",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "terminal",
|
"type": "terminal",
|
||||||
|
BIN
fcitx5(local)/themes/catppuccin-mocha-flamingo/arrow.png
Normal file
BIN
fcitx5(local)/themes/catppuccin-mocha-flamingo/arrow.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 694 B |
BIN
fcitx5(local)/themes/catppuccin-mocha-flamingo/radio.png
Normal file
BIN
fcitx5(local)/themes/catppuccin-mocha-flamingo/radio.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 617 B |
110
fcitx5(local)/themes/catppuccin-mocha-flamingo/theme.conf
Normal file
110
fcitx5(local)/themes/catppuccin-mocha-flamingo/theme.conf
Normal file
@ -0,0 +1,110 @@
|
|||||||
|
# vim: ft=dosini
|
||||||
|
[Metadata]
|
||||||
|
Name=Catppuccin Mocha Flamingo
|
||||||
|
Version=0.2
|
||||||
|
Author=justTOBBI and Isabelinc
|
||||||
|
Description=Catppuccin Mocha Flamingo Color Theme
|
||||||
|
ScaleWithDPI=True
|
||||||
|
|
||||||
|
[InputPanel]
|
||||||
|
# 字体
|
||||||
|
Font=Sarasa Gothic SC 14
|
||||||
|
# 非选中候选字颜色
|
||||||
|
# Blue
|
||||||
|
NormalColor=#89b4fa
|
||||||
|
# 选中候选字颜色
|
||||||
|
# Flamingo
|
||||||
|
HighlightCandidateColor=#f2cdcd
|
||||||
|
# 高亮前景颜色(输入字符颜色)
|
||||||
|
# Flamingo
|
||||||
|
HighlightColor=#f2cdcd
|
||||||
|
# 输入字符背景颜色
|
||||||
|
# Surface 0
|
||||||
|
HighlightBackgroundColor=#313244
|
||||||
|
|
||||||
|
Spacing=3
|
||||||
|
|
||||||
|
[InputPanel/TextMargin]
|
||||||
|
# 候选字对左边距
|
||||||
|
Left=10
|
||||||
|
# 候选字对右边距
|
||||||
|
Right=10
|
||||||
|
# 候选字向上边距
|
||||||
|
Top=6
|
||||||
|
# 候选字向下边距
|
||||||
|
Bottom=6
|
||||||
|
|
||||||
|
[InputPanel/Background]
|
||||||
|
# Surface 0
|
||||||
|
Color=#313244
|
||||||
|
# Surface 0
|
||||||
|
BorderColor=#313244
|
||||||
|
BorderWidth=2
|
||||||
|
|
||||||
|
[InputPanel/Background/Margin]
|
||||||
|
Left=2
|
||||||
|
Right=2
|
||||||
|
Top=2
|
||||||
|
Bottom=2
|
||||||
|
|
||||||
|
[InputPanel/Highlight]
|
||||||
|
# Surface 0
|
||||||
|
Color=#313244
|
||||||
|
|
||||||
|
[InputPanel/Highlight/Margin]
|
||||||
|
# 高亮区域左边距
|
||||||
|
Left=10
|
||||||
|
# 高亮区域右边距
|
||||||
|
Right=10
|
||||||
|
# 高亮区域上边距
|
||||||
|
Top=7
|
||||||
|
# 高亮区域下边距
|
||||||
|
Bottom=7
|
||||||
|
|
||||||
|
[Menu]
|
||||||
|
Font=Sarasa Gothic SC 14
|
||||||
|
# Text
|
||||||
|
NormalColor=#cdd6f4
|
||||||
|
Spacing=3
|
||||||
|
|
||||||
|
[Menu/Background]
|
||||||
|
# Surface 0
|
||||||
|
Color=#313244
|
||||||
|
|
||||||
|
[Menu/Background/Margin]
|
||||||
|
Left=2
|
||||||
|
Right=2
|
||||||
|
Top=2
|
||||||
|
Bottom=2
|
||||||
|
|
||||||
|
[Menu/ContentMargin]
|
||||||
|
Left=2
|
||||||
|
Right=2
|
||||||
|
Top=2
|
||||||
|
Bottom=2
|
||||||
|
|
||||||
|
[Menu/Highlight]
|
||||||
|
# Pink
|
||||||
|
Color=#f5c2e7
|
||||||
|
|
||||||
|
[Menu/Highlight/Margin]
|
||||||
|
Left=10
|
||||||
|
Right=10
|
||||||
|
Top=5
|
||||||
|
Bottom=5
|
||||||
|
|
||||||
|
[Menu/Separator]
|
||||||
|
# Base
|
||||||
|
Color=#1e1e2e
|
||||||
|
|
||||||
|
[Menu/CheckBox]
|
||||||
|
Image=radio.png
|
||||||
|
|
||||||
|
[Menu/SubMenu]
|
||||||
|
Image=arrow.png
|
||||||
|
|
||||||
|
[Menu/TextMargin]
|
||||||
|
Left=5
|
||||||
|
Right=5
|
||||||
|
Top=5
|
||||||
|
Bottom=5
|
@ -958,6 +958,11 @@ Description="Keyboard - Swedish - Swedish (Svdvorak)"
|
|||||||
Language=sv
|
Language=sv
|
||||||
Label="se (svdvorak)"
|
Label="se (svdvorak)"
|
||||||
|
|
||||||
|
[keyboard-se-colemak]
|
||||||
|
Description="Keyboard - Swedish - Swedish (Colemak)"
|
||||||
|
Language=sv
|
||||||
|
Label="se (colemak)"
|
||||||
|
|
||||||
[keyboard-se-mac]
|
[keyboard-se-mac]
|
||||||
Description="Keyboard - Swedish - Swedish (Macintosh)"
|
Description="Keyboard - Swedish - Swedish (Macintosh)"
|
||||||
Language=sv
|
Language=sv
|
||||||
@ -3673,11 +3678,6 @@ Description="Keyboard - Japanese - Japanese (Kana)"
|
|||||||
Language=ja
|
Language=ja
|
||||||
Label="jp (kana)"
|
Label="jp (kana)"
|
||||||
|
|
||||||
[keyboard-jp-kana86]
|
|
||||||
Description="Keyboard - Japanese - Japanese (Kana 86)"
|
|
||||||
Language=ja
|
|
||||||
Label="jp (kana86)"
|
|
||||||
|
|
||||||
[keyboard-jp-OADG109A]
|
[keyboard-jp-OADG109A]
|
||||||
Description="Keyboard - Japanese - Japanese (OADG 109A)"
|
Description="Keyboard - Japanese - Japanese (OADG 109A)"
|
||||||
Language=ja
|
Language=ja
|
||||||
|
35
fcitx5/conf/classicui.conf
Normal file
35
fcitx5/conf/classicui.conf
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
# Vertical Candidate List
|
||||||
|
Vertical Candidate List=False
|
||||||
|
# Use mouse wheel to go to prev or next page
|
||||||
|
WheelForPaging=True
|
||||||
|
# Font
|
||||||
|
Font="Sarasa Gothic SC 14"
|
||||||
|
# Menu Font
|
||||||
|
MenuFont="Sarasa Gothic SC 14"
|
||||||
|
# Tray Font
|
||||||
|
TrayFont="Sarasa Gothic SC 12"
|
||||||
|
# Tray Label Outline Color
|
||||||
|
TrayOutlineColor=#000000
|
||||||
|
# Tray Label Text Color
|
||||||
|
TrayTextColor=#ffffff
|
||||||
|
# Prefer Text Icon
|
||||||
|
PreferTextIcon=False
|
||||||
|
# Show Layout Name In Icon
|
||||||
|
ShowLayoutNameInIcon=True
|
||||||
|
# Use input method language to display text
|
||||||
|
UseInputMethodLanguageToDisplayText=True
|
||||||
|
# Theme
|
||||||
|
Theme=catppuccin-mocha-flamingo
|
||||||
|
# Dark Theme
|
||||||
|
DarkTheme=catppuccin-mocha-flamingo
|
||||||
|
# Follow system light/dark color scheme
|
||||||
|
UseDarkTheme=True
|
||||||
|
# Follow system accent color if it is supported by theme and desktop
|
||||||
|
UseAccentColor=True
|
||||||
|
# Use Per Screen DPI on X11
|
||||||
|
PerScreenDPI=False
|
||||||
|
# Force font DPI on Wayland
|
||||||
|
ForceWaylandDPI=0
|
||||||
|
# Enable fractional scale under Wayland
|
||||||
|
EnableFractionalScale=True
|
||||||
|
|
@ -1,3 +1,3 @@
|
|||||||
[HiddenNotifications]
|
# Hidden Notifications
|
||||||
0=fcitx-rime-deploy
|
HiddenNotifications=
|
||||||
|
|
||||||
|
@ -1,140 +0,0 @@
|
|||||||
# Shuangpin Profile
|
|
||||||
ShuangpinProfile=Ziranma
|
|
||||||
# Show current shuangpin mode
|
|
||||||
ShowShuangpinMode=True
|
|
||||||
# Page size
|
|
||||||
PageSize=7
|
|
||||||
# Enable Spell
|
|
||||||
SpellEnabled=True
|
|
||||||
# Enable Symbols
|
|
||||||
SymbolsEnabled=True
|
|
||||||
# Enable Chaizi
|
|
||||||
ChaiziEnabled=True
|
|
||||||
# Enable Characters in Unicode CJK Extension B
|
|
||||||
ExtBEnabled=True
|
|
||||||
# Enable Cloud Pinyin
|
|
||||||
CloudPinyinEnabled=False
|
|
||||||
# Cloud Pinyin Index
|
|
||||||
CloudPinyinIndex=2
|
|
||||||
# Show animation when Cloud Pinyin is loading
|
|
||||||
CloudPinyinAnimation=True
|
|
||||||
# Always show Cloud Pinyin place holder
|
|
||||||
KeepCloudPinyinPlaceHolder=False
|
|
||||||
# Preedit Mode
|
|
||||||
PreeditMode="Composing pinyin"
|
|
||||||
# Fix embedded preedit cursor at the beginning of the preedit
|
|
||||||
PreeditCursorPositionAtBeginning=True
|
|
||||||
# Show complete pinyin in preedit
|
|
||||||
PinyinInPreedit=False
|
|
||||||
# Enable Prediction
|
|
||||||
Prediction=False
|
|
||||||
# Prediction Size
|
|
||||||
PredictionSize=49
|
|
||||||
# Action when switching input method
|
|
||||||
SwitchInputMethodBehavior="Commit current preedit"
|
|
||||||
# Select 2nd Candidate
|
|
||||||
SecondCandidate=
|
|
||||||
# Select 3rd Candidate
|
|
||||||
ThirdCandidate=
|
|
||||||
# Use Keypad as Selection key
|
|
||||||
UseKeypadAsSelection=False
|
|
||||||
# Use BackSpace to cancel the selection
|
|
||||||
BackSpaceToUnselect=True
|
|
||||||
# Number of Sentences
|
|
||||||
Number of sentence=2
|
|
||||||
# Prompt long word length when input length over (0 for disable)
|
|
||||||
LongWordLengthLimit=4
|
|
||||||
# Key to trigger quickphrase
|
|
||||||
QuickPhraseKey=semicolon
|
|
||||||
# Use V to trigger quickphrase
|
|
||||||
VAsQuickphrase=True
|
|
||||||
# FirstRun
|
|
||||||
FirstRun=False
|
|
||||||
|
|
||||||
[ForgetWord]
|
|
||||||
0=Control+7
|
|
||||||
|
|
||||||
[PrevPage]
|
|
||||||
0=minus
|
|
||||||
1=Up
|
|
||||||
2=KP_Up
|
|
||||||
3=Page_Up
|
|
||||||
|
|
||||||
[NextPage]
|
|
||||||
0=equal
|
|
||||||
1=Down
|
|
||||||
2=KP_Down
|
|
||||||
3=Next
|
|
||||||
|
|
||||||
[PrevCandidate]
|
|
||||||
0=Shift+Tab
|
|
||||||
|
|
||||||
[NextCandidate]
|
|
||||||
0=Tab
|
|
||||||
|
|
||||||
[CurrentCandidate]
|
|
||||||
0=space
|
|
||||||
1=KP_Space
|
|
||||||
|
|
||||||
[CommitRawInput]
|
|
||||||
0=Return
|
|
||||||
1=KP_Enter
|
|
||||||
2=Control+Return
|
|
||||||
3=Control+KP_Enter
|
|
||||||
4=Shift+Return
|
|
||||||
5=Shift+KP_Enter
|
|
||||||
6=Control+Shift+Return
|
|
||||||
7=Control+Shift+KP_Enter
|
|
||||||
|
|
||||||
[ChooseCharFromPhrase]
|
|
||||||
0=bracketleft
|
|
||||||
1=bracketright
|
|
||||||
|
|
||||||
[FilterByStroke]
|
|
||||||
0=grave
|
|
||||||
|
|
||||||
[QuickPhraseTriggerRegex]
|
|
||||||
0=.(/|@)$
|
|
||||||
1=^(www|bbs|forum|mail|bbs)\\.
|
|
||||||
2=^(http|https|ftp|telnet|mailto):
|
|
||||||
|
|
||||||
[Fuzzy]
|
|
||||||
# ue -> ve
|
|
||||||
VE_UE=True
|
|
||||||
# Common Typo
|
|
||||||
NG_GN=True
|
|
||||||
# Inner Segment (xian -> xi'an)
|
|
||||||
Inner=True
|
|
||||||
# Inner Segment for Short Pinyin (qie -> qi'e)
|
|
||||||
InnerShort=True
|
|
||||||
# Match partial finals (e -> en, eng, ei)
|
|
||||||
PartialFinal=True
|
|
||||||
# Match partial shuangpin if input length is longer than 4
|
|
||||||
PartialSp=False
|
|
||||||
# u <-> v
|
|
||||||
V_U=False
|
|
||||||
# an <-> ang
|
|
||||||
AN_ANG=False
|
|
||||||
# en <-> eng
|
|
||||||
EN_ENG=False
|
|
||||||
# ian <-> iang
|
|
||||||
IAN_IANG=False
|
|
||||||
# in <-> ing
|
|
||||||
IN_ING=False
|
|
||||||
# u <-> ou
|
|
||||||
U_OU=False
|
|
||||||
# uan <-> uang
|
|
||||||
UAN_UANG=False
|
|
||||||
# c <-> ch
|
|
||||||
C_CH=False
|
|
||||||
# f <-> h
|
|
||||||
F_H=False
|
|
||||||
# l <-> n
|
|
||||||
L_N=False
|
|
||||||
# s <-> sh
|
|
||||||
S_SH=False
|
|
||||||
# z <-> zh
|
|
||||||
Z_ZH=False
|
|
||||||
# Correction Layout
|
|
||||||
Correction=None
|
|
||||||
|
|
@ -1,10 +0,0 @@
|
|||||||
# Half width punctuation after latin letter or number
|
|
||||||
HalfWidthPuncAfterLetterOrNumber=True
|
|
||||||
# Type paired punctuations together (e.g. Quote)
|
|
||||||
TypePairedPunctuationsTogether=False
|
|
||||||
# Enabled
|
|
||||||
Enabled=True
|
|
||||||
|
|
||||||
[Hotkey]
|
|
||||||
0=Control+period
|
|
||||||
|
|
@ -1,13 +0,0 @@
|
|||||||
# Preedit Mode
|
|
||||||
PreeditMode="Composing text"
|
|
||||||
# Shared Input State
|
|
||||||
InputState=All
|
|
||||||
# Fix embedded preedit cursor at the beginning of the preedit
|
|
||||||
PreeditCursorPositionAtBeginning=True
|
|
||||||
# Action when switching input method
|
|
||||||
SwitchInputMethodBehavior="Commit commit preview"
|
|
||||||
# Deploy
|
|
||||||
Deploy=
|
|
||||||
# Synchronize
|
|
||||||
Synchronize=
|
|
||||||
|
|
@ -11,7 +11,7 @@ EnumerateSkipFirst=False
|
|||||||
ModifierOnlyKeyTimeout=250
|
ModifierOnlyKeyTimeout=250
|
||||||
|
|
||||||
[Hotkey/TriggerKeys]
|
[Hotkey/TriggerKeys]
|
||||||
0=Control+Shift+Shift_L
|
0=Control+space
|
||||||
1=Zenkaku_Hankaku
|
1=Zenkaku_Hankaku
|
||||||
2=Hangul
|
2=Hangul
|
||||||
|
|
||||||
|
340
fish/conf.d/done.fish
Normal file
340
fish/conf.d/done.fish
Normal file
@ -0,0 +1,340 @@
|
|||||||
|
# MIT License
|
||||||
|
|
||||||
|
# Copyright (c) 2016 Francisco Lourenço & Daniel Wehner
|
||||||
|
|
||||||
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
# of this software and associated documentation files (the "Software"), to deal
|
||||||
|
# in the Software without restriction, including without limitation the rights
|
||||||
|
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
# copies of the Software, and to permit persons to whom the Software is
|
||||||
|
# furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
# The above copyright notice and this permission notice shall be included in all
|
||||||
|
# copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
# SOFTWARE.
|
||||||
|
|
||||||
|
if not status is-interactive
|
||||||
|
exit
|
||||||
|
end
|
||||||
|
|
||||||
|
set -g __done_version 1.19.1
|
||||||
|
|
||||||
|
function __done_run_powershell_script
|
||||||
|
set -l powershell_exe (command --search "powershell.exe")
|
||||||
|
|
||||||
|
if test $status -ne 0
|
||||||
|
and command --search wslvar
|
||||||
|
|
||||||
|
set -l powershell_exe (wslpath (wslvar windir)/System32/WindowsPowerShell/v1.0/powershell.exe)
|
||||||
|
end
|
||||||
|
|
||||||
|
if string length --quiet "$powershell_exe"
|
||||||
|
and test -x "$powershell_exe"
|
||||||
|
|
||||||
|
set cmd (string escape $argv)
|
||||||
|
|
||||||
|
eval "$powershell_exe -Command $cmd"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function __done_windows_notification -a title -a message
|
||||||
|
if test "$__done_notify_sound" -eq 1
|
||||||
|
set soundopt "<audio silent=\"false\" src=\"ms-winsoundevent:Notification.Default\" />"
|
||||||
|
else
|
||||||
|
set soundopt "<audio silent=\"true\" />"
|
||||||
|
end
|
||||||
|
|
||||||
|
__done_run_powershell_script "
|
||||||
|
[Windows.Data.Xml.Dom.XmlDocument, Windows.Data.Xml.Dom.XmlDocument, ContentType = WindowsRuntime] | Out-Null
|
||||||
|
[Windows.UI.Notifications.ToastNotification, Windows.UI.Notifications, ContentType = WindowsRuntime] | Out-Null
|
||||||
|
|
||||||
|
\$toast_xml_source = @\"
|
||||||
|
<toast>
|
||||||
|
$soundopt
|
||||||
|
<visual>
|
||||||
|
<binding template=\"ToastText02\">
|
||||||
|
<text id=\"1\">$title</text>
|
||||||
|
<text id=\"2\">$message</text>
|
||||||
|
</binding>
|
||||||
|
</visual>
|
||||||
|
</toast>
|
||||||
|
\"@
|
||||||
|
|
||||||
|
\$toast_xml = New-Object Windows.Data.Xml.Dom.XmlDocument
|
||||||
|
\$toast_xml.loadXml(\$toast_xml_source)
|
||||||
|
|
||||||
|
\$toast = New-Object Windows.UI.Notifications.ToastNotification \$toast_xml
|
||||||
|
|
||||||
|
[Windows.UI.Notifications.ToastNotificationManager]::CreateToastNotifier(\"fish\").Show(\$toast)
|
||||||
|
"
|
||||||
|
end
|
||||||
|
|
||||||
|
function __done_get_focused_window_id
|
||||||
|
if type -q lsappinfo
|
||||||
|
lsappinfo info -only bundleID (lsappinfo front | string replace 'ASN:0x0-' '0x') | cut -d '"' -f4
|
||||||
|
else if test -n "$SWAYSOCK"
|
||||||
|
and type -q jq
|
||||||
|
swaymsg --type get_tree | jq '.. | objects | select(.focused == true) | .id'
|
||||||
|
else if test -n "$HYPRLAND_INSTANCE_SIGNATURE"
|
||||||
|
hyprctl activewindow | awk '/^\tpid: / {print $2}'
|
||||||
|
else if begin
|
||||||
|
test "$XDG_SESSION_DESKTOP" = gnome; and type -q gdbus
|
||||||
|
end
|
||||||
|
gdbus call --session --dest org.gnome.Shell --object-path /org/gnome/Shell --method org.gnome.Shell.Eval 'global.display.focus_window.get_id()'
|
||||||
|
else if type -q xprop
|
||||||
|
and test -n "$DISPLAY"
|
||||||
|
# Test that the X server at $DISPLAY is running
|
||||||
|
and xprop -grammar >/dev/null 2>&1
|
||||||
|
xprop -root 32x '\t$0' _NET_ACTIVE_WINDOW | cut -f 2
|
||||||
|
else if uname -a | string match --quiet --ignore-case --regex microsoft
|
||||||
|
__done_run_powershell_script '
|
||||||
|
Add-Type @"
|
||||||
|
using System;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
|
public class WindowsCompat {
|
||||||
|
[DllImport("user32.dll")]
|
||||||
|
public static extern IntPtr GetForegroundWindow();
|
||||||
|
}
|
||||||
|
"@
|
||||||
|
[WindowsCompat]::GetForegroundWindow()
|
||||||
|
'
|
||||||
|
else if set -q __done_allow_nongraphical
|
||||||
|
echo 12345 # dummy value
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function __done_is_tmux_window_active
|
||||||
|
set -q fish_pid; or set -l fish_pid %self
|
||||||
|
|
||||||
|
# find the outermost process within tmux
|
||||||
|
# ppid != "tmux" -> pid = ppid
|
||||||
|
# ppid == "tmux" -> break
|
||||||
|
set tmux_fish_pid $fish_pid
|
||||||
|
while set tmux_fish_ppid (ps -o ppid= -p $tmux_fish_pid | string trim)
|
||||||
|
# remove leading hyphen so that basename does not treat it as an argument (e.g. -fish), and return only
|
||||||
|
# the actual command and not its arguments so that basename finds the correct command name.
|
||||||
|
# (e.g. '/usr/bin/tmux' from command '/usr/bin/tmux new-session -c /some/start/dir')
|
||||||
|
and ! string match -q "tmux*" (basename (ps -o command= -p $tmux_fish_ppid | string replace -r '^-' '' | string split ' ')[1])
|
||||||
|
set tmux_fish_pid $tmux_fish_ppid
|
||||||
|
end
|
||||||
|
|
||||||
|
# tmux session attached and window is active -> no notification
|
||||||
|
# all other combinations -> send notification
|
||||||
|
tmux list-panes -a -F "#{session_attached} #{window_active} #{pane_pid}" | string match -q "1 1 $tmux_fish_pid"
|
||||||
|
end
|
||||||
|
|
||||||
|
function __done_is_screen_window_active
|
||||||
|
string match --quiet --regex "$STY\s+\(Attached" (screen -ls)
|
||||||
|
end
|
||||||
|
|
||||||
|
function __done_is_process_window_focused
|
||||||
|
# Return false if the window is not focused
|
||||||
|
|
||||||
|
if set -q __done_allow_nongraphical
|
||||||
|
return 1
|
||||||
|
end
|
||||||
|
|
||||||
|
if set -q __done_kitty_remote_control
|
||||||
|
kitty @ --password="$__done_kitty_remote_control_password" ls | jq -e ".[].tabs[] | select(any(.windows[]; .is_self)) | .is_focused" >/dev/null
|
||||||
|
return $status
|
||||||
|
end
|
||||||
|
|
||||||
|
set __done_focused_window_id (__done_get_focused_window_id)
|
||||||
|
if test "$__done_sway_ignore_visible" -eq 1
|
||||||
|
and test -n "$SWAYSOCK"
|
||||||
|
string match --quiet --regex "^true" (swaymsg -t get_tree | jq ".. | objects | select(.id == "$__done_initial_window_id") | .visible")
|
||||||
|
return $status
|
||||||
|
else if test -n "$HYPRLAND_INSTANCE_SIGNATURE"
|
||||||
|
set window_pid (hyprctl activewindow | awk '/^\tpid: / {print $2}')
|
||||||
|
if test -n "$window_pid"
|
||||||
|
and test $__done_initial_window_id -eq $window_pid
|
||||||
|
return $status
|
||||||
|
else
|
||||||
|
return 1
|
||||||
|
end
|
||||||
|
else if test "$__done_initial_window_id" != "$__done_focused_window_id"
|
||||||
|
return 1
|
||||||
|
end
|
||||||
|
# If inside a tmux session, check if the tmux window is focused
|
||||||
|
if type -q tmux
|
||||||
|
and test -n "$TMUX"
|
||||||
|
__done_is_tmux_window_active
|
||||||
|
return $status
|
||||||
|
end
|
||||||
|
|
||||||
|
# If inside a screen session, check if the screen window is focused
|
||||||
|
if type -q screen
|
||||||
|
and test -n "$STY"
|
||||||
|
__done_is_screen_window_active
|
||||||
|
return $status
|
||||||
|
end
|
||||||
|
|
||||||
|
return 0
|
||||||
|
end
|
||||||
|
|
||||||
|
function __done_humanize_duration -a milliseconds
|
||||||
|
set -l seconds (math --scale=0 "$milliseconds/1000" % 60)
|
||||||
|
set -l minutes (math --scale=0 "$milliseconds/60000" % 60)
|
||||||
|
set -l hours (math --scale=0 "$milliseconds/3600000")
|
||||||
|
|
||||||
|
if test $hours -gt 0
|
||||||
|
printf '%s' $hours'h '
|
||||||
|
end
|
||||||
|
if test $minutes -gt 0
|
||||||
|
printf '%s' $minutes'm '
|
||||||
|
end
|
||||||
|
if test $seconds -gt 0
|
||||||
|
printf '%s' $seconds's'
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
# verify that the system has graphical capabilities before initializing
|
||||||
|
if test -z "$SSH_CLIENT" # not over ssh
|
||||||
|
and count (__done_get_focused_window_id) >/dev/null # is able to get window id
|
||||||
|
set __done_enabled
|
||||||
|
end
|
||||||
|
|
||||||
|
if set -q __done_allow_nongraphical
|
||||||
|
and set -q __done_notification_command
|
||||||
|
set __done_enabled
|
||||||
|
end
|
||||||
|
|
||||||
|
if set -q __done_enabled
|
||||||
|
set -g __done_initial_window_id ''
|
||||||
|
set -q __done_min_cmd_duration; or set -g __done_min_cmd_duration 5000
|
||||||
|
set -q __done_exclude; or set -g __done_exclude '^git (?!push|pull|fetch)'
|
||||||
|
set -q __done_notify_sound; or set -g __done_notify_sound 0
|
||||||
|
set -q __done_sway_ignore_visible; or set -g __done_sway_ignore_visible 0
|
||||||
|
set -q __done_tmux_pane_format; or set -g __done_tmux_pane_format '[#{window_index}]'
|
||||||
|
set -q __done_notification_duration; or set -g __done_notification_duration 3000
|
||||||
|
|
||||||
|
function __done_started --on-event fish_preexec
|
||||||
|
set __done_initial_window_id (__done_get_focused_window_id)
|
||||||
|
end
|
||||||
|
|
||||||
|
function __done_ended --on-event fish_postexec
|
||||||
|
set -l exit_status $status
|
||||||
|
|
||||||
|
# backwards compatibility for fish < v3.0
|
||||||
|
set -q cmd_duration; or set -l cmd_duration $CMD_DURATION
|
||||||
|
|
||||||
|
if test $cmd_duration
|
||||||
|
and test $cmd_duration -gt $__done_min_cmd_duration # longer than notify_duration
|
||||||
|
and not __done_is_process_window_focused # process pane or window not focused
|
||||||
|
|
||||||
|
# don't notify if command matches exclude list
|
||||||
|
for pattern in $__done_exclude
|
||||||
|
if string match -qr $pattern $argv[1]
|
||||||
|
return
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
# Store duration of last command
|
||||||
|
set -l humanized_duration (__done_humanize_duration "$cmd_duration")
|
||||||
|
|
||||||
|
set -l title "Done in $humanized_duration"
|
||||||
|
set -l wd (string replace --regex "^$HOME" "~" (pwd))
|
||||||
|
set -l message "$wd/ $argv[1]"
|
||||||
|
set -l sender $__done_initial_window_id
|
||||||
|
|
||||||
|
if test $exit_status -ne 0
|
||||||
|
set title "Failed ($exit_status) after $humanized_duration"
|
||||||
|
end
|
||||||
|
|
||||||
|
if test -n "$TMUX_PANE"
|
||||||
|
set message (tmux lsw -F"$__done_tmux_pane_format" -f '#{==:#{pane_id},'$TMUX_PANE'}')" $message"
|
||||||
|
end
|
||||||
|
|
||||||
|
if set -q __done_notification_command
|
||||||
|
eval $__done_notification_command
|
||||||
|
if test "$__done_notify_sound" -eq 1
|
||||||
|
echo -e "\a" # bell sound
|
||||||
|
end
|
||||||
|
else if set -q KITTY_WINDOW_ID
|
||||||
|
printf "\x1b]99;i=done:d=0;$title\x1b\\"
|
||||||
|
printf "\x1b]99;i=done:d=1:p=body;$message\x1b\\"
|
||||||
|
else if type -q terminal-notifier # https://github.com/julienXX/terminal-notifier
|
||||||
|
if test "$__done_notify_sound" -eq 1
|
||||||
|
# pipe message into terminal-notifier to avoid escaping issues (https://github.com/julienXX/terminal-notifier/issues/134). fixes #140
|
||||||
|
echo "$message" | terminal-notifier -title "$title" -sender "$__done_initial_window_id" -sound default
|
||||||
|
else
|
||||||
|
echo "$message" | terminal-notifier -title "$title" -sender "$__done_initial_window_id"
|
||||||
|
end
|
||||||
|
|
||||||
|
else if type -q osascript # AppleScript
|
||||||
|
# escape double quotes that might exist in the message and break osascript. fixes #133
|
||||||
|
set -l message (string replace --all '"' '\"' "$message")
|
||||||
|
set -l title (string replace --all '"' '\"' "$title")
|
||||||
|
|
||||||
|
osascript -e "display notification \"$message\" with title \"$title\""
|
||||||
|
if test "$__done_notify_sound" -eq 1
|
||||||
|
osascript -e "display notification \"$message\" with title \"$title\" sound name \"Glass\""
|
||||||
|
else
|
||||||
|
osascript -e "display notification \"$message\" with title \"$title\""
|
||||||
|
end
|
||||||
|
|
||||||
|
else if type -q notify-send # Linux notify-send
|
||||||
|
# set urgency to normal
|
||||||
|
set -l urgency normal
|
||||||
|
|
||||||
|
# use user-defined urgency if set
|
||||||
|
if set -q __done_notification_urgency_level
|
||||||
|
set urgency "$__done_notification_urgency_level"
|
||||||
|
end
|
||||||
|
# override user-defined urgency level if non-zero exitstatus
|
||||||
|
if test $exit_status -ne 0
|
||||||
|
set urgency critical
|
||||||
|
if set -q __done_notification_urgency_level_failure
|
||||||
|
set urgency "$__done_notification_urgency_level_failure"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
notify-send --hint=int:transient:1 --urgency=$urgency --icon=utilities-terminal --app-name=fish --expire-time=$__done_notification_duration "$title" "$message"
|
||||||
|
|
||||||
|
if test "$__done_notify_sound" -eq 1
|
||||||
|
echo -e "\a" # bell sound
|
||||||
|
end
|
||||||
|
|
||||||
|
else if type -q notify-desktop # Linux notify-desktop
|
||||||
|
set -l urgency
|
||||||
|
if test $exit_status -ne 0
|
||||||
|
set urgency "--urgency=critical"
|
||||||
|
end
|
||||||
|
notify-desktop $urgency --icon=utilities-terminal --app-name=fish "$title" "$message"
|
||||||
|
if test "$__done_notify_sound" -eq 1
|
||||||
|
echo -e "\a" # bell sound
|
||||||
|
end
|
||||||
|
|
||||||
|
else if uname -a | string match --quiet --ignore-case --regex microsoft
|
||||||
|
__done_windows_notification "$title" "$message"
|
||||||
|
|
||||||
|
else # anything else
|
||||||
|
echo -e "\a" # bell sound
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function __done_uninstall -e done_uninstall
|
||||||
|
# Erase all __done_* functions
|
||||||
|
functions -e __done_ended
|
||||||
|
functions -e __done_started
|
||||||
|
functions -e __done_get_focused_window_id
|
||||||
|
functions -e __done_is_tmux_window_active
|
||||||
|
functions -e __done_is_screen_window_active
|
||||||
|
functions -e __done_is_process_window_focused
|
||||||
|
functions -e __done_windows_notification
|
||||||
|
functions -e __done_run_powershell_script
|
||||||
|
functions -e __done_humanize_duration
|
||||||
|
|
||||||
|
# Erase __done variables
|
||||||
|
set -e __done_version
|
||||||
|
end
|
128
fish/config.fish
Normal file
128
fish/config.fish
Normal file
@ -0,0 +1,128 @@
|
|||||||
|
## Source from conf.d before our fish config
|
||||||
|
source ~/.config/fish/conf.d/done.fish
|
||||||
|
atuin init fish | source
|
||||||
|
## Set values
|
||||||
|
## Run fastfetch as welcome message
|
||||||
|
function fish_greeting
|
||||||
|
fastfetch
|
||||||
|
end
|
||||||
|
|
||||||
|
# Format man pages
|
||||||
|
set -x MANROFFOPT -c
|
||||||
|
set -x MANPAGER "sh -c 'col -bx | bat -l man -p'"
|
||||||
|
|
||||||
|
# Set settings for https://github.com/franciscolourenco/done
|
||||||
|
set -U __done_min_cmd_duration 10000
|
||||||
|
set -U __done_notification_urgency_level low
|
||||||
|
|
||||||
|
## Environment setup
|
||||||
|
# Apply .profile: use this to put fish compatible .profile stuff in
|
||||||
|
if test -f ~/.fish_profile
|
||||||
|
source ~/.fish_profile
|
||||||
|
end
|
||||||
|
|
||||||
|
# Add ~/.local/bin to PATH
|
||||||
|
if test -d ~/.local/bin
|
||||||
|
if not contains -- ~/.local/bin $PATH
|
||||||
|
set -p PATH ~/.local/bin
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
# Add depot_tools to PATH
|
||||||
|
if test -d ~/Applications/depot_tools
|
||||||
|
if not contains -- ~/Applications/depot_tools $PATH
|
||||||
|
set -p PATH ~/Applications/depot_tools
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
## Functions
|
||||||
|
# Functions needed for !! and !$ https://github.com/oh-my-fish/plugin-bang-bang
|
||||||
|
function __history_previous_command
|
||||||
|
switch (commandline -t)
|
||||||
|
case "!"
|
||||||
|
commandline -t $history[1]
|
||||||
|
commandline -f repaint
|
||||||
|
case "*"
|
||||||
|
commandline -i !
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function __history_previous_command_arguments
|
||||||
|
switch (commandline -t)
|
||||||
|
case "!"
|
||||||
|
commandline -t ""
|
||||||
|
commandline -f history-token-search-backward
|
||||||
|
case "*"
|
||||||
|
commandline -i '$'
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
if [ "$fish_key_bindings" = fish_vi_key_bindings ]
|
||||||
|
|
||||||
|
bind -Minsert ! __history_previous_command
|
||||||
|
bind -Minsert '$' __history_previous_command_arguments
|
||||||
|
else
|
||||||
|
bind ! __history_previous_command
|
||||||
|
bind '$' __history_previous_command_arguments
|
||||||
|
end
|
||||||
|
|
||||||
|
# Fish command history
|
||||||
|
function history
|
||||||
|
builtin history --show-time='%F %T '
|
||||||
|
end
|
||||||
|
|
||||||
|
function backup --argument filename
|
||||||
|
cp $filename $filename.bak
|
||||||
|
end
|
||||||
|
|
||||||
|
# Copy DIR1 DIR2
|
||||||
|
function copy
|
||||||
|
set count (count $argv | tr -d \n)
|
||||||
|
if test "$count" = 2; and test -d "$argv[1]"
|
||||||
|
set from (echo $argv[1] | trim-right /)
|
||||||
|
set to (echo $argv[2])
|
||||||
|
command cp -r $from $to
|
||||||
|
else
|
||||||
|
command cp $argv
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
## Useful aliases
|
||||||
|
# Replace ls with eza
|
||||||
|
alias ls='eza -al --color=always --group-directories-first --icons' # preferred listing
|
||||||
|
alias la='eza -a --color=always --group-directories-first --icons' # all files and dirs
|
||||||
|
alias ll='eza -l --color=always --group-directories-first --icons' # long format
|
||||||
|
alias lt='eza -aT --color=always --group-directories-first --icons' # tree listing
|
||||||
|
alias l.="eza -a | grep -e '^\.'" # show only dotfiles
|
||||||
|
|
||||||
|
# Common use
|
||||||
|
alias grubup="sudo grub-mkconfig -o /boot/grub/grub.cfg"
|
||||||
|
alias tarnow='tar -acf '
|
||||||
|
alias untar='tar -zxvf '
|
||||||
|
alias wget='wget -c '
|
||||||
|
alias psmem='ps auxf | sort -nr -k 4'
|
||||||
|
alias psmem10='ps auxf | sort -nr -k 4 | head -10'
|
||||||
|
alias ..='cd ..'
|
||||||
|
alias ...='cd ../..'
|
||||||
|
alias ....='cd ../../..'
|
||||||
|
alias .....='cd ../../../..'
|
||||||
|
alias ......='cd ../../../../..'
|
||||||
|
alias dir='dir --color=auto'
|
||||||
|
alias vdir='vdir --color=auto'
|
||||||
|
alias grep='grep --color=auto'
|
||||||
|
alias fgrep='fgrep --color=auto'
|
||||||
|
alias egrep='egrep --color=auto'
|
||||||
|
alias hw='hwinfo --short' # Hardware Info
|
||||||
|
alias big="expac -H M '%m\t%n' | sort -h | nl" # Sort installed packages according to size in MB
|
||||||
|
|
||||||
|
# Get fastest mirrors
|
||||||
|
alias mirror="sudo cachyos-rate-mirrors"
|
||||||
|
|
||||||
|
# Cleanup orphaned packages
|
||||||
|
alias cleanup='sudo pacman -Rns (pacman -Qtdq)'
|
||||||
|
|
||||||
|
# Get the error messages from journalctl
|
||||||
|
alias jctl="journalctl -p 3 -xb"
|
||||||
|
|
||||||
|
# Recent installed packages
|
||||||
|
alias rip="expac --timefmt='%Y-%m-%d %T' '%l\t%n %v' | sort | tail -200 | nl"
|
21
fuzzel/fuzzel.ini
Normal file
21
fuzzel/fuzzel.ini
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
[colors]
|
||||||
|
background=1e1e2edd
|
||||||
|
text=cdd6f4ff
|
||||||
|
prompt=bac2deff
|
||||||
|
placeholder=7f849cff
|
||||||
|
input=cdd6f4ff
|
||||||
|
match=b4befeff
|
||||||
|
selection=585b70ff
|
||||||
|
selection-text=cdd6f4ff
|
||||||
|
selection-match=b4befeff
|
||||||
|
counter=7f849cff
|
||||||
|
border=b4befeff
|
||||||
|
|
||||||
|
[main]
|
||||||
|
font=Sarasa Gothic SC:size=18
|
||||||
|
icon-theme=Papirus-Dark
|
||||||
|
icons-enabled=no
|
||||||
|
delayed-filter-ms=0
|
||||||
|
delayed-filter-limit=0
|
||||||
|
lines=10
|
||||||
|
sort-result=yes
|
@ -8,10 +8,12 @@ source = ~/.config/hypr/config/defaults.conf
|
|||||||
exec-once = swww-daemon
|
exec-once = swww-daemon
|
||||||
exec-once = waybar &
|
exec-once = waybar &
|
||||||
exec-once = fcitx5 -d &
|
exec-once = fcitx5 -d &
|
||||||
exec-once = mako &
|
exec-once = swayosd-server
|
||||||
|
exec-once = wl-clip-persist --clipboard regular
|
||||||
|
# exec-once = mako &
|
||||||
exec-once = nm-applet --indicator &
|
exec-once = nm-applet --indicator &
|
||||||
exec-once = bash -c "mkfifo /tmp/$HYPRLAND_INSTANCE_SIGNATURE.wob && tail -f /tmp/$HYPRLAND_INSTANCE_SIGNATURE.wob | wob & disown" &
|
exec-once = bash -c "mkfifo /tmp/$HYPRLAND_INSTANCE_SIGNATURE.wob && tail -f /tmp/$HYPRLAND_INSTANCE_SIGNATURE.wob | wob & disown" &
|
||||||
exec-once = /usr/lib/polkit-kde-authentication-agent-1 &
|
# exec-once = /usr/lib/polkit-kde-authentication-agent-1 &
|
||||||
|
|
||||||
# ## Slow app launch fix
|
# ## Slow app launch fix
|
||||||
exec-once = systemctl --user import-environment &
|
exec-once = systemctl --user import-environment &
|
||||||
@ -19,5 +21,5 @@ exec-once = hash dbus-update-activation-environment 2>/dev/null &
|
|||||||
exec-once = dbus-update-activation-environment --systemd &
|
exec-once = dbus-update-activation-environment --systemd &
|
||||||
|
|
||||||
# ## Idle configuration
|
# ## Idle configuration
|
||||||
exec-once = $idlehandler
|
# exec-once = $idlehandler
|
||||||
|
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
# ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
|
# ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
|
||||||
# ┃ Defaults Configuration ┃
|
# ┃ Defaults Configuration ┃
|
||||||
# ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
|
# ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
|
||||||
|
$browser = floorp
|
||||||
$filemanager = thunar
|
$filemanager = nemo
|
||||||
#$applauncher = rofi -show combi -modi window,run,combi -combi-modi window,run
|
#$applauncher = rofi -show combi -modi window,run,combi -combi-modi window,run
|
||||||
$applauncher = wofi
|
$applauncher = fuzzel
|
||||||
$terminal = alacritty
|
$terminal = alacritty
|
||||||
$idlehandler = swayidle -w timeout 300 'swaylock -f -c 000000' before-sleep 'swaylock -f -c 000000'
|
#$idlehandler = swayidle -w timeout 300 'swaylock -f -c 000000' before-sleep 'swaylock -f -c 000000'
|
||||||
$capturing = grim -g "$(slurp)" - | swappy -f -
|
$capturing = grim -g "$(slurp)" - | swappy -f -
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
source = ~/.config/hypr/config/defaults.conf
|
source = ~/.config/hypr/config/defaults.conf
|
||||||
|
|
||||||
# https://wiki.hyprland.org/Configuring/Binds/
|
# https://wiki.hyprland.org/Configuring/Binds/
|
||||||
|
bindd = $mainMod, B, Opens browser ($browser), exec, $browser
|
||||||
bindd = $mainMod, RETURN, Opens your preferred terminal emulator ($terminal), exec, $terminal
|
bindd = $mainMod, RETURN, Opens your preferred terminal emulator ($terminal), exec, $terminal
|
||||||
bindd = $mainMod, E, Opens your preferred filemanager ($filemanager), exec, $filemanager
|
bindd = $mainMod, E, Opens your preferred filemanager ($filemanager), exec, $filemanager
|
||||||
bindd = $mainMod, A, Screen capture selection, exec, $capturing
|
bindd = $mainMod, A, Screen capture selection, exec, $capturing
|
||||||
@ -28,9 +29,13 @@ bindd = $mainMod, G, Remove gaps between window, exec, hyprctl --batch "keyword
|
|||||||
|
|
||||||
# ======= Volume Control =======
|
# ======= Volume Control =======
|
||||||
|
|
||||||
bindel = , XF86AudioRaiseVolume, exec, pactl set-sink-volume @DEFAULT_SINK@ +5% && pactl get-sink-volume @DEFAULT_SINK@ | grep -oP '\d+(?=%)' | awk '{if($1>100) system("pactl set-sink-volume @DEFAULT_SINK@ 100%")}' && pactl get-sink-volume @DEFAULT_SINK@ | grep -oP '\d+(?=%)' | awk '{print $1}' | head -1 > /tmp/$HYPRLAND_INSTANCE_SIGNATURE.wob # Raise Volume
|
# bindel = , XF86AudioRaiseVolume, exec, pactl set-sink-volume @DEFAULT_SINK@ +5% && pactl get-sink-volume @DEFAULT_SINK@ | grep -oP '\d+(?=%)' | awk '{if($1>100) system("pactl set-sink-volume @DEFAULT_SINK@ 100%")}' && pactl get-sink-volume @DEFAULT_SINK@ | grep -oP '\d+(?=%)' | awk '{print $1}' | head -1 > /tmp/$HYPRLAND_INSTANCE_SIGNATURE.wob # Raise Volume
|
||||||
bindel = , XF86AudioLowerVolume, exec, pactl set-sink-volume @DEFAULT_SINK@ -5% && pactl get-sink-volume @DEFAULT_SINK@ | grep -oP '\d+(?=%)' | awk '{print $1}' | head -1 > /tmp/$HYPRLAND_INSTANCE_SIGNATURE.wob # Lower Volume
|
# bindel = , XF86AudioLowerVolume, exec, pactl set-sink-volume @DEFAULT_SINK@ -5% && pactl get-sink-volume @DEFAULT_SINK@ | grep -oP '\d+(?=%)' | awk '{print $1}' | head -1 > /tmp/$HYPRLAND_INSTANCE_SIGNATURE.wob # Lower Volume
|
||||||
bindel = , XF86AudioMute, exec, amixer sset Master toggle | sed -En '/\[on\]/ s/.*\[([0-9]+)%\].*/\1/ p; /\[off\]/ s/.*/0/p' | head -1 > /tmp/$HYPRLAND_INSTANCE_SIGNATURE.wob #Mutes player audio
|
# bindel = , XF86AudioMute, exec, amixer sset Master toggle | sed -En '/\[on\]/ s/.*\[([0-9]+)%\].*/\1/ p; /\[off\]/ s/.*/0/p' | head -1 > /tmp/$HYPRLAND_INSTANCE_SIGNATURE.wob #Mutes player audio
|
||||||
|
|
||||||
|
bindel = , XF86AudioRaiseVolume, exec, pamixer -i 5 && swayosd-client --output-volume +5
|
||||||
|
bindel = , XF86AudioLowerVolume, exec, pamixer -d 5 && swayosd-client --output-volume -5
|
||||||
|
bindel = , XF86AudioMute, exec, pamixer -t && swayosd-client --output-volume mute-toggle
|
||||||
|
|
||||||
# ======= Playback Control =======
|
# ======= Playback Control =======
|
||||||
|
|
||||||
|
@ -4,13 +4,14 @@
|
|||||||
|
|
||||||
# Monitor wiki https://wiki.hyprland.org/0.45.0/Configuring/Monitors/
|
# Monitor wiki https://wiki.hyprland.org/0.45.0/Configuring/Monitors/
|
||||||
|
|
||||||
monitor = , preferred, auto, 1.25
|
#monitor = , preferred, auto, 1.25
|
||||||
|
monitor = eDP-1, 2560x1600@165, auto, 1.25
|
||||||
|
|
||||||
|
|
||||||
# If you need to scale things like steam etc, please uncomment these lines.
|
# If you need to scale things like steam etc, please uncomment these lines.
|
||||||
# Adjust GDK_SCALE accordingly to your liking.
|
# Adjust GDK_SCALE accordingly to your liking.
|
||||||
#xwayland {
|
xwayland {
|
||||||
# force_zero_scaling = true # Unscale XWayland
|
force_zero_scaling = true # Unscale XWayland
|
||||||
#}
|
}
|
||||||
|
|
||||||
#env = GDK_SCALE, 1.25 # GDK Scaling Factor
|
env = GDK_SCALE, 1.25 # GDK Scaling Factor
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
#!/usr/bin/bash
|
|
||||||
grim -g "$(slurp)" - | wl-copy -t image/png
|
|
||||||
notify-send "Screenshot copied to clipboard"
|
|
@ -1,3 +0,0 @@
|
|||||||
#!/usr/bin/bash
|
|
||||||
grimblast copy area || exit
|
|
||||||
notify-send "Screenshot copied to clipboard"
|
|
@ -1,3 +0,0 @@
|
|||||||
#!/usr/bin/bash
|
|
||||||
grimblast copy output || exit
|
|
||||||
notify-send "Screenshot copied to clipboard"
|
|
@ -1,23 +0,0 @@
|
|||||||
gui:
|
|
||||||
authorColors:
|
|
||||||
"*": "#b4befe"
|
|
||||||
theme:
|
|
||||||
activeBorderColor:
|
|
||||||
- "#cba6f7"
|
|
||||||
- bold
|
|
||||||
inactiveBorderColor:
|
|
||||||
- "#a6adc8"
|
|
||||||
optionsTextColor:
|
|
||||||
- "#89b4fa"
|
|
||||||
selectedLineBgColor:
|
|
||||||
- "#313244"
|
|
||||||
cherryPickedCommitBgColor:
|
|
||||||
- "#45475a"
|
|
||||||
cherryPickedCommitFgColor:
|
|
||||||
- "#cba6f7"
|
|
||||||
unstagedChangesColor:
|
|
||||||
- "#f38ba8"
|
|
||||||
defaultFgColor:
|
|
||||||
- "#cdd6f4"
|
|
||||||
searchingActiveBorderColor:
|
|
||||||
- "#f9e2af"
|
|
11
mako/config
11
mako/config
@ -1,11 +0,0 @@
|
|||||||
max-visible=10
|
|
||||||
layer=top
|
|
||||||
font=Sarasa UI SC 10
|
|
||||||
background-color=#4c566add
|
|
||||||
text-color=#d8dee9
|
|
||||||
border-color=#434c5e
|
|
||||||
border-radius=7
|
|
||||||
max-icon-size=48
|
|
||||||
default-timeout=10000
|
|
||||||
anchor=top-right
|
|
||||||
margin=20
|
|
@ -1,24 +0,0 @@
|
|||||||
# config.nu
|
|
||||||
#
|
|
||||||
# Installed by:
|
|
||||||
# version = "0.103.0"
|
|
||||||
#
|
|
||||||
# This file is used to override default Nushell settings, define
|
|
||||||
# (or import) custom commands, or run any other startup tasks.
|
|
||||||
# See https://www.nushell.sh/book/configuration.html
|
|
||||||
#
|
|
||||||
# This file is loaded after env.nu and before login.nu
|
|
||||||
#
|
|
||||||
# You can open this file in your default editor using:
|
|
||||||
# config nu
|
|
||||||
#
|
|
||||||
# See `help config nu` for more options
|
|
||||||
#
|
|
||||||
# You can remove these comments if you want or leave
|
|
||||||
# them for future reference.
|
|
||||||
|
|
||||||
mkdir ($nu.data-dir | path join "vendor/autoload")
|
|
||||||
atuin init nu | save -f ($nu.data-dir | path join "vendor/autoload/atuin.nu")
|
|
||||||
starship init nu | save -f ($nu.data-dir | path join "vendor/autoload/starship.nu")
|
|
||||||
# 彻底关闭启动欢迎横幅
|
|
||||||
$env.config.show_banner = false
|
|
@ -1,18 +0,0 @@
|
|||||||
# env.nu
|
|
||||||
#
|
|
||||||
# Installed by:
|
|
||||||
# version = "0.103.0"
|
|
||||||
#
|
|
||||||
# Previously, environment variables were typically configured in `env.nu`.
|
|
||||||
# In general, most configuration can and should be performed in `config.nu`
|
|
||||||
# or one of the autoload directories.
|
|
||||||
#
|
|
||||||
# This file is generated for backwards compatibility for now.
|
|
||||||
# It is loaded before config.nu and login.nu
|
|
||||||
#
|
|
||||||
# See https://www.nushell.sh/book/configuration.html
|
|
||||||
#
|
|
||||||
# Also see `help config env` for more options.
|
|
||||||
#
|
|
||||||
# You can remove these comments if you want or leave
|
|
||||||
# them for future reference.
|
|
82
setup_ubuntu.sh
Normal file
82
setup_ubuntu.sh
Normal file
@ -0,0 +1,82 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
SCRIPT_NAME=$(basename "$0")
|
||||||
|
echo "\n=== Ubuntu Repos and Plugins Setup Script ===\n"
|
||||||
|
|
||||||
|
# Determine Ubuntu codename
|
||||||
|
CODENAME=$(lsb_release -cs)
|
||||||
|
echo "Detected Ubuntu codename: $CODENAME"
|
||||||
|
|
||||||
|
# Function to add PPA if not present
|
||||||
|
add_ppa() {
|
||||||
|
local PPA="$1"
|
||||||
|
if ! grep -Rq "${PPA#*:}" /etc/apt/sources.list.d; then
|
||||||
|
echo "Adding PPA: $PPA"
|
||||||
|
sudo add-apt-repository -y "$PPA"
|
||||||
|
else
|
||||||
|
echo "PPA already exists: $PPA"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# Function to add Docker repo
|
||||||
|
add_docker_repo() {
|
||||||
|
local KEYRING="/usr/share/keyrings/docker-archive-keyring.gpg"
|
||||||
|
if [ ! -f "$KEYRING" ]; then
|
||||||
|
echo "Adding Docker GPG key and repository"
|
||||||
|
curl -fsSL https://download.docker.com/linux/ubuntu/gpg |
|
||||||
|
sudo gpg --dearmor -o "$KEYRING"
|
||||||
|
echo "deb [arch=amd64 signed-by=$KEYRING] https://download.docker.com/linux/ubuntu $CODENAME stable" |
|
||||||
|
sudo tee /etc/apt/sources.list.d/docker.list >/dev/null
|
||||||
|
else
|
||||||
|
echo "Docker repository already configured"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# Add PPAs
|
||||||
|
add_ppa ppa:fish-shell/release-3
|
||||||
|
add_ppa ppa:neovim-ppa/unstable
|
||||||
|
add_ppa ppa:zhangsongcui3371/fastfetch
|
||||||
|
|
||||||
|
# Add Docker repo
|
||||||
|
add_docker_repo
|
||||||
|
|
||||||
|
# Update package list
|
||||||
|
echo "\nUpdating package lists..."
|
||||||
|
sudo apt update
|
||||||
|
|
||||||
|
# Core packages to install
|
||||||
|
CORE_PKGS=(docker-ce docker-ce-cli containerd.io fastfetch neovim fish tealdeer)
|
||||||
|
|
||||||
|
# Install each package, skip if not found
|
||||||
|
for pkg in "${CORE_PKGS[@]}"; do
|
||||||
|
if apt-cache show "$pkg" >/dev/null 2>&1; then
|
||||||
|
echo "Installing $pkg..."
|
||||||
|
sudo apt install -y "$pkg"
|
||||||
|
else
|
||||||
|
echo "Package not found in repos, skipping: $pkg"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
# Fisher and fish plugins
|
||||||
|
echo "\nInstalling Fisher and fish plugins..."
|
||||||
|
fish -c 'curl -sL https://git.io/fisher | source && fisher install jorgebucaran/fisher'
|
||||||
|
fish -c 'fisher install bruno-ricard/fish-autopair Pure-Fish/pure'
|
||||||
|
|
||||||
|
# Atuin installation
|
||||||
|
if ! command -v atuin >/dev/null 2>&1; then
|
||||||
|
echo "\nInstalling Atuin"
|
||||||
|
curl -sS https://raw.githubusercontent.com/ellie/atuin/main/install.sh | bash
|
||||||
|
else
|
||||||
|
echo "Atuin already installed"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Change default shell to fish
|
||||||
|
if [ "$SHELL" != "$(which fish)" ]; then
|
||||||
|
echo "Changing default shell to fish"
|
||||||
|
chsh -s "$(which fish)"
|
||||||
|
else
|
||||||
|
echo "Default shell is already fish"
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "\n=== Setup Complete! Restart your terminal to apply changes. ==="
|
@ -2,15 +2,15 @@
|
|||||||
"layer": "top",
|
"layer": "top",
|
||||||
"position": "top",
|
"position": "top",
|
||||||
//"height": 20,
|
//"height": 20,
|
||||||
"margin-left": 10,
|
"margin-left": 0,
|
||||||
"margin-bottom": 0,
|
"margin-bottom": 0,
|
||||||
"margin-right": 10,
|
"margin-right": 0,
|
||||||
"spacing": 8,
|
"spacing": 8,
|
||||||
"modules-left": [
|
"modules-left": [
|
||||||
"custom/startmenu",
|
"custom/startmenu",
|
||||||
"backlight",
|
"backlight",
|
||||||
|
"wireplumber",
|
||||||
"battery",
|
"battery",
|
||||||
// "network",
|
|
||||||
"hyprland/workspaces",
|
"hyprland/workspaces",
|
||||||
"niri/workspaces",
|
"niri/workspaces",
|
||||||
"sway/workspaces"
|
"sway/workspaces"
|
||||||
@ -21,9 +21,8 @@
|
|||||||
"modules-right": [
|
"modules-right": [
|
||||||
"custom/screenshot",
|
"custom/screenshot",
|
||||||
"tray",
|
"tray",
|
||||||
"custom/wl-gammarelay-brightness",
|
// "custom/wl-gammarelay-brightness",
|
||||||
"custom/wl-gammarelay-temperature",
|
// "custom/wl-gammarelay-temperature",
|
||||||
"wireplumber",
|
|
||||||
"clock",
|
"clock",
|
||||||
"custom/swaync",
|
"custom/swaync",
|
||||||
],
|
],
|
||||||
@ -59,16 +58,7 @@
|
|||||||
"format-plugged": " {capacity}%",
|
"format-plugged": " {capacity}%",
|
||||||
"format-icons": ["", "", "", "", ""],
|
"format-icons": ["", "", "", "", ""],
|
||||||
},
|
},
|
||||||
/*
|
|
||||||
"network": {
|
|
||||||
"interval": 3,
|
|
||||||
"format": "{bandwidthUpBytes} {bandwidthDownBytes}",
|
|
||||||
"format-disconnected": " ",
|
|
||||||
"on-click": "alacritty -e zenith",
|
|
||||||
"on-click-right": "corestats",
|
|
||||||
"tooltip-format": "{ifname}\n{ipaddr}/{cidr}\n",
|
|
||||||
},
|
|
||||||
*/
|
|
||||||
"hyprland/workspaces": {
|
"hyprland/workspaces": {
|
||||||
"all-outputs": true,
|
"all-outputs": true,
|
||||||
"format": "{name}",
|
"format": "{name}",
|
||||||
@ -96,7 +86,7 @@
|
|||||||
"on-click": "activate",
|
"on-click": "activate",
|
||||||
"on-click-middle": "close",
|
"on-click-middle": "close",
|
||||||
},
|
},
|
||||||
|
/*
|
||||||
"custom/screenshot": {
|
"custom/screenshot": {
|
||||||
"format": " ",
|
"format": " ",
|
||||||
"on-click": "sh ~/.config/waybar/scripts/Screenshot-Area.sh",
|
"on-click": "sh ~/.config/waybar/scripts/Screenshot-Area.sh",
|
||||||
@ -104,7 +94,7 @@
|
|||||||
"on-click-middle": "sh ~/.config/waybar/scripts/Screenshot-Fullscreen.sh",
|
"on-click-middle": "sh ~/.config/waybar/scripts/Screenshot-Fullscreen.sh",
|
||||||
"tooltip": false,
|
"tooltip": false,
|
||||||
},
|
},
|
||||||
|
*/
|
||||||
"tray": {
|
"tray": {
|
||||||
"spacing": 8,
|
"spacing": 8,
|
||||||
},
|
},
|
||||||
@ -127,7 +117,7 @@
|
|||||||
"on-scroll-down": "busctl --user -- call rs.wl-gammarelay / rs.wl.gammarelay UpdateTemperature n -100",
|
"on-scroll-down": "busctl --user -- call rs.wl-gammarelay / rs.wl.gammarelay UpdateTemperature n -100",
|
||||||
"tooltip": false
|
"tooltip": false
|
||||||
},
|
},
|
||||||
|
/*
|
||||||
"wireplumber": {
|
"wireplumber": {
|
||||||
"on-click": "pwvucontrol",
|
"on-click": "pwvucontrol",
|
||||||
"on-click-right": "easyeffects",
|
"on-click-right": "easyeffects",
|
||||||
@ -142,14 +132,38 @@
|
|||||||
"default": ["", "", ""],
|
"default": ["", "", ""],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
*/
|
||||||
|
|
||||||
|
"wireplumber": {
|
||||||
|
"on-click": "pwvucontrol",
|
||||||
|
"on-click-right": "easyeffects",
|
||||||
|
"on-click-middle": "pamixer -t && swayosd-client --output-volume mute-toggle",
|
||||||
|
"on-scroll-down": "pamixer -d 1 && swayosd-client --output-volume -1",
|
||||||
|
"on-scroll-up": "pamixer -i 1 && swayosd-client --output-volume +1",
|
||||||
|
"format": "{icon} {volume}%",
|
||||||
|
"format-muted": "MUTE",
|
||||||
|
"format-source": "",
|
||||||
|
"format-source-muted": "",
|
||||||
|
"format-icons": {
|
||||||
|
"default": ["", "", ""]
|
||||||
|
},
|
||||||
|
},
|
||||||
|
/*
|
||||||
"clock": {
|
"clock": {
|
||||||
"interval": 60,
|
"interval": 60,
|
||||||
"align": 0,
|
"align": 0,
|
||||||
"rotate": 0,
|
"rotate": 0,
|
||||||
"tooltip-format": "<tt><big>{calendar}</big></tt>",
|
"tooltip-format": "<tt><big>{calendar}</big></tt>",
|
||||||
"format": " {:%H:%M}",
|
"format": " {:%d.%m.%Y}",
|
||||||
"format-alt": " {:%a %b %d, %G}",
|
"format-alt": " {:%b%d %a,%G}",
|
||||||
|
},
|
||||||
|
*/
|
||||||
|
"clock": {
|
||||||
|
"interval": 60,
|
||||||
|
"align": 0,
|
||||||
|
"rotate": 0,
|
||||||
|
"format": " {:%a %d %H:%M}",
|
||||||
|
"tooltip-format": "<tt><big>{:%A, %d %B %Y}</big></tt>",
|
||||||
},
|
},
|
||||||
|
|
||||||
"custom/swaync": {
|
"custom/swaync": {
|
||||||
@ -168,4 +182,3 @@
|
|||||||
"escape": true,
|
"escape": true,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
grim -g "$(slurp)" - | swappy -f -
|
|
@ -1,3 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
grim - | wl-copy -t image/png;notify-send "Screenshot copied to clipboard"
|
|
@ -1,3 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
grim -g "$(hyprctl clients -j | jq '.[] | select(.hidden | not) | "\(.at[0]),\(.at[1]) \(.size[0])x\(.size[1])"' -r | slurp)" - | swappy -f -
|
|
@ -1,4 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
## only support EN
|
|
||||||
grim -g "$(slurp)" - | tesseract -l "eng" stdin stdout | wl-copy;notify-send "OCR content copied to clipboard"
|
|
@ -1,3 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
grim -g "$(swaymsg -t get_tree | jq -r '.. | select(.pid? and .visible?) | .rect | "\(.x),\(.y) \(.width)x\(.height)"' | slurp)" - | swappy -f -
|
|
@ -1,6 +0,0 @@
|
|||||||
allow_images=true
|
|
||||||
hide_scroll=true
|
|
||||||
no_actions=false
|
|
||||||
term=alacritty
|
|
||||||
mode=drun
|
|
||||||
--show
|
|
@ -1,46 +0,0 @@
|
|||||||
* {
|
|
||||||
font-family: "Hack", monospace;
|
|
||||||
}
|
|
||||||
|
|
||||||
window {
|
|
||||||
background-color: #3B4252;
|
|
||||||
}
|
|
||||||
|
|
||||||
#input {
|
|
||||||
margin: 5px;
|
|
||||||
border-radius: 0px;
|
|
||||||
border: none;
|
|
||||||
background-color: #3B4252;
|
|
||||||
color: white;
|
|
||||||
}
|
|
||||||
|
|
||||||
#inner-box {
|
|
||||||
background-color: #383C4A;
|
|
||||||
}
|
|
||||||
|
|
||||||
#outer-box {
|
|
||||||
margin: 2px;
|
|
||||||
padding: 10px;
|
|
||||||
background-color: #383C4A;
|
|
||||||
}
|
|
||||||
|
|
||||||
#scroll {
|
|
||||||
margin: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#text {
|
|
||||||
padding: 4px;
|
|
||||||
color: white;
|
|
||||||
}
|
|
||||||
|
|
||||||
#entry:nth-child(even){
|
|
||||||
background-color: #404552;
|
|
||||||
}
|
|
||||||
|
|
||||||
#entry:selected {
|
|
||||||
background-color: #4C566A;
|
|
||||||
}
|
|
||||||
|
|
||||||
#text:selected {
|
|
||||||
background: transparent;
|
|
||||||
}
|
|
Reference in New Issue
Block a user