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

推荐订阅源

V
V2EX
P
Proofpoint News Feed
D
DataBreaches.Net
C
Check Point Blog
L
LangChain Blog
量子位
美团技术团队
Vercel News
Vercel News
人人都是产品经理
人人都是产品经理
N
Netflix TechBlog - Medium
V
Visual Studio Blog
Microsoft Security Blog
Microsoft Security Blog
博客园 - 【当耐特】
MongoDB | Blog
MongoDB | Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Last Week in AI
Last Week in AI
The GitHub Blog
The GitHub Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
U
Unit 42
腾讯CDC
M
MIT News - Artificial intelligence
Microsoft Azure Blog
Microsoft Azure Blog
Blog — PlanetScale
Blog — PlanetScale

CachyOS Forum - Latest posts

Ran into a frozen black screen issue with latest update Niri Settings GUI Not Appearing Update to Gnome 50 and I'm getting black/blank screen on NVIDIA with hybrid graphics My JBL Quantum 350 headphones dont play sound 90% of the time on linux while on windows it plays audio 99% of the time Niri/Noctalia Shell notifications Getting a black screen after alt-tabbing too many times Rog-control-center Duplicate keyboard and mouse in system settings? Games running very poorly after first session (semi-solved, still need help though!) Amdgpu random hangs (does cachy perhaps plan to carry patches for this)? A little something. The adj script that replaces GNU fmt for non-ASCII text Mouse scroll wheel issues - ratchet Can't start steam after updates of today (17 April) Balena etcher or ventoy QEMU Bridge setup - Maybe already known but I found it pretty difficult to do and needed much reading Multi-boot install: what do I do about my /boot and /boot/efi partition? Do you collect all the solutions and post them on Wiki or Forum? System update - lts headers invalid or corrupted Sick to death of updates killing my games! I messed up my stuff again and cant download any thing now. error below Got Logitech MX4 with Haptic working in CachyOS Need help with the performance button on my Acer Nitro V16 AI Bailing out, you are at your own Troubles in the Starfield What is so special about the new Linux Kernel 7? "Issue: Display brightness is locked at a low level after waking from sleep on CachyOS (latest update) Balena etcher or ventoy Help with kernel update, emergency mode Issue happening only on wayland Display not recognised - low resolution
Swayimg image viewer setup with dynamic niri noctalia the...
@V0lcaneR · 2026-05-01 · via CachyOS Forum - Latest posts
Well, I needed a basic default image viewer for my niri + noctalia install. So spent the last couple of days setting up a swayimg template that is compatible with noctalias user templates. I will be talking about setting this up here. I will NOT be talking about setting up keybinds right now as I haven’t gotten to that part yet. Before that though a little about my niche use-case: I use noctalias wallpaper colors (Faithful method) + scheduled wallpaper changes once per hour. This results in me wanting live theme reloads on almost all of my software for cohesion since I have a habit of leaving a lot of software open. If you don’t need the live theme reload then just copy the setColors.lua file as your init.lua and modify it to your hearts content. (also make sure that the noctalia user templates targets your init file) With that out of the way lets begin: The swayimg config file is init.lua and uses functions to set configuration variables. The software itself has 3 modes “viewer”, “gallery” and “slideshow”. Each of these has its own config functions. For the purpose of theming we care about the on_signal config functions and the dofile lua function. The on_signal function is called when swayimg recieves an external signal from the system. In this case we will be using the “USR1” signal, but “USR2” is also supported by the function. The dofile function accepts a single parameter which is a path to another lua file, it finds it and runs it. It requires absolute path as it couldn’t find the file when i used the ~ shortcut. The purpose of on_signal is to act as a hook to use to tell swayimg to reload its theme. We need the dofile function to load a separate file that will be the template target. This is because swayimg keeps a copy of the init file in memory and does not refresh it. So to start you want to navigate to one of the directories listed in the config . I used option 2 personally. You want to create 2 files: init.lua and setColors_temlpate.lua ( setColors.lua will be generated by noctalia) init.lua : swayimg.text.set_size(24) swayimg.viewer.set_default_scale("width") swayimg.viewer.enable_loop("true") -- This section sets the colors path="<your_path>/setColors.lua" dofile(path) swayimg.viewer.on_signal("USR1", function() dofile(path) end) swayimg.slideshow.on_signal("USR1", function() dofile(path) end) swayimg.gallery.on_signal("USR1", function() dofile(path) end) setColors_temlpate.lua : swayimg.text.set_foreground(0xdd{{colors.on_surface.default.hex_stripped}}) swayimg.text.set_background(0xaa{{colors.surface.default.hex_stripped}}) swayimg.text.set_shadow(0xff{{colors.shadow.default.hex_stripped}}) swayimg.viewer.set_mark_color(0xee{{colors.primary.default.hex_stripped}}) swayimg.viewer.set_window_background(0xaa{{colors.surface.default.hex_stripped}}) -- you can customize the transparency chessboard, keep both commented for the default chessboard style. swayimg.viewer.set_image_background(0xcc{{colors.surface_variant.default.hex_stripped}}) -- swayimg.viewer.set_image_chessboard(25, 0xee{{colors.tertiary.default.hex_stripped | set_lightness 10 | set_saturation 10}}, 0xee{{colors.tertiary.default.hex_stripped | set_lightness 30 | set_saturation 10}}) swayimg.gallery.set_mark_color(0xee{{colors.primary.default.hex_stripped}}) swayimg.gallery.set_border_color(0xee{{colors.primary.default.hex_stripped}}) swayimg.gallery.set_selected_color(0x11{{colors.secondary.default.hex_stripped}}) swayimg.gallery.set_unselected_color(0x11{{colors.surface.default.hex_stripped}}) swayimg.gallery.set_window_color(0xaa{{colors.surface.default.hex_stripped}}) swayimg.slideshow.set_mark_color(0xee{{colors.primary.default.hex_stripped}}) swayimg.slideshow.set_window_background(0xaa{{colors.surface.default.hex_stripped}}) swayimg.slideshow.set_image_background(0xcc{{colors.surface_variant.default.hex_stripped}}) -- swayimg.slideshow.set_image_chessboard(25, 0xee{{colors.tertiary.default.hex_stripped | set_lightness 10 | set_saturation 10}}, 0xee{{colors.tertiary.default.hex_stripped | set_lightness 30 | set_saturation 10}}) -- swayimg.text.set_status("Ctrl+Alt+R 0x99{{colors.surface.default.hex_stripped}}") Then add the following to your user-templates.toml (if the file doesn’t exist you need to enable user templates in noctalia first): [templates.swayimg] input_path = "<your_path>/setColors_template.lua" output_path = "<your_path>/setColors.lua" post_hook = "kill -s USR1 $(pidof swayimg)" The horrifying kill command just sends the USR1 signal to every pid of swayimg (this works with multiple instances too) Lastly you need to regenerate a color scheme to generate the setColors.lua file and you are done! If you dont care about live theming then just add whatever swayimg configuration you want to the setColors_template.lua file, then modify the user-templates.toml by redirecting the output_path to init.lua and then remove the post_hook. This will reload the theme when you restart swayimg. I am new to this so I probably made a bunch of mistakes here. I’d appreciate any feedback you have and I hope this helped!