You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

搭配TaskWarrior使用时,如何查找TimeWarrior节假日文件位置?

Finding TimeWarrior Holiday Files for Community-Repo Installs

Great question—when you install TimeWarrior from a community repository, the default holiday file paths listed in the official docs often don’t match your system’s actual layout. Let’s walk through reliable ways to locate those files, or set up a custom one if needed:

1. Use your package manager to track down installed files

Most Linux package managers let you list every file installed by a package, which is perfect for finding hidden holiday files. Run the command that matches your distro:

  • Debian/Ubuntu-based systems:
    dpkg -L timewarrior | grep -i holiday
    
  • RedHat/CentOS/Fedora:
    rpm -ql timewarrior | grep -i holiday
    
  • Arch Linux/Manjaro:
    pacman -Ql timewarrior | grep -i holiday
    

This filters the full list of TimeWarrior files to only show those related to holidays, giving you their exact system paths.

2. Do a global search for holiday files

If the package manager method doesn’t turn up anything, use the find command to scan your entire filesystem for holiday-related files:

find / -name "holidays.*" 2>/dev/null

The 2>/dev/null part just suppresses those annoying permission-denied errors you get when searching system directories you don’t have access to.

3. Fallback: Create your own custom holiday file

If you can’t find a pre-installed system-wide holiday file, you can easily create a user-specific one that TimeWarrior will recognize. Just make a file named holidays in your TimeWarrior user directory:

~/.timewarrior/holidays

You can build this file from scratch using the format TimeWarrior expects (one holiday per line, in YYYY-MM-DD format, with an optional description like 2024-12-25 Christmas).

Once you have the path to your holiday file (whether system-wide or custom), add this line to your TimeWarrior config file (usually ~/.timewarrior/timewarrior.cfg) to enable it:

holidays /path/to/your/holidays.file

内容的提问来源于stack exchange,提问作者Philip Koch

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.19 08:43:20